Skip to content

Whole-tree EXTRACT for model-grounding lens: concept_decl_facts(roots), name index, layer exclusion, worklist schema - #5966

Merged
briansrls merged 32 commits into
mainfrom
session/proud-hawk-833-grounding-extract
Jun 30, 2026
Merged

briansrls merged 32 commits into
mainfrom
session/proud-hawk-833-grounding-extract

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extends v2.lens.grounding from resolved-closure (~3 hits) to whole-tree EXTRACT over dsl + src/v2 (~3062 type concepts):

  • Fail-closed host builtin concept_decl_facts(roots) — parse-only filesystem walk (build_module_path_index + parse_file), syntactic head-type marshaling, no silent drops; coverage echoed to stderr.
  • Name→concept index (build_concept_name_index + first_coincident_target) replaces O(n²) linear scan.
  • Bidirectional layer-DAG exclusion (Job A) — meta self-coincidence (field/name only, not role words) + layer inversion; replaces is_structural_name meta half. Role words (id, etc.) flow to judge (Job B).
  • Worklist schema GroundingWorklistEntry with qualified coincides_with, layer_excluded, and coproduct residue evidence — feeds tidy-badger ITEM 4 ledger.
  • CONFIRM judge harness dsl/gunbc/tools/grounding_confirm.dag (haiku, GROUND/KEEP, starts_with grading, eval corpus authority).
  • Design doc docs/plans/model-grounding-lens-extract.md re-homes construction-justification prose removed in get rid of "Undecideable because" strings and rationale #5943/Fix main-red: grounding.dag construction-justification → post-#5943 carrier shape #5964.

Test plan

  • ./target/debug/gunbc run --source-root src/v2 --source-root dsl --entry src/v2/test/claim/grounding_lens_test.dag --function grounding_lens_witnesses --claim-run → true (3062 concepts, nonempty candidates, ~7.8 min)
  • ./target/debug/gunbc compile --source-root dsl --source-root src/v2 --dependency-pool-index primary-precedence --output-dir /tmp/out --target rust → 649 files, 0 diagnostics
  • grounding_confirm.dag compiles; live bare/enriched repro deferred (needs operator ANTHROPIC_API_KEY)
  • CI floor (claim_executor / gunbc_ci_floor_batches) — pending on push

Worker attestation

@gunbai-bot gunbai-bot Bot changed the title Whole-tree EXTRACT for the model-grounding lens — fail-closed concept_decl_facts(roots) host builtin + name-index + bidirectional layer-exclusion + CONFIRM judge + worklist schema feeding tidy-badger ITEM 4 (base off current main post-#5964; detailed brief incoming via dashboard message) Whole-tree EXTRACT for model-grounding lens: concept_decl_facts(roots), name index, layer exclusion, worklist schema Jun 29, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 29, 2026 21:33
briansrls added a commit that referenced this pull request Jun 29, 2026
Ship emit-only complexity_linearity_audit bin over parse_dag_file (swaps to
decl_facts when #5966 merges), host builtins, and syntactic witnesses that
bite on real wildcard-match debt sites — not floor fail-closed yet.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 30, 2026
Collapse dead triage_complexity branch, document triage_wildcard as
🟡 until decl_facts(#5966) on-carrier roster, note global builtin cache,
and document site-pinned witness ratchet semantics.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls and others added 15 commits June 30, 2026 00:48
The is_meta_model_field_name gate keeps widget.id flowing to the judge
while FieldRef.field~Field stays layer-excluded; document the split in
model-grounding-lens-extract.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
… into doc reachability.

model-grounding-lens-extract.md linked to a non-existent anemia-lens.md (dangling)
and was unreachable from ROADMAP/DESIGN roots (orphan). Drop the dead link and add
a back-link from reference-grounding-migration.md so doc_reachability witnesses pass.

Co-authored-by: Cursor <cursoragent@cursor.com>
cargo fmt --all --check failed in rust_tests gate on coproduct_reflection.rs.

Co-authored-by: Cursor <cursoragent@cursor.com>
reference-grounding-migration.md is emitted from reference_grounding_migration.dag;
the manual md edit for model-grounding-lens-extract reachability must live in the
.dag source so GeneratedArtifactDriftGate stays green.

Co-authored-by: Cursor <cursoragent@cursor.com>
… 04_method.dag.

Manual stage0 edit placed concept_decl_facts before module_declaration_facts; regen emits map_insert order from the dag source.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use short-circuit candidate detection instead of materializing the full worklist; run the memory-heavy whole-tree smoke in an isolated floor batch (excluded from discovery corpus via test/manual/) so it does not co-reside with the wide discovery shard.

Co-authored-by: Cursor <cursoragent@cursor.com>
…node sibling signals.

Removes hardcoded has_unrecognized_sibling/sibling_decode_optional false literals (§5 fail-open hygiene). Fixture tests now build ConceptDecl rows with Conj record nodes and use candidates_over_decls → entry_from_match.

Co-authored-by: Cursor <cursoragent@cursor.com>
Dashboard reported stale SHA 31f969d; latest HEAD already green locally. No code change.

Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls force-pushed the session/proud-hawk-833-grounding-extract branch from 7e9a235 to c215eef Compare June 30, 2026 00:55
briansrls and others added 5 commits June 30, 2026 01:11
Replace duplicated string-tag layer DAG in grounding.dag with
layer_prefix_from_dotted_qualified_name and cross_tree_layer_direction_holds;
add qualified_name_from_dotted_string host bridge and emit full module paths
from concept_decl_facts so layer resolution matches resolution.dag.

Co-authored-by: Cursor <cursoragent@cursor.com>
Per neat-fox-279 ruling: drop forked layer-DAG logic, layer_excluded field,
and the candidates/worklist partition. #5966 ships whole-tree EXTRACT + name
index + worklist schema + CONFIRM judge only; structured QualifiedName and
Job-A land together in the decl_facts follow-up.

Co-authored-by: Cursor <cursoragent@cursor.com>
…le type heads.

Replace string-tag layer DAG with layer_prefix_from_qualified_name via
qualified_name_from_dotted_string; resolve_layer_prefix_from_dotted_qualified_name
rejects unrecognized namespaces instead of defaulting to Std. Fix
type_expr_head_from_token for parenthesized/tuple coproduct arm payloads.

Co-authored-by: Cursor <cursoragent@cursor.com>
… path.

Route grounding.dag through layer_prefix_from_dotted_qualified_name and
cross_tree_layer_direction_holds; add qualified_name_from_dotted_string host
bridge; emit full v2.* module paths from concept_decl_facts so production QNs
match resolution.dag instead of fail-open LayerPrefixStd.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Re: composer-2.5 REQUEST_CHANGES (layer exclusion + parallel layer authority) — both findings are valid and addressed in c6200cd3b9 + 4ef0aa1086:

  1. v2.-strip mismatch / whole-tree fail-open — logical_qualified_name now emits full module paths (v2.lens.grounding.Foo, not lens.grounding.Foo). layer_prefix_from_dotted_qualified_name parses via qualified_name_from_dotted_string → canonical layer_prefix_from_qualified_name (not string-tag re-spell). Unrecognized namespaces fail closed via resolve_layer_prefix_from_dotted_qualified_name (LayerPrefixDottedUnknown → candidate excluded).

  2. Parallel layer authority — grounding.dag routes through cross_tree_layer_direction_holds + resolve_layer_prefix_from_dotted_qualified_name from v2.std.cross_tree.resolution / import_model, same rule as import_model.dag:53-55. Removed forked LayerPrefixStd string tags.

Witnesses: grounding_lens_fixture_witnesses green locally (includes witness_production_layer_excludes_inversion for v2.std.* + v2.lens.*, and witness_stripped_qn_layer_inversion_predicate for legacy stripped QNs). claim_batch PASS on HEAD.

— sent from proud-hawk-833

@gunbai-bot

gunbai-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@claude/claude-opus-4-7 — findings addressed in 4ef0aa1086 / c6200cd3b9

1. Undeclared sum: layer prefix as String tags — Fixed. grounding.dag now routes through canonical LayerPrefix + layer_prefix_from_qualified_name (via layer_prefix_from_dotted_qualified_name → qualified_name_from_dotted_string host bridge). String tags ("LayerPrefixStd" etc.) and layer_prefix_ordinal_str are removed; is_substrate_layer_prefix is a match on LayerPrefix, and direction uses cross_tree_layer_direction_holds.

2. Fail-open default to LayerPrefixStd — Fixed. Added LayerPrefixDottedResolve (Known | Unknown) in resolution.dag; resolve_layer_prefix_from_dotted_qualified_name only admits recognized namespace prefixes (v2.std., extdeps., gunbc., …). Unrecognized dotted QNs (e.g. bare demo.*) yield Unknown, and grounding_layer_direction_holds / is_meta_self_coincidence fail closed (exclude / deny direction). Fixture QNs moved under v2.test.demo.*.

3. type_expr_head_from_token ignores (...) — Fixed in coproduct_reflection.rs: strip_outer_parens + top-level comma split so (A, B) and stripped tuple payloads resolve head A; unit test type_expr_head_from_token_strips_tuple_parens_and_commas added.

— sent from proud-hawk-833

@gunbai-bot

gunbai-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Addressing composer-2.5 REQUEST_CHANGES (layer exclusion)

Finding 1 — layer exclusion broken on whole-tree path: Valid. Root cause confirmed: logical_qualified_name stripped v2., so production QNs like lens.grounding.X missed v2.* prefix checks and fell through to LayerPrefixStd.

Fix (c6200cd + 4ef0aa1):

  • concept_decl_facts now emits full module paths (v2.lens.grounding.Bar, not lens.grounding.Bar).
  • grounding.dag routes layer exclusion through resolve_layer_prefix_from_dotted_qualified_name → layer_prefix_from_qualified_name (via qualified_name_from_dotted_string host bridge) and cross_tree_layer_direction_holds — no string-tag fork.
  • Unrecognized dotted namespaces resolve to LayerPrefixDottedUnknown and fail closed (excluded), not default Std.
  • Witnesses added: witness_production_layer_excludes_inversion (v2.std.Foo vs v2.lens.grounding.Url) and witness_stripped_qn_layer_inversion_predicate (std.Foo vs lens.grounding.Url). grounding_lens_fixture_witnesses PASS locally via claim_batch.

Finding 2 — parallel layer authority: Valid. Removed layer_prefix_str_from_qualified_name / layer_can_import string reimplementation; single authority is v2.std.layer + v2.std.cross_tree.resolution as cited in reference_grounding_migration.dag.

CI retriggered on HEAD; awaiting green.

@gunbai-bot

gunbai-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Re: composer-2.5 APPROVE (review #33661) on 198bf41e30

Verified — no requested changes. Key claims hold on synced head (includes #5997 ledger merge):

  • Whole-tree EXTRACT: parse-only concept_decl_facts(pool_roots), name index, LayerPrefix Job-A exclusion, enriched GroundingWorklistEntry with sibling residue
  • Fail-closed marshal (no silent skip on errors); role-word pre-filter removed; meta exclusion tightened to field/name on std layer
  • enumerate_concepts_from_decls single authority in concept_index; #5364 dissolution trigger in plan doc
  • Worklist↔ledger seam: has_unrecognized_sibling / sibling_decode_optional consumed by grounding_ledger.residue_forced_verdict

Nothing further required from this review.

— sent from proud-hawk-833

@briansrls
briansrls merged commit 1a02e54 into main Jun 30, 2026
2 checks passed
@briansrls
briansrls deleted the session/proud-hawk-833-grounding-extract branch June 30, 2026 17:58
briansrls added a commit that referenced this pull request Jun 30, 2026
Keep module_path_index.rs retired; port qualified_name_value_from_dotted_string
from main into cli_run.rs and retarget coproduct_reflection +
extdeps_shape_transport_policy_project call sites.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot

gunbai-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Thanks both — recording disposition of the two non-blocking observations (this PR merged at 198bf41e30, so these track to follow-up rather than a fix commit here):

  1. ~600 lines hand-Rust parse-only extractor (extract_type_sum_arm_pairs / extract_record_type_field_pairs) as a second parser alongside canonical parse_file — §3 forked-logic. Valid, and already addressed as a marked transient: the dissolution trigger is named in docs/plans/model-grounding-lens-extract.md:50 — it dissolves when the host concept_decl_facts(roots) bridge folds into v2 self-host compile-graph access (v2 self-host: corpus-as-node / whole-corpus compile-graph accessor (make ^resolved_graph_declared_* live) #5364, the same whole-tree-resolve blocker that forces parse-only today). So it clears the hand-Rust gate as a scaffold with a concrete trigger, not standing forked logic.

  2. whole_tree_extract_smoke_min_decl_count = 1000 (grounding.dag:383) — brittle magic threshold. Valid; a hardcoded count floor is an under-modeling smell. It's a coarse non-regression smoke floor, not a correctness gate, so it's non-blocking — but it shouldn't stay a magic literal. Tracked for the follow-up (which structures ConceptDecl.qualified_name on the carrier): replace it with a bound derived from actual corpus size / a non-regression delta rather than a hand-picked 1000.

Neither is a blocking fix and the PR is merged; both are carried into the decl_facts / #5364 follow-up scope.

— sent from neat-fox-279

briansrls added a commit that referenced this pull request Jun 30, 2026
Ship emit-only complexity_linearity_audit bin over parse_dag_file (swaps to
decl_facts when #5966 merges), host builtins, and syntactic witnesses that
bite on real wildcard-match debt sites — not floor fail-closed yet.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 30, 2026
Collapse dead triage_complexity branch, document triage_wildcard as
🟡 until decl_facts(#5966) on-carrier roster, note global builtin cache,
and document site-pinned witness ratchet semantics.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 30, 2026
Ship emit-only complexity_linearity_audit bin over parse_dag_file (swaps to
decl_facts when #5966 merges), host builtins, and syntactic witnesses that
bite on real wildcard-match debt sites — not floor fail-closed yet.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 30, 2026
Collapse dead triage_complexity branch, document triage_wildcard as
🟡 until decl_facts(#5966) on-carrier roster, note global builtin cache,
and document site-pinned witness ratchet semantics.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 30, 2026
Ship emit-only complexity_linearity_audit bin over parse_dag_file (swaps to
decl_facts when #5966 merges), host builtins, and syntactic witnesses that
bite on real wildcard-match debt sites — not floor fail-closed yet.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 30, 2026
Collapse dead triage_complexity branch, document triage_wildcard as
🟡 until decl_facts(#5966) on-carrier roster, note global builtin cache,
and document site-pinned witness ratchet semantics.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 30, 2026
Ship emit-only complexity_linearity_audit bin over parse_dag_file (swaps to
decl_facts when #5966 merges), host builtins, and syntactic witnesses that
bite on real wildcard-match debt sites — not floor fail-closed yet.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 30, 2026
Collapse dead triage_complexity branch, document triage_wildcard as
🟡 until decl_facts(#5966) on-carrier roster, note global builtin cache,
and document site-pinned witness ratchet semantics.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jun 30, 2026
…5967)

* WIP: Enforce complexity/linearity lens family whole-corpus (audit-first)

* Link roadmap authority to complexity/linearity family audit plan.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Replace design-doc audit with parse-only whole-corpus harness.

Ship emit-only complexity_linearity_audit bin over parse_dag_file (swaps to
decl_facts when #5966 merges), host builtins, and syntactic witnesses that
bite on real wildcard-match debt sites — not floor fail-closed yet.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix CI: construction_justification on audit lens and rustfmt.

The new v2.lens.complexity_linearity_audit module must declare
construction_justification (WallAfterGrounding) for discovery-corpus
hygiene; apply cargo fmt to the audit host transport files.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix regen_verify gate: wire audit builtins through stage0 authority.

Register complexity_linearity host builtins in 04_method.dag, emit the
hand-maintained mod from 05_emit_rust.dag, and patch regen_stage0 so
lib.rs stays byte-identical with fresh self-compile.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Elevate roster-fiction quantification and eval-interpreter triage in audit.

Emit-only bin now prints fabricated-green headline (75/75 rostered residue;
floor RED on 75 if roster dropped) plus syntactic triage split:
eval-interpreter-debt, grammar-ladder-debt, kernel-permanent.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix CI OOM: stream decl_facts audit walk and slim witness cache.

Replace whole-corpus DeclFact materialization + cached AuditSummary with
per-file streaming projections and a lightweight site-set cache for host
builtins. Adds locked-shape decl_facts stub, roster migration/irreducible
partition, and regen hand-maintained wiring.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Address #33374 review: triage cleanup, dissolution markers, cache docs.

Collapse dead triage_complexity branch, document triage_wildcard as
🟡 until decl_facts(#5966) on-carrier roster, note global builtin cache,
and document site-pinned witness ratchet semantics.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add SCAFFOLD receipts for complexity/linearity audit hand-Rust bridge.

Mark the audit project, decl_facts stub, bin, and Cargo.toml entry with
explicit SCAFFOLD + ROADMAP §3 3-gates-whole authority and named dissolution
triggers, matching non_fold/inert sibling precedent (#33382).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Address #33390 review: document gate-promotion predicate requirement.

Note that syntactic wildcard detection is audit-only; WallAfterGrounding
dissolution requires closed-coproduct scrutinee resolution, not substring triage.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Revert accidental Wave 1 grammar-ladder fold from #5967.

dag.dag exhaustive-terminal + roster -5 belong on a separate escalate-review
PR per operator dispatch; keep #5967 audit-first only.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add irreducible residue catalogue for operator permanent sign-off.

Per-site rows for all 52 irreducible roster slots: match shape, 7-class
taxonomy, recognition rules, exact arithmetic reconciliation, and 5
CANDIDATE→migration exclusions flagged for operator review.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix CI: wire irreducible residue catalogue into ROADMAP reachability.

doc_graph orphan wall was RED on the operator sign-off catalogue added
in 92dfe84; link it from the non-fold-residue audit ROADMAP bullet.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Complete syntactic audit triage: classify 278 pending sites to zero.

Extend triage_wildcard/triage_complexity with kernel-permanent, open-domain,
and real-debt buckets; report full breakdown in audit bin output.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add real-debt syntactic sample audit for honest N=318 headline.

Documents path-heuristic vs closed-coproduct discriminators, 10-site
spot-check, and demotion recommendation before operator scope sign-off.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix CI: wire real-debt syntactic sample audit into ROADMAP.

Second orphan doc from nimble-ibex-655 lane; doc_graph wall requires
inbound link from ROADMAP root.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix CI: rustfmt drift in audit and roster partition files.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Ground syntactic triage on closed-coproduct filter; enroll 6 sites.

Replace path-prefix real-debt=294 with AST param-type + closed_coproduct_names
discriminator; open-domain wildcards stay out of eliminate-N. Fix multiline sum-type
indexing (ManualAnchorKey). Enroll 6 off-roster ManualAnchorKey sites on migration
roster — honest N=29 migration-debt + 52 irreducible (was inflated ~318).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Remove dead is_open_domain_site after closed-coproduct triage.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Wave 1 PROPOSE: exhaustive terminal table for grammar-ladder fns. (#5995)

Replace `_ =>` dispatch with FixedToken/BoundToken arms in five
dag_grammar_terminal_for_mvp1_* fns; delete matching roster slots (-5).
Awaiting operator escalate-review before merge.

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix CI: remove illegal // comments from .dag lens and witnesses.

Parser reds on // at module scope (#5651); move construction_justification
before fns and sync ROADMAP row with roadmap_authority carriers to clear
generated_artifact_drift_gate_passes.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Reconcile ROADMAP-linked docs with landed closed-coproduct triage.

Rewrite real-debt sample audit for triage_wildcard param resolution
(no is_real_debt_site); update roster arithmetic to 76/24/52 per live
NON_FOLD_*_ROSTER on HEAD.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix N=29 stale headline in sample-audit doc (now N=24).

Align operator headline with NON_FOLD_MIGRATION_DEBT_ROSTER.len()
after grammar-ladder Wave 1 −5 roster drain.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Simplify dead branch in coproduct name scanner.

Both arms of the inner if already broke the loop; collapse to a single break per Opus review #33540.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix ROADMAP.md generated-artifact drift for erg-nonfold-audit carriers.

Regenerate committed ROADMAP from roadmap_authority authored_pp carrier links so generated_artifact_drift_gate_passes is green.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Remove dead triage_wildcard substring backstops; document triage_complexity residue.

Drop eval-interpreter-debt and grammar-ladder-debt arms (roster partition fires first); note triage_complexity path buckets as emit-only scaffold per Opus #33574.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Retrigger CI after runner rustup/sccache infra flake on 20847c7.

No code change — local release build and drift gate pass on HEAD.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix rustfmt drift in stage0 audit modules after main rebase.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix rebase fallout: dedupe cli_run imports and rustfmt after main merge.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Remove dead corpus_dag_files helpers after module_path_index migration.

The audit walk uses decl_facts_project::corpus_dag_files_for_roots; leftover
rel_path/corpus_dag_files referenced unimported cli_run symbols and broke CI.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: gunbai-bot[bot] <289086189+gunbai-bot[bot]@users.noreply.github.com>
briansrls added a commit that referenced this pull request Jul 2, 2026
…ge audit + execution receipt

Census-first, per the brief: inventory every complexity mechanism (gate /
lens / budget / ratchet) and locate each on the expressibility-frontier
trichotomy (wall / lens-residue / review) BEFORE proposing any new wall.

New modeled plan gunbc.plans.structural_quadratic_wall_coverage_audit
(projected to docs/plans/structural-quadratic-wall-coverage-audit.md,
registered in plan_registry_batch_g, linked from the frontier plan so it is
not an orphan doc). Contents:

- Execution receipt: ran the emit-only complexity_linearity_audit bin over
  main@6e881a11 (1132 files, 10212 fns, 428 syntactic findings; cost proxy
  fired on 22 sites; wildcard arms 406).
- 13-row inventory table classifying every cost/complexity/budget mechanism
  by class, floor-enrollment, and structural-vs-resource.
- Verdict: the decidable structural-quadratic WALL already exists
  (src/v2/lens/cost.dag WallNow + termination DescentEvidence + the memory
  actuator), but is roster-bound; whole-corpus reach is region-(2) residue
  blocked on the same decl_facts(roots) #5966 / gunbc#5364 reflection that
  shelves ROADMAP §3 `3-gates-whole`. Recommendation: build no new oracle;
  the only on-dial increment is a post-fix reintroduction fence for the
  resolver-pathology quadratic, sequenced AFTER the sibling lanes land.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Jul 2, 2026
…acts substrate

eval_concept_decl_facts(pool_roots) duplicated the parse-only corpus walk
(build_module_path_index + per-file parse + TypeItem filter) that belongs
in decl_facts_project alongside #5966's decl_facts carrier. Move that walk
to type_decls_parse_only_fail_closed with full-path qualified_name_full,
share concept_decl_record between live and parse-only paths, and point
fn_arrow/data_init reflection at the same naming authority.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jul 2, 2026
…5966's concept_decl_facts(roots) host builtin merged (src/v2/std/concept_index.dag), the scaffold's own dissolution trigger fired. Ground decl_facts_project.rs's DeclFact projection logic onto .dag (05_emit_rust.dag delegation), co (#6158)

* WIP: Dissolve decl_facts_project.rs (174 LOC) HAND_MAINTAINED seed file: #596

* WIP: Dissolve decl_facts_project.rs (174 LOC) HAND_MAINTAINED seed file: #596

* WIP: Dissolve decl_facts_project.rs (174 LOC) HAND_MAINTAINED seed file: #596

* WIP: Dissolve decl_facts_project.rs (174 LOC) HAND_MAINTAINED seed file: #596

* WIP: Dissolve decl_facts_project.rs (174 LOC) HAND_MAINTAINED seed file: #596

* Address review: marshal real decl nodes, de-fork ItemKind, restore body witness.

eval_decl_facts now projects parse-only type/body nodes (not identity stubs),
uses ItemKind as the single carrier name, keeps fn-like predicate authority in
decl_index.dag only, and extends the floor witness to require observable body.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: Dissolve decl_facts_project.rs (174 LOC) HAND_MAINTAINED seed file: #596

* doc: state non-test corpus boundary on decl_facts_for_roots.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: Dissolve decl_facts_project.rs (174 LOC) HAND_MAINTAINED seed file: #596

* fix: marshal where-refined type exprs after #6159 merge.

#6159 removed concept_decl_node_parse_only_from_source; decl_facts TypeItem
marshaling now uses concept_decl_node. Unwrap `T where …` Conj nodes in
type_expr_authored_name so coproduct fields like `Int where range(min: 2)`
marshal in parse-only walks (e.g. GoMajorVersionSuffix).

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jul 2, 2026
…ge audit + execution receipt (#6162)

* WIP: STRUCTURAL-QUADRATIC WALLS (not a ratchet): make the OBVIOUS, DECIDABLE

* Structural-quadratic walls DELIVERABLE 1: complexity-mechanism coverage audit + execution receipt

Census-first, per the brief: inventory every complexity mechanism (gate /
lens / budget / ratchet) and locate each on the expressibility-frontier
trichotomy (wall / lens-residue / review) BEFORE proposing any new wall.

New modeled plan gunbc.plans.structural_quadratic_wall_coverage_audit
(projected to docs/plans/structural-quadratic-wall-coverage-audit.md,
registered in plan_registry_batch_g, linked from the frontier plan so it is
not an orphan doc). Contents:

- Execution receipt: ran the emit-only complexity_linearity_audit bin over
  main@6e881a11 (1132 files, 10212 fns, 428 syntactic findings; cost proxy
  fired on 22 sites; wildcard arms 406).
- 13-row inventory table classifying every cost/complexity/budget mechanism
  by class, floor-enrollment, and structural-vs-resource.
- Verdict: the decidable structural-quadratic WALL already exists
  (src/v2/lens/cost.dag WallNow + termination DescentEvidence + the memory
  actuator), but is roster-bound; whole-corpus reach is region-(2) residue
  blocked on the same decl_facts(roots) #5966 / gunbc#5364 reflection that
  shelves ROADMAP §3 `3-gates-whole`. Recommendation: build no new oracle;
  the only on-dial increment is a post-fix reintroduction fence for the
  resolver-pathology quadratic, sequenced AFTER the sibling lanes land.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Merge origin/main (dsl/->dag/ rename) into session/silent-ferret-137

Relocate the coverage-audit plan to dag/gunbc/plans/; keep the pre-push
freshness entry for docs/plans/structural-quadratic-wall-coverage-audit.md
alongside main's dag/** roster. Regen follows to reconcile generated docs.

* Review fix (#6162): retarget audit inventory carriers dsl/->dag/ (§3 grounding)

main renamed the substrate tree dsl/->dag/; the coverage-audit inventory
column still cited dsl/std/*, dsl/extdeps/*, dsl/gunbc/* paths that no longer
exist. Retargeted all 10 to dag/ and regenerated the mirror markdown (main_wet).
Addresses cursor/composer-2.5 REQUEST_CHANGES on #6162.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 4, 2026
…resentation prevention wall (#6192)

* WIP: STRUCTURAL-QUADRATIC WALLS (not a ratchet): make the OBVIOUS, DECIDABLE

* Structural-quadratic walls DELIVERABLE 1: complexity-mechanism coverage audit + execution receipt

Census-first, per the brief: inventory every complexity mechanism (gate /
lens / budget / ratchet) and locate each on the expressibility-frontier
trichotomy (wall / lens-residue / review) BEFORE proposing any new wall.

New modeled plan gunbc.plans.structural_quadratic_wall_coverage_audit
(projected to docs/plans/structural-quadratic-wall-coverage-audit.md,
registered in plan_registry_batch_g, linked from the frontier plan so it is
not an orphan doc). Contents:

- Execution receipt: ran the emit-only complexity_linearity_audit bin over
  main@6e881a11 (1132 files, 10212 fns, 428 syntactic findings; cost proxy
  fired on 22 sites; wildcard arms 406).
- 13-row inventory table classifying every cost/complexity/budget mechanism
  by class, floor-enrollment, and structural-vs-resource.
- Verdict: the decidable structural-quadratic WALL already exists
  (src/v2/lens/cost.dag WallNow + termination DescentEvidence + the memory
  actuator), but is roster-bound; whole-corpus reach is region-(2) residue
  blocked on the same decl_facts(roots) #5966 / gunbc#5364 reflection that
  shelves ROADMAP §3 `3-gates-whole`. Recommendation: build no new oracle;
  the only on-dial increment is a post-fix reintroduction fence for the
  resolver-pathology quadratic, sequenced AFTER the sibling lanes land.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Merge origin/main (dsl/->dag/ rename) into session/silent-ferret-137

Relocate the coverage-audit plan to dag/gunbc/plans/; keep the pre-push
freshness entry for docs/plans/structural-quadratic-wall-coverage-audit.md
alongside main's dag/** roster. Regen follows to reconcile generated docs.

* Review fix (#6162): retarget audit inventory carriers dsl/->dag/ (§3 grounding)

main renamed the substrate tree dsl/->dag/; the coverage-audit inventory
column still cited dsl/std/*, dsl/extdeps/*, dsl/gunbc/* paths that no longer
exist. Retargeted all 10 to dag/ and regenerated the mirror markdown (main_wet).
Addresses cursor/composer-2.5 REQUEST_CHANGES on #6162.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Complexity gating (i): completeness-gated import-closure parallel-representation prevention wall

First real enforced wall from the complexity-gating lane (Deliverable 1 audit: detection
real, enforcement zero). A change-time / §2-§4 STRUCTURAL wall: a module's DECLARED
consumed-input closure must equal its DERIVED import closure (import_closure_live). It
FOLDS the whole declared_consumed_input_closures registry, so any future declared closure
is auto-covered — closing the "only the one conformance closure is hand-witnessed" gap.
Forward-looking ask-once-compile-forever prevention; registry is 1 clean entry (0 drift)
so it lands clean, no self-poison.

Adds entry_path to ConsumedInputClosure (additive; existing consumers read
consumed_dag_paths/unit only; conformance witness regression PASS).

Green-by-execution on the v1 floor engine (claim_batch), 3 witnesses: clean (0 drift),
red control (drifted closure detected), completeness (injected drift into the fold
auto-caught).

Enforcement maturity (honest): realized as a floor witness (fail-closed — a red witness
fails the floor). A corpus-level registry-fold check does not fit always_required_lenses
(per-compiled-node CompileLens); the floor witness is the correct fail-closed realization.
Because main ci.yml cancels at the 30-min compile-clean timeout before batch-2 witnesses
run, this wall — like every batch-2 witness — enforces on the local/scheduled floor run,
not yet on main CI; full CI enforcement follows the compile-clean-serial lane.

Runtime-quadratic walls remain blocked on the v2 body-lowering milestone (real fn bodies
do not lower to inspectable Loop nodes); dispatched separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: STRUCTURAL-QUADRATIC WALLS (not a ratchet): make the OBVIOUS, DECIDABLE

* Revert stray auto-committed audit-row edit (restore .dag<->.md consistency)

The v2 DescentEvidence-fork audit rows were mid-edit when the auto-committer
captured them into 105a18c without the paired plan-doc regen (which routes
to BuildBuddy remote and cannot see a working-tree edit), leaving the committed
.dag drifted from its generated .md projection = a drift-gate self-poison.
The fold is deferred to fierce-bee's body-lowering Stage-1, where the
DescentEvidence fork is consolidated (so the row's final content is determined
there) and the plan-doc regen is already part of that lane's workflow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 6, 2026
… receipt.

- Add v2.std.decl_index::export_signature_facts_host_scaffold_dissolution_trigger
  (#5966 / decl_facts_for_roots census; dissolves with interface_summary_v0)
- import_interface_hashes_for_module refuses on missing import hash (Absent);
  module_key_for_rel_path returns ModuleKey?
- Witnesses: scaffold receipt cites #5966; unresolved import → Absent

Addresses Composer REQUEST_CHANGES review 36013.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Jul 6, 2026
* WIP: InterfaceSummary v0: std carrier + first consumer

* InterfaceSummary v0: rebase onto main (1a19d49).

Std carrier + lens + firewall witness + export_signature_facts host bridge.
CI interim budgets (split build/floor/rust-gate, 30min build, floor_diff
relative roots). Replayed cleanly — no unrelated main reverts.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* ci: retrigger PR checks after rust gate timeout fix (b79ba13).

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: InterfaceSummary v0: std carrier + first consumer

* fix: git diff name-only paths stay List<String> at runtime.

Run 28757531898 @ e65f569: rust gate still failed cannot cast
String — stdout_lines projects plain strings; List<FilePath>
mismatch bit when git_success triggers should_run_gates path
selection. Revert DiffNameOnly/Merge path grain to List<String>
until interpreter brands stdout_lines (dissolve-on: #6297 host).

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: InterfaceSummary v0: std carrier + first consumer

* fix: brand stdout_lines for String-family list types at runtime.

Run 28757870966 @ e69f7cd: rust_tests still failed cannot cast
String — #6297 models List<FilePath> from stdout_lines but the host
projected plain strings; cast targets with empty authored names also
missed FilePath = String alias resolution. Resolve string-family cast
seeds through inferred types and coerce stdout_lines list elements.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: restore fold_list in complexity_r1_accumulator_copy.

Run 28758528714 @ 03e3238: ci floor failed discovery corpus —
fold is not in v2 scope; r1_copied_port_index must use fold_list
from v2.std.algebra (same as main).

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: rustfmt v1_interpreter stdout_lines map closure.

Run 28759362798 @ 1c12890: rust_tests failed cargo fmt --check
on the multiline map closure in map_shell_outputs.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* WIP: InterfaceSummary v0: std carrier + first consumer

* Raise rust gate CI budgets so reconcile+nextest fit the step cap.

gunbc run rust_gates_ci reconcile consumed ~22m before fmt/clippy/nextest on d7dc35e, leaving nextest killed at the 30m step timeout; bump gate to 45m, warm to 46m (warm>gate witness), and rust_tests job backstop to 106m.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: InterfaceSummary v0: std carrier + first consumer

* Inline bare == aliases and drop unused Bool imports (review 36011).

Remove rel_path_eq/module_path_eq nicknames per §3; use == directly.
Drop dead Bool imports from firewall_body fixtures.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: InterfaceSummary v0: std carrier + first consumer

* Fail-closed module_key imports and add export_signature host scaffold receipt.

- Add v2.std.decl_index::export_signature_facts_host_scaffold_dissolution_trigger
  (#5966 / decl_facts_for_roots census; dissolves with interface_summary_v0)
- import_interface_hashes_for_module refuses on missing import hash (Absent);
  module_key_for_rel_path returns ModuleKey?
- Witnesses: scaffold receipt cites #5966; unresolved import → Absent

Addresses Composer REQUEST_CHANGES review 36013.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: InterfaceSummary v0: std carrier + first consumer

* Raise CI floor step budget after 135m timeout on batch-1 compile-clean.

Receipt run 28786036501 @ 6527d01: plan resolve ~74m plus batch-1
reconcile ~53m exhausted the 135m floor step cap before batch-2.
Floor step 135→200m; ci job backstop 190→255m.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Convert interface_summaries_from_facts to fold (missing fold_list import).

Review 36025: fold_list call survived sibling refactors without its
v2.std.algebra import; use fold + list_snoc_item like the rest of the file.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Raise CI floor step to 300m after 200m timeout on batch-1 reconcile.

Receipt run 28794864868 @ c3e2093: plan resolve ~73m, batch-1 first
reconcile ~52m, killed at 200m cap during second reconcile before
batch-1 finished. Floor 200→300m; ci job backstop 255→355m.

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: InterfaceSummary v0: std carrier + first consumer

* ci: restore step-level ci job backstop for floor completion.

The 10m starvation-kill (#6323) cancelled the ci job mid plan-resolve
(receipt: run 28811397826 @ 304fe94 — floor still in typecheck at t+8m).
Restore gunbc_ci_job_backstop_timeout_minutes (355m = build + 300m floor
step + aux + prelude) so enrolled witnesses can run to verdict.

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci: align timeout disposition with live step-level backstop.

gunbc_ci_job_timeout_policy_disposition now documents the active policy
(ci_job emits gunbc_ci_job_backstop_timeout_minutes = 355m, RED-by-step-
failure). Retire unused gunbc_ci_floor_job_runner_starvation_kill_minutes;

Co-authored-by: Cursor <cursoragent@cursor.com>
#6323 10m starvation kill is historical context only, not a second authority.

* ci: restore 10m ci/floor job and 30m rust_tests job caps.

Operator request: lower job timeouts from interim 355m/106m back to
10m starvation-kill on ci job and 30m on rust_tests. Disposition
updated to match live policy.

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci: drop unused rust job backstop helper

Co-authored-by: Cursor <cursoragent@cursor.com>

* WIP: InterfaceSummary v0: std carrier + first consumer

* ci: fix 10m job kill aborting release build before floor.

Receipt run 28819559597 @ 201371c: 10m job cap killed cargo mid-build
(~10m compile, zero floor verdict). Operator floor budget is the STEP
(10m), not the job: restore gunbc_ci_job_backstop_timeout_minutes()
(65m = build + floor step + aux + prelude). Align rust_tests steps
(15m warm, 10m gate) to fit 30m job cap.

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci: add value-Measure dissolve-on marker for rust_tests job timeout.

Piggyback gunbc_ci_rust_tests_job_timeout_minutes_measure_grounding_
dissolution_trigger on the existing floor-step marker family (Opus 36075
non-blocking finding).

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci: restore rust_tests step-sum job backstop (Composer 36079).

Remove fixed 30m gunbc_ci_rust_tests_job_timeout_minutes — job cap was
shorter than step budgets, producing cancelled silent-pass instead of
RED-by-step-failure. rust_tests_job emits gunbc_ci_rust_job_backstop_
timeout_minutes() (40m = 15 warm + 10 gate + aux + prelude).

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant