Skip to content

T-Modeling int-literal magnitude consumer - #897

Merged
briansrls merged 17 commits into
mainfrom
session/quick-stag-803
Apr 26, 2026
Merged

briansrls merged 17 commits into
mainfrom
session/quick-stag-803

Conversation

@briansrls

@briansrls briansrls commented Apr 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements the T-Modeling int-literal magnitude consumer slice over the merged Substrate cardinality/range-facts carrier from #806.

This is a partial, i64-bounded Goal 2 close only. It does not widen LiteralBits::Int(i64), does not close the i64::MIN single-token limitation, and does not implement Int128/Word128 carrier work.

Downstream Consumer Audit

Site Disposition
infer.rs value/transform paths Consumes range facts through int_literal_fits_expected_type; preserves narrowed annotated literals only after fit-check; emits MagnitudeOutOfRange for out-of-range UInt8 literals.
callable resolution Allows default-Int literal arguments to satisfy range-backed expected primitive types when the literal magnitude fits, so id_u8(7) narrows without broadening the conflict path.
Rust realization/emission Adds rust_uint8: TypeRealization mapping UInt8 to u8; emitted Rust can realize narrowed UInt8 lets.
bootstrap/generated snapshots Regenerated for the rust.dag realization change; parse corpus manifest refreshed.
deferred 128-bit lane No audited consumer in this slice requires a wider literal carrier; Int128/Word128 remains separate Substrate scope.

Verification

GitHub checks on head 19557885c57df0461111f214492e119c8b485cff:

  • fmt: passed
  • ci: passed
  • v3: passed
  • self_host_ratchet: passed

Worker also reported local targeted verification for all int_literal_cardinality_test tests and the handwritten parse manifest test after merging current main.

DB-8 / Closure

self_host_ratchet passed in CI. This closes the Modeling int-lit consumer slice as partial/i64-bounded; full int-lit closure still depends on the separate Int128/Word128 lane.

@briansrls

Copy link
Copy Markdown
Contributor Author

Blocking feedback on the draft:

  1. This skipped the required pre-flight gate. The dispatch asked for a short issue session/quick-stag-803 · quick-stag-803 #870 pre-flight before opening a PR: range-fact location, narrowing location, downstream consumers found, and whether any consumer needs the deferred Int128/Word128 sub-lane. Please post that audit on session/quick-stag-803 · quick-stag-803 #870 before continuing the implementation.

  2. The diff adds a second inference-level narrowing path without reconciling it with the existing one. Current infer.rs already has range-aware expected-type handling in decide_transform around the input/expected mismatch path (literal_int_at + int_literal_fits_expected_type + magnitude_out_of_range). Your new int_literal_magnitude_narrow_merge runs in the top-level Decision::Set conflict merge and silently replaces an existing Int port with the new type when the literal fits. That bypasses the local context in decide_transform and does not show why this extra merge-site behavior is needed rather than fixing/consuming the existing expected-type narrowing path.

  3. The PR does not satisfy the worker brief acceptance surface yet: no downstream-consumer audit table, no consumer migration evidence beyond infer.rs, no tests for let x: u8 = 5 reaching consumers, no out-of-range reporting check, and no DB-8 disposition. Please do not make this ready until those are present.

Suggested next step: pause code changes, post the pre-flight audit on #870, and in that audit explicitly answer whether the existing decide_transform narrowing path is insufficient. If it is insufficient, name the exact downstream consumer / port-resolution scenario that requires a top-level conflict-merge hook, then add focused tests that fail without that hook.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 69e9a3f1 · Trigger: schedule
  • Thinking: 304s wall

BLOCKING (1)

Root Cause

  • src/v3/compiler/src/infer.rs lowering seeds annotated let literal ports with the declared type, but infer now treats that seed as already validated → gate this retry behind the same diagnostic-producing range/refinement checks used for call-site narrowing, or move annotated-let literal narrowing through that path.

⚠️ One fail-closed gap remains in the annotated-let narrowing path.

Comment thread src/v3/compiler/src/infer.rs Outdated
if let PortState::Resolved(existing) = dag.port(v.output).state() {
if let Some(int_sh) = dag.int_shape() {
if !type_shapes_equivalent(dag, &existing, &int_sh) {
return Decision::Retry;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BLOCKING: The int-literal retry path accepts any already-resolved non-Int port without range/refinement validation, so an annotated let like let x: UInt8 = 256 can keep the annotation by fiat instead of failing closed (C-8 / API-level enforcement).

@briansrls
briansrls marked this pull request as ready for review April 26, 2026 09:47
@briansrls

Copy link
Copy Markdown
Contributor Author

Manager audit: marking ready so CI/review can run. The required pre-flight is now posted on #870, and this PR includes focused tests for annotated/call-site UInt8 narrowing plus Rust emit shape.

Reviewers should still look closely at the inference design: the PR adds a top-level Decision::Set conflict-merge hook (int_literal_magnitude_narrow_merge) in addition to changing the existing decide_transform range-aware path to set the literal input port. The key review question is whether both sites are necessary, or whether the existing expected-type path can carry the behavior without a global conflict-merge exception.

Scope remains partial Goal 2 / i64-bounded range-facts consumption only: no LiteralBits::Int widening, no i64::MIN single-token closure, no Int128/Word128 carrier work.

Copy link
Copy Markdown
Contributor Author

Blocking review is valid.

The new Behavior::Value retry path currently accepts any already-resolved non-Int literal port without checking whether the literal fits that type. That means an annotated let like:

let x: UInt8 = 256

can keep the seeded UInt8 port by fiat instead of producing the MagnitudeOutOfRange diagnostic. This violates the fail-closed contract for the int-lit range-facts consumer.

Please fix before merge by either:

  • gating the retry behind the same int_literal_fits_expected_type / magnitude_out_of_range validation used by call-site narrowing, or
  • routing annotated-let literal narrowing through the same diagnostic-producing path instead of treating a pre-resolved non-Int port as already validated.

Add a regression for the negative annotated-let case (let x: UInt8 = 256) proving it fails with MagnitudeOutOfRange, alongside the existing positive UInt8 = 5 test.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 69e9a3f1ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +80 to +82
if int_literal_magnitude_narrow_merge(dag, port, &existing, &ty) {
dag.set_port_type(port, ty);
changed = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate literal narrowing on backend realizability

This merge path now rewrites an Int literal port to a fixed-width type (for example UInt8) during inference, but the Rust emitter still lacks a realization for that narrowed declaration, so newly accepted programs fail later with MissingTypeRealization (the new emit_let_uint8_uses_narrow_rust_type case reproduces it with let x: UInt8 = 5). In practice this turns a type-check success into a codegen failure, so the narrowing should be blocked until realization exists (or the emitter updated to handle the narrowed primitive).

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

CI triage on head 69e9a3f1fffbd4be8261617de636116f076f160d / merge a22906bd:

v3 is failing in the full integration suite, not from runner flake. Failures are broad enough to confirm the earlier review concern that the inference change is perturbing the diagnostic/fail-closed path:

  • int_literal_cardinality_test::call_site_uint8_literal_narrows
  • int_literal_cardinality_test::emit_let_uint8_uses_narrow_rust_type
  • lane3_stage_3b_db1_test::type_mismatch_corrections_apply_and_compile
  • m0_acceptance::{compile_boundary_is_fail_closed,type_mismatch_marks_the_binding_unresolved}
  • runner/claim tests around diagnostic claims
  • thesis_validation_test::t1_4_type_mismatch_produces_a_typemismatch_diagnostic

Please focus the next patch on narrowing the inference intervention. The likely risky surface is the new top-level Decision::Set conflict merge and the Behavior::Value retry path accepting already-resolved non-Int literal ports. The fix should keep the existing diagnostic-producing path authoritative: validate magnitude/range before accepting a narrowed primitive, and preserve fail-closed TypeMismatch / MagnitudeOutOfRange behavior.

Requested verification before re-requesting review:

  • Add/keep a negative regression for let x: UInt8 = 256 expecting MagnitudeOutOfRange.
  • Run at least cargo test -p v3-compiler --test integration int_literal_cardinality_test and a targeted diagnostic test such as cargo test -p v3-compiler --test integration thesis_validation_test::t1_4_type_mismatch_produces_a_typemismatch_diagnostic.
  • If the positive int-lit tests still fail after the narrower fix, post the exact assertion output before broadening inference again.

Copy link
Copy Markdown
Contributor Author

Current-head CI triage for 359cbb42fef74b6fbca10276a444d55462575514 / merge 2a3b935:

The remaining failing check is still v3 full-suite. The failure set is effectively unchanged from the earlier broad inference failure:

  • int_literal_cardinality_test::call_site_uint8_literal_narrows
  • int_literal_cardinality_test::emit_let_uint8_uses_narrow_rust_type
  • lane3_stage_3b_db1_test::type_mismatch_corrections_apply_and_compile
  • m0_acceptance::{compile_boundary_is_fail_closed,type_mismatch_marks_the_binding_unresolved}
  • runner/claim diagnostic suites
  • thesis_validation_test::t1_4_type_mismatch_produces_a_typemismatch_diagnostic

So the latest patch did not localize the inference behavior enough. The current diff still shows two broad mechanisms:

  • top-level Decision::Set conflict merge via int_literal_magnitude_narrow_merge
  • Behavior::Value retry for any already-resolved non-Int literal port

Direction: stop trying to make both broad hooks work. Rebase the fix around the existing diagnostic-producing expected-type path in decide_transform, or prove with a minimal targeted test why one extra hook is unavoidable. If an extra hook remains, it must be range-validated and must not perturb existing TypeMismatch/M0 diagnostic behavior.

Also address the backend-realizability finding: either update Rust realization for the narrowed primitive declarations so emit_let_uint8_uses_narrow_rust_type can pass, or do not accept narrowing into a declaration the emitter cannot realize.

Before the next review request, please run/post results for:

  • cargo test -p v3-compiler --test integration int_literal_cardinality_test
  • cargo test -p v3-compiler --test integration thesis_validation_test::t1_4_type_mismatch_produces_a_typemismatch_diagnostic
  • one M0 fail-closed target from the failing list

Do not broaden beyond partial/i64-bounded range-facts consumption.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 359cbb42 · Trigger: schedule
  • Thinking: 316s wall

⚠️ No new findings to add, but prior blocking comment 3143194607 remains unresolved on current head.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-pro
  • Commit: 359cbb42 · Trigger: manual
  • Conversation: View conversation

1. Story of the diff

This PR changes integer-literal inference so default Int64 literal ports can be refined to a range-backed fixed-width integer type such as UInt8 when an annotation or call-site expected type provides that narrower type. The load-bearing mechanism is in infer.rs: conflict resolution now has a special merge path for “existing Int literal, incoming narrower expected type” at src/v3/compiler/src/infer.rs:80, backed by int_literal_magnitude_narrow_merge at src/v3/compiler/src/infer.rs:713; transform inference now actively sets the literal input port to the expected type instead of merely accepting the mismatch at src/v3/compiler/src/infer.rs:1122. The PR also prevents the value-node pass from re-stamping an already-narrowed int literal back to Int64, and adds integration coverage for annotated UInt8, call-site UInt8, and Rust emission.

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

Finding [BLOCKING] — illegal Dag port-state preservation. src/v3/compiler/src/infer.rs:751: return Decision::Retry; preserves any pre-resolved non-Int type on an integer literal output without validating that the existing type is an integer primitive or that the literal magnitude fits it. The surrounding guard only checks “int literal” and “existing is not dag.int_shape()” at src/v3/compiler/src/infer.rs:747-750, so this can make a Dag PortState::Resolved fact authoritative even when the literal/type pair is invalid. Because this is a cross-pass Dag type fact, the branch needs to re-use the same fit check used by the merge path before retrying, or fail with a typed diagnostic.

  1. INVARIANTS.md + modeling-discipline.md.

Finding [BLOCKING] — Fail-Closed / Illegal States Unrepresentable. The comment says “If the port is already a non-Int type that fits” at src/v3/compiler/src/infer.rs:745-746, but the code returns Decision::Retry solely because the existing type is non-Int at src/v3/compiler/src/infer.rs:750-751. That is a fail-open shape: invalid cases such as an out-of-range narrow literal, or a non-integer annotation if one can pre-resolve the value port, are not rejected at this boundary; the value-node inference pass simply steps aside and leaves the state intact.

  1. CODING.md.

Compliant. The new narrowing logic is factored as small free functions / decisions over explicit inputs rather than method-style hidden state: int_literal_magnitude_narrow_merge(dag, port, from, to) at src/v3/compiler/src/infer.rs:713-718 and the transform path returns a structured Decision::Set at src/v3/compiler/src/infer.rs:1122.

  1. TESTING.md.

Finding [BLOCKING with the inference issue] — missing negative regression coverage. The added tests cover valid happy paths only: annotated UInt8 = 5 at src/v3/compiler/tests/integration/int_literal_cardinality_test.rs:67-84, call-site UInt8 at src/v3/compiler/tests/integration/int_literal_cardinality_test.rs:89-106, and a loose emission check at src/v3/compiler/tests/integration/int_literal_cardinality_test.rs:111-116. Given the new bypass at src/v3/compiler/src/infer.rs:751, this PR should also add a behavior test that an invalid pre-resolved int literal does not survive inference, for example let x: UInt8 = 256 and/or let x: Bool = 5 if annotations can seed the literal port.

  1. LOCKED DESIGN DECISIONS.

N/A — the diff consumes the existing integer-literal / IntegerPrimitive modeling lane, referenced at src/v3/compiler/src/infer.rs:710-712, but does not alter thesis text, locked design docs, substrate declarations, or target-realization authority.

  1. TRACKED vs UNTRACKED DEBT.

N/A — no new TODO, scaffold, temporary bridge, or dual representation is introduced. The T-Modeling int-lit / PR #806 consumer comment at src/v3/compiler/src/infer.rs:710 is provenance for the helper, not an unresolved bridge.

3. Verdict

REQUEST_CHANGES. The core narrowing direction is right, and the call-site merge path does validate magnitude before setting the expected type, but the value-node retry path currently trusts any pre-resolved non-Int literal type. Tightening that branch to validate existing with int_literal_fits_expected_type before returning Retry, plus adding a negative regression test, would resolve the blocking concern.

Copy link
Copy Markdown
Contributor Author

Verified current head 97fd61710203729fc53a48bca21ece0e3d85a17b:

  • The queued manual review is valid and still current. Behavior::Value still returns Decision::Retry for any already-resolved non-Int int-literal port without validating the existing declaration or magnitude.
  • v3 still fails the full suite with the same 11-test broad diagnostic failure set, including the int-lit positives and existing TypeMismatch/M0/runner diagnostic tests.

Required next patch is now very specific:

  1. In the Behavior::Value int-literal branch, do not retry merely because existing != Int. First validate existing with int_literal_fits_expected_type(dag, literal, existing.declaration).
  2. If the fit check returns Ok(Some(true)), Retry is acceptable.
  3. If it returns Ok(Some(false)), emit the same magnitude_out_of_range diagnostic path rather than preserving the port.
  4. If it returns Ok(None) for a non-integer/non-range-backed declaration, do not preserve the pre-resolved type by fiat; fall through to the normal value typing / conflict path so existing TypeMismatch behavior survives.
  5. Add the negative regression let x: UInt8 = 256 expecting MagnitudeOutOfRange.

Do not request review again until the targeted diagnostic tests from the prior comment pass, especially thesis_validation_test::t1_4_type_mismatch_produces_a_typemismatch_diagnostic; that failure proves this is still disturbing generic fail-closed diagnostics.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 97fd6171 · Trigger: schedule
  • Thinking: 79s wall

⚠️ Unable to review because gh pr diff 897 --repo gunb-ai/gunbc failed with error connecting to api.github.com, leaving no allowed source-of-truth diff under the PR constraints.

Copy link
Copy Markdown
Contributor Author

Current-head triage for 968288e0dbfd61020185943ad16d230162ceaf85:

Progress: the prior broad diagnostic/M0/TypeMismatch failures are gone. v3 now fails only two int-lit tests:

  1. int_literal_cardinality_test::call_site_uint8_literal_narrows

    • compile_to_dag fails with diagnostic:
    • implicit template binding for id_u8conflicts while matchingUInt8againstInt``
    • This is now a call-site narrowing/template-binding conflict, not the earlier global fail-open retry issue.
  2. int_literal_cardinality_test::emit_let_uint8_uses_narrow_rust_type

    • Rust emit fails with MissingTypeRealization { target: DeclarationId(23) }.
    • This is the backend-realizability blocker previously called out: the PR accepts UInt8 narrowing, but Rust emit cannot realize that narrowed primitive yet.

The Behavior::Value fit-check/negative-regression direction appears implemented in the diff; please keep it. Next patch should be narrow:

  • For call-site id_u8(7): fix the implicit template binding path so an int literal may satisfy a range-backed expected UInt8 without creating an UInt8 vs Int template conflict. Keep this routed through diagnostic-producing range checks.
  • For emit: either add/repair Rust type realization for the narrowed integer primitive (UInt8 -> u8) or drop/defer the Rust-emission acceptance claim until realization exists. Since the worker brief asks downstream consumer evidence, the better closure is to add the realization if bounded.

Please rerun/post:
cargo test -p v3-compiler --test integration int_literal_cardinality_test after the next patch.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / unknown
  • Commit: 968288e0 · Trigger: schedule
  • Thinking: 33s wall

⚠️ Unable to review because gh pr diff 897 --repo gunb-ai/gunbc failed with error connecting to api.github.com, leaving no allowed source-of-truth diff under the PR constraints.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re-dashboard item (22:20:57): git fetch — 19557885c, MERGEABLE / CLEAN, 9044719ea ∈ history. No Codex diff-based finding → no fix commit.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re-dashboard item (22:21:59): git fetch — 19557885c, MERGEABLE / CLEAN, 9044719ea ∈ history. No Codex diff-based finding → no fix commit.

@briansrls briansrls changed the title quick-stag-803 T-Modeling int-literal magnitude consumer Apr 26, 2026
@briansrls
briansrls merged commit fd21fee into main Apr 26, 2026
4 checks passed
@briansrls
briansrls deleted the session/quick-stag-803 branch April 26, 2026 22:23
@briansrls

Copy link
Copy Markdown
Contributor Author

Re-dashboard item (22:22:59) — superseded

#897 is merged (main fd21feed6857…, 2026-04-26). Earlier conclusions stand: no Codex diff-based finding from the scheduled [api-review] run (gh pr diff connectivity), so there was never a fix commit for that entry.

Note: GitHub briefly returned mergeable: UNKNOWN while merge state settled; current PR state is MERGED.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re-dashboard item (22:24:07): Re-checked — #897 remains MERGED to main at fd21feed685700a212f3740ab498af031506441f. Prior [api-review] run still produced no diff (connectivity); no fix commit was ever required. This comment stands.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re-dashboard item (22:39:09): Verified again — MERGED, merge OID fd21feed685700a212f3740ab498af031506441f, mergedAt unchanged. [api-review] still never had a diff (connectivity); no fix commit applies. Comment stands.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re-dashboard item (22:40:09): gh pr view 897 — still MERGED, merge fd21feed685700a212f3740ab498af031506441f, mergedAt 2026-04-26T22:23:15Z. No new [api-review] artifact; no fix commit.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re-dashboard item (22:41:04): Re-gh pr view 897 — MERGED, merge fd21feed685700a212f3740ab498af031506441f, mergedAt unchanged. Still no [api-review] diff artifact; no fix commit.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re: “no [api-review] diff artifact / no fix commit” — verified, no code action

Checked gh pr view 897: MERGED (mergedAt 2026-04-26T22:23:15Z), mergeCommit.oid = fd21feed685700a212f3740ab498af031506441f — matches the dashboard re-check.

Why there is no fix commit: the Codex [api-review] entry never produced a diff-based finding because gh pr diff / GitHub API did not yield a reviewable diff (infra/connectivity), not because a specific line-level issue was waived. With no artifact, there is nothing to patch on this (now closed) PR.

Post-merge: merged PRs are not the right vehicle for a “fix” here anyway; if a future diff review surfaces a real defect against main @ fd21feed6857…+, that would be a new change on a new branch/PR, not a retroactive commit on #897.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 19557885 · Trigger: schedule
  • Thinking: 57s wall

Verdict: APPROVE — diff is narrowly scoped, fails closed, and is grounded in range facts.

The change is a clean T-Modeling consumer for int-literal narrowing:

  • int_literal_magnitude_narrow_merge (infer.rs:710-732) only refines Int → narrower when range facts prove fit — directed refinement, not a parallel representation.
  • decide Value branch (infer.rs:743-789) fails closed via MagnitudeOutOfRange (or internal ResolveError when range is missing) — same contract as call-site narrowing.
  • port_type_context for Value now reads the resolved port decl rather than the literal default; the comment correctly explains why this prevents spurious Int-vs-UInt8 conflicts in resolve_callable_target.
  • range_compatible_default_int_literal_argument is documented as a deliberate bridge: callable resolution accepts the binding, but narrowing/OOB enforcement remains authoritative in decide_transform. Authority is preserved.
  • New rust_uint8: TypeRealization is the obvious carrier addition; decide_transform change from continue to Decision::Set(*input_port, *expected_ty) actually pushes the narrowing into the substrate.
  • Tests cover the let-annotated success, OOB diagnostic, call-site narrowing, and Rust emission paths — behavior-driven and hermetic.

Minor exploratory note (non-blocking): the IntegerRangeLookup::Missing branch returns a synthetic ResolveError with a parenthetical "(internal: …)" name string. That fail-closed is fine, but if it's ever hit in practice, that diagnostic surface is awkward — a dedicated Diagnostic::Internal variant would localize the smell. Nothing to fix in this PR.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / codex-default
  • Commit: 19557885 · Trigger: schedule
  • Thinking: 92s wall

Verdict: APPROVE

The diff is narrowly scoped to consuming existing integer range facts for literal narrowing, adds the Rust UInt8 realization, and covers both success and fail-closed overflow behavior. I don’t see a concrete violation of the pinned invariants, modeling discipline, coding guidance, or testing discipline in the changed lines.

briansrls added a commit that referenced this pull request Apr 27, 2026
Single control surface for cleanup-lane harvest of #900/#901/#920/#897/#824/#825
per dispatch from tidy-dove-734 (#941). No ctrl#263 in repo; this docs/audit
artifact is the agreed fallback. Rows: source PR, gap, file/invariant, owner
lane, dissolution trigger, acceptance check, tracking authority, disposition.
briansrls added a commit that referenced this pull request Apr 27, 2026
Per bright-wolf-465 (inbox #945), no missed BLOCKING findings on these PRs;
flip rows 6/7/8 to closed with audit citation.
@briansrls briansrls mentioned this pull request Apr 27, 2026
briansrls added a commit that referenced this pull request Apr 27, 2026
briansrls added a commit that referenced this pull request Apr 27, 2026
* docs(audit): W-C1 follow-up harvest table

Single control surface for cleanup-lane harvest of #900/#901/#920/#897/#824/#825
per dispatch from tidy-dove-734 (#941). No ctrl#263 in repo; this docs/audit
artifact is the agreed fallback. Rows: source PR, gap, file/invariant, owner
lane, dissolution trigger, acceptance check, tracking authority, disposition.

* docs(audit): close #897/#824/#825 rows per bright-wolf-465 audit

Per bright-wolf-465 (inbox #945), no missed BLOCKING findings on these PRs;
flip rows 6/7/8 to closed with audit citation.

* docs(audit): reconcile note with row dispositions for #897/#824/#825

* WIP: calm-ant-861

* chore: apply cargo fmt

* WIP: calm-ant-861

* fix(test): fold B5 Loop closure receipt into m1_substrate_test

SG-0 census ratchet forbids new hand-authored .rs files. Move the
every_loop_node_originates_from_recursive_function_lowering test (and the
LoopNode/LoopBound import + two helper fns) into the existing
m1_substrate_test.rs and drop the standalone file + its integration.rs
registration. Behavior unchanged.

* docs: correct B5 receipt file path in synthesis doc (m1_substrate_test, not standalone file)

* docs: mark ROADMAP loop-emission row resolved + correct synthesis cite

Codex BLOCKING on be4a6ab: ROADMAP.md still listed the loop-emission
semantic invariant as open debt while the synthesis doc declared it
resolved — tracker-authority mismatch.

- ROADMAP.md:436: rewrite the row as RESOLVED 2026-04-27 with PR cite,
  audit summary (two production sites in lower.rs), receipt location
  (m1_substrate_test.rs), and marker-retired note.
- synthesis-doc §3 line 155: fix the receipt path
  (loop_construction_closure_test.rs → m1_substrate_test.rs after the
  SG-0 fold).

* fix(test): split global vs fixture-scoped Loop closure assertions

Codex BLOCKING on db7b773: previous test mixed a global all-Dag closure
check with fixture-only variant claims, so bootstrap loops could mask the
fixture-coverage claim.

Split into two phases:
- Global: every Behavior::Loop in the Dag (fixture + bootstrap) satisfies
  the recursive-function-lowering signature (loop.output is a Bind value
  port + Descent cluster id resolves). This is the closure invariant.
- Fixture-scoped: filter loops by span.file == fixture file before claiming
  both LoopBound variants are produced by THIS fixture. Bootstrap loops are
  excluded so the variant claim is mechanically about the fixture's
  recursive functions.

* post-merge: drop superseded artifacts; correct ROADMAP B5 receipt cite

The parallel B5 lane landed `r2_b5_loop_construction_closure_test.rs` on
main with a more rigorous receipt (substring push-site ratchet + per-fixture
DAG walk + Origin::Accumulated provenance). The harvest table in this PR is
also being landed via aggregate #949.

Drop:
- `docs/audit/w-c1-followup-harvest-2026-04-27.md` (canonical surface is
  #949).
- The m1_substrate_test additions (auto-reverted via merge --theirs;
  superseded by the standalone r2_b5_loop_construction_closure_test.rs on
  main).

Keep:
- `ROADMAP.md` row marking loop-emission RESOLVED, with citation rewritten
  to point at the actual landed receipt file (r2_b5_…) instead of the
  retired m1_substrate_test cite.
briansrls added a commit that referenced this pull request Apr 27, 2026
* docs: forward-fix audit for merged PR #897 and #824

Static review maps prior BLOCKING threads to current main with file/line
evidence; no code fix needed. Notes cargo verification for operators.

Made-with: Cursor

* docs: fix v3-compiler test target in forward-fix audit (§5)

--test boundary does not exist; m1_4_emit_python_test lives in the
consolidated integration test binary. Document the real layout.

Made-with: Cursor

* docs: polish forward-fix audit (section order, bootstrap pointer)

Renumber §5–§6 to §4–§5 so the outline is contiguous after §3.
Replace fragile bootstrap_generated.rs line-6 cite with an rg search
pattern stable across regen (per PR review feedback).

Made-with: Cursor
briansrls added a commit that referenced this pull request Apr 27, 2026
* docs(std.unicode): cite UCD 15.x / UAX-11 authority

Closes the #920 post-merge citation gap. Header now states the file
is sourced from UCD 15.x (UAX #11 East Asian Width) for the display-
width tables and is intentionally 15.x compatible rather than pinned
to a specific minor. UAX #9 is explicitly not consulted (no bidi).
No behavior changes.

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

* docs: tighten P5 per-PR dissolution gate (b) for ROADMAP-cited deferrals

Require exactly one checkable receipt: delete path, SG-0 census
before/after counts, or lane plus concrete ROADMAP row/link. Call out
vague deferrals as insufficient. Align INVARIANTS §P5 (b) with the
template without duplicating the checklist.

Made-with: Cursor

* docs(audit): W-C1 follow-up harvest table

Single control surface for cleanup-lane harvest of #900/#901/#920/#897/#824/#825
per dispatch from tidy-dove-734 (#941). No ctrl#263 in repo; this docs/audit
artifact is the agreed fallback. Rows: source PR, gap, file/invariant, owner
lane, dissolution trigger, acceptance check, tracking authority, disposition.

* docs(audit): mark #920 citation follow-up closed

* docs(audit): close #897 #824 #825 harvest rows

* docs(audit): cite closure evidence for harvest rows

* WIP: Cleanup

* docs(std.unicode): clarify UAX 11 coverage

* docs: link cleanup harvest from roadmap

* docs(std.unicode): refresh bootstrap spans

* docs(std.unicode): refresh full bootstrap spans

* docs(std.unicode): refresh no-parse bootstrap spans

* docs(audit): stabilize harvest code references

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.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