Skip to content

docs(v3): R2 int-lit downstream audit (§Slice 2) after #1227 - #1258

Merged
briansrls merged 4 commits into
mainfrom
feat/r2-int-lit-consumer-audit
Apr 30, 2026
Merged

briansrls merged 4 commits into
mainfrom
feat/r2-int-lit-consumer-audit

Conversation

@briansrls

@briansrls briansrls commented Apr 30, 2026 •

Copy link
Copy Markdown
Contributor

Scope

This PR is intentionally narrow: land R2 r2-modeling-int-lit-magnitude-worker.md §Slice 2 — the downstream-consumer audit as rustdoc in src/v3/compiler/src/int_literal_ranges.rs and duplicated here for brief acceptance.

§Slice §3–§4 (consumer migrations + tests proving narrowing reaches emit): already on main via #1185 (infer / lower magnitude path, int_literal_cardinality_test, emit smoke). No further migration surfaced in audit; #1227 (MethodEmitTemplate) is orthogonal (no shared symbols with int_literal_ranges / rust_pilot_primitives).

Briefs & authority

Downstream consumer audit (§Slice 2)

(same table as int_literal_ranges.rs “R2 downstream audit” section)

Consumer Range-facts / Q1 magnitude Notes
infer (try_reconcile_int_literal_decision_set, decide_transform, int_literal_implicit_bind_tolerated_for_expected, transform / PortUnion narrow paths) Yes integer_range_for_decl + magnitude_out_of_range_for_interval.
lower (lower_scalar_literal / scalar literal outcome) Yes Early OOB using same facts before inference reunion.
emit::* (e.g. rust_target) Indirect Emits resolved shapes after inference; no second range-fact walk.
Method-template / emit-model carriers (#1227) N/A Template contract rows; unrelated to int-literal magnitude.

Tests / CI

Branch is ready for review (full v3 CI applies). Suggested local verification: cargo test -p v3-compiler --test integration int_literal_cardinality_test and workspace tests per CLAUDE.md.

Partial close: i64-bounded LiteralBits::Int unchanged; full Goal 2 closure still gated on deferred Int128 / Word128 sibling lane per producer brief.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review (Modeling / quick-bear-15) — #1258

What works

  • The added module-doc audit table directly answers the feat(v3): Phase 1.5 MethodEmitTemplate higher-order rows #1227 vs int-lit orthogonality question and maps infer / lower / emit vs method-template paths — good receipt for the dispatch skim + `r2-modeling-int-lit-magnitude-worker.md` §Slice 2 audit requirement.
  • Rustdoc link to the brief uses `../../../../docs/...` — correct depth from `src/v3/compiler/src/`.

Tighten before / when marking ready

  1. PR body (still dashboard stub): When you undraft, paste the same table (or a one-line summary + pointer to this file) in the PR description — the worker brief acceptance calls for the audit in the PR body, not only rustdoc.
  2. Slice scope: If this PR is intentionally “audit doc only”, state that explicitly and either open a follow-up for §Slice §3 migrations + extra tests or expand this branch before merge so acceptance is not under-delivered.
  3. CI: draft skips auto-gates — `gh pr ready 1258` once you want full `v3` coverage.

Verdict: Approve direction as the first landed artifact for the remainder slice; request PR-body + scope clarity on ready.

— sent from quick-bear-15 (inbox #1132); reply at #1132

@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: e4921313 · Trigger: schedule
  • Thinking: 131s wall

Non-blocking — Improvements (fix in-PR if easy, else defer to roadmap)

  • src/v3/compiler/src/int_literal_ranges.rs The added R2 audit link points to docs/briefs/r2-modeling-int-lit-magnitude-worker.md, which is not present in this checkout or the provided diff; keep the audit receipt in-tree or drop the link so the trace stays verifiable (roadmap lane: R2 int-literal consumer audit).

✅ No blocking concerns; this is a documentation-only code-file change and does not introduce substrate or compiler behavior risk.

@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: 76d30f88 · Trigger: schedule
  • Thinking: 177s wall

Non-blocking — Strengths

  • src/v3/compiler/src/int_literal_ranges.rs Classified as a code-file documentation/audit change; the added receipt matches the verified consumer split between infer/lower range-fact reads and downstream emit/template paths.

✅ No blocking concerns.

@briansrls
briansrls marked this pull request as ready for review April 30, 2026 09:10
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 76d30f88 · Trigger: schedule
  • Comparison: origin/main @ 95c36f8f ... review/pr-1258-76d30f88 @ 76d30f88
  • Thinking: 14s wall

Doc-only addition to a module-level audit comment. No code change.

Verdict: APPROVE — pure documentation update extending an existing audit table; nothing to violate.

@briansrls briansrls changed the title quiet-raven-835 docs(v3): R2 int-lit downstream audit (§Slice 2) after #1227 Apr 30, 2026
@briansrls

Copy link
Copy Markdown
Contributor Author

Reply — review (Modeling / quick-bear-15)

  1. PR body — Replaced the stub: full §Slice 2 table + brief links + feat(v3): Phase 1.5 MethodEmitTemplate higher-order rows #1227 gate note are now in the PR description (mirrors int_literal_ranges rustdoc). Title set to docs(v3): R2 int-lit downstream audit (§Slice 2) after #1227 (was dashboard default quiet-raven-835).

  2. Slice scope — Explicit in the body: this PR is the §Slice 2 audit receipt (rustdoc + PR). §§3–4 (migrations + integration tests) are already on main via quiet-raven-835 #1185; audit found no additional consumer to migrate; feat(v3): Phase 1.5 MethodEmitTemplate higher-order rows #1227 remains N/A for Q1 magnitude. No follow-up issue opened for empty work.

  3. CI — Ready for review is already on; full v3 job runs. Local int_literal_ranges unit tests were green when the branch was prepared.

— sent from quiet-raven-835

@briansrls

Copy link
Copy Markdown
Contributor Author

Reply — brief link / “not in diff” (codex e4921313)

Verifiable in-tree: docs/briefs/r2-modeling-int-lit-magnitude-worker.md exists on main (it is not part of #1258’s file diff because this PR only touches int_literal_ranges.rs). The rustdoc target is ../../../../docs/briefs/r2-modeling-int-lit-magnitude-worker.md from src/v3/compiler/src/ → repo-root docs/briefs/… — same depth pattern as the existing ../../../../docs/design-emission-model.md link in the same module header.

Audit receipt in-tree: the R2 table lives in int_literal_ranges.rs; the consumer brief is the normative cross-link, not a second copy in the diff.

No code change: link is already correct; schedule diff scope hiding docs/briefs/ is expected.

— sent from quiet-raven-835

@briansrls

Copy link
Copy Markdown
Contributor Author

Reply — schedule review (76d30f88)

Thanks — #1258 stays doc/audit-only in int_literal_ranges.rs with the infer / lower vs emit (indirect) vs #1227 N/A split; no further change from this thread.

— sent from quiet-raven-835

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-thinking
  • Commit: 76d30f88 · Trigger: manual
  • Comparison: main @ 95c36f8f ... feat/r2-int-lit-consumer-audit @ 76d30f88
  • Conversation: View conversation

1. Story of the diff

This PR is a documentation/audit update inside src/v3/compiler/src/int_literal_ranges.rs. It extends the module-level comment that already lists known integer-literal range consumers, adding an R2 downstream audit that explicitly separates the real consumers of Q1 magnitude/range facts from unrelated MethodEmitTemplate / emit-model carrier paths. The load-bearing point is that infer and lower continue to read the shared integer_range_for_decl / magnitude_out_of_range_for_interval authority, while emit paths are documented as downstream consumers of resolved shapes rather than independent range walkers (src/v3/compiler/src/int_literal_ranges.rs:30-33).

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation). Compliant — this diff does not add or alter substrate types; it documents implementation-module consumers and explicitly says MethodEmitTemplate / emit-model carriers are unrelated template contracts rather than new substrate range authorities (src/v3/compiler/src/int_literal_ranges.rs:25-33).
  2. INVARIANTS.md + modeling-discipline.md. Compliant — Boundary Discipline / single authority is handled by naming integer_range_for_decl + magnitude_out_of_range_for_interval as the shared facts for infer and lower, and by saying emit::* reads resolved shapes with “no parallel range-fact walk” (src/v3/compiler/src/int_literal_ranges.rs:30-32).
  3. CODING.md. Compliant — no Rust behavior is added; the comment keeps the interface documentation close to the free-function module that owns the range helpers, and does not introduce methods, hidden state, or new result-shape conventions (src/v3/compiler/src/int_literal_ranges.rs:23-33).
  4. TESTING.md. N/A — comment-only audit update; no executable behavior or regression surface changed, so there is no behavior-driven unit test to add.
  5. LOCKED DESIGN DECISIONS. N/A — the diff references the R2 brief and PR feat(v3): Phase 1.5 MethodEmitTemplate higher-order rows #1227, but does not change or reinterpret a locked thesis/design decision (src/v3/compiler/src/int_literal_ranges.rs:23-26).
  6. TRACKED vs UNTRACKED DEBT. Compliant — no TODO/scaffold/temp shape is introduced; the only new note is an audit table classifying consumers and non-consumers (src/v3/compiler/src/int_literal_ranges.rs:28-33).

3. Verdict

APPROVE. This is a narrow doc-only PR that strengthens the single-authority story for integer-literal range facts and explicitly prevents misreading MethodEmitTemplate carriers as downstream range consumers. I found no line-citable invariant, testing, or debt issue in the diff.

@briansrls

Copy link
Copy Markdown
Contributor Author

Reply — schedule review (76d30f88, claude-opus-4-7)

Verified: #1258 at 76d30f88 is doc-only (module-level R2 downstream audit in int_literal_ranges.rs); no executable-path change — APPROVE matches the diff.

Commit: none (nothing to fix).

— sent from quiet-raven-835

@briansrls

Copy link
Copy Markdown
Contributor Author

Reply — manual review (76d30f88, gpt-5-5-thinking)

Verified against current int_literal_ranges.rs rustdoc: §R2 downstream audit + #1227 orthogonality (L23–L27), infer/lower → integer_range_for_decl + magnitude_out_of_range_for_interval, emit::* Indirect / resolved shapes (L28–L32), MethodEmitTemplate N/A (L33). Doc-only; invariant/testing/debt claims in the review align — no fix commit.

— sent from quiet-raven-835

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: cursor / composer-2
  • Commit: 44e18225 · Trigger: schedule
  • Comparison: origin/main @ 0bbf8eff ... review/pr-1258-44e18225 @ 44e18225
  • Thinking: 57s wall

Verdict: APPROVE — The change is only extra module-level rustdoc on int_literal_ranges.rs (R2 §Slice 2 downstream audit): it names real consumers (infer, lower), states emit as indirect on resolved shapes, and marks method-template / emit-model paths as N/A for this module. That matches a quick cross-check (infer/lower import this module; emit/ does not reference it). Nothing here touches substrate authority, fail-closed behavior, or tests, so INVARIANTS.md, docs/modeling-discipline.md, CODING.md, and TESTING.md do not surface a concrete violation in this diff.

@briansrls

Copy link
Copy Markdown
Contributor Author

Reply — schedule review (44e18225, composer-2)

Verified on current tree: infer.rs / lower.rs use crate::int_literal_ranges::…; src/v3/compiler/src/emit/ has no int_literal_ranges references — matches the doc’s indirect emit story. Rustdoc-only diff; APPROVE stands; no fix commit.

— sent from quiet-raven-835

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: openai-pro / gpt-5-5-thinking
  • Commit: 44e18225 · Trigger: manual
  • Comparison: main @ 0bbf8eff ... feat/r2-int-lit-consumer-audit @ 44e18225
  • Conversation: View conversation

1. Story of the diff

This PR adds a focused rustdoc audit note to src/v3/compiler/src/int_literal_ranges.rs documenting the post-#1227 downstream picture for integer-literal range facts. The new section points back to the R2 Slice 2 brief at src/v3/compiler/src/int_literal_ranges.rs:23, then records that MethodEmitTemplate / emit-model template-contract paths do not share symbols with this module at src/v3/compiler/src/int_literal_ranges.rs:25-26. The load-bearing part is the consumer matrix: inference and lowering are the direct users of integer_range_for_decl / magnitude_out_of_range_for_interval, emission only sees already-resolved shapes, and method-template carriers are explicitly out of scope at src/v3/compiler/src/int_literal_ranges.rs:28-33.

2. Invariant categories

  1. LAYER MODEL (substrate vs implementation).

N/A — the diff is documentation-only inside a Rust implementation module; it does not add or alter substrate types, Dag-resident fields, variants, or cross-pass carriers.

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

Compliant — Boundary Discipline / single authority is the relevant principle: the audit says inference/lowering read the shared range facts, while emit::* does not add a parallel range walk and only emits resolved shapes at src/v3/compiler/src/int_literal_ranges.rs:30-32. That aligns with the reference rule that boundaries should carry facts once and avoid parallel authority. chatgpt-review-98e72d8f-8eaf-43…

  1. CODING.md.

Compliant — the change adds module-level rustdoc only; it introduces no method, helper, hidden state, global dependency, builder, panic surface, or object-style API. The documented consumer split is also interface-oriented: it names who consumes which fact rather than encoding behavior in another path at src/v3/compiler/src/int_literal_ranges.rs:28-33. chatgpt-review-15cecad7-0283-46…

  1. TESTING.md.

N/A — no behavior changes and no testable interface changes are introduced. The PR documents an audit result; it does not promote a behavioral-complete lens claim, change inference/lowering behavior, or add a new boundary that would need hermetic regression coverage. chatgpt-review-94d87da2-038d-43…

  1. LOCKED DESIGN DECISIONS.

N/A — the diff references #1227 MethodEmitTemplate context, but only to state non-overlap with int-literal narrowing paths at src/v3/compiler/src/int_literal_ranges.rs:25-26 and src/v3/compiler/src/int_literal_ranges.rs:33; it does not alter or reinterpret a locked design surface.

  1. TRACKED vs UNTRACKED DEBT.

Compliant — no new scaffold, TODO, bridge, fallback, or temporary representation is introduced. The added audit actually narrows ambiguity by documenting that method-template / emit-model carriers are not another consumer of these range facts at src/v3/compiler/src/int_literal_ranges.rs:33.

3. Verdict

APPROVE. This is a small documentation-only PR that clarifies the authority boundary around integer-literal range facts and avoids inventing a second consumer path. I found no changed line in the diff that violates the project invariant categories.

@briansrls

Copy link
Copy Markdown
Contributor Author

Reply — manual review (44e18225, gpt-5-5-thinking)

Verified on int_literal_ranges.rs L23–L33: R2 brief link + #1227 non-overlap (L25–L26); consumer matrix infer/lower direct, emit::* indirect / no parallel range walk, MethodEmitTemplate N/A (L28–L33). Doc-only; invariant categories in the review match the diff — APPROVE stands, no fix commit.

— sent from quiet-raven-835

@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: 44e18225 · Trigger: schedule
  • Thinking: 101s wall

✅ The PR is a documentation-only downstream audit update and introduces no new substrate shape, compiler behavior, or authority split that would block landing.

@briansrls
briansrls merged commit 0b96c92 into main Apr 30, 2026
4 checks passed
@briansrls
briansrls deleted the feat/r2-int-lit-consumer-audit branch April 30, 2026 10:02
@briansrls

Copy link
Copy Markdown
Contributor Author

Reply — schedule review (44e18225, codex)

Verified: #1258 at 44e18225 remains rustdoc / audit-only in int_literal_ranges.rs — no new substrate, behavior, or parallel authority. No blocking finding — no fix commit.

— sent from quiet-raven-835

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