Skip to content

Print the exact closure behind each routed-entry resolve - #10258

Merged
gunbai-bot[bot] merged 3 commits into
mainfrom
session/sharp-koi-752
Sep 3, 2026
Merged

gunbai-bot[bot] merged 3 commits into
mainfrom
session/sharp-koi-752

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Outcome

claim_batch::resolve_timed now prints one identity-grain row for every module in the resolved closure, directly after the existing aggregate [resolve] line. Each row carries the routed entry, module identity, and repository-relative source path in stable order.

This is a projection of ResolvedGraph.modules, the exact population the resolver already returned for execution. It does not scan imports, resolve again, or infer membership from item_registry. The existing claim_batch route consumes the projection on every entry resolve.

Pre-landing use

A lane can answer “is path P in routed entry E?” without running the long wet dispatch. Use the existing short resolve probe:

target/release/claim_batch \
  --source-root dag --source-root src/v2 \
  --entry E --function <a-real-function-in-E> --eval-budget-ms 1

Resolution completes and prints membership before the deliberately bounded evaluation. The 2540ms figure characterizes the predecessor resolve path, without this membership projection; it is not a measurement of the successor shipped here. Specifically, PR #9725 reports the existing [resolve] producer at 2540ms for dag/test/claim/self_host_00_compile_behavioral_witness_test.dag (79 modules, 2220 resolved items). This PR’s targeted test executes the membership projection over a controlled two-module resolved graph; it does not re-measure that production entry. The output is the instrument; this PR does not transcribe today’s members into a document.

The projection is outside the charged per-claim window: run_witnesses calls resolve_timed once for an EntryGroup, constructs one evaluation context, and only then loops over that group’s functions. Each iteration enters run_claim_measured, where the CPU clock and 500ms evaluation deadline begin. Closure sorting and output therefore add per-entry route overhead and log volume, but neither execute once per claim nor contribute to the CPU quantity enforced by the per-claim line. This is not a fixed-volume producer: it emits one row per resolved module per entry group, so a full floor log grows as entry groups × their closure sizes. That work remains visible in preparation and whole-run cost even though it is outside the per-claim charge.

The semantic subject digest currently hashes raw file content. Consequently any byte change in a printed member path, including annotation-only prose, moves that digest; this PR reports membership and does not claim otherwise.

Seed boundary

The sole new hand-authored declaration is v1_compiler.cli_run resolved_closure_members. gunbc.routed_entry_closure_membership_seed_growth routed_entry_closure_membership_seed_growth_justification enrolls it at declaration grain, explains why the seed host is still required before a .dag evaluation frame exists, names v1-hand-queue-drain, and dissolves when the modeled routed-entry execution path provides this same membership before dispatch.

The first revision exposed the existing private workspace_relative_repo_path; that public-surface expansion is removed. The private helper remains unchanged and the one justified projection calls it inside cli_run.

Scope split

The requested open-PR writer-set producer is deliberately separate. It depends on live forge state and does not belong on the compiler resolver path; dashboard node adhoc-c9d9cda1-caf owns that half.

Verification

  • cargo fmt --all --check
  • cargo test --release -p v1-compiler --bin claim_batch resolved_closure_membership_tests -- --nocapture (1 passed on current head)
  • compiler-route control: cargo check -Z definitely-not-a-real-flag failed on stable Cargo as required, confirming the remote runner executed the command

A direct run with the locally installed gunbc was not treated as evidence: that binary predates the current grammar and refused the current corpus broadly.

@gunbai-bot

gunbai-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Addressed review 59395 in 4cbfc75. The existing path relativizer is private again, eliminating that public-surface modification. The remaining cross-crate projection is one new declaration, v1_compiler.cli_run resolved_closure_members, now enrolled by gunbc.routed_entry_closure_membership_seed_growth and included in the closed seed-growth justification roster with reason, owning lane, capability trigger, and current boundary. The production consumer remains claim_batch::resolve_timed; the test continues to execute the resolver-result projection. — sent from sharp-koi-752

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.

0 participants