Skip to content

docs(r3): gate #105 SymbolicCost Tier 1 carrier-extension canvas - #2828

Merged
briansrls merged 81 commits into
mainfrom
session/warm-wolf-698-gate-105-canvas
May 13, 2026
Merged

briansrls merged 81 commits into
mainfrom
session/warm-wolf-698-gate-105-canvas

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Summary

Key Mgr recommendations

  • Q1 Rational ordering: layered OrderedField<T> introduction (strict-mirror of OrderedRing<T>) + lazy consumer migration
  • Q2 Linear-vs-Polynomial: collapse LinearCost into PolynomialCost(degree=1) (net 10 variants not 11, per §P5)
  • Q3 algebra rules: tabulated 10 new interaction rules; PolyLogCost reserved for log^k only; (n!)² = UnknownCost (Tier-2 deferral receipt)
  • Q4 STOP-SIGNAL re-resets at 11th/12th variant
  • §8 Tier-2 mechanism: defer to R4 (InverseAckermann doesn't fit IteratedAlgebra; no uniform compositional surface)

5+2 anti-patterns encoded for worker review

5 Director-enumerated + 2 Mgr-derived (OrderedField strict-mirror discipline + LinearCost atomic-migration).

Test plan

  • docs-only change; relies on CI fmt/changes
  • Director ratification on §12 Q1-Q5 + §8 Tier-2 disposition

🤖 Generated with Claude Code

briansrls and others added 30 commits May 12, 2026 22:08
…dex BLOCKING review on PR #2782 sha b28cf88

Earlier brief mis-cited high-level T-WAD substrate-shape framing; codex caught that the actual implementation authority for affected-set selection is:
- PR #2713 (upstream affected-set lens substrate; merged) per docs/design-affected-set-lens.md §2
- docs/design-t-wad-slice-7-binary-shim-affected-set-selection-canvas.md in main (§1 BinaryShim consumption / §3 fail-closed / §4 selection algorithm / §5 path-regex removal invariant)
- PR #2766 harness contract + Layer 2 path-regex inventory ratchet

§0 + §1 rewritten to encode the correct authority chain, canvas §4 algorithm verbatim, and canvas §5 path-regex removal invariant. STOP conditions tightened to the actual fail-closed surfaces (PR #2713 serialization form, path-regex inventory drift).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…§7 staging (substrate prerequisite + BinaryShim consumer/runner) — swift-wren-365 msg_29f68109

Earlier draft compressed both layers into one PR. swift-wren-365 surfaced (correctly) that PR #2798 in-flight is Layer 1 substrate (closure+topo over CIWorkflowDag + CiWorkflowDiff) — Layer 2 (BinaryShim consumer of PR #2713 lens output + TestClaim D(t)/Δ(t) mapping + canvas §5 path-regex removal) is a follow-on PR depending on Slice 5 BinaryShim hook per canvas §6-§7.

§1 reframed as two-layer decomposition with explicit scope boundaries. Phase A-C explicitly scoped to Layer 2. Layer 1 in-flight under PR #2798 not in this brief's scope.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…zed with §1 canvas-vs-PR-#2766-harness split — cursor APPROVE 10477 exploratory note

§4 PR body framing now distinguishes three authority types: canvas (BinaryShim consumption + selection algorithm + path-regex removal) + upstream lens (PR #2713 / design-affected-set-lens.md) + harness/ratchet (PR #2766). §6 reference list expanded similarly. Removes the residual 'PR #2766 substrate authority' phrasing that conflicted with §1's three-source split.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Surfaces the substrate-shape question for §1.8 row #62
substrate_gap_file_ingestion_closed before brief authoring.

bright-otter-731 was auto-spawned on this gate without an
authored brief and surfaced a clean audit (no include_str! at
HEAD in dsl/; PR #2819 read_utf8_file candidate shape held in
draft). §4.3 line 505 frames closure as workflow_substrate
extension to file-attachment (Candidate B), but PR #2819 implements
compile-time UTF-8 read (Candidate A) — parallel-authority risk.

This canvas frames the candidate shapes (A/B/C/d) for Director-or-
Substrate-Mgr-tier ratification before brief authoring proceeds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Director ratified Candidate (b) on PR #2820 — workflow-substrate
FileAttachment carrier extending #53 — per PM msg_52c4a707. This
sub-canvas surfaces carrier internals (type def + fields + workflow
coupling + Practice 4 + lazy-vs-eager) for next-tier ratification
per recursive feedback_substrate_shape_belongs_in_mgr_canvas.

Three candidate shapes (B-1 minimal / B-2 path-keyed / B-3 anchor+entry
pair) anchored against gate #55 WorkflowObservationAnchor precedent at
src/v3/std/timing_lens.dag:98 (already CONSUMER_LANDED).

Director anti-patterns encoded for worker review enforcement.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Director ratified Refined-B-1 carrier shape with full §8 Q1-Q6
dispositions + 7 anti-patterns per PM msg_bc8c23f6 (relaying Director
msg_61e302c6). Worker brief authored with:

- Exact 5-field carrier (subject_node + content_digest + producer_id +
  workflow_run_id + attached_at_ns) — strict 5-of-7-subset of #55
  WorkflowObservationAnchor
- Q1-Q6 dispositions encoded verbatim for reviewer enforcement
- 7 anti-patterns receipt-of-compliance requirement
- Phase A (carrier) / Phase B (ratchet test) / Phase C (existence-proof
  use case) / Phase D (ledger update) staging
- 5 STOP conditions including consumer-evidence-blob-store gap
- Workflow blob-store substrate flagged as Wave-2 sub-canvas-2 trigger
  (forward-looking, NOT blocking this brief)

Brief is DISPATCH-READY. PR #2819 stays held as Candidate A drift
(anti-pattern #1).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls and others added 3 commits May 13, 2026 04:28
…hmetic

Cursor APPROVE_WITH_COMMENTS 10980 — 2 internal-consistency findings:

1. Q2-Y parenthetical "no where refinement" contradicted the snippet
   directly above showing `where nonzero` (post msg_b80bcaa8 Option B).
   Reconciled: explicit "no positivity / gt_zero refinement" framing
   per Director msg_2c1bfb0e sign-admission intent, AND explicit
   acknowledgment that `where nonzero` IS present per msg_b80bcaa8
   Practice-2 carrier-level Option B (sign-orthogonal, excludes only 0).

2. Q2-Y Pros bullet "11 → 10 net" contradicted §4 closing "**9** net
   under Q2-Y". Reconciled: corrected to "7 → 9 net" matching §1
   ratified scope (+3 new variants -1 collapsed = +3 net over existing
   7) and §4 closing reconciliation pointer.

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

Copy link
Copy Markdown
Contributor Author

cursor APPROVE_WITH_COMMENTS 10980 — both internal-consistency findings FIXED in commit 8424461:

  1. Q2-Y parenthetical contradiction (L140): prior text "no where refinement" contradicted the snippet just above which shows where nonzero. Reconciled: explicit framing now reads "no positivity / gt_zero refinement" (matches Director msg_2c1bfb0e sign-admission intent) AND "carrier-level where nonzero refinement IS present" (matches msg_b80bcaa8 Practice-2 Option B; sign-orthogonal, excludes only 0).

  2. Q2-Y variant arithmetic (L145 vs L153): "11 → 10 net" was wrong. Corrected to "7 → 9 net" matching §1 ratified scope (existing 7 + 3 ADD + 1 PROMOTE - 1 REMOVE = 9; PolyCost.degree promotion is not a new variant) and the §4 closing reconciliation line at L153. Canvas-wide arithmetic now coherent (§1 / §4 / §12).

— sent from warm-wolf-698

@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: 77088ffd · Trigger: schedule
  • Thinking: 411s wall

Non-blocking — Strengths

  • docs/briefs/r3-substrate-gate-105-symbolic-cost-tier1-worker.md The brief now cleanly preserves Field.compare authority, refinement-carrier enforcement, UnknownCost conservatism, and the Q7 canonical-vs-projection split.

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

  • docs/briefs/r3-substrate-gate-105-symbolic-cost-tier1-worker.md Line 156 should say PolynomialCost.degree has no positivity refinement, not no refinement, because the same brief correctly requires the nonzero refinement elsewhere.
  • docs/briefs/r3-substrate-gate-105-symbolic-cost-tier1-canvas.md Line 285 says 7 Director + 3 Mgr-derived anti-patterns but the section lists 12 total, so align it to 7 + 5 for ratchet clarity.

✅ No blocking concerns; the remaining items are wording/count hygiene before dispatch.

@briansrls

Copy link
Copy Markdown
Contributor Author

Re inline BLOCKING at worker:124 (degree=0 parallel authority with ConstantCost) — already addressed in commit 77088ff (pushed before this batch relay; Director Option B ratification msg_b80bcaa8 via PM msg_9d248cbd).

Current HEAD worker:24 + :99 + :143 + :167 all carry the Practice-2 carrier-level refinement:

PolynomialCost.degree: Rational where nonzero

New nonzero predicate added to KNOWN_PREDICATES Phase A list (allowed_carriers: Rational; arg_shape: Bare; sibling to gt_one). Bootstrap ratchet (§7) asserts type-rejection negative test: PolyCost(_, Rational(0)) is structurally REJECTED at carrier level; admits Rational(2) + Rational(-1) (sign-orthogonal). Anti-pattern #12 added (cross-variant redundancy → Practice-2 carrier refinement, not Practice-4 fold).

Stale-SHA batch relay; same root cause as previously-replied worker:122 / codex 4bd0cb5 finding #1.

— sent from warm-wolf-698

@briansrls

Copy link
Copy Markdown
Contributor Author

Re inline BLOCKING at worker:255 (§6.0 preserves-all-terms vs §14 backwards-compatible contradiction) — already addressed in commit da89089; same as worker:250 reply (comment 4438748215).

Current HEAD worker §14 carries the Q7 contract change explicitly: symbolic_cost_of(...) returns exact canonical SymbolicCost (all dominance-sorted terms preserved), NOT dominant-term-reduced. Big-O projection is the separate dominant_term function. Consumers expecting dominant-only output MUST call dominant_term explicitly; the Q7 contract change is expected and Director-ratified per msg_2c1bfb0e via canvas §6.2.

§6.0 + §14 are consistent at HEAD. Stale-SHA batch relay.

— sent from warm-wolf-698

Codex no-blocking + 2 non-blocking improvements (77088ff review):

- worker L156: "no such refinement" → "no positivity refinement, but
  DOES carry where nonzero" (clarifies sign-admission vs zero-exclusion
  distinction for downstream readers).
- canvas L285: §10 anti-pattern header "7 Director + 3 Mgr-derived"
  → "7 Director + 5 Mgr-derived; 12 total" (matches actual 12-item
  list per worker §11 cite-list).

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

Copy link
Copy Markdown
Contributor Author

codex 77088ff "no blocking concerns" + 2 non-blocking improvements — both FIXED in commit 134aafc:

  1. worker L156 wording: "no such refinement" → "no positivity refinement (admits ± per Q6 sign-admission), but DOES carry the where nonzero refinement (msg_b80bcaa8 Practice-2 zero-exclusion)". Clarifies the orthogonal sign-vs-zero distinction.

  2. canvas L285 anti-pattern header count: "7 Director + 3 Mgr-derived" → "7 Director + 5 Mgr-derived; 12 total". Matches the actual 12-item list (Mgr-derived Add node override support for non-transport I/O node mocking #8/Remove LLM response caching module #9/Design: Diff Gist Mode for Branch Change Snapshots #10/Remove node override mocking mechanism from test framework #11/Refactor tool acquisition: env node provides resources via edges #12 incl. msg_2c1bfb0e + msg_b80bcaa8 additions) and worker §11 cite-list.

— sent from warm-wolf-698

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

BLOCKING (1)

Root Cause

  • docs/briefs/r3-substrate-gate-105-symbolic-cost-tier1-worker.md alias-level refinement authority was generalized to record/variant fields without a parser/lowering receipt → define a named refinement carrier such as PolynomialDegree = Rational where nonzero and use degree: PolynomialDegree in the canvas, worker brief, tests, and STOP text.

⚠️ One dispatch-blocking substrate-syntax issue remains; the prior review concerns are otherwise addressed.

```dag
type SymbolicCost inhabits Semiring<SymbolicCost>
= ConstantCost(Int)
| PolynomialCost { var: SizeVariable, degree: Rational where nonzero } // Q2-Y: absorbs LinearCost via degree=1; Q6 signed Rational (admits decay)

This comment was marked as resolved.

briansrls and others added 2 commits May 13, 2026 06:49
Codex BLOCKING worker:167: inline `Rational where nonzero` in struct
field types is unsupported by HEAD parser/lowerer — `where` refinements
attach only to type aliases / parameters (precedent
`type PositiveInt = Nat where gt_zero` at dsl/std/integer.dag:181).
Inline use would require unsupported substrate syntax instead of
making illegal degree=0 unrepresentable through a proper named
refinement carrier.

Fix-forward: introduce `type NonZeroRational = Rational where nonzero`
at the type-alias layer (alongside existing
`PolyLogExponent = Rational where gt_one` +
`ExponentialBase = Int where range(min: 2)`). PolynomialCost.degree
field type references the named alias: `degree: NonZeroRational`.

Updates across both briefs:
- All `degree: Rational where nonzero` → `degree: NonZeroRational`
  (5 canvas occurrences + 10 worker occurrences)
- Worker §5.0 dag block: NonZeroRational alias declaration added with
  rationale comment citing codex worker:167 + HEAD parser constraint
- Canvas §6 refinement-carriers list: NonZeroRational row added with
  named-alias note
- Worker §5.0 HARD STOP directive: NonZeroRational added to the
  hard-stop list (named alias, not fresh record); HEAD parser
  constraint cited
- Worker §10 STOP #4 variant-collision list: NonZeroRational added
- Worker §5.0 P1/P2 narrative: clarified "DOES carry NonZeroRational
  named-alias" framing
- Worker §7 bootstrap ratchet test: type-rejection test asserts both
  the type-alias declaration AND the degree=0 rejection at carrier
  level
- Worker §13 verification axis: NonZeroRational added to refinement-
  carriers test list

INVARIANTS P2 + Practice 2 carrier-level illegal-states-unrepresentable
satisfied via named alias (P5 / parser-supported substrate syntax).

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

Copy link
Copy Markdown
Contributor Author

Re inline BLOCKING at worker:167 (inline where nonzero unsupported by HEAD parser) — FIXED in commit 3be772b (with bulk landing in 577f2f8 WIP checkpoint).

Reviewer correct: HEAD parser/lowerer only supports where refinements on type aliases / parameters (precedent PositiveInt = Nat where gt_zero at dsl/std/integer.dag:181), NOT inline in struct field types. The prior inline form would have required unsupported substrate syntax.

Fix-forward introduces named alias at the type-alias layer (alongside existing PolyLogExponent + ExponentialBase):

type NonZeroRational = Rational where nonzero

PolynomialCost.degree now references the named alias: degree: NonZeroRational. All 5 canvas + 10 worker inline occurrences converted to the named-alias reference. HARD STOP directive + STOP #4 variant-collision list + §7 bootstrap ratchet test + §13 verification axis all updated.

Practice 2 illegal-states-unrepresentable satisfied at type-alias tier via parser-supported type X = Y where pred substrate syntax.

— sent from warm-wolf-698

@briansrls

Copy link
Copy Markdown
Contributor Author

Re codex BLOCKING fbe451e (named refinement carrier required) — already addressed in commit 3be772b (just landed). Same root cause as inline BLOCKING worker:167.

Structural ask satisfied: named type-alias refinement carrier introduced at the type-alias layer alongside existing PolyLogExponent + ExponentialBase:

type NonZeroRational = Rational where nonzero

PolynomialCost.degree: NonZeroRational references the named alias (parser-supported per HEAD precedent PositiveInt = Nat where gt_zero at dsl/std/integer.dag:181). All canvas + worker inline occurrences converted; STOP block / verification axis / HARD-STOP directive / variant-collision list / bootstrap ratchet test all updated.

Re the suggested name PolynomialDegree: NonZeroRational is the more general descriptive name (matches the predicate semantics; symmetric to PolyLogExponent + ExponentialBase naming style which describe the predicate role, not the use site). Use-site-specific naming (PolynomialDegree) would shadow the refinement intent. Open to renaming if reviewer or Director prefers the use-site form; structural answer (named alias not inline) is the load-bearing fix.

— sent from warm-wolf-698

@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: 492bda5e · Trigger: schedule
  • Thinking: 189s wall

BLOCKING (1)

Root Cause

  • docs/briefs/r3-substrate-gate-105-symbolic-cost-tier1-canvas.md zero-exclusion ratification was layered onto the canvas but earlier plain-Rational wording was not fully rewritten → say “no positivity refinement, but degree uses NonZeroRational where nonzero” and update the STOP text’s PolynomialCost payload to NonZeroRational.

⚠️ One dispatch-blocking canvas contradiction remains.

- `NonZeroRational = Rational where nonzero` — REQUIRES NEW `nonzero` predicate (allowed_carriers: Rational; arg_shape: Bare). **Named alias** per HEAD parser constraint (codex BLOCKING worker:167): `where` refinements only attach to type aliases / parameters at HEAD (precedent `dsl/std/integer.dag:181 type PositiveInt = Nat where gt_zero`), NOT inline in struct field types. Used as `PolynomialCost.degree: NonZeroRational` per Director Option B msg_b80bcaa8.
- `PositiveInt = Nat where gt_zero` — ALREADY EXISTS at `dsl/std/integer.dag:181`; worker reuses

These refinements make `exponent ≤ 1` / `base ≤ 1` **structurally unrepresentable** at the carrier level via the ratified refinement mechanism — Practice 2 + Practice 6 satisfied; INVARIANTS P1 (single authority) preserved. PolynomialCost.degree intentionally has no refinement: signed Rational admits asymptotic decay (negative degrees) per Director msg_2c1bfb0e scope-extension.

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: This still says PolynomialCost.degree has no refinement even though the ratified carrier is NonZeroRational, leaving contradictory substrate authority for degree=0 under INVARIANTS P2 / Practice 2.

… canvas:218)

Canvas §6 closing paragraph still said "PolynomialCost.degree intentionally
has no refinement" — pre-msg_b80bcaa8 framing that contradicts the
NonZeroRational alias declared 3 lines above + ratified by msg_b80bcaa8.

Fix-forward: reframe as "no positivity refinement, but DOES carry
NonZeroRational named alias for zero-exclusion". Sign-admission
preserved (msg_2c1bfb0e); zero-exclusion enforced (msg_b80bcaa8).
Also added explicit reference to degree=0 alongside exponent≤1 / base≤1
in the structurally-unrepresentable set.

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

Copy link
Copy Markdown
Contributor Author

Re inline BLOCKING at canvas:218 ("PolynomialCost.degree intentionally has no refinement" contradicts NonZeroRational ratified above) — FIXED in commit 338ac15.

The §6 closing paragraph carried pre-msg_b80bcaa8 framing that contradicted the NonZeroRational alias declared 3 lines above. Reframed:

These refinements make exponent ≤ 1 (PolyLogCost), base ≤ 1 (ExponentialCost), and degree = 0 (PolynomialCost via NonZeroRational) structurally unrepresentable at the carrier level — Practice 2 + Practice 6 satisfied; INVARIANTS P1 (single authority) preserved. PolynomialCost.degree has no positivity refinement (signed Rational admits asymptotic decay / negative degrees per msg_2c1bfb0e sign-admission), but DOES carry the named NonZeroRational alias (msg_b80bcaa8 Practice-2 zero-exclusion). Sign-admission preserved; zero-exclusion enforced.

Sign-vs-zero distinction now consistently framed across canvas + worker.

— sent from warm-wolf-698

@briansrls

Copy link
Copy Markdown
Contributor Author

codex BLOCKING 492bda5 (§6 STOP-SIGNAL still listed PolynomialCost { degree: Rational } pre-msg_b80bcaa8) — FIXED in commit 857d0a5 (WIP checkpoint).

STOP-SIGNAL Tier-1 variant list now correctly reads:

ConstantCost / PolynomialCost { degree: NonZeroRational } (signed per Q6; nonzero per msg_b80bcaa8) / PolyLogCost { exponent: PolyLogExponent } / LogCost / ProductCost / SumCost / ExponentialCost { base: ExponentialBase } / FactorialCost / UnknownCost

Sign-admission (msg_2c1bfb0e) + zero-exclusion via NonZeroRational named alias (msg_b80bcaa8 + codex worker:167 parser constraint) consistently framed across §6 + §6.1 + STOP-SIGNAL + §1 PROMOTE + §4 Q2-Y candidate + worker brief.

— sent from warm-wolf-698

…sg_d86a5987 (cursor 11087)

Cursor APPROVE_WITH_COMMENTS 11087: canvas §6 STOP-SIGNAL cited
msg_ad5e934d for Tier-2 R4-deferral, but the worker brief §4 verbatim
STOP block cited msg_d86a5987 for the same sentence. msg_ad5e934d was
the original Path A Tier-1 ratification; the §8 Tier-2-deferral
disposition was ratified in msg_d86a5987 (per composite-ratification
text already used elsewhere in worker §0/§2/§9/§13/§15). Canvas
STOP-SIGNAL aligned to msg_d86a5987 for single-authority trace.

INVARIANTS P2 single authoritative trace restored.

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

Copy link
Copy Markdown
Contributor Author

cursor APPROVE_WITH_COMMENTS 11087 — STOP-SIGNAL msg_id mismatch FIXED in commit f298bc8.

Canvas §6 STOP-SIGNAL cited msg_ad5e934d for Tier-2 R4-deferral; worker brief §4 verbatim STOP block cited msg_d86a5987 for the same sentence. msg_ad5e934d was the original Path A Tier-1 ratification; the §8 Tier-2-deferral disposition was ratified in msg_d86a5987 (matches worker §0/§2/§9/§13/§15 composite-ratification text).

Canvas STOP-SIGNAL Tier-2-deferral cite updated to msg_d86a5987 (§8 disposition). Canvas + worker now share the same authority trace for the verbatim STOP block. INVARIANTS P2 single-authoritative-trace restored.

— sent from warm-wolf-698

@briansrls
briansrls merged commit fe1dd99 into main May 13, 2026
5 checks passed
@briansrls
briansrls deleted the session/warm-wolf-698-gate-105-canvas branch May 13, 2026 12:06
briansrls added a commit that referenced this pull request May 13, 2026
 merge) (#2955)

* docs(r3): §1.8 row #105 status DECLARED → CANVAS_RATIFIED (post-PR-#2828 merge)

PR #2828 (gate #105 SymbolicCost Tier 1 carrier-extension canvas — Substrate Mgr) merged at 2026-05-13T12:06:20Z (squash `fe1dd99c`). Row #105 status flips DECLARED → CANVAS_RATIFIED per the row's own Status progression line ("DECLARED → CANVAS_RATIFIED requires Director ratification of Substrate Mgr canvas covering Q1-Q5").

Extended ratification scope captured in the row:
- Q1-α (Director msg_676ad4e7): use `Field.compare` for Rational dominance lattice — no parallel Int-tuple representation
- Q2-Y (Director msg_7d51b699): `LinearCost ≡ PolyCost(degree=1)` Practice-4 collapse (same-variant); LinearCost removed as distinct variant
- Q6 Option B (Director msg_b80bcaa8): `PolynomialCost { degree: Rational where nonzero }` carrier refinement (Practice-2; cross-variant redundancy with ConstantCost dissolved via type-level state-space tightening; new Practice-2 vs Practice-4 disambiguation rule: same-variant→P4 collapse, cross-variant→P2 carrier refinement)
- Q7: SymbolicCost preserves full expression (Big-O = derived projection)
- 12 anti-patterns enumerated (canvas §10 + worker brief §11)
- Sign-orthogonal degree admission unblocks operator inverse-exponent request 2026-05-13 ("cubed -> quarter -> quintet roots ... also inverse applies"; n^-x exponential expressible via PolyCost(_, Rational(-x)))

Status progression remains: CANVAS_RATIFIED → CONSUMER_LANDED (Phase 1 worker brief carrier implementation) → PASSING (Part A predicate + Part B algebra tests both green).

Authority chain:
- PR #2828 merged 2026-05-13T12:06:20Z (squash `fe1dd99c`)
- Director msg_ad5e934d (Path A + Tier 1 IN-R3 ratification)
- Director msg_676ad4e7 (Q1-α)
- Director msg_7d51b699 (Q2-Y collapse + 7 anti-patterns added)
- Director msg_b80bcaa8 (Q6 Option B carrier refinement + Practice-2 vs Practice-4 rule)

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

* docs(r3): §1.8 row #105 — reconcile carrier-landed predicate + CONSUMER_LANDED criteria with ratified Q2-Y collapse + Q6 Option B nonzero refinement (openai-pro REQUEST_CHANGES on PR #2955)

Addresses openai-pro REQUEST_CHANGES (verdict on sha 5a6c678 at 2026-05-13T13:43:38Z) — finding valid:

The row previously had:
- "Path A — rational-degree polynomial promotion + 3 new named variants; net 7→11 variants"
- Part A: grep for "4 new variants" + "PolynomialCost { degree: Rational }" shape

These accept the OLD carrier shape and don't require Q2-Y LinearCost dissolution or Q6 Option B nonzero refinement. A faithful worker could pass the written predicate while:
- Keeping LinearCost as separate variant (violating Q2-Y Practice-4 collapse)
- Allowing `PolyCost(d=0)` (violating Q6 Option B cross-variant Practice-2 carrier refinement; collides with ConstantCost)

Fix updates the row in 3 places (all docs/r3-program-plan.md:333):

1. **Tier 1 ratified carrier extension** — explicitly cites Q2-Y LinearCost dissolution (1b) + Q6 Option B `degree: Rational where nonzero` refinement (1); removes stale "net 7→11 variants" pre-computation (deferred to worker brief execution to avoid drift); cites signed-degree admission for inverse exponents.

2. **Part A predicate** — grep now requires:
   - 3 new variants present (not 4)
   - `PolynomialCost { var: SizeVariable, degree: Rational where nonzero }` shape (refinement-explicit)
   - `LinearCost` absent from file (dissolution receipt)

3. **Part B predicate** — adds receipts for:
   - Dominance lattice via `Field.compare` (Q1-α; no parallel Int-tuple)
   - LinearCost → PolyCost(d=1) normalization
   - `PolyCost(_, Rational(0))` type-rejection negative test (Q6 Option B bootstrap ratchet)

4. **Status progression CONSUMER_LANDED criteria** — adds LinearCost dissolution + nonzero refinement + dominance lattice as required worker brief deliverables.

Authority:
- openai-pro REQUEST_CHANGES on PR #2955 sha 5a6c678 at 2026-05-13T13:43:38Z
- Director msg_7d51b699 (Q2-Y collapse)
- Director msg_b80bcaa8 (Q6 Option B nonzero refinement)
- Director msg_676ad4e7 (Q1-α Field.compare)
- INVARIANTS P2 (Boundary Discipline — single authority) + Practice 2 (illegal states unrepresentable)

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

* docs(r3): §1.8 row #105 — Part A predicate uses actual .dag variant-arm syntax (codex BLOCKING on PR #2955)

Addresses codex BLOCKING (verdict on sha 64f2ad1 at 2026-05-13T14:42:59Z) — finding valid:

Previous Part A grep `^type (PolynomialCost|PolyLogCost|...)` targets top-level `type` declarations, but `SymbolicCost` variants are `| Name(...)` / `| Name { ... }` arms inside the `type SymbolicCost inhabits Semiring<SymbolicCost>` body at `src/v3/std/algebra.dag:190`. Old grep would never match real variant arms; predicate was design-intent text, not actually verifiable against substrate.

New Part A predicate is three explicit grep checks targeting variant-arm syntax `^\s*\| Name`:

(i) 3 new variants present: `git grep -nE '^\s*\| (PolyLogCost|ExponentialCost|FactorialCost)' src/v3/std/algebra.dag`

(ii) PolynomialCost shape refinement-explicit (exactly one matching line): `git grep -nE '^\s*\| PolynomialCost \{ var: SizeVariable, degree: Rational where nonzero \}' src/v3/std/algebra.dag`

(iii) LinearCost dissolved (empty result): `git grep -nE '^\s*\| LinearCost' src/v3/std/algebra.dag`

Receipt-on-failure: if (ii) returns 0 lines or (iii) returns ≥1 line, Part A fails closed.

Sanity-checked against current algebra.dag (pre-implementation state): greps return expected pre-Q6/pre-Q2-Y matches. Post-Phase-1-worker-brief implementation, the predicates flip per ratified shape.

Also adds explicit framing reference to `src/v3/std/algebra.dag:190` SymbolicCost coproduct body location.

Authority:
- codex BLOCKING on PR #2955 sha 64f2ad1 at 2026-05-13T14:42:59Z
- Director msg_b80bcaa8 (Q6 Option B `where nonzero` refinement)
- Director msg_7d51b699 (Q2-Y LinearCost ≡ PolyCost(d=1) Practice-4 collapse)

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

* docs(r3): §1.8 row #105 — Part A grep predicates use POSIX-portable [[:space:]] instead of \s (codex BLOCKING on PR #2955)

Addresses codex BLOCKING (verdict on sha bf58a85 at 2026-05-13T15:33:41Z) — finding valid for portability discipline:

POSIX ERE does not define `\s`; GNU grep supports it as an extension, but git's bundled ERE engine across platforms may not. To guarantee Part A predicates fire reliably across the engines git ships with, the three grep checks now use POSIX-standard `[[:space:]]` character class:

```bash
# (i) 3 new variants present
git grep -nE '^[[:space:]]*\| (PolyLogCost|ExponentialCost|FactorialCost)' src/v3/std/algebra.dag

# (ii) PolynomialCost refinement-explicit (exactly one matching line)
git grep -nE '^[[:space:]]*\| PolynomialCost \{ var: SizeVariable, degree: Rational where nonzero \}' src/v3/std/algebra.dag

# (iii) LinearCost dissolved (empty result)
git grep -nE '^[[:space:]]*\| LinearCost' src/v3/std/algebra.dag
```

Sanity-checked: locally git grep accepts both `\s` and `[[:space:]]` (GNU extension), but `[[:space:]]` is the portable form per INVARIANTS P5 (checkable receipt) + P2 (boundary discipline — predicate must reliably check the carrier shape).

Also adds explicit framing note about git's ERE engine portability rationale.

Authority:
- codex BLOCKING on PR #2955 sha bf58a85 at 2026-05-13T15:33:41Z
- POSIX.1-2017 §9.3.5 (character classes)
- INVARIANTS P5 / P2

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

* docs(r3): §1.8 row #105 — HTML entity &#124; for literal-pipe in grep patterns + Part A (i) split into 3 separate greps to avoid alternation (openai-pro REQUEST_CHANGES on PR #2955)

Addresses openai-pro REQUEST_CHANGES (verdict on sha aeba066 at 2026-05-13T15:55:16Z) — finding valid:

The previous grep patterns contained `|` characters that broke the markdown table cell rendering. Two distinct pipe-character uses needed disambiguation:

1. **Regex literal-pipe escape** `\|` (matches the actual `|` character in the .dag variant-arm syntax): displayed via `\&#124;` → renders as `\|` (backslash + pipe) without splitting the table cell. When user copies the rendered text into shell, `&#124;` becomes `|`, yielding the actual regex `\|`.

2. **Alternation operator** `|` (was in Part A (i) `(PolyLogCost|ExponentialCost|FactorialCost)`): eliminated entirely by splitting (i) into three separate greps (i.a / i.b / i.c). No alternation operators remain in any Part A pattern.

Final pattern shape (rendered):
```
git grep -nE '^[[:space:]]*\| PolyLogCost' src/v3/std/algebra.dag
git grep -nE '^[[:space:]]*\| ExponentialCost' src/v3/std/algebra.dag
git grep -nE '^[[:space:]]*\| FactorialCost' src/v3/std/algebra.dag
git grep -nE '^[[:space:]]*\| PolynomialCost \{ var: SizeVariable, degree: Rational where nonzero \}' src/v3/std/algebra.dag
git grep -nE '^[[:space:]]*\| LinearCost' src/v3/std/algebra.dag
```

Source uses `\&#124;` for each pipe; markdown table cell now renders without column-structure damage.

Receipt-on-failure remains: any of (i.a), (i.b), (i.c) returning 0 lines fails closed; (ii) returning 0 lines fails closed; (iii) returning more than 0 lines fails closed.

Authority:
- openai-pro REQUEST_CHANGES on PR #2955 sha aeba066 at 2026-05-13T15:55:16Z
- GitHub markdown table escape conventions
- INVARIANTS P5 (checkable receipt) — predicate must reliably check carrier shape AND render in authoritative doc

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

---------

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