Repository navigation
docs(r3): T-Numeric-Construction lane reframe (was T-Int128) - #1364
Conversation
…re<P>) Authored per PR #1319 Director ratification ask 4 (PM-side authoring). C1 — `r3-pb-tier3-perf-budget-worker.md` - Sub-gate of T-Tier3-Dissolution: tier3_mirror_dissolution_perf_within_budget - Thresholds: median ≤2x hand-Rust, p99 ≤5x (Director-ratified) - Cargo bench fixtures per retired mirror (termination/computation/induction/effect-carrier) - Owner: PB Manager (R2→R3 continuation); S-M scope ~2-3 days C2 — `r3-substrate-provider-typed-wire-worker.md` - T-Anthropic-Wire scope expansion: extract `ProviderTypedWire<P>` carrier - Per-provider parameter rows in `dsl/extdeps/providers/*/` - Drops prior 6-month elapsed-time check per user directive ("nothing can be deferred past R3") - Owner: Substrate Manager (R2→R3 continuation); M scope ~1-2 weeks - Resolves R3 design challenge #8 via path-(a) commit Both briefs are dispatch-gated on R2-Evaluator readiness; STOP+PING discipline matches `feedback_worker_stall_diagnosis` substrate-gap-stall pattern. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ing) Codex review on PR #1331 sha 1870104 flagged 3 BLOCKING + 1 non-blocking findings against the C1 + C2 briefs. All 4 verified valid against current code; this commit pushes fixes. C2 — `r3-substrate-provider-typed-wire-worker.md`: 1. (BLOCKING) Operation-indexed carrier, not provider-level envelope. `dsl/extdeps/llm/anthropic.dag:168-200` declares `service llm.Anthropic { operation Messages { transport rest { … } } }`; providers carry MULTIPLE operations each with own request/response/error envelopes. Single provider-level envelope loses per-operation typing. Fix: split into two carriers — `ProviderOperationWire<P>` keyed on (provider, operation) for per-op wire envelopes, `ProviderConfig<P>` for provider-level shared facts (auth, base_url, models). Multi-op coverage required (Anthropic Messages + OpenAI Chat Completions at minimum; Embeddings/Tool Use land as additional rows). 2. (BLOCKING) Migration discipline — no parallel-authority window. Prior framing said old per-provider files "either retired or kept as v2-parsed legacy until v2 retirement" — exactly the parallel-authority anti-pattern (`feedback_parallel_representation_debt`). Fix: explicit commit to ONE of two paths in same PR — (a) deletion, preferred; OR (b) one-way generated projection from new carriers (un-editable header; CI rejects manual edits). "Kept as legacy" is rejected per user directive 2026-04-30 ("nothing deferred past R3"). C1 — `r3-pb-tier3-perf-budget-worker.md`: 3. (BLOCKING) std mirror path coverage. Verified `dsl/std/{termination, computation,induction,effects}.dag` AND `src/v3/std/{...}` both exist for all four blocks. CI wiring updated to reference both — `dsl/std/` as canonical authority + `src/v3/std/` as substrate twin + Rust mirror sites (`dag.rs`, `dag/effects.rs`, `workflow_idempotency.rs`). 4. (Non-blocking) `criterion` dev-dep claim. Verified `criterion` is NOT in any Cargo.toml. Fix: removed false "already in Cargo.toml" claim; adding criterion as `[dev-dependencies]` is part of THIS lane's deliverables (worker's first commit), not a precondition. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codex inline BLOCKING comment on PR #1331 sha 1870104 flagged that ProviderTypedWire<P> would drop per-operation wire facts when OpenAI has ChatCompletion + Responses as distinct REST operations. The structural fix (operation-indexed ProviderOperationWire<P>) landed in d881e2a. This commit corrects the EXAMPLE data rows to match the actual operations declared in dsl/extdeps/llm/openai.dag (verified live: ChatCompletion at :163, Responses at :200) — prior commit used "Embeddings" as the second operation, which is not declared. Both ChatCompletion + Responses are now explicit in the migration deliverables and acceptance gate; multi-operation coverage table cites exact line numbers for both Anthropic Messages and OpenAI ChatCompletion / Responses. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cursor/composer-2 review on PR #1331 sha d881e2a caught a real self-contradiction in deliverable #1: it called criterion an "existing dev-dep" while deliverable #4 (added in d881e2a) explicitly says criterion is NOT in any Cargo.toml and adding it is part of THIS lane. Both can't be true. Fix: deliverable #1 now says "added as new dev-dep per deliverable #4 below; not currently in any Cargo.toml" — single authority on the criterion state, no contradiction. Per INVARIANTS Documentation Describes Live State: documentation should not assert repo state that doesn't exist. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cursor/composer-2 review on PR #1331 sha 89e4082 caught a copy-paste slip in C2 brief cross-refs: line labeled "Sibling: T-V2-Retirement" but pointed at r3-pb-tier3-perf-budget-worker.md (which is the C1 brief for T-Tier3-Dissolution sub-gate, not T-V2-Retirement). Fix: label the link correctly as "Sibling brief: r3-pb-tier3-perf- budget-worker.md (C1 sub-gate of T-Tier3-Dissolution; co-sibling in same wave per PR #1319 ratification ask 4)". No T-V2-Retirement reference here since neither brief is for T-V2-Retirement. Exploratory finding (not BLOCKING) per cursor APPROVE verdict. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codex BLOCKING review on PR #1331 sha 19dc267 correctly flagged a structural contradiction in the C1 perf-budget brief: comparing median(eval) against median(hand-Rust) requires both paths to exist simultaneously, but T-Tier3-Dissolution removes the hand-Rust side. Either the mirror stays alive (parallel-implementation, INVARIANTS §P2 violation) or the comparison is impossible. Fix reframes the gate as two-phase: **Phase 1 (sibling PR; pre-dissolution)**: - 0a: criterion dev-dep added - 0b: hand-Rust mirror benchmarks; deletes alongside dissolution - 0c: frozen tier3_baseline.json with median+p99 captured on canonical CI machine **Phase 2 (this brief; post-dissolution)**: - 1: eval-path bench fixtures (.dag-evaluator only) - 2: shared deterministic fixture corpus (Phase 1 + Phase 2 share) - 3: .dag TestClaim comparing measured timings against frozen baseline JSON - 4: CI wiring on Evaluator path + baseline file (read-only) Director's ≤2× median / ≤5× p99 thresholds preserved (now relative to frozen baseline data, not live mirror code). Strict temporal ordering: Phase 1 → mirror dissolution → Phase 2. Reverse order is impossible (STOP condition #1). Phase 1 baseline JSON survives mirror dissolution; mirror code does not. Discipline: explicit INVARIANTS §P2 callout — only DATA survives post-dissolution, not parallel authority. tier3_baseline.json is read-only after capture; CI rejects edits. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…Services dependency Codex BLOCKING review on PR #1331 sha 19dc267 flagged that ProviderOperationWire<P> as drafted captured only a fraction of what service { operation { ... } } blocks at dsl/extdeps/llm/{anthropic, openai}.dag carry. Deleting those extdeps with the carrier as replacement would lose 8 fact-classes per operation: - Output projection paths (e.g., "content/0/text") - Input field declarations + types - Output field declarations + types - Transport body composition - Transport headers - Response status mapping (200/4xx/5xx) - Mock responses (per status, with descriptions) - Service-level config (rate_limit, retry, auth) This violates feedback_projections_must_compose_facts. Reframe: the structural answer is NOT to extract a subset-carrier replacing the canonical authority. It's to make the canonical authority parseable natively via T-Ground-Services (R3 Grounding lane) and dissolve the v3-side parallel MIRROR. The lane now delivers 3 structural moves, all gated on T-Ground-Services landing first: 1. Relocate dsl/extdeps/llm/{openai,anthropic}.dag to dsl/extdeps/providers/{openai,anthropic}/wire.dag (path-only move; content unchanged) 2. Delete src/v3/std/anthropic_schema.dag (v3-side parallel mirror); update BOOTSTRAP_FIXTURE_PATH_KEYS to read canonical extdeps directly 3. Optionally author ProviderTypedWire<P> as thin alias wrapping Service<P> (T-Ground-Services owned) — only if cross-provider lens-instance authoring needs a parametric handle; defaults to "no alias unless consumer demand" Acceptance gates updated: 4 gates (relocation + mirror dissolution + optional alias decision + no fact re-encoding) instead of prior 5 gates that assumed carrier extraction. Hard prerequisite added: T-Ground-Services parser-grammar slice must land first. Without it, the lane has nothing to do — it can't delete the canonical extdeps without the parser to read them. STOP conditions updated: STOP+PING if T-Ground-Services not landed, or if alias scope creeps into fact reification. Per ROADMAP `### Post-merge debt (2026-04-30 analyses)` "Provider/ API mirror multiplication risk": "Corrective action: prioritize shared T-Ground-Services ingestion path over per-provider mirrors. Owner: R3 Grounding (post-Anthropic-chain)." Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cursor/composer-2 APPROVE_WITH_COMMENTS on PR #1331 sha 30413c3 caught a residual inconsistency in the C1 lane-summary at lines 24-26. Item 1 still read "Cargo bench fixtures comparing hand-Rust mirror invocation vs Evaluator-backed .dag invocation for each of the four retired mirrors" — implying a simultaneous side-by-side harness, contradicting the two-phase pattern (Phase 1 hand-Rust captures frozen JSON; Phase 2 eval-only vs baseline) that lives in §"Acceptance gate" and Deliverables. Same class of bug as the criterion self-contradiction caught by cursor on sha d881e2a — fixed the structural shape but left the lane-summary bullet describing the prior shape. Fix: lane-summary now explicitly names Phase 1 + Phase 2 and the INVARIANTS §P2 framing (no simultaneous dual paths). Adds a 4th deliverable line for CI integration that explicitly notes the dissolved Rust mirror sites no longer exist as gate triggers post-dissolution. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…n't carry perf-budget shape Codex BLOCKING inline on PR #1331 sha 62c20e9 line 51 caught a real unverified claim. The brief said "no new substrate variant; structural composition over existing BehavioralObservation-shaped TestPredicates" but verified BehavioralObservation at src/v3/std/verification.dag:126-130 only carries: - subject: DeclarationRef - input_sample: DeclarationRef - expected_output: DeclarationRef It's shaped for input/output equality testing, NOT perf-budget-against- baseline. The prior brief was hand-waving the substrate target. Honest fix: surface the substrate gap explicitly. Two paths, Director/ Substrate-Mgr decision at brief-finalization: Path (a) — preferred: new TestPredicate variant. Substrate Mgr authors PerfWithinBaseline { bench_subject, baseline_data, median_factor_max, p99_factor_max } in src/v3/std/verification.dag as hard prerequisite for C1 dispatch. Cleanest structurally; preserves "tests are data" facet 3 discipline. Path (b) — fallback: existing ExecuteCommand variant. Bench harness becomes a subprocess via ExecuteCommand { command, args, expect_exit_code: 0 }; binary parses baseline + measured + exits non-zero on breach. No new substrate but loses structural-acceptance precision. Updates: - §"Acceptance gate" — explicit two-path framing with shape sketch - Per-mirror claim shape — uses PerfWithinBaseline (path a) with ExecuteCommand fallback (path b) noted - Deliverable #3 — predicate variant per Substrate-Mgr decision - Dependencies — added #1: Substrate-Mgr decision on the variant before Phase 2 dispatches (renumbered prior 1-4 to 2-5) - STOP conditions — added #1: STOP+PING if path (a) variant not authored; OR explicit downshift to path (b) with Director sign-off Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codex BLOCKING inline on PR #1331 sha aca422d line 65 caught the C2 brief hand-waving "compose via existing BehavioralObservation" without naming subjects/lenses. Same pattern as the C1 substrate gap caught earlier — and same honest fix. Verified that none of the 4 C2 gates have existing TestPredicate variants that structurally observe what they require: - Gate 1 (relocation): file-existence at new path + non-existence at old path — no existing variant - Gate 2 (mirror dissolved): file-non-existence + path-key membership change — no existing variant for file check; BOOTSTRAP_FIXTURE_PATH_KEYS membership covered by Compiles on a fixture - Gate 3 (alias optional): TestPredicate::Compiles on import fixture covers if alias declared; meta-fact recording if not - Gate 4 (no fact re-encoding): structural-absence across substrate — no existing variant Honest fix: per-gate, name the substrate-Mgr-decision shape: Path (a) — preferred: new TestPredicate variants - BootstrapFixturePathPresent { path, must_exist } for gates 1+2 - NoDeclarationMatching { kind, in_directory, except } for gate 4 Path (b) — fallback: ExecuteCommand subprocesses - test -f for gates 1+2 - tier3_no_re_encoding_check for gate 4 Path (c) for gate 4 only: PR-review checklist (reviewer-enforced) with Director sign-off on the structural-precision tradeoff STOP conditions extended: - #2: STOP if Substrate Mgr declines all 3 paths for any gate Per `feedback_no_textual_enforcement_bridges`: file-presence is a typed substrate fact, not a grep operation — preferring path (a) with new typed variants. Same shape as C1's PerfWithinBaseline gap surfaced honestly in 86f0292. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Cursor APPROVE_WITH_COMMENTS on PR #1331 sha 9e79b5b caught 3 real leftover inconsistencies from the reframe iterations: 1. Title still said "Carrier Extraction Worker Brief" while the body explicitly abandoned carrier extraction as the structural move. Renamed to "Mirror Dissolution + T-Ground-Services Consumption Worker Brief" — matches the reframed lane shape. 2. Line 162 said "Carrier extraction IS the dissolution" — direct contradiction with §"Lane reframe" (lines 38-57) and §"Scope" (lines 18-29). Rewrote to align: "The dissolution mechanism is option (a) from feedback_isomorphism_or_generation_for_mirrors — generation/parsing from the canonical authority — implemented here via T-Ground-Services parsing the canonical extdeps." 3. Line 170 named ratchet `provider_wire_no_per_provider_duplication` but the actual gate at line 92 is `provider_wire_no_fact_re_encoding`. Same-doc naming drift. Fixed all 6 questions of the substrate- principle audit to reference the correct gate name + extended the audit answers to reflect the reframed lane (T-Ground-Services parsing as recovery pattern; canonical extdeps preserved). All 3 findings were direct artifacts of the prior reframe (aca422d) not propagating through every cite — same self-consistency-sweep pattern that PR #1341 just landed for r3-structure.md. Per `feedback_verify_thesis_claims`: when reframing, sweep ALL references; partial sweeps create exactly this kind of contradictory documentation that confuses dispatch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per Director ratification at gunbc#828 comment 4357704426 (2026-05-01). User pushback: "model real numbers/natural numbers and then form int64 based on those models - not jump straight to int64." Reframes R3 Lane #6 (T-Int128 → T-Numeric-Construction; same lane slot, expanded scope). Director's prior `OrderedRing<Magnitude>` shorthand ratification (4357686725) explicitly SUPERSEDED in favor of the explicit construction chain ℕ → ℤ → ℚ → ℝ that the user requested. Construction chain (ratified verbatim): Magnitude (terminal carrier) → Nat = Semiring<Magnitude> → Int = AbelianGroup<Nat> via Grothendieck → Rational = Field<Int> → Real = ApproximateField<Rational> Refinement chain at any layer: Int<N>, Nat<N>, Real<N>. Width-specific aliases (Int8..Int128, UInt8..UInt128, Float32/64) are refinements, not parallel substrate. Lane absorbs: - T-Int128 (was its own R3 lane) - post-R3 BigInt deferral (BigInt = Int unbounded; same substrate landing as Int<128>) - Float widening (was unscoped) - UInt widening (parallel bake-in to Int) - IntLit refinement 8 types in scope: 3 direct (Int, UInt, Float) + 5 inherited via Int chain (Char, EpochMs, Duration, Milliseconds, Seconds — auto-fix when Int becomes abstract). Files in this PR: NEW: - docs/design-numeric-construction.md — design doc; covers construction chain, 5 substrate-introductions needing 6Q audit (Magnitude, AbelianGroup verify, Grothendieck encoding choice, Field verify, ApproximateField), refinement chain, per-target grounding mapping (Rust/Python/Go), v2-refinement-syntax-blocker coordination (path-a same wave with T-V2-Retirement), cost-lens implications per layer AMENDMENTS: - docs/r3-structure.md — Lane #6 reframe across §Summary, §Acceptance, §Lane structure, §Manager structure, §Dependency DAG visual, §Dependency on R2, §Worker dispatch precondition. Lane size L-XL. T-Numeric-Construction is one of 3 non-Evaluator-gated lanes but has its own internal cascade gate on T-V2-Retirement. - docs/r2-structure.md — cross-program-producer §"3 non-Evaluator- gated R3 lanes" updated to reflect post-12-lane structure + T-Numeric-Construction reference - docs/thesis/r2-r3-thesis-mapping.md — Integer overflow thesis claim updated to refinement-parametric form; Tier 2 Int128/Word128 row noted as subsumed by T-Numeric-Construction - docs/briefs/r2-release-manager.md — manager continuation pattern updated; R2 close gate framing reflects 12-lane structure - ROADMAP.md — new "Post-merge debt (2026-05-01 R3 substrate- completion adjacents)" section for Json/Bytes opaque kernel types (out of scope for T-Numeric-Construction; assess post-lane-close per Director disposition) DELETED: - docs/briefs/t-int128-r3-initial-slice.md — superseded by lane reframe; eager-ram's prior PR #1333 work (Word128Carrier + signed i128 pilot row) preserved as load-bearing under reframe (Word128 becomes storage refinement under Int<128>) Substrate Mgr authoring follows: 6Q audits on the 5 substrate- introductions, then docs/briefs/t-numeric-construction-worker.md brief. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Review metadata
Findings
Nothing in this diff touches CODING.md / TESTING.md Rust or test policy in a way that violates those docs. The reframe is documentation and planning only; substrate work stays proposal-shaped with explicit PROPOSAL status and ratification links. docs/modeling-discipline.md practices (fail-closed, illegal states, etc.) apply to compiler/substrate code paths — not engaged here. Verdict: APPROVE_WITH_COMMENTS — The lane reframe, structure-doc updates, thesis mapping, ROADMAP debt row, and new construction-chain design doc read coherent and aligned with locked Director context; fix the superseded-brief link so the new doc doesn’t ship a 404. |
|
Cursor APPROVE_WITH_COMMENTS finding fixed in follow-up PR. Real NON-BLOCKING catch — Fix at follow-up PR: branch — sent from deep-wolf-155 |
…truction doc (#1369) Cursor APPROVE_WITH_COMMENTS on PR #1364 sha 384f661 flagged a real NON-BLOCKING finding: the design-doc Cross-refs section linked `docs/briefs/t-int128-r3-initial-slice.md`, but that brief was deleted in the same PR. After merge, the link is a 404. Per INVARIANTS §"Documentation Describes Live State": navigation should match what exists in the tree. Fix: drop the markdown link; keep plain-text reference to the deleted brief filename + cite PR #1364 (where the deletion landed) for anyone needing the pre-deletion content via diff/git history. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Per Director ratification at gunbc#828 comment 4357704426 (2026-05-01).
User pushback: "basically i think we should model real numbers/natural numbers and then form int64 based on those models - not jump straight to int64." + "i should have done this sooner."
Reframes R3 Lane #6 (T-Int128 → T-Numeric-Construction; same lane slot, expanded scope). Director's prior
OrderedRing<Magnitude>shorthand ratification (4357686725) explicitly superseded by the explicit construction chain.Construction chain (Director-ratified verbatim)
Refinements at any layer:
Int<N>,Nat<N>,Real<N>. Width-specific aliases (Int8/.../Int128,UInt8/.../UInt128,Float32/Float64) are refinements, not parallel substrate.Lane absorbs
Intunbounded; same substrate landing asInt<128>) — removes the post-R3 deferral entirely per user directive "nothing can be deferred past R3"8 types in scope: 3 direct (
Int,UInt,Float) + 5 inherited viaIntchain (Char,EpochMs,Duration,Milliseconds,Seconds— auto-fix when Int becomes abstract).Files
NEW:
docs/design-numeric-construction.md— design doc; covers construction chain + 5 substrate-introductions needing 6Q audit (Magnitude, AbelianGroup verify, Grothendieck encoding choice, Field verify, ApproximateField) + refinement chain + per-target grounding (Rust/Python/Go) + v2-refinement-syntax-blocker coordination (path-a same wave with T-V2-Retirement) + cost-lens implications per layerAMENDMENTS (cross-doc sweep for self-consistency, same shape as Director's PR #1341 12-lane sweep):
docs/r3-structure.md— Lane feat(cloud): add cloud resource management layer with GCP and AWS sup… #6 reframe across §Summary, §Acceptance, §Lane structure, §Manager structure, §Dependency DAG visual, §Dependency on R2, §Worker dispatch precondition. Lane size L-XL. T-Numeric-Construction is one of 3 non-Evaluator-gated lanes but has its own internal cascade gate on T-V2-Retirement.docs/r2-structure.md— cross-program-producer §"3 non-Evaluator-gated R3 lanes" updated for post-12-lane structuredocs/thesis/r2-r3-thesis-mapping.md— Integer overflow thesis claim → refinement-parametric form; Tier 2 Int128/Word128 row → subsumed by reframedocs/briefs/r2-release-manager.md— manager continuation pattern + R2 close gate framing reflect 12-lane structureROADMAP.md— new "Post-merge debt (2026-05-01 R3 substrate-completion adjacents)" section for Json/Bytes opaque kernel types (out of scope per Director disposition)DELETED:
docs/briefs/t-int128-r3-initial-slice.md— superseded by lane reframe; eager-ram's prior PR feat(v3): T-Int128 Slice B1 — signed i128 pilot row + Word128Carrier #1333 work (Word128Carrier+ signed i128 pilot row) preserved as load-bearing under reframe (Word128becomes storage refinement underInt<128>)What this enables
Next steps (Substrate Mgr territory, NOT this PR):
docs/briefs/t-numeric-construction-worker.mdworker brief authoring (Substrate Mgr; gated on this PR + 6Q audits clearing)Test plan
Word128Carrierpreserved as storage refinement; PR feat(v3): T-Int128 Slice B1 — signed i128 pilot row + Word128Carrier #1333 work not wasted under reframeAuthority chain
🤖 Generated with Claude Code