Skip to content

Harvest gate: refuse reference-derived use-lines absent from authored module source - #7631

Merged
briansrls merged 5 commits into
mainfrom
session/deep-heron-234-authored-source-gate
Aug 2, 2026
Merged

briansrls merged 5 commits into
mainfrom
session/deep-heron-234-authored-source-gate

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Interim gate in reference_derived_use_lines: synthesize a pub use only when the candidate name is spelled in the module's authored source text (NewlineIndex char codes).

Failure directions (both required):

  1. False admit — a name that enters the candidate set only via inferred/type-summary over-collection (never authored) must not become a use-line. Discriminating case: AuthoredTokenOrdinal after occurrence-binding enrollment previously fabricated pub use …::AuthoredTokenOrdinal from std.http_path, which never mentions it.
  2. False refuse / absorb — empty or unavailable module source must refuse every candidate (fail-closed). Treating unreadability as “admit all” is §5 ⊤-as-ignorance absorption.

Dissolve-on: derive use-lines from the module's bound-reference structure (BoundReferenceProvider / P2a candidate-producer). This text-presence gate is the conservative interim, not the destination.

CI note

extdeps_scope_placement_gate_passes red is inherited from main — dag/extdeps/session_dashboard.dag unenrolled on main (added by #7573 after #7571's passing run); fix pending in #7640/#7633. Not this PR. Merge decision with the known red is the operator's.

Test plan

  • Unit witnesses in dag/test/claim/reference_derived_authored_source_gate_witness_test.dag (admit spelled / refuse AuthoredTokenOrdinal / refuse on empty source) — 3/3 PASS via claim_batch
  • Witness lives under dag/test/claim (not src/v1/tests) so regen does not emit an unregistered stage0 file
  • regen_stage0 --verify → regen_divergence_count=0 with fail-closed seed regenerated
  • Integration (no hand-pin): on P2a slice B1: parser occurrence-binding walk + stage0 enrollment #7515 tip with fail-closed gated seed, regen_stage0 --emit-fresh emits std_http_path.rs without AuthoredTokenOrdinal; installing that file into the living stage0 tree, cargo check -p v1-compiler is green
  • build / heal / regen green on integrated head; floor extdeps_scope_placement expected red (inherited)

CI note

CI note (fleet red 2 / #7648): inherited upstream breakage — expect either ContentHash not found in std.types (resolve) or a Coproduct(ContentHash) type mismatch; both the same main defect, neither this PR. #7648 + cool-wren seed bridge in flight. No main merges / no local rest.dag or fixture patches until quiet-hawk signals main green by execution.

CI hold

Hold at bar (quiet-hawk): gh run rerun replays the frozen merge ref — does not pick up repaired main. Diff includes regenerated .rs → whole-tree compile-clean. Fresh close/reopen today would trade extdeps red for known layer-2 rest_exchange_replay_test.dag:44 (expected Coproduct(ContentHash), got Primitive(String)); fix pending #7648. HOLD as-is until #7648 merges, then close/reopen for a fresh merge ref. Not diagnosing either inherited shape.

gunbc-ci-auto-heal and others added 3 commits August 1, 2026 21:11
src/v1/tests enrollment forced an unregistered stage0 emit of the
witness module and failed regen_verify. Relocate to dag/test/claim,
fail-close empty module source, and regenerate the seed emitter.

Co-authored-by: Cursor <cursoragent@cursor.com>
Empty/unavailable module source must refuse every reference-derived
candidate (not admit the full set). Keep the discriminating unit
witness under dag/test/claim so regen does not emit unregistered
stage0 files; regenerate the seed emitter to match.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot gunbai-bot Bot changed the title P2a namespace-reference-derived-closure: derive module dependency edges from references via the containment tree, consuming the #7508 cardinality kernel (do NOT fork it). Mechanism + ONE production control only. Base main. Full mandate arrives by message in seconds -- await it before acting. Harvest gate: refuse reference-derived use-lines absent from authored module source Aug 1, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 1, 2026 22:02
Floor compile-clean witness_layer_roots do not close over src/v1, so
importing v1.compiler.emit_rust hard-failed the whole-tree dag compile.
Mirror the production predicate locally with an explicit dissolve-on.

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

gunbai-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

CI batch-1 extdeps_scope_placement_gate_passes: inherited main red (fleet notice from calm-badger via quiet-hawk) — gate introduced by #7571; last green main ci fe1c76885. Not this PR; not diagnosing/fixing here (manifest is remove-only).

Own-lane fix pushed: compile-clean also reded unresolved import: v1.compiler.emit_rust from the dag witness. Witness no longer imports src/v1; oracle mirrors reference_derived_candidate_spelled_in_module with dissolve-on recorded.

— sent from deep-heron-234

Integrate post-#7571 main so the extdeps_scope_placement gate sees a
non-degenerate merge-base (standing branch-behind-main integration).
gunbai-bot Bot pushed a commit that referenced this pull request Aug 1, 2026
DeclarationExposure sole authority, fail-closed index refusals,
omit self DirectModuleDependency, refused-population RED control.
Parser-walk deferred to B (#7515). Includes cherry-picked authored-
source gate from #7631 so regen stays free of AuthoredTokenOrdinal
fabrication. Rebase onto main after #7631 merges.

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

gunbai-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

CI extdeps_scope_placement_gate_passes: gate red inherited from main — dag/extdeps/session_dashboard.dag unenrolled on main (added by #7573 after #7571's passing run); fix pending in #7640/#7633. Not this PR. Merge decision with the known red is the operator's.

— sent from deep-heron-234

@gunbai-bot

gunbai-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Dashboard CI alert: sole failure on 8cdffc5 is extdeps_scope_placement_gate_passes (Bool(false)). build / heal / regen are green.

This is inherited from main — dag/extdeps/session_dashboard.dag unenrolled; fix pending in #7640/#7633 (quiet-hawk / calm-badger). Not absorbing here (no frontier/manifest edits). Merge with known red is the operator's call.

@gunbai-bot

gunbai-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

CI note (fleet red 2 / #7648): inherited upstream breakage — expect either ContentHash not found in std.types (resolve) or a Coproduct(ContentHash) type mismatch; both the same main defect, neither this PR. #7648 + cool-wren seed bridge in flight. No main merges / no local rest.dag or fixture patches until quiet-hawk signals main green by execution.

@gunbai-bot

gunbai-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Fleet hold lifted: head kept at 8cdffc5 (exact-head approvals). Re-running failed CI jobs only (30722550499) — merge ref should pick up post-#7656 main without stale-ing reviews. Will report post-rerun.

@gunbai-bot

gunbai-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Fleet hold lifted: head kept at 8cdffc5 (exact-head approvals). Re-running failed CI only (30722550499). build/regen/heal already green on re-run; ci still in progress — will report post-rerun.

@gunbai-bot

gunbai-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Hold at bar (quiet-hawk): gh run rerun replays the frozen merge ref — does not pick up repaired main. Diff includes regenerated .rs → whole-tree compile-clean. Fresh close/reopen today would trade extdeps red for known layer-2 rest_exchange_replay_test.dag:44 (expected Coproduct(ContentHash), got Primitive(String)); fix pending #7648. HOLD as-is until #7648 merges, then close/reopen for a fresh merge ref. Not diagnosing either inherited shape.

@gunbai-bot

gunbai-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Close/reopen for fresh merge ref — main tip dbc87b2 repaired all 3 ContentHash layers (#7656/#7663/#7665); wait-for-7648 superseded (quiet-hawk).

@gunbai-bot gunbai-bot Bot closed this Aug 2, 2026
@gunbai-bot gunbai-bot Bot reopened this Aug 2, 2026
@gunbai-bot

gunbai-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Close/reopen done (quiet-hawk): fresh merge ref against main with ContentHash layers repaired (#7656/#7663/#7665). Head still 8cdffc5. New run 30732003189 — will report verdict; any new red shape (not the old inherited ones) escalated immediately.

@gunbai-bot

gunbai-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Close/reopen verdict: build/regen/heal green; ci still reds batch-1 extdeps_scope_placement_gate_passes (Bool(false)) on fresh merge ref 30732003189. Not ContentHash/rest_exchange. Reported to quiet-hawk; holding at bar.

@gunbai-bot gunbai-bot Bot mentioned this pull request Aug 2, 2026
6 tasks
@gunbai-bot

gunbai-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Close/reopen #2: prior 'fresh' run used stale cached merge parent f3df2ce (pre-enrollment). GitHub now has merge ref with parents b951e72+8cdffc555 (quiet-hawk).

@gunbai-bot gunbai-bot Bot closed this Aug 2, 2026
@gunbai-bot gunbai-bot Bot reopened this Aug 2, 2026
@gunbai-bot

gunbai-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Close/reopen #2: run 30734018661. Pre-flight merge-parent check:

  • refs/pull/7631/merge = bc466be parents b951e724c2 + 8cdffc555 ✓
  • API merge_commit_sha = bc466be6d6ad75d269d5872f5ef4750a82c678d4 first-parent b951e724c2b peel_alias_once_for_field_access drops resolve_node diagnostics: type the probe-miss vs refusal split, audit diagnostic-count consumers (#7630) ✓ (≥ b951e72)

Will re-check the run's checkout ref: from the ci job log once available; cancel+repeat if stale.

@gunbai-bot

gunbai-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Close/reopen #2 verdict: FULL GREEN (30734018661).

Checkout ref: 6f82da1e — parents b951e724c2 + 8cdffc555 (fresh). build / heal / regen / ci all pass.

@briansrls
briansrls merged commit ed53fd2 into main Aug 2, 2026
17 of 20 checks passed
@briansrls
briansrls deleted the session/deep-heron-234-authored-source-gate branch August 2, 2026 14:20
gunbai-bot Bot pushed a commit that referenced this pull request Aug 2, 2026
Post-#7631 refresh. NFR frontier: keep occurrence_binding eq rows
(omit stale sibling enrollment), union main's vacuity row (#7620).
Authored-source gate witness takes main's local-oracle form.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls pushed a commit that referenced this pull request Aug 2, 2026
…candidate kernel (#7673)

* WIP: P2a namespace-reference-derived-closure: derive module dependency edges

* fix(emit): move authored-source gate witness off stage0 emit path

src/v1/tests enrollment forced an unregistered stage0 emit of the
witness module and failed regen_verify. Relocate to dag/test/claim,
fail-close empty module source, and regenerate the seed emitter.

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

* fix(emit): fail-close authored-source use-line gate and relocate witness

Empty/unavailable module source must refuse every reference-derived
candidate (not admit the full set). Keep the discriminating unit
witness under dag/test/claim so regen does not emit unregistered
stage0 files; regenerate the seed emitter to match.

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

* slice-A: occurrence-binding candidate kernel (pre-stage)

DeclarationExposure sole authority, fail-closed index refusals,
omit self DirectModuleDependency, refused-population RED control.
Parser-walk deferred to B (#7515). Includes cherry-picked authored-
source gate from #7631 so regen stays free of AuthoredTokenOrdinal
fabrication. Rebase onto main after #7631 merges.

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

* slice-A: keep candidates/binding/resolve off stage0 emit roster

Without the B parser-walk emit edge those modules are not in the
regen closure. Drop the unregistered committed outputs and narrow
enrollment to identity so regen_stage0 --verify stays clean.

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

* Address review 47424 and operator slice-A verification gaps.

Ground AuthoredTokenOrdinal on std.occurrence_identity with
feature:occurrence-ordinal-value-measure dissolve-on; rewrite FreeMonoid
prefix via fold (no Empty/Cons walker); align regen_stage0 required
files with the deferred stage0 roster. Also refuse silent
declarations_by_name skips, join §13 Executing receipts to exact-head
observations (symbolic module paths; drop ==6 pin), and add RootExposure
plus missing-index RED controls.

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

* Add dissolve-on for section13 symbolic-path string heuristic.

review 47440: the / and .dag grep in section13_module_path_is_symbolic
is an interim oracle; name the QualifiedName grounding trigger beside it.

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

* Use roster_frontier declaration_ref_eq for §13 receipt join.

review 47449: delete the local section13_declaration_ref_eq fork and
import the existing DeclarationRef equality authority instead.

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

---------

Co-authored-by: gunbc-ci-auto-heal <gunbc-ci-auto-heal@users.noreply.github.com>
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