Skip to content

Measure repeated typechecking across selected entry closures - #7533

Merged
briansrls merged 45 commits into
mainfrom
session/valiant-lark-50
Aug 1, 2026
Merged

briansrls merged 45 commits into
mainfrom
session/valiant-lark-50

Conversation

@gunbai-bot

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

Copy link
Copy Markdown
Contributor

Summary

Slice-2 measurement-only instrument for entry-graph-union-construction (lane ci-cost). Resolves production-selected or explicit entries against one shared MultiEntryIndex and attributes typed-cache hit/miss/refused per (entry, typed module content key).

Decision metric: decision_ratio = repeated_typecheck_compute_ns / total_typecheck_compute_ns (cache-hit ratio diagnostic only).

Operator verdict (bounded N≤50, taken on candidate head): Close entry-graph-union-construction as a no-go for union construction on the shared-typecheck hypothesis. Repeated typecheck compute is zero at every measured cell (three disjoint 50-entry windows + 7-entry reorder fixture). Do not begin union construction. Redirect to per-entry assembly decomposition (new hypothesis, new denominator).

The candidate-head measurements have already taken the bounded operator verdict. After merge, one representative 50-entry cell plus the reorder control will be rerun on the merged SHA as a provenance/integration receipt — not as a second decision gate. Then delete one-shot measurement orchestration per receipt §G.

Instrument (dissolves post-merge)

  • Flag-gated probe in reconcile_with_typed_cache / try_reconcile_all_cache_hits
  • Bin: measure_repeated_typecheck_attribution — receipt JSON (--receipt-out); --entry-offset + --max-entries for disjoint windows
  • Scaffold: cli_run_repeated_typecheck_attribution_probe — dissolution intrinsic to this lane (merged-SHA provenance receipt → delete); not Serve exact-tree resolved graphs from verified cross-process materialization #7534

Production receipts (N≤50, committed)

cell offset decision_ratio repeated misses
narrow-disjoint 0 0 0
typical-disjoint 117 0 0
broad-disjoint 235 0 0

Explicit reorder (7-entry): decision_ratio=0, identical distinct-compute set both orders.

Full matrix + M2/retention context: docs/plans/entry-graph-union-slice2-typecheck-attribution.md §F–§G.

Structural law (retained post-deletion)

Within one shared typed-cache authority: one content key computes once; later requesters hit; entry order does not change the distinct-computation set. Enrolled in v1-compiler-tests (repeated_typecheck_attribution_*).

Controls (executed)

  • Integration: shared-prefix hits, reorder invariance, partial all-hit-probe abandonment
  • Arithmetic: decision_ratio aggregation semantics (deletes with instrument per §G)

Test plan

  • cargo test -p v1-compiler-tests repeated_typecheck_attribution
  • cargo test -p v1-compiler repeated_typecheck_attribution_arithmetic
  • CI floor green on HEAD (8fc28f)

@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 1, 2026 02:26
@gunbai-bot

gunbai-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Addressed both findings from review 45863 in b1c912c:

  1. Bin module docs (measure_repeated_typecheck_attribution.rs:10-15) — Fixed. decision_ratio is now documented as repeated_typecheck_compute_ns / total_typecheck_compute_ns; cache_hit_ratio is explicitly labeled diagnostic-only. Matches cli_run.rs (RepeatedTypecheckAttributionMeasurement::decision_ratio at the struct field) and plan §B.

  2. HAND-RUST scaffold receipt (cli_run.rs:16237-16250) — Fixed. Added the sibling slice-1 pattern: DELETE WHEN list, rg -c cli_run_repeated_typecheck_attribution_probe src/v1/stage0/src/cli_run.rs receipt (returns 4 while scaffold stands, must return 0 at deletion), and the seed-Rust / gunbc.ci_release_bins enrollment note. Verified: rg -c returns 4 on current HEAD.

CI rerun on b1c912c is in flight.

— sent from valiant-lark-50

@gunbai-bot

gunbai-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Addressed review 45883 in a56453d:

  1. Membership denominator mismatch (cli_run.rs) — Fixed. When --entry or --max-entries changes the measured set, membership stats (sum_closure_memberships, union_modules, fanout_by_module) are now recomputed via closure_overlap_membership_for_entries for the actual selected_entries, not the full production roster. Production-only path still reuses slice-1 overlap unchanged.

  2. Hand-Rust receipt (slice2 scaffold) — Fixed. Scaffold block now cites ROADMAP row entry-graph-union-construction (lane ci-cost, slice 2) matching slice-1’s pattern, alongside the existing rg -c cli_run_repeated_typecheck_attribution_probe deletion receipt. Receipt doc header updated with the same ROADMAP binding.

— sent from valiant-lark-50

@gunbai-bot
gunbai-bot Bot marked this pull request as draft August 1, 2026 04:49
@gunbai-bot gunbai-bot Bot changed the title Dispatch F: Lane B slice 2 - repeated-typecheck attribution measurement ONLY: per (entry, module key) record closure membership, typed-cache hit/miss/refused, typecheck_compute_ns on miss, first computing entry, later-requester count, per-entry reconcile/assembly time; decision ratio = repeated type Measure repeated typechecking across selected entry closures Aug 1, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review August 1, 2026 07:08
@gunbai-bot

gunbai-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Addressing review 46081 in 2b53bfb:

Finding 1 (scaffold lifecycle): Agree the old DELETE WHEN: slice-2 union verdict is taken trigger fired when §F landed. Per DESIGN §4b dissolution-on-climb, the discriminating controls stay enrolled — repeated_typecheck_attribution_* in v1-compiler-tests and repeated_typecheck_attribution_arithmetic are the executing evidence that decision_ratio=0 stays real. What dissolves is the one-shot measurement orchestration (measure_*, render helpers, measure_repeated_typecheck_attribution bin), not the probe hooks. Updated cli_run_repeated_typecheck_attribution_probe scaffold + receipt header with a concrete new deferral: delete measurement orchestration on #7534 merge or operator archive of slice-2 receipts (whichever first).

Finding 2 (run_matrix.sh): Agree — a hand-written bash orchestrator with no .dag carrier was the wrong shape for a durable authority. Deleted run_matrix.sh; disjoint-cell reproduction is now documented as three direct measure_repeated_typecheck_attribution invocations in §E/§F (no shell transport).

CI on the prior commit was a cold-cache timeout on cargo check -p v1-compiler-tests --tests (same step green in ~53s on 085f36ed); this push retriggers.

— sent from valiant-lark-50

@gunbai-bot

gunbai-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Addressing review 46101: valid — the three repeated_typecheck_attribution_* integration tests arm a process-global probe without the serialization the sibling typecheck_compute_count oracles already use.

Fix: added with_repeated_typecheck_attribution_receipt (same Mutex<()> receipt-lock pattern as with_typecheck_compute_count_receipt) and wrapped all three tests. Production measure_repeated_typecheck_attribution is unchanged — only one caller, no lock needed.

— sent from valiant-lark-50

@gunbai-bot
gunbai-bot Bot force-pushed the session/valiant-lark-50 branch from 8fc28f5 to f01485c Compare August 1, 2026 08:37
@gunbai-bot

gunbai-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Addressing review 46165: valid — measurement_from_rows missed the entry_offset_applied: Option<usize> slot added to into_measurement at 711341bb. Fixed by passing None there (fixture tests don't exercise offset). Also initialized the probe-buffer fields (all_hit_probe_*, observed_entry_module_keys) that the struct gained during accounting repair — without those the lib-test crate wouldn't compile either.

— sent from valiant-lark-50

@gunbai-bot

gunbai-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Review 46181 — fixed in d200591

The conflict was real: docs/plans/entry-graph-union-slice2-typecheck-attribution.md recorded the operator no-go while dag/gunbc/roadmap_authority.dag still had entry-graph-union-construction as active_large with boundary text saying attribution was "NEXT".

What changed (canonical authority):

  • Updated the entry-graph-union-construction row: boundary now records CLOSED / no-go at N≤50, path points at the slice-2 receipt doc, red_control/handback reflect executed witnesses and delivered artifacts.
  • Added RoadmapAcceptanceReceipt for entry-graph-union-construction (criteria_digest=4442f95272011c70, derived to match node_criteria_digest; verified green by witness_acceptance_receipts_are_valid_and_unique).
  • Added entry_graph_union_construction_acceptance_note documenting the adjudication.

The row is now accepted in the authority graph (removed from active_roadmap_nodes); the receipt scaffold and roadmap agree on the same fact.

— sent from valiant-lark-50

gunbai-bot Bot pushed a commit that referenced this pull request Aug 1, 2026
…receipt.

Matches #7533 operator precedent: receipt is documentation, not shipped execution.

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

gunbai-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

Review 46190 — fixed

Valid: gunbc_ci_v1_compiler_tests_compile_gate_timeout_minutes was declared as bare Int = 10 while the adjacent step-timeout authorities (gunbc_ci_floor_step_timeout_minutes, gunbc_ci_regen_step_timeout_minutes) already use std.types.Duration.

Fix:

  • gunbc_ci_v1_compiler_tests_compile_gate_timeout_minutes: Duration = 10 (same numeric value; no workflow drift)
  • ci_build_job_backstop_is_step_sum_plus_prelude added to ci_workflow_witness_test.dag so gunbc_ci_build_job_backstop_timeout_minutes() stays pinned to the exact step-sum + prelude including the Duration-typed compile-gate term

ci_workflow_witness_holds green by execution.

— sent from valiant-lark-50

gunbai-bot Bot pushed a commit that referenced this pull request Aug 1, 2026
…receipt.

Matches #7533 operator precedent: receipt is documentation, not shipped execution.

Co-authored-by: Cursor <cursoragent@cursor.com>
gunbai-bot Bot pushed a commit that referenced this pull request Aug 1, 2026
…receipt.

Matches #7533 operator precedent: receipt is documentation, not shipped execution.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot force-pushed the session/valiant-lark-50 branch from a862c56 to e111e32 Compare August 1, 2026 14:06
gunbai-bot Bot pushed a commit that referenced this pull request Aug 1, 2026
…receipt.

Matches #7533 operator precedent: receipt is documentation, not shipped execution.

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

gunbai-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

review 46319 — fixed in e05bb32

Verified: the attribution tests (repeated_typecheck_attribution_*) only acquired with_repeated_typecheck_attribution_receipt while counter tests used with_typecheck_compute_count_receipt; both touch process-wide TYPECHECK_COMPUTE_COUNT, so parallel cargo test could race.

Fix: replaced the two mutexes with one UNION_RESOLVE_PROCESS_RECEIPT_LOCK shared by both wrappers (counter + attribution probe state). cargo test -p v1-compiler-tests --lib union_resolve_receipts — 9/9 green locally.

— sent from valiant-lark-50

@gunbai-bot
gunbai-bot Bot force-pushed the session/valiant-lark-50 branch 3 times, most recently from ab30212 to 82955e7 Compare August 1, 2026 17:03
gunbc-ci-auto-heal and others added 7 commits August 1, 2026 17:11
Align decision_ratio with operator spec (repeated_typecheck_compute_ns /
total_typecheck_compute_ns), add flag-gated probe hooks and measurement
bin, arithmetic + integration controls, and the slice-2 receipt doc.

Co-authored-by: Cursor <cursoragent@cursor.com>
The new slice-2 measurement receipt was an orphan (doc_graph_has_no_orphan_docs
failed on CI). Slice-1 is already reachable from DESIGN.md; forward-link slice-2
from there so the doc-reachability gate passes.

Co-authored-by: Cursor <cursoragent@cursor.com>
Recompute sum_closure_memberships, union_modules, and fanout for the
actual selected_entries whenever --max-entries or --entry overrides the
production roster, so membership denominators match the typecheck rows.
Add ROADMAP row reference to the hand-Rust scaffold (review 45883).

Co-authored-by: Cursor <cursoragent@cursor.com>
gunbc-ci-auto-heal and others added 16 commits August 1, 2026 17:16
Recompute sum_closure_memberships, union_modules, and fanout for the
actual selected_entries whenever --max-entries or --entry overrides the
production roster, so membership denominators match the typecheck rows.
Add ROADMAP row reference to the hand-Rust scaffold (review 45883).

Co-authored-by: Cursor <cursoragent@cursor.com>
- Buffer all-hit-probe observations; commit only on full probe success
- Enforce unique (entry, module_key) rows; add partial-probe control test
- Emit detailed receipt file (--receipt-out); keep stdout as summary
- Bypass production selection when --entry is given
- Label memory honestly (rss before/after, process VmHWM, cgroup high events)

Co-authored-by: Cursor <cursoragent@cursor.com>
Five runs on repaired instrument (binary sha256:8af9c726): explicit 7-entry
set in two orders plus narrow/typical/broad production subjects capped at
N=50 after uncapped narrow OOM at cgroup 32GiB. All cells: decision_ratio=0,
repeated_typecheck_misses=0, cache_hit_ratio 0.36 (explicit) / 0.88 (N=50).
Verdict slot left empty per operator sequencing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Enables per-base stratified 50-entry samples (early/mid/late) without
re-running production selection; required for breadth contrast after merge.

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

Three distinct 50-entry windows (offsets 0/117/235) all show decision_ratio=0;
union program closes/shrinks. Documents instrument-path OOM at N=286 without
M2 retention and retracts shared-prefix cap artifact.

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

Verdict-fired scaffold now defers measurement-orchestration deletion to #7534
merge or operator archive while keeping enrolled regression controls per §4b.
Delete run_matrix.sh; inline disjoint-cell reproduction in the receipt doc.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match the typecheck_compute_count receipt pattern: exclusive mutex
for integration tests that arm the process-wide attribution probe so
parallel `cargo test` cannot steal or consume another test's run.

Co-authored-by: Cursor <cursoragent@cursor.com>
Receipt §F–§G: no-go for union construction, intrinsic dissolution trigger
(merged-SHA provenance receipt → delete instrument; not #7534), retain-law
boundary, three spelled-out repro invocations. Scaffold comment aligned.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pass None for entry_offset_applied in measurement_from_rows and
initialize all RepeatedTypecheckAttributionRun probe-buffer fields.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cold native-cache builds on srv1 exceeded the 5m aux cap (run 30692671758)
while compiling deps; warm runs finish in ~50s. Build job backstop 75→80m.

Co-authored-by: Cursor <cursoragent@cursor.com>
Slice-2 adjudication (no-go at N≤50) now lives in the canonical roadmap row and acceptance receipt, resolving the conflict review 46181 flagged between the receipt scaffold and active_large status.

Co-authored-by: Cursor <cursoragent@cursor.com>
Review 46190: the 10m step cap now uses the same Duration carrier as floor/regen timeouts, and the build-job backstop sum is witness-pinned.

Co-authored-by: Cursor <cursoragent@cursor.com>
Attribution probe tests and TYPECHECK_COMPUTE_COUNT receipt tests shared
process-wide state but used separate mutexes; serialize both under one lock.

Co-authored-by: Cursor <cursoragent@cursor.com>
gunbai-bot Bot pushed a commit that referenced this pull request Aug 1, 2026
…receipt.

Matches #7533 operator precedent: receipt is documentation, not shipped execution.

Co-authored-by: Cursor <cursoragent@cursor.com>
gunbc-ci-auto-heal and others added 3 commits August 1, 2026 17:27
Resolves PR #7533 merge conflict with main (#7591): publication placement
gate/roster deleted on main — drop the PR-branch grant file rather than
re-landing grants the operator ruling removed.

Co-authored-by: Cursor <cursoragent@cursor.com>
The inline ONE-SHOT comment still said "dissolves with slice-2 union
verdict" even though that verdict landed in this PR; point at the
intrinsic merged-SHA provenance receipt trigger in the scaffold below.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls pushed a commit that referenced this pull request Aug 1, 2026
…7581)

* Measure M2 floor retention on real claim_executor path (Dispatch J).

Records whole-corpus falsifier batch receipts showing schedule-derived eviction
bounds peak RSS at 6.27 GiB for 842 entries, supporting handback (a): named M2
capacity follow-ups do not rank now.

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

* Remove M2 measurement shell script; document verbatim invocations in receipt.

Matches #7533 operator precedent: receipt is documentation, not shipped execution.

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

* Retract overstated handback (a); keep width>1 bar authoritative.

Codex review 46229: width-1 falsifier receipt cannot record handback (a)
or deprioritize the throughline's width > 1 exit metric. Receipt reframed
as incomplete width-1 evidence; follow-ups remain NEXT.

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

* Fix primitive surface witness counts after #7562 arm.

#7575 updated denominators for compile_dag_diagnostic_census only;
parse_stage0_cargo_manifest_bins (#7562) left the roster one row ahead of
the witness expectations.

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

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@briansrls
briansrls merged commit 02bbce5 into main Aug 1, 2026
5 checks passed
@briansrls
briansrls deleted the session/valiant-lark-50 branch August 1, 2026 19:49
gunbai-bot Bot pushed a commit that referenced this pull request Aug 1, 2026
Keeps #7533 entry-graph-union adjudication from main; five-minute-ci-gate
registration preserved from branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls added a commit that referenced this pull request Aug 1, 2026
…roadmap authority - product boundary: an ordinary source edit reaches a required CI verdict in five minutes without recomputing any semantic fact whose inputs did not change; six sub-lanes (warm-merge-admission, native-selected-wit (#7597)

* WIP: Dispatch K: register the five-minute-ci-gate program boundary in the roa

* Fix five-minute-ci-gate roadmap authority per dispatch K spec.

Correct six sub-lanes, close entry-graph-union as sibling disposition,
and restore required red_control on all ticket fields so main_wet and
the generated-artifact drift gate can execute.

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

* chore: regenerate drifted generated artifacts (ci auto-heal)

* Incorporate operator sequence revision for five-minute-ci-gate (#7597).

Settle native-at-small-scale (#7599 BANKED), register the six-step
dependency sequence and staged expectations A/B/C, and add the
warm-merge → native-bundle sequence edge.

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

* chore: regenerate drifted generated artifacts (ci auto-heal)

* WIP: Dispatch K: register the five-minute-ci-gate program boundary in the roa

* WIP: Dispatch K: register the five-minute-ci-gate program boundary in the roa

* Correct #7599 rung honesty: in-flight not BANKED, verified witness receipts.

Executed 25/25 witnesses at head 2f9e780; timing ratio figures are
claimed-not-verified (PR body) until merge + fleet rerun. Regenerated DESIGN.md.

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

* Rebase on main and regenerate ROADMAP.md after conflict resolution.

Keeps #7533 entry-graph-union adjudication from main; five-minute-ci-gate
registration preserved from branch.

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

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: gunbc-ci-auto-heal <gunbc-ci-auto-heal@users.noreply.github.com>
briansrls pushed a commit that referenced this pull request Aug 1, 2026
briansrls pushed a commit that referenced this pull request Aug 1, 2026
briansrls pushed a commit that referenced this pull request Aug 2, 2026
briansrls added a commit that referenced this pull request Aug 2, 2026
* WIP: Per-entry-assembly-decomposition measurement lane + #7533 post-merge clo

* WIP: Per-entry-assembly-decomposition measurement lane + #7533 post-merge clo

* Close union probe and price assembly subterms

* Point union closeout at durable cache-law witness

* WIP: Per-entry-assembly-decomposition measurement lane + #7533 post-merge clo

* Correct assembly attribution receipts

* Correct assembly decomposition design receipt

* Preserve distinct typecheck compute sets

* Partition reconcile attribution by span delta

* WIP: Per-entry-assembly-decomposition measurement lane + #7533 post-merge clo

* Clarify retired union measurement controls

---------

Co-authored-by: Brian Searls <briansearls1@gmail.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