Repository navigation
R3 Substrate: IntPlatform/UIntPlatform + isize/usize Rust rows - #1933
Conversation
…ame) Renames CardinalityPayload::new_unchecked to new_unchecked_bypassing_idempotence so every call-site that does not route through Dag::alloc_cardinality_decl is, by name, declaring it is not applying the cardinality_idempotent_target rule. Per Director routing #828 #issuecomment-4383647114 (Path B over Path A); brief: docs/briefs/r2-impossible-bugs-nested-optional-codegen-bypass-closure-worker.md (#1778, warm-dove-810). - Discipline-visible doc comment names the load-bearing invariant. - 205 call-sites updated across 6 files (4 hand-written non-test sites + 4 test sites + ~50 generated sites in 3 bootstrap_*_generated.rs files refreshed via the regen_bootstrap_emit format string). - Mechanical refresh; zero semantic change. Existing cardinality_idempotent / cardinality_idempotence tests pass; cargo fmt clean. - r2-closure-ledger row updated: nested-optional flatten now cites #1803 as the codegen-bypass closure receipt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The prior commit's mass-rename of CardinalityPayload::new_unchecked → new_unchecked_bypassing_idempotence was applied with sed, preserving multi-line formatting; fresh regen_bootstrap emits on a single line. The regen_bootstrap --verify CI gate caught the divergence. This commit runs regen_bootstrap (no --verify) to align the committed snapshots with the format string. No semantic change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…probe Authorized single retrigger per R3 Mgr at #1761 #issuecomment-4384216296. Prior run (job 74523060739) was cancelled at 30m hard timeout mid-rustc release recompile of v3-compiler for self_host_fixed_point; ci/fmt/v3 green. Probing whether warmer cache / different runner state lands within budget; if same failure recurs, escalate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…e gap Address blocking review on PR #1819 (codex@9ccfe165): 1. Scale was a bare coproduct; Grounding consumers and downstream algebra would have to re-encode the SI exponent table at each call site. Add `fn scale_exponent(s: Scale) -> Int` as the canonical typed exponent authority (single-source-of-truth invariant; total over all Scale inhabitants). 2. `Measure<Q, S>` admitted any type-reference for Q/S at the parser level — denotationally Q must inhabit Quantity and S must inhabit Scale, but no parametric where-clause syntax exists in the substrate. Document the CONSTRAINED-INHABITANCE GAP scaffold matching the pattern at `dsl/std/algebra.dag` (`GroupCompletion<M>` / `FieldOfFractions<R>`), with a named dissolution trigger (parametric where-clause syntax lands → tighten to `<Q> : Quantity, <S> : Scale`). 3. Refresh the COMPOSITION block and citation discipline: brief paths live in the parent worktree (cross-program review reaches them via the gunbc#828 ratification thread). Inline rule-text quotes for Practice 4 / `feedback_construction_over_ratchets` / `feedback_reason_not_label` per `brief-authoring-checklist.md`. Update the conceptual composition lines to reflect option (c) RATIFIED (no `Refined<>` wrapper at this layer). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Add `cross_target_coverage_carrier_test.rs` to EXPECTED_HAND_AUTHORED_TEST in `sg0_census_test.rs` (sorted ASCII-ascending; receipt cites Director Option 2 RATIFIED at gunbc#828 #issuecomment-4377533390). - Refresh `parse_corpus_manifest.txt` via the `refresh_handwritten_parse_snapshot_manifest` host (picks up the new `src/v3/std/cross_target_coverage.dag` entry + the `extdeps_bootstrap_fixtures.dag` / `bootstrap_authority.dag` row changes). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Address blocking review on PR #1842 (codex@2eb2632a): ShapeATarget was stamped 🟢 TERMINAL with an inline checkpoint comment but lacked the four-pattern dissolution receipt that `feedback_coproduct_dissolution` requires for the GREEN classification. Pattern follows the DB-18 / DB-9 / DB-16 receipt format at `docs/design-db18-workflow-effect-carrier.md` §"Dissolution receipt". Pattern 1 (fact-placement): n/a — all variants attach to the same typed slot at the same DAG location. Pattern 2 (variant-is-data): n/a — tag identity governs typed dispatch into per-target method-template-contract authorities; collapsing to `target_name: String` would re-introduce string-name dispatch (Option 2 §4.C=(i) ratified specifically to prevent that). Pattern 3 (algebraic-form): n/a — no algebraic operation over {Rust, Python, Go}; the set is Director-ratified per Shape A portability. Pattern 4 (dimensional): n/a — targets do not factor into orthogonal coordinates; per-target primitives + method-template contracts + emit are irreducible per-target profiles. Stamp confirmed: 🟢 TERMINAL. Bootstrap regen + parse-corpus-manifest refresh follow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…state Address non-blocking finding on PR #1914 (codex@f994e1f3): file-level pilot-scope text still listed u128 as deferred even though the row is present in this PR. Refresh: - PILOT SCOPE list now includes u128. - T-Int128 SLICE B1/B2 block annotates the resolution: B2 deferral closed by Phase A `BigInt` host repr widening (commit `e7ba022c6`); u128 row landed in Phase B-1 (commit `59511503e`). - New FOLLOW-ON DEFERRAL block names the next cascade explicitly: isize/usize wait on substrate-side IntSize/UIntSize kernel integer introduction (Director-level scope per Mgr disposition Path 1 at gunbc#1761 #issuecomment-4393235461). Bootstrap snapshots + parse manifest regenerated to absorb the comment edit through the bootstrap span byte ranges. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Review metadata
Findings: None. The hand-authored surface ( Verdict: APPROVE — Narrowly scoped R3 substrate + Rust spec wiring; no concrete violations of INVARIANTS, modeling discipline, CODING, or TESTING surfaced in the reviewed diff. |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
7c645050· Trigger:schedule - Thinking:
144s wall
Non-blocking — Strengths
dsl/std/machine_constraints.dagPointerWidth is documented as a substrate-level target-resolved width token with a bounded constrained-inhabitance gap and dissolution trigger.dsl/std/integer.dagIntPlatform and UIntPlatform compose existing integer carriers with MachineWidth instead of introducing a parallel platform-integer authority.src/v3/spec/rust.dagRust isize and usize realizations consume the new substrate carriers in the same PR via TargetIntegerTypeInhabitance rows.
✅ No blocking concerns in the PR-scoped .dag substrate changes or regenerated snapshots.
|
Review metadata
Verdict: APPROVE Diff looks clean. The new substrate names in dsl/std/machine_constraints.dag:48 and dsl/std/integer.dag:114 are single-authority additions rather than parallel representations, and they land with same-PR consumers in src/v3/spec/rust.dag:176 and src/v3/spec/rust.dag:266. I did not find a concrete violation of the pinned invariants, modeling discipline, coding guidance, or testing guidance in the reviewed diff. |
# Conflicts: # src/v3/compiler/src/bootstrap_generated.rs # src/v3/compiler/src/bootstrap_generated_without_parse_surface.rs
Resolve bootstrap_generated*.rs conflicts by regenerating snapshots after integrating main (includes #1933 and concurrent substrate work). Co-authored-by: Cursor <cursoragent@cursor.com>
|
Review metadata
1. Story of the diffThis PR adds pointer-width-sized integer modeling as a substrate concept rather than as Rust-only spelling. 2. Invariant categories
chatgpt-review-e2ddb56c-e0d0-48…
3. VerdictAPPROVE The PR adds a substrate-level pointer-width integer concept with a direct Rust target consumer, keeps target-specific spelling out of the substrate, refreshes the generated snapshots, and tracks the one known constraint gap with a bounded dissolution trigger. I found no blocking or non-blocking findings tied to changed lines. |
R3 Substrate —
IntPlatform/UIntPlatformsubstrate-fact-introduction + Rust isize/usize coverageAuthority: Director Q1+Q2+Q3+Q4 RATIFIED at gunbc#1739 #issuecomment-4393248961 (2026-05-07). Inner-token rename
Platform→PointerWidthRATIFIED at gunbc#828 #issuecomment-4393616097. Worker brief atdocs/briefs/r3-substrate-int-platform-uint-platform-worker.md.Closes the substrate cascade deferred from PR #1914 Phase B (isize/usize rows blocked on missing platform-sized integer kernel types).
What's in this PR
dsl/std/machine_constraints.dagtype PointerWidthopaque substrate token (Option β shape). Sibling toMachineWidth<bits>'s phantom-bits: wherebits = 32resolves at substrate-load time,bits = PointerWidthresolves at Grounding-emit time per target spec. Practice 4 dissolution ledger inline (terminal at substrate-concept layer; constrained-inhabitance gap mirrorsMachineWidth<bits>'s P2/P5 scaffold).dsl/std/integer.dagType aliases over existing
Compose<...>carrier; no new sum types. Practice 4 N/A.src/v3/spec/rust.dagIntPlatform/UIntPlatformtostd.integerimport.data rust_isize: TypeRealization(targetIntPlatform, carrier"isize").data rust_usize: TypeRealization(targetUIntPlatform, carrier"usize").data rust_integer_inhabit_isize_platform: TargetIntegerTypeInhabitance(kernel_integer: IntPlatform,bound: PlatformDependentFact).data rust_integer_inhabit_usize_platform: TargetIntegerTypeInhabitance(kernel_integer: UIntPlatform,bound: PlatformDependentFact).Bootstrap regen + manifest
Snapshots regenerated (
bootstrap_generated.rs,bootstrap_generated_without_parse_surface.rs,bootstrap_std_generated.rs);parse_corpus_manifest.txtrefreshed.Name collision resolution (chronicled for archaeology)
The original brief framed the inner substrate token as
Platform, but that name pre-existed atdsl/std/types.dag:356asPlatform = Linux | Macos | Windows(OS-identity sum, NOT pointer-width axis). Surfaced via STOP-PING at gunbc#1739 #issuecomment-4393567605; consumer scan at #issuecomment-4393571479 confirmed zero direct consumers of the existingPlatform. Director ratified inner-token renamePlatform→PointerWidthat gunbc#828 #issuecomment-4393616097 perfeedback_reason_not_label(pointer-width is the structural reason; OS-identity vs pointer-width are orthogonal axes — 32-bit Linux vs 64-bit Linux are different pointer widths but same OS). Outer carrier namesIntPlatform/UIntPlatformstay verbatim per Q1 RATIFIED. Pre-existingstd.types::Platformleft untouched.Closure gates
int_platform_uint_platform_substrate_landed: DECLARED → CONSUMER_LANDED on merge (consumer = Rust isize/usize rows in same PR).rust_primitive_full_coverage(from PR R3 Phases A+B: BigInt host repr + u128 coverage (isize/usize deferred) #1914): PARTIAL → CONSUMER_LANDED on merge (full Rust integer primitive coverage closes via this slice's isize/usize rows).Cross-program handoff (Grounding Mgr #1745)
G2 Phase 2 isize/usize coverage unblocks on merge. Per-target pointer-width projection (Rust 32/64-bit pointer; Go
intwidth; Python arbitrary-precision int via target-conditioned lowering) is Grounding-lane work, NOT substrate. Bundled-scope honored: G2 Phase 2 lowering rules NOT in this PR per Director discipline (parallel infrastructure DISALLOWED).Authority audit (5 questions)
IntPlatform/UIntPlatform/PointerWidthdid NOT exist at HEAD; onlyMachineWidth<bits>andCompose<Algebra, MachineConstraint>(substrate carriers consumed viaCompose<Int, MachineWidth<PointerWidth>>shape per Q-MachineConstraint sub-decision 3). Pre-existing collision:std.types::Platform(OS-identity); resolved via Director-ratified inner-token rename.docs/briefs/r3-substrate-int-platform-uint-platform-worker.md.spec/rust.dagconsume them viakernel_integer: IntPlatform/UIntPlatform+bound: PlatformDependentFact, eliminating the platform-dependent-bound bridge that PR R3 Phases A+B: BigInt host repr + u128 coverage (isize/usize deferred) #1914 Phase B surfaced.CI status
cargo test -p v3-compiler— exit 0 (full suite green).cargo clippy --all-targets -- -D warnings— clean.cargo fmt --all --check— clean. Targeted ratchets (target_integer_type_inhabitance_rows_are_structural_slice_b_receipt, int_literal_cardinality, parse_corpus manifest) all green.SG-0 hand-path delta: 0