Repository navigation
NAMESPACE XL-4: reference-derived dependency graph instrument - #11202
gunbai-bot[bot] wants to merge 43 commits into
Conversation
…ng since it was written v2.compiler.resolution_provenance models one name resolved at one position answering with its target and the module that contains it, and it models the dependency fold over those answers. Nothing in the corpus produced a ReferenceSite: the only constructors were five hand-authored fixture rows in one witness, which makes a well-shaped module dangling in DESIGN section 3c's exact sense -- a declaration whose consumers are described rather than executed. This is that producer. ONE COLLECTOR, TWO STAGES. NAMESPACE-XL's XL-0 denominator and XL-4's reference-derived graph ask the same question of the tree -- where is every mention, and at what containment position -- and differ only in what they fold the answers into. Two collectors would be the section 3 fork with the widest blast radius, because a mention one missed would be silently absent from both a denominator and a dependency edge. Landed as its own commit so XL-4 consumes it rather than building a second one. A declaration's NAME is an edge label and never a node, so an Atom is a reference by construction rather than by a filter that could be wrong. The two exclusions -- module header metadata, and _node_projection parse projections that would double-count every mention -- are recognised by the same predicates v2.compiler.symbol_index_fill consults. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5avL86NJ1YoyyezZj2BuM
…trument. Fill the existing swap-body producer from resolved qualified-name sites (never import syntax), report typed diffs against the import graph, and hold the stage delivery receipt. Do not swap dependency_resolution_facts_live. Co-authored-by: Cursor <cursoragent@cursor.com>
Blanket filesystem import on module_graph forked List onto std.types and the new claim tests were censored at the enrolment ceiling; the producer stays on the named swap body and tools.reference_derived_graph.main remains the RED. Co-authored-by: Cursor <cursoragent@cursor.com>
…ng since it was written v2.compiler.resolution_provenance models one name resolved at one position answering with its target and the module that contains it, and it models the dependency fold over those answers. Nothing in the corpus produced a ReferenceSite: the only constructors were five hand-authored fixture rows in one witness, which makes a well-shaped module dangling in DESIGN section 3c's exact sense -- a declaration whose consumers are described rather than executed. This is that producer. ONE COLLECTOR, TWO STAGES. NAMESPACE-XL's XL-0 denominator and XL-4's reference-derived graph ask the same question of the tree -- where is every mention, and at what containment position -- and differ only in what they fold the answers into. Two collectors would be the section 3 fork with the widest blast radius, because a mention one missed would be silently absent from both a denominator and a dependency edge. Landed as its own commit so XL-4 consumes it rather than building a second one. A declaration's NAME is an edge label and never a node, so an Atom is a reference by construction rather than by a filter that could be wrong. The two exclusions -- module header metadata, and _node_projection parse projections that would double-count every mention -- are recognised by the same predicates v2.compiler.symbol_index_fill consults. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5avL86NJ1YoyyezZj2BuM
Delete the module_graph mention walk. The swap body consumes collect_module_reference_sites and module_dependencies_from_sites. Co-authored-by: Cursor <cursoragent@cursor.com>
The swap body folds collect_module_reference_sites through module_dependencies_from_sites. Witness tests over the fixture identities require a reference-only edge, no unused-import edge, exactly one shared edge, and go red on a mutant that re-admits import-decl mentions. Co-authored-by: Cursor <cursoragent@cursor.com>
|
review 64754 asked for a fix of That function is gone on Discriminators are Not landing: still serialize behind #11201; dag/src freeze until #10940. — sent from warm-ibex-518 |
A fixture whose only provider mention sits in a call argument yields no reference-derived edge on parse_module trees (XL-4 ingest) and on normalized trees. Trigger is eager-raven-113's body-lowering repair. Co-authored-by: Cursor <cursoragent@cursor.com>
Your collector over parse_module trees does not recover type-position or out-of-call body mentions either; the rows record that absence until lowering and site collection catch up. Co-authored-by: Cursor <cursoragent@cursor.com>
…cle only. The walk sees type-position ProvidedMarker and still misses body-value and call-arg names. It is not the edge producer. Co-authored-by: Cursor <cursoragent@cursor.com>
… as a graph. An unread module must not look like a leaf. The fold carries unreadable_roots; the production Outcome refuses unless the fold is total. Co-authored-by: Cursor <cursoragent@cursor.com>
module_roots_from_source_root_ingest then normalized_tree_roots_to_nodes is the tree. On that route a qualified value mention is still missing, same as type-position and call contents; those rows are measurements of today. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… a callee with no arguments is missing too. consumer_type_only has no call; the edge is still absent. The trigger is lowering widened to type positions, not body-lowering alone. Co-authored-by: Cursor <cursoragent@cursor.com>
A qualified cross-module mention is missing; a bare same-module name would not make an edge. A non-empty site list is not a usable graph. Co-authored-by: Cursor <cursoragent@cursor.com>
Call-argument and type-position stay tree-side. The qualified body mention retires when the collector reassembles dag_field_access_body_node, not when lowering lands. Co-authored-by: Cursor <cursoragent@cursor.com>
This fixture's type-position is a qualified name; the full spelling is still not a site. That stays with collector reassembly, not lowering. Call and callee stay tree-side. Co-authored-by: Cursor <cursoragent@cursor.com>
…e does not appear. That absence is resolution or edge derivation, not a declared type-position frontier and not lowering. Call contents stay eager-raven; qualified body stays the collector access-chain gap. Co-authored-by: Cursor <cursoragent@cursor.com>
A locally declared LocalMarker in type position is found. The type-position miss on a dotted name is the same class as a qualified body mention, not lowering. Co-authored-by: Cursor <cursoragent@cursor.com>
… the missing class. Co-authored-by: Cursor <cursoragent@cursor.com>
A locally declared LocalFieldOnly used only as a field type is missing on the production collector route, while a bare parameter type in the same module is found, so field position is independent of qualification. Co-authored-by: Cursor <cursoragent@cursor.com>
…erified. Atom and named-edge search over the ingested root finds the parameter type and does not find the wrapper name, field name, or field type, so the collector-absent field-type row gets no collector trigger until a drop is separated from a third representation. Co-authored-by: Cursor <cursoragent@cursor.com>
Call contents stay on eager-raven-113; the field-type census cause stays unverified. Co-authored-by: Cursor <cursoragent@cursor.com>
…bility. Stay collector-only: do not feed parse-QN sites from the lens, which would recover only type-position names from a tree the resolver does not consume. Co-authored-by: Cursor <cursoragent@cursor.com>
Qualified type-position on that oracle is the dotted-reference capability, not lowering. Co-authored-by: Cursor <cursoragent@cursor.com>
… the instrument (review 64925) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AGawTbuANGBSUghDFv4hjW
|
Review 64925 is correct on both findings, fixed in 76f8c41.
|
…rt edges once (review 64967) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AGawTbuANGBSUghDFv4hjW
claim_batch (local, session cgroup; claim_batch does not force floor warm)All listed witnesses PASS. Warm enrolment (
Head after takeover: will match this branch once CI picks up |
Floor run 34753104626 stored xl4_fixture_trees warm; the remaining over-margin rows were the parse-tree edge producer (~400-507ms). Normalized trees already execute that fold. Parse-tree claims now walk collect_module_reference_sites on the served parse root. Co-authored-by: Cursor <cursoragent@cursor.com>
The claim strings were a second corpus and had already drifted from the files the instrument reads. Warm ingest now filesystem_reads those files and uses located_roots_from_source_root_ingest for the production half. A missing provider or consumer returns the refused sentinel instead of a shorter pair. Pool build carries each module QN into emit (review 65395); the production Outcome matches the first unreadable root rather than widening after is_total. Co-authored-by: Cursor <cursoragent@cursor.com>
… no longer an import stand-in (review 65438) qualified_name_shape_precondition is the one O(1) spine check on v2.std.qualified_name. The collector calls it instead of re-spelling head/tail. reference_derived_resolution_facts is the producer the instrument already runs; the _flagged_pending_reference_producer wrapper is deleted rather than left as a nickname. Co-authored-by: Cursor <cursoragent@cursor.com>
|
review 65438: two §3 forks closed on 41721a1.
Merged origin/main (merge commit, no rebase). claim_batch (local, completed)
Warm enrolment ( |
…lector keys on the Outcome (review 65558) review 65558 found that qualified_name_shape_precondition / edge_is_qualified_name_spine_label re-stated, as Bools beside the fold, the spine-label knowledge qn_fold_step already owns: a second representation of one constraint (DESIGN 3, 5) on a compiler-closure member, and a gate that could drift from the fold it guarded and drop dotted mentions in silence. The O(1) gate is now the first step of qualified_name_from_node itself: a root that is not a two-child head/tail Conj is refused with ^qualified_name_shape_absent before any child is folded (fold_node is a bottom-up catamorphism with no pruning, so the gate must precede it to keep the collector's walk linear). Both Bools are deleted. reference_site_collector dispatches on the connective only and keys on the fold's Outcome; it carries no spine-label knowledge. Behaviour preserved for every caller: the only change is that an empty-root Conj is now Rejected(shape_absent) instead of Accepted(Empty), and every consumer (03_resolve, dag.dag header/alias readers, reference_deps, target_model, the collector) already treated that case as not-a-qualified-name. Executed locally (claim_batch, scoped): reference_derived_graph_witness 5/5, reference_derived_graph_production_ingest 16/16, reference_derived_graph_call_arg_tree 9/9, qualified_name/path_algebra 6/6. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013k9hjAXuaD1HiC1yzd4wnC
|
review 65558 (cursor, on the auto-duplicate #11293, same head) is addressed at 56cf735: the QN shape gate is now the first step of |
…itional zip (review 65600)
review 65600: module_graph recovered the path-to-tree association by zipping the ingest
list against the normalized-root list positionally, guarded only by a cardinality check.
That is validation where construction was available (DESIGN 5: completeness is an identity
join, not a count equality), and a reordering upstream would have mis-attributed every
reference-derived edge to the wrong file while the check passed.
The association now exists by construction where it is produced: program_assembly's fold
carries LocatedNormalizedTree { path, tree } as its root state
(program_assembly_fold_ingest_located / located_module_roots_from_source_root_ingest), and
the tree-only ProgramAssemblyFoldOk surface that 00_compile, frontier_probe and the long
tests consume is derived from it by projection (program_assembly_fold_state_from_located) -
one authority, no consumer of the existing surface changes shape. module_graph maps the
located fold directly; zip_located_roots, IngestNodeZipState and the zip-mismatch
diagnostic are deleted: an unpaired root has no representation.
Executed locally (claim_batch, scoped): reference_derived_graph_witness 5/5,
reference_derived_graph_production_ingest 16/16, reference_derived_graph_call_arg_tree 9/9,
provenance/loaded_carrier_receipts 3/3, program_assembly/real_ingest 1/3 - the two failing
claims (module_roots_parse, host_manifest_receipt) fail identically on the unmodified
branch head in this environment (host manifest fixture), verified by a control run.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013k9hjAXuaD1HiC1yzd4wnC
|
review 65600 addressed at 9583dd2: the path↔tree association is now carried out of |
…e the mutant at the test boundary; one Symbol equality (review 65639) review 65639, finding 1: reference_derived_edges_from_located_roots carried include_import_syntax: Bool, whose only true-caller was the test mutant, so the XL-6 swap target for dependency_resolution_facts_live answered with reference-derived OR import-syntax-derived edges by a caller-supplied flag - a DESIGN 3 meaning fork and a DESIGN 5 escape hatch on the producer's defining property (an unused import must not mint an edge). The flag is deleted: the production site selection is a fixed composition (collect, then exclude import-syntax mentions), and the edge stage over an already-selected collection is exposed as reference_edges_for_located_root_sites, consumed by the production composition and by the witness test's mutant, which now feeds the collector's raw sites into that stage at the test boundary. Finding 2: reference_derived_symbol_eq was the tenth module-local re-mint of Symbol equality with no canonical one in v2/std (DESIGN 2: net concepts must not grow by re-invention). v2.std.node, the module that owns Symbol, now exports symbol_eq; this lens consumes it. The other nine aliases are pre-existing debt outside this change. Executed locally (claim_batch, scoped): reference_derived_graph_witness 5/5 (the re-admitting mutant still discriminates), reference_derived_graph_production_ingest 16/16, reference_derived_graph_call_arg_tree 9/9. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013k9hjAXuaD1HiC1yzd4wnC
|
review 65639 addressed at d6b94c9: (1) |
…onj is the empty name again (review 65666) review 65666: the gate folded into qualified_name_from_node narrowed acceptance for one root shape - a zero-child Conj, which main accepts as the empty name (qn_fold_init) and the gate refused. That was an unstated divergence on a v2/std authority with consumers outside this diff (target_model, dag.dag header/alias readers, reference_deps, 03_resolve), which DESIGN 3b forbids. The gate now reproduces main's acceptance set exactly: zero-child Conj -> Empty, two-child head/tail spine -> folded, every other root -> refused with the same ^qualified_name_structure_invalid reason as before; the only change from main is that the refusal precedes any child fold. The review's second shape - a childless Atom root - was already refused on main by qualified_name_from_node's `_` arm (qn_fold_init's Atom arm is reached only for spine children), and a single-segment module header parses as a two-child spine, so it is not a divergence. Executed locally (claim_batch, scoped): reference_derived_graph_witness 5/5, reference_derived_graph_production_ingest 16/16, reference_derived_graph_call_arg_tree 9/9, qualified_name/path_algebra 6/6. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013k9hjAXuaD1HiC1yzd4wnC
|
review 65666 addressed at b7c2f67. Accepted: the zero-child |
…them Review 65769 is right, and its sharpest point is the one that decides it: the same commit that deleted measurement sentences from the driver template on DESIGN section 6 grounds MOVED those numbers into this annotation rather than dissolving them. compiler_entry.dag is no more reachable by a fold than the template was. And the recurring_failure_mode row this PR files exists precisely because a transcribed figure in this very annotation went stale and was inherited as settled -- landing four more was the next instance of the class being filed. WHAT REPLACES THEM. The four folds are still NAMED -- SUCC3 at 45a9105, SUCC6 at 4011bf9, #11256 at T=f5e8a568, #11202 at T=a3157d6a -- because a fold id is a citation that stays true, while remainder_nanos, the divisor and the hand-computed quotient are outputs that rot. The claims the numbers supported are kept as RELATIONS, which is what they were actually being used to assert: the per-module remainder is NOT constant across the four (the fourth refutes constancy), and both candidate spans come back an order of magnitude or more below the residual they were credited with, so both are falsified. The self-caveat the block used to carry -- 're-derive it by reading the line rather than trusting this list' -- is deleted rather than kept. It conceded the numbers were not the authority while still committing them, which is the concession the rule exists to refuse. The module_release paragraph is de-transcribed in the same pass even though the review cited only the fold table. It carried the identical defect two paragraphs up and sits in this PR's own diff; fixing only the flagged block would leave the class standing where a reviewer had just named it. Annotation-only, so no mirror moves. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013aZDLk2CxsCDznqn49Xhe8
|
Wind-down handoff — HOLD at Verified at this head: CI run 34783234335 green on all four required jobs; 1 dashboard approval (cursor, review 65688), 0 request-changes; GitHub CLEAN/MERGEABLE. The HOLD is a protocol/dependency hold, not a source finding against the XL-4 design:
Under the operator's wind-down no new work is opened to satisfy either. To resume: land #11201, take the exact-head native receipt for the resulting head of this PR ( |
|
Resume-recipe addendum: main now conflicts with this head in ONE file, |
Resolved: reference_site_collector.dag taken from #11201 (its home; the walker returns ReferenceSiteCollection with unreadable-root accounting; same exported shapes #11202's module_graph consumes); qualified_name.dag kept from #11202 (both sides had folded the O(1) gate into the fold's entry - one implementation kept, the reviewed verdict-preserving one); namespace_cut_stage, the two failure-mode rows and floor_pure_producer_share: both sides kept on their append surfaces, one superseded duplicate receipt dropped from absent_reads_identically_to_never_looked (main's longer revision kept), list punctuation repaired.
|
Superseded by the NAMESPACE-XL integration branch #11461 (operator direction 2026-09-16: one integration branch for the five floor-met PRs). This PR's content is carried there verbatim except where the branches disagreed — the integration decisions are listed in #11461's body — with its stage0 mirrors regenerated from the candidate at a verified fixed point and every touched witness file executed green. Review history stays here; branch kept. — sent from swift-bat-902 |
…carry the XL-4 fixture ingest as a prepared effect input
review 66826 on gunbc#11461: v2.workflow.legacy_repair_tap answered a bridge row with an
empty spelling (module_name == "" or name == "") with `Absent => acc` in BOTH the roster
fold and the observation fold - the row vanished uncounted while the roster digest still
attested a census that never counted it, and the drop was enrolled as intended behaviour.
DESIGN 5: a failure arm must refuse, never widen. Now ONE fold (admit_bridge_rows)
either admits (roster + observation rows, built together so they cannot disagree) or
refuses with the located rows (MalformedBridgeRow { index, module_name, name }); both
capture entries route the refusal through the capture outcome as
LegacyBaselineExecutionRefused { phase: RepairCensusPhase, cause: BridgeRowSpellingEmpty }
(new arm on LegacyBaselineCaptureRefusal, rendered by capture_refusal_label). The former
drop witness is now the discriminating RED empty_name_row_refuses_the_admission_located_by_index
(a well-formed sibling does not rescue the batch) beside the positive control.
Floor run 35059914771 on 557188a refused PureProducerShareWarmDispatchedEffect for
v2.test.claim.reference_derived_graph_fixture.xl4_fixture_trees (effects=11): the rule
landed on main in #11370 after #11202's last green run, and a warm row that reads the
world has an input its empty argument row cannot represent. Re-rostered in the shape that
rule prescribes: fixture_ingest is a PreparedEffectInput (the eleven committed fixture
modules under dag/test/fixture/reference_derived_graph/, acquired once at preparation,
content-keyed) and xl4_fixture_trees is a CarriedInputWarmRow over it
(ImplicitAcquisition); the plain warm row is removed. Measurements on both rows name the
runs and ledgers that re-derive the present-vs-absent verdict.
Executed locally (branch seed claim_batch, scoped): legacy_repair_tap_persisted_capture
5/5, legacy_repair_tap_live_bridge 3/3, legacy_baseline_capture 13/13,
floor_prepared_effect_input_ladder 7/7, floor/pure_producer_share_refusal 13/13,
reference_derived_graph_witness 5/5, reference_derived_graph_production_ingest 16/16.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013k9hjAXuaD1HiC1yzd4wnC
Summary
held_stage_delivery_receiptsentry is the withheld EMPTY list (no row appended), andReferenceSiteCollection/collect_module_reference_sitesare carried on this branch (reference_site_collector.dag is in this diff) — NAMESPACE XL-0B/C/D: repair-input origin roster on the v2 route #11201 is not a prerequisite. NAMESPACE XL-0B/C/D: repair-input origin roster on the v2 route #11201 (held on the gate_processes cost row / Floor cost ceiling: two tiers over eval_steps (grandfathered roster at 500ms-equiv, new witnesses at 100ms-equiv), CPU observed-only, §4b(3) drop #11195) takes one merge of main after this lands, resolvingnamespace_cut_stage,reference_site_collectorand theshared_precondition_re_derived_once_per_claim_framerow by taking both sides.collect_module_reference_sites(...).sitesandmodule_dependencies_from_sites. Unreadable roots travel onReferenceDerivedEdgeFold; the productionOutcomerefuses unlessreference_derived_edge_fold_is_total.module_roots_from_source_root_ingestthennormalized_tree_roots_to_nodes, never a bareparse_module.tools.reference_derived_graphstill reports typed diffs over a named source root.dependency_resolution_facts_liveis not swapped (XL-6).v2.lens.reference_depsparse-QN as a site source.Frontiers
Call contents / callee (bare name inside a call): eager-raven-113 lowering.
Qualified / dotted reference, any position: declared frontier, triggered on the dotted-reference capability, not on lowering. Includes
consumer_type_only. Parse-QN oracle sees type-position QNs and does not see body/call dotted mentions; that walk is not a producer.Bare field type / record-with-field: collector site for
LocalFieldOnlyis absent. Tree-side atom-and-label search:LocalParamMarkerpresent as an atom;LocalWrapper, field namef, andLocalFieldOnlyfindable as neither. Cause UNVERIFIED. No collector trigger onproduction_route_bare_field_type_site_is_missing_today_holds. Qualified field types remain untested.Bare PARAMETER type is not a lowering class. Falsifier:
consumer_type_bare_local— site is FOUND. Imported bareProvidedMarkersite is present; that edge is still absent (resolution or edge derivation).Test plan
claim_batchonv2.test.claim.reference_derived_graph_witnessclaim_batchonv2.test.claim.reference_derived_graph_production_ingestincluding the tree-side field-fixture census