cli: validate Copy content of source owning arrays

This commit is contained in:
dev committed 2026-10-08 09:01:58 +03:00
1 parent caf3b86e80
commit cfbe01a16f
42 files changed
+608 -3

No files matched your search

+8
View File
@@ -245,3 +245,11 @@ Q-042/spec 15 §10 closes source annotation gaps using the verifier's existing p
Thirty-four conformance fixtures cover valid runs/unused headers, forbidden positions, specialization and graph-diagnostic preservation. CLI checks exercise exact fields/positions, all diagnostic commands, package reachability and source/AIR/hosted parity. Existing invalid-source fixtures now expect the earlier E7005. No syntax, code, feature, verifier/runtime state or evaluation input changes; source bundle growth is recorded in docs/agent/README.md. Q-043 records the separately reproduced Copy-content validation gap. P6-2 remains open; the historical P6A-12 checkpoint does not establish completeness for the current language.
Validation: full conformance 1,303/1,303; all 34 new fixtures also pass with per-instruction collection. Unit tests and formatting checks pass. CLI integration passes 74 checks, existing generics/buffers/linear suites pass, and formatter passes 4,453 checks over 1,015 public files (1,007 parsed, eight existing syntax errors, 631 identical AIR outputs). Source coverage remains 121/121. Comparison of 983 preceding public sources finds only five expected invalid-type diagnostic changes, with no check acceptance changes and all other canonical lowerings identical. All 333 public AIR files preserve check diagnostics and acceptance. Independent Claude review passes after clarifying feature-gate precedence.
## P6-2 dynamic owning-array content (2026-10-08)
Q-043/spec 15 §10 enforces the existing Copy-content requirement for source `own_array<T>` annotations and `own.array` repeated values before AIR emission. One AST property query follows nominal fields/payloads and generic parameter states without calling lowering recursively. User type names precede built-ins; imported fields use their declaring namespace. Unused generic/static headers reject provable linear content; unknown parameters defer to substitution. A query-local cache shares completed branches, keeps positive witnesses final and rechecks negative results whenever a new positive proof is learned. Parameter-state queries repeat until that generation stabilizes; memo lookup is a linear scan, trading peak cost for implementation simplicity. Parameter rotations and deep nominal chains cannot hide a known linear leaf; iref content remains phantom and graph-root properties retain E2111.
The preserved invariant is that repeated dynamic heap arrays contain Copy values, so bulk release cannot destroy nested resources. AIR independently retains the same type/operation checks; allocation budgets, initialization, owner transfer, explicit release and deterministic interpreter behavior are unchanged. Valid Copy allocations run with explicit release; rejected annotations and repeated linear values report E7005 with `constraint` and `type_constructor`. Existing invalid-source codes/priority may change, including Copy violations preceding simultaneous layout errors. No syntax, code, feature, verifier/runtime state or evaluation input changes. Source bundle growth is recorded in docs/agent/README.md; P6-2 remains open.
Validation: full conformance 1,335/1,335; all 32 new fixtures also pass with per-instruction collection. Unit tests pass 128/128, including counted acyclic/cyclic diamond queries; the cyclic case failed before the cache correction. CLI integration passes 119 checks with exact annotations/value positions, nested package imports and source/AIR/hosted parity. Formatter passes 4,563 checks over 1,047 public files (1,039 parsed, eight existing syntax errors, 638 identical AIR outputs); source coverage remains 121/121. Comparison of all 1,017 preceding public sources preserves every check/lower result and all 631 successful canonical lowerings. No AIR verifier/runtime files change. Independent Claude review passes after checking shadowing, generic rotations, cache invalidation and the complete declaration snapshot used by the shared Copy predicate.