From 12bf0115d41b9c3d5cff6f4d05a13250f7f1326c Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 6 May 2026 18:43:54 +0000 Subject: [PATCH 1/5] docs(s7): Phase 1 BoundDeclarationView/match_bound inventory (fold.rs) Co-authored-by: Cursor --- ...-fold-rs-bounddeclarationview-inventory.md | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md diff --git a/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md b/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md new file mode 100644 index 00000000000..631258a7d52 --- /dev/null +++ b/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md @@ -0,0 +1,142 @@ +# S7 Phase 1 — `BoundDeclarationView` / `match_bound` consumer inventory (`fold.rs`) + +**Purpose:** Forcing-function artifact (Director ratified). Catalog of the +`BoundDeclarationView` + `match_bound` consumer surface in +`src/v3/grounding_coercion_fold/src/fold.rs` before Slice 2.5 implementation. +**Authority:** `docs/briefs/r3-substrate-s7-pr-f-bounddeclaration-consumer-worker.md`. + +This file mirrors the PR-body inventory for traceability in-tree. + +--- + +## 1. Grep catalog + +Command: + +```bash +git grep "BoundDeclarationView\|match_bound" src/v3/grounding_coercion_fold/ +``` + +Output at inventory time: + +``` +src/v3/grounding_coercion_fold/src/fold.rs:41:enum BoundDeclarationView { +src/v3/grounding_coercion_fold/src/fold.rs:72: bound: BoundDeclarationView, +src/v3/grounding_coercion_fold/src/fold.rs:86:fn design_doc_example_8_program_bound() -> BoundDeclarationView { +src/v3/grounding_coercion_fold/src/fold.rs:87: BoundDeclarationView::StaticBound(Interval::BoundedInterval { +src/v3/grounding_coercion_fold/src/fold.rs:95:fn match_bound( +src/v3/grounding_coercion_fold/src/fold.rs:96: program: &BoundDeclarationView, +src/v3/grounding_coercion_fold/src/fold.rs:101: BoundDeclarationView::StaticBound(_), +src/v3/grounding_coercion_fold/src/fold.rs:105: BoundDeclarationView::StaticBound(program_interval), +src/v3/grounding_coercion_fold/src/fold.rs:115: BoundDeclarationView::StaticBound(_), +src/v3/grounding_coercion_fold/src/fold.rs:118: (BoundDeclarationView::PlatformDependent, _) => BoundMatch::DiffersKind, +src/v3/grounding_coercion_fold/src/fold.rs:123: program: &BoundDeclarationView, +src/v3/grounding_coercion_fold/src/fold.rs:129: BoundDeclarationView::StaticBound(program_interval), +src/v3/grounding_coercion_fold/src/fold.rs:321: program_bound: &BoundDeclarationView, +src/v3/grounding_coercion_fold/src/fold.rs:346: .filter(|row| match_bound(&intent.bound, &row.bound) == BoundMatch::Matches) +src/v3/grounding_coercion_fold/src/fold.rs:399: bound: BoundDeclarationView, +src/v3/grounding_coercion_fold/src/fold.rs:429:fn design_doc_example_2_program_bound() -> BoundDeclarationView { +src/v3/grounding_coercion_fold/src/fold.rs:430: BoundDeclarationView::StaticBound(Interval::BoundedInterval { +src/v3/grounding_coercion_fold/src/fold.rs:513: &BoundDeclarationView::StaticBound(program_bound), +src/v3/grounding_coercion_fold/src/fold.rs:545: bound: BoundDeclarationView::StaticBound(program_bound), +``` + +No other matches under `src/v3/grounding_coercion_fold/` at this grep. + +--- + +## 2. Per-call-site narrative (broadening vs `design-emission-model.md` example surface) + +**Module preamble (`fold.rs` lines 1–14):** States that worked examples from +`docs/design-emission-model.md` are behavioral targets, but only Examples **1, +2, 5, 6, and 8** run on the `ScratchIntExamples` checkpoint path; others stay +`FoldNotImplemented`. **Broadening needed:** T-Ground-Rust Phase 1 / pilot-mirror +requires moving beyond `ScratchIntExamples` — **u128**, **isize**, **usize** +walker arms and declared inhabitance matching must eventually consume the same +`BoundDeclarationView` / `match_bound` predicate as the full emission surface, +not only scratch-int drivers. + +**`BoundDeclarationView` enum (`L41–44`):** Today: +`StaticBound(Interval) | PlatformDependent` (platform variant currently +`#[allow(dead_code)]`). Substrate `BoundDeclaration` is +`StaticBound(Interval) | PlatformDependent` per design authority. +**Broadening:** View must align with **full** `Interval`-carried program +facts and target inhabitance rows for **Rust i128/u128/isize/usize** (and any +other Phase-1 kernel integers), not only `i64` scratch literals. **Pilot-mirror:** +tests/helpers that synthesize `Interval` (`L513`, `L545`) must grow with +whatever canonical interval representation Phase 1 uses for wider primitives. + +**`ProgramIntegerIntent.bound` (`L72`):** Carries program-side bound into +selection. **Broadening:** Intent extraction from real program DAG (Slice C / +#1133 / #1286 track) must populate this field for all Phase-1 examples — not +fixed scratch closures. + +**`design_doc_example_8_program_bound` (`L86–93`):** Hard-codes Example 8’s +i32 exact interval as `StaticBound`. **Broadening:** Representative of “exact +static interval” programs; same pattern must generalize to other declared ranges +(u128/isize/usize) once facts are wired. + +**`match_bound` (`L95–119`):** Single structural predicate vs +`TargetIntegerInhabitanceBoundView` (`BoundUnspecified`, `StaticBoundFact`). +Implements design-doc rules: target `Unbounded` accepts any program `StaticBound`; +exact interval equality; `BoundUnspecified` and `PlatformDependent` mismatch +kinds. **Broadening:** Ensure **interval equality** and **kind** dispatch remain +correct when `StaticBoundFact` carries intervals outside signed-64 scratch +encoding (wider literals, usize platform rows). **Walker arms:** Every new +target row shape that participates in Phase 1 must still funnel through this +predicate or an explicit extension beside it (no parallel emission predicate). + +**`exact_static_bound_match` (`L122–132`):** Refinement for disambiguation after +`match_bound` filtering. **Broadening:** Same interval-type alignment as +`match_bound`. + +**`select_example_8_declared_inhabitance` / `select_declared_inhabitance` +(`L318–368`, filter at `L346`):** **Primary consumer** — filters declared +`TargetIntegerTypeInhabitance` DAG rows using `match_bound`. **Broadening:** Row +set must include **u128 / isize / usize** (and related) inhabitations when DAG +and scratch/bootstrap data expand; otherwise Phase 1 examples cannot select. + +**`example_8_program_intent` (`L396–420`):** Wires kernel/algebra/realization +names per scratch target language. **Broadening:** Additional arms or generalized +lookup when walker exercises non–Example-8 kernels. + +**`design_doc_example_2_program_bound` + `fold_design_doc_example_2_semiring_u32` +(`L429–458`):** Example 2 Semiring u32 bound. **Broadening:** Confirms Semiring +lane uses same bound machinery; **u128** / other Semiring inhabitants must follow +once declared rows exist. + +**`fold_design_doc_example_8_*` (`L470–492`):** Per-target Example 8 entry. +**Broadening:** Parallel **walker/pilot** paths for isize/u128/usize should call +the same selection stack (`select_example_8_declared_inhabitance` pattern). + +**Test hooks (`L494–552`):** `fold_design_doc_example_8_for_testing`, +`select_program_integer_intent_for_testing` — construct +`BoundDeclarationView::StaticBound(program_bound)` from `Interval`. +**Broadening:** Test fixtures may need wider interval types or DAG-driven bounds +to mirror production extraction. + +--- + +## 3. Per-site STOP triggers (new `BoundDeclaration` substrate variant) + +Per S7 brief **STOP-AND-ESCALATE**: if Phase 1 requires a **new `BoundDeclaration` +variant** beyond **`StaticBound` + `PlatformDependent`**, stop — P1 +substrate-fact-introduction + Substrate Mgr (#1739). + +| Location | Trigger | +|----------|---------| +| **`BoundDeclarationView` (`L41–44`)** | Adding a third view arm because substrate gained a new `BoundDeclaration` variant — **STOP** (confirm substrate change + P1 before editing consumer). | +| **`match_bound` (`L95–119`)** | New substrate variant implies new match arms and likely `TargetIntegerInhabitanceBoundView` / DAG parse changes — **STOP** unless brief explicitly permits and substrate is already landed. | +| **`parse_target_integer_inhabitance_bound` / row parsing (`L250–307` region)** | If inhabitance rows gain a new `bound:` shape — coordinate with substrate; may be STOP if it implies new `BoundDeclaration` variant. | +| **`select_declared_inhabitance` (`L327–368`)** | Symptom surface for “no matching row” after substrate expansion — diagnose substrate vs consumer gap before ad-hoc variants. | + +If broadening can be done **without** new substrate variants (e.g., wider +`Interval` payloads inside existing `StaticBound`, more rows in DAG), **no +STOP** — proceed within Phase 1 consumer work. + +--- + +## 4. Brief reference + +- Worker brief: `docs/briefs/r3-substrate-s7-pr-f-bounddeclaration-consumer-worker.md` +- Design emission examples / `BoundDeclaration` predicate: `docs/design-emission-model.md` (bound-matching sections; Rust/Python/Go triple walk) From 48c90d0b322c493f9c9d92743ac2f651aba7010d Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 6 May 2026 19:13:41 +0000 Subject: [PATCH 2/5] docs(s7): clarify inventory authority, Track A/B gates, Pattern D Co-authored-by: Cursor --- ...-fold-rs-bounddeclarationview-inventory.md | 102 +++++++++++++----- 1 file changed, 78 insertions(+), 24 deletions(-) diff --git a/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md b/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md index 631258a7d52..f533ccefbc2 100644 --- a/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md +++ b/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md @@ -3,7 +3,10 @@ **Purpose:** Forcing-function artifact (Director ratified). Catalog of the `BoundDeclarationView` + `match_bound` consumer surface in `src/v3/grounding_coercion_fold/src/fold.rs` before Slice 2.5 implementation. -**Authority:** `docs/briefs/r3-substrate-s7-pr-f-bounddeclaration-consumer-worker.md`. + +**Authority:** `docs/briefs/r3-substrate-s7-pr-f-bounddeclaration-consumer-worker.md` +*(canonical S7 worker brief — **tracked on `main`** at this path; this inventory +PR does not add or rename that file; STOP / Phase boundaries defer to it.)* This file mirrors the PR-body inventory for traceability in-tree. @@ -45,26 +48,67 @@ No other matches under `src/v3/grounding_coercion_fold/` at this grep. --- -## 2. Per-call-site narrative (broadening vs `design-emission-model.md` example surface) +## 2. Orthogonal tracks — interval widening vs platform-kind (do not conflate) + +Phase-1 consumer work spans **two substrate gates** that must stay separate in +dispatch planning: + +**Track A — Static intervals / numeric width (`StaticBound`, `Interval`):** +Scratch encoding uses `Interval` today; broader **i128 / u128** program +ranges and matching **`StaticBoundFact`** rows require widening interval +representation and declared `TargetIntegerTypeInhabitance` facts — still within +the **`StaticBound(Interval)`** substrate kind. + +**ROADMAP Pattern D — STOP+PING on bare u128 width work:** Per `ROADMAP.md` +§ reflective integration patterns (**Pattern D — numeric work changed philosophy +mid-window** / T-Numeric-Construction reframe): the next slice must **not** add +**u128** (nor UInt128 / fixed-width chain expansion) **merely as another table +row** unless explicitly tied to the **`Int` / `Nat`** refinement path; +**STOP+PING at brief-finalization** for bare width-row additions; owner R3 +Substrate (T-Numeric-Construction). This fold consumer **follows** substrate + +numeric lane receipts — it does not bypass Pattern D upstream. + +**Track B — Platform-dependent kinds (`PlatformDependent`, kind-only match):** +Targets such as Rust **`usize`** (and Go **`int`**) carry **platform-sized / +kind-only** bounds per `design-emission-model.md` — matched via the outer +`BoundDeclaration` sum (`PlatformDependent`), **not** by pretending their +semantics are “wider `Interval` literals.” **`match_bound`** already has a +**kind-only** arm for `BoundDeclarationView::PlatformDependent` (`fold.rs` +`L118`). **Explicit gate:** extending Phase 1 here means **substrate + +`TargetIntegerTypeInhabitance` row facts + `parse_target_integer_inhabitance_bound`** +alignment for platform-bound inhabitants — validate **before** folding Track B +into Track A work items. + +**`isize` boundary:** Classify per declared inhabitance rows at dispatch (exact +static intervals vs platform-sizing policies). Do **not** lump **isize** with +Track A u128 widening **or** Track B usize matching without reading the shape of +the rows being added. + +--- + +## 3. Per-call-site narrative (broadening vs `design-emission-model.md` example surface) **Module preamble (`fold.rs` lines 1–14):** States that worked examples from `docs/design-emission-model.md` are behavioral targets, but only Examples **1, 2, 5, 6, and 8** run on the `ScratchIntExamples` checkpoint path; others stay `FoldNotImplemented`. **Broadening needed:** T-Ground-Rust Phase 1 / pilot-mirror -requires moving beyond `ScratchIntExamples` — **u128**, **isize**, **usize** -walker arms and declared inhabitance matching must eventually consume the same -`BoundDeclarationView` / `match_bound` predicate as the full emission surface, -not only scratch-int drivers. +requires moving beyond `ScratchIntExamples`. **Track A:** walker / declared +inhabitance for wider **static** intervals (**i128 / u128** and Pattern D–aligned +substrate). **Track B:** **usize** / platform-kind rows and matching rules. +**isize:** per-row classification. All must eventually use the same +`BoundDeclarationView` / `match_bound` predicate (**no parallel emission +predicate**), but implementation tasks stay split by track above. **`BoundDeclarationView` enum (`L41–44`):** Today: `StaticBound(Interval) | PlatformDependent` (platform variant currently `#[allow(dead_code)]`). Substrate `BoundDeclaration` is `StaticBound(Interval) | PlatformDependent` per design authority. -**Broadening:** View must align with **full** `Interval`-carried program -facts and target inhabitance rows for **Rust i128/u128/isize/usize** (and any -other Phase-1 kernel integers), not only `i64` scratch literals. **Pilot-mirror:** -tests/helpers that synthesize `Interval` (`L513`, `L545`) must grow with -whatever canonical interval representation Phase 1 uses for wider primitives. +**Track A broadening:** align the view with full **`Interval`** program +facts for wider **static** ranges (i128/u128 path; Pattern D upstream). **Track +B broadening:** exercise **`PlatformDependent`** on the program side where design +authority requires — distinct from interval widening. **Pilot-mirror:** tests/helpers +that synthesize `Interval` (`L513`, `L545`) must grow with Phase 1’s +canonical interval representation for Track A. **`ProgramIntegerIntent.bound` (`L72`):** Carries program-side bound into selection. **Broadening:** Intent extraction from real program DAG (Slice C / @@ -73,8 +117,10 @@ fixed scratch closures. **`design_doc_example_8_program_bound` (`L86–93`):** Hard-codes Example 8’s i32 exact interval as `StaticBound`. **Broadening:** Representative of “exact -static interval” programs; same pattern must generalize to other declared ranges -(u128/isize/usize) once facts are wired. +static interval” programs (**Track A**); generalize to wider **static** ranges per +Pattern D–aligned substrate. **Track B** examples use **`PlatformDependent`** +where the design doc calls for platform-bound targets — not the same extension as +wider `Interval` literals. **`match_bound` (`L95–119`):** Single structural predicate vs `TargetIntegerInhabitanceBoundView` (`BoundUnspecified`, `StaticBoundFact`). @@ -82,9 +128,11 @@ Implements design-doc rules: target `Unbounded` accepts any program `StaticBound exact interval equality; `BoundUnspecified` and `PlatformDependent` mismatch kinds. **Broadening:** Ensure **interval equality** and **kind** dispatch remain correct when `StaticBoundFact` carries intervals outside signed-64 scratch -encoding (wider literals, usize platform rows). **Walker arms:** Every new -target row shape that participates in Phase 1 must still funnel through this -predicate or an explicit extension beside it (no parallel emission predicate). +encoding (**Track A**: wider `StaticBoundFact` intervals). **Track B:** do not +collapse platform-kind targets into “wider intervals” — use substrate rows + +kind dispatch. **Walker arms:** Every new target row shape that participates in +Phase 1 must still funnel through this predicate or an explicit extension beside +it (no parallel emission predicate). **`exact_static_bound_match` (`L122–132`):** Refinement for disambiguation after `match_bound` filtering. **Broadening:** Same interval-type alignment as @@ -93,8 +141,10 @@ predicate or an explicit extension beside it (no parallel emission predicate). **`select_example_8_declared_inhabitance` / `select_declared_inhabitance` (`L318–368`, filter at `L346`):** **Primary consumer** — filters declared `TargetIntegerTypeInhabitance` DAG rows using `match_bound`. **Broadening:** Row -set must include **u128 / isize / usize** (and related) inhabitations when DAG -and scratch/bootstrap data expand; otherwise Phase 1 examples cannot select. +set must include **Pattern D–aligned u128/i128 static** inhabitants (**Track A**), +**platform-kind** rows for **usize** / related targets (**Track B**), and +correctly shaped rows for **isize** per substrate — when DAG and bootstrap data +expand; otherwise Phase 1 examples cannot select. **`example_8_program_intent` (`L396–420`):** Wires kernel/algebra/realization names per scratch target language. **Broadening:** Additional arms or generalized @@ -102,12 +152,13 @@ lookup when walker exercises non–Example-8 kernels. **`design_doc_example_2_program_bound` + `fold_design_doc_example_2_semiring_u32` (`L429–458`):** Example 2 Semiring u32 bound. **Broadening:** Confirms Semiring -lane uses same bound machinery; **u128** / other Semiring inhabitants must follow -once declared rows exist. +lane uses same bound machinery; **u128** / wider Semiring inhabitants follow +**Pattern D–aligned** substrate rows once declared (not ad-hoc width expansion). **`fold_design_doc_example_8_*` (`L470–492`):** Per-target Example 8 entry. -**Broadening:** Parallel **walker/pilot** paths for isize/u128/usize should call -the same selection stack (`select_example_8_declared_inhabitance` pattern). +**Broadening:** Parallel **walker/pilot** paths for **Track A / Track B / isize** +targets should call the same selection stack (`select_example_8_declared_inhabitance` +pattern) once corresponding `TargetIntegerTypeInhabitance` rows exist. **Test hooks (`L494–552`):** `fold_design_doc_example_8_for_testing`, `select_program_integer_intent_for_testing` — construct @@ -117,7 +168,7 @@ to mirror production extraction. --- -## 3. Per-site STOP triggers (new `BoundDeclaration` substrate variant) +## 4. Per-site STOP triggers (new `BoundDeclaration` substrate variant) Per S7 brief **STOP-AND-ESCALATE**: if Phase 1 requires a **new `BoundDeclaration` variant** beyond **`StaticBound` + `PlatformDependent`**, stop — P1 @@ -129,6 +180,7 @@ substrate-fact-introduction + Substrate Mgr (#1739). | **`match_bound` (`L95–119`)** | New substrate variant implies new match arms and likely `TargetIntegerInhabitanceBoundView` / DAG parse changes — **STOP** unless brief explicitly permits and substrate is already landed. | | **`parse_target_integer_inhabitance_bound` / row parsing (`L250–307` region)** | If inhabitance rows gain a new `bound:` shape — coordinate with substrate; may be STOP if it implies new `BoundDeclaration` variant. | | **`select_declared_inhabitance` (`L327–368`)** | Symptom surface for “no matching row” after substrate expansion — diagnose substrate vs consumer gap before ad-hoc variants. | +| **Pattern D / u128–width substrate** | Adding UInt128/u128 **width** without **Int/Nat** tie-in — **STOP+PING** per `ROADMAP.md` Pattern D; resolve in **T-Numeric-Construction** briefs before treating as fold-consumer-only work. | If broadening can be done **without** new substrate variants (e.g., wider `Interval` payloads inside existing `StaticBound`, more rows in DAG), **no @@ -136,7 +188,9 @@ STOP** — proceed within Phase 1 consumer work. --- -## 4. Brief reference +## 5. Brief reference - Worker brief: `docs/briefs/r3-substrate-s7-pr-f-bounddeclaration-consumer-worker.md` + *(canonical path on `main`; STOP-AND-ESCALATE section authoritative).* - Design emission examples / `BoundDeclaration` predicate: `docs/design-emission-model.md` (bound-matching sections; Rust/Python/Go triple walk) +- ROADMAP Pattern D (numeric / u128 discipline): `ROADMAP.md` — § reflective integration patterns, **Pattern D** From a55cbcbde6ffc4139439525b3317f88ed94d71ed Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 6 May 2026 19:18:15 +0000 Subject: [PATCH 3/5] docs(s7): auditable merge-base receipt for S7 worker brief (blob SHA) Co-authored-by: Cursor --- ...ate-s7-phase1-fold-rs-bounddeclarationview-inventory.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md b/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md index f533ccefbc2..780cb7ef74c 100644 --- a/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md +++ b/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md @@ -8,6 +8,13 @@ *(canonical S7 worker brief — **tracked on `main`** at this path; this inventory PR does not add or rename that file; STOP / Phase boundaries defer to it.)* +**Merge-base audit (not in this PR diff — auditable on `main`):** That path is +present on `origin/main` as git blob **`ac843c5817358785979409dc30deaba94fb28de5`** +(path cited above; introduced **`7153efb51`** “R3 Substrate”, **#1825**). +Mechanical check before merge: +`git cat-file -t ac843c5817358785979409dc30deaba94fb28de5` → `blob`, or +`git show origin/main:docs/briefs/r3-substrate-s7-pr-f-bounddeclaration-consumer-worker.md | head -n 5`. + This file mirrors the PR-body inventory for traceability in-tree. --- From 01352f4c98125c52064873a8b71bdcc659260746 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 6 May 2026 19:22:56 +0000 Subject: [PATCH 4/5] =?UTF-8?q?docs(s7):=20Q1/P1=20gate=20=E2=80=94=20Plat?= =?UTF-8?q?formDependent=20=E2=89=A0=20wider=20StaticBoundFact?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- ...-fold-rs-bounddeclarationview-inventory.md | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md b/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md index 780cb7ef74c..7fd889f8f41 100644 --- a/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md +++ b/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md @@ -81,15 +81,27 @@ kind-only** bounds per `design-emission-model.md` — matched via the outer `BoundDeclaration` sum (`PlatformDependent`), **not** by pretending their semantics are “wider `Interval` literals.” **`match_bound`** already has a **kind-only** arm for `BoundDeclarationView::PlatformDependent` (`fold.rs` -`L118`). **Explicit gate:** extending Phase 1 here means **substrate + -`TargetIntegerTypeInhabitance` row facts + `parse_target_integer_inhabitance_bound`** -alignment for platform-bound inhabitants — validate **before** folding Track B -into Track A work items. - -**`isize` boundary:** Classify per declared inhabitance rows at dispatch (exact -static intervals vs platform-sizing policies). Do **not** lump **isize** with -Track A u128 widening **or** Track B usize matching without reading the shape of -the rows being added. +`L118`). + +**Not wider `StaticBoundFact` (Q1):** Under **`design-emission-model.md` Q1** +consolidation, **`PlatformDependent` is a distinct outer kind**, not an +`Interval` edge case. **`usize` / architecture-dependent rows are not** +“broader `TargetIntegerInhabitanceBoundView::StaticBoundFact` intervals.” Encoding +them that way would **split substrate authority** (same failure mode Q1 calls out +for “`BoundDeclaration = Interval` only”). **P1 modeling faithfulness:** +extend the **target inhabitance carrier** (`TargetIntegerTypeInhabitance` **`bound:`** +field + **`parse_target_integer_inhabitance_bound`**) so platform targets **name +`PlatformDependent` structurally** — **STOP** if consumer work invents interval +width where substrate requires the platform-kind gate. + +**Explicit gate:** Phase 1 Track B work lands **substrate + row facts** first, +then consumers — **never** merge Track B into Track A as “interval widening.” + +**`isize` boundary:** Classify per declared inhabitance rows — **`isize`** is **not** +automatically Track B like **`usize`**; substrate may use **`StaticBound` exact +intervals** for a fixed pointer-sized signed range **or** other declared shapes. +Do **not** lump **isize** with Track A u128 widening **or** Track B usize matching +without reading each row’s **`BoundDeclaration`** kind. --- From 8e1c400578932159917598d131a86c2f30d3ad68 Mon Sep 17 00:00:00 2001 From: Brian Searls Date: Wed, 6 May 2026 20:07:22 +0000 Subject: [PATCH 5/5] =?UTF-8?q?docs(s7):=20inventory=20=E2=80=94=20Platfor?= =?UTF-8?q?mDependent=20arm=20is=20DiffersKind=20placeholder=20until=20Tra?= =?UTF-8?q?ck=20B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- ...s7-phase1-fold-rs-bounddeclarationview-inventory.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md b/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md index 7fd889f8f41..a02215db4f8 100644 --- a/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md +++ b/docs/briefs/r3-substrate-s7-phase1-fold-rs-bounddeclarationview-inventory.md @@ -79,9 +79,13 @@ numeric lane receipts — it does not bypass Pattern D upstream. Targets such as Rust **`usize`** (and Go **`int`**) carry **platform-sized / kind-only** bounds per `design-emission-model.md` — matched via the outer `BoundDeclaration` sum (`PlatformDependent`), **not** by pretending their -semantics are “wider `Interval` literals.” **`match_bound`** already has a -**kind-only** arm for `BoundDeclarationView::PlatformDependent` (`fold.rs` -`L118`). +semantics are “wider `Interval` literals.” **`match_bound`** has a dedicated +arm for **`BoundDeclarationView::PlatformDependent`** (`fold.rs` **`L118`**), but +today it returns **`BoundMatch::DiffersKind` for every target shape** — i.e. **no +selection reaches `Matches`** on this path until Track B lands **target-side +`PlatformDependent` facts** in **`TargetIntegerTypeInhabitance`** (plus parsing) +**and** extends the predicate with explicit **kind-only positive matches** (not +just this placeholder arm). **Not wider `StaticBoundFact` (Q1):** Under **`design-emission-model.md` Q1** consolidation, **`PlatformDependent` is a distinct outer kind**, not an