Skip to content
Merged
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
2fccc2a
docs(briefs): Substrate bridge SourceSpan.file participation retireme…
briansrls May 7, 2026
8c5f054
docs(briefs): S5 Variant-aware projection carrier canvas (#1947)
briansrls May 7, 2026
d826950
docs(briefs): SourceSpan.file brief — same-slice prerequisite + secti…
briansrls May 7, 2026
f26a582
docs(briefs): SourceSpan.file brief — umbrella stays Open per P2 ledg…
briansrls May 7, 2026
beabfa4
docs(briefs): S5 CoproductProjection worker brief — γ ratified (#1947)
briansrls May 7, 2026
925a412
docs(briefs): SourceSpan.file brief — resolve Acceptance #4 / Cross-M…
briansrls May 7, 2026
5b3a9f8
WIP: R3 Substrate Mgr — lane through R3 close
briansrls May 7, 2026
2900228
docs(briefs): S5 brief — absorb Director pre-ratifications for 3 STOP…
briansrls May 7, 2026
313d1a6
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
0e8724b
docs(r3): Q-Reification Gate A receipt — Option A (Dag-as-carrier)
briansrls May 7, 2026
2601d7d
docs(briefs): S5 — delete superseded canvas + name dissolution trigge…
briansrls May 7, 2026
1b9f743
docs(r3): Q-Reification row — fix invariant cite (C-1 → P2)
briansrls May 7, 2026
55470a1
docs(briefs): S5 — name dissolution trigger for DeclarationRef alias …
briansrls May 7, 2026
8a1f5c7
docs: complete Q-Reification stale-cite sweep — e6-g1a brief :169 + Q…
briansrls May 7, 2026
5fc9221
docs(briefs): S5 — fix InputFieldRef mis-read; reframe observations #…
briansrls May 7, 2026
598776f
docs(briefs): S5 — consolidate split per-variant maps into single key…
briansrls May 7, 2026
4656801
docs(briefs): S5 — fix stale split-map vocab in path (a) + scope STOP…
briansrls May 7, 2026
0ac8ca7
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
85ceb85
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
9f0b9de
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
aac5b3b
docs(briefs): descent_execution_proof canvas — 4-residual coproduct-d…
briansrls May 7, 2026
622361c
docs(briefs): SourceSpan brief Row #6 — derive from bootstrap_authori…
briansrls May 7, 2026
e2741c4
docs(briefs): descent_execution_proof worker brief — γ ratified (2-va…
briansrls May 7, 2026
0a0491c
WIP: R3 Substrate Mgr — lane through R3 close
briansrls May 7, 2026
0cfea88
docs(briefs): descent_execution_proof — narrow EvidenceUnknown payloa…
briansrls May 7, 2026
ce12428
docs(briefs): descent_execution_proof — section-anchor cite for §10.3…
briansrls May 7, 2026
1a0756a
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
93c6f76
docs(briefs): T-CostLens-Composition canvas — Lens<SymbolicCost> comp…
briansrls May 7, 2026
054dcde
docs(briefs): T-Workflow-As-Data canvas — audit-receipt-honoring scop…
briansrls May 7, 2026
102071e
docs(briefs): T-CostLens-Composition worker brief — γ ratified; delet…
briansrls May 7, 2026
35c4585
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
34faf0c
Delete superseded T-CostLens canvas (worker brief is single live auth…
briansrls May 7, 2026
b7d808e
docs(briefs): T-WAD Slice 1 worker brief — β ratified; delete canvas
briansrls May 7, 2026
ae7972b
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
e611c0b
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
dac25f6
docs(briefs): T-LAS Demo (#1952) complexity-contract compile-error wo…
briansrls May 7, 2026
214f286
docs(briefs): T-LAS Demos #1953 + #1954 — cost-basis sibling worker b…
briansrls May 7, 2026
1f33e39
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
89bbd89
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
000d474
docs(briefs): T-CostLens — update Sub-issue from #1957 to #2141 (post…
briansrls May 7, 2026
1aecf40
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
4d87a03
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
f33f132
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
d0da4ef
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
6d13c60
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
7c5105a
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
d38716e
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
dc1d589
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
9d01f84
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
ef9126d
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
3cf53a4
docs(proposals): Q-Lens-Target-Context canvas (β-extended substrate-s…
briansrls May 7, 2026
89b0c70
docs(proposals): Q-Cost-Composition-Layering canvas (ε substrate-shap…
briansrls May 7, 2026
00551a8
WIP: R3 Substrate Mgr — lane through R3 close
briansrls May 7, 2026
33afd89
WIP: R3 Substrate Mgr — lane through R3 close
briansrls May 7, 2026
4209eb7
docs: ε ratified canonical for cost; β-extended deferred to N=2 — gat…
briansrls May 7, 2026
db88b10
docs(proposals): canvas inventory grounded in live src/v3/lenses/ reg…
briansrls May 7, 2026
65f86a6
docs(proposals): fix Director-ratification-ask typo + #37 gate-id cla…
briansrls May 7, 2026
c20a1a2
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
686027d
docs(proposals): Q-Lens-Target-Context — absorb PM canvas-review conc…
briansrls May 7, 2026
be9a9c9
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
2c9c343
docs(proposals): canvases — collapse stale ratification-ask sections …
briansrls May 7, 2026
7d708af
docs(proposals): Q-Lens-Target-Context — separate live N=1 from reope…
briansrls May 7, 2026
786dcf5
WIP: R3 Substrate Mgr — lane through R3 close
briansrls May 7, 2026
4f9918c
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
ae5f020
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 7, 2026
7d99eb5
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 8, 2026
c1ce452
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 8, 2026
e57a390
docs(briefs): T-CostLens worker brief — ε supersession header (γ reta…
briansrls May 8, 2026
9874cbf
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 8, 2026
edaee19
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 8, 2026
1405823
docs(proposals): Q-Complexity-Composition-Layering canvas — DRAFT (fa…
briansrls May 8, 2026
fa80fc2
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 8, 2026
ab382e3
docs(briefs): T-LBP complexity-lens substrate-completion worker brief…
briansrls May 8, 2026
7a8bb6d
Merge remote-tracking branch 'origin/main' into session/warm-wolf-698
briansrls May 8, 2026
3bcd504
docs(briefs): rewrite complexity-lens brief consuming live design aut…
briansrls May 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Worker brief — Substrate T-LBP complexity-lens substrate completion

**Sub-issue**: TBD (parented under R3 Substrate Mgr lane #1939; new sub-issue created at dispatch time).
**Authority — live design doc**: [`docs/design-complexity-lens-behavioral-completeness.md`](../design-complexity-lens-behavioral-completeness.md) — comprehensive R3 design that resolves substrate-shape questions for `lenses/complexity.dag` PROXY → COMPLETE. **All implementation decisions trace to this doc**; brief delegates carrier shape, dimension wiring, and consumer-rewrite to its §§1.1–1.6 + §3.
**Authority — lane row**: [`docs/r3-structure.md`](../r3-structure.md) row 146 (T-Lens-Behavioral-Parity slice 1 — complexity).
**Authority — Director ratification**: Q-Complexity-Composition-Layering canvas (`docs/proposals/q-complexity-composition-layering-canvas.md`) Q1/Q2/Q3 RATIFIED at gunb-ai/gunbc#828 #issuecomment-4402714255 — finding: ε precedent does NOT apply (no target-context axis); slice-tier dispatch authorized; existing substrate authorities (`SymbolicCost`, `CostBound`, `ComplexitySummary`, `AsymptoticClass`) consumed, NOT re-introduced.
**Closure predicate**: §1.8 row #79 `complexity_lens_behaviorally_complete` (work/span split + asymptotic classification + cementing test); cementing test (#1950) is a separate downstream brief.

## Important framing — this is NOT substrate-fact-introduction

Per the live design doc §1, **all six substrate carriers already exist or are minor enrichments**, not new P1 facts:

- §1.1 `SymbolicCost` 7-variant — already at `src/v3/std/algebra.dag` (DB-7); no substrate change
- §1.2 `SizeVariable` — enrichment (add `display_name: String?`), not new type
- §1.3 work/span — TWO `AnalysisDimension<SymbolicCost>` instances (`work_dimension` + `span_dimension`) per DB-3; the `AnalysisDimension` parent already declared in `src/v3/std/dimensions.dag`
- §1.4 `AsymptoticClass` — 8-variant sum + `BoundedLattice<AsymptoticClass>` instance, declared in `src/v3/std/algebra.dag` per design §1.4 spec (NB: `data` form gated on class-5 record bodies; Rust-execution authority pattern applies until grammar lands)
- §1.5 `Certainty = Proven | Conservative` — complexity-lens-local sum type; declared in `lenses/complexity.dag` per design §1.5
- §1.6 `RecurrenceForm` + `CostBound` — both already at `src/v3/std/induction.dag`; missing piece is the `cost_bound_to_symbolic` projection (design §1.6 spec)

Plus §1.7 `ComplexitySummary` record (work + span + cost + asymptotic + certainty coordinates) at `lenses/complexity.dag`.

**Use existing carriers verbatim**; do NOT invent parallel names (e.g., `ComplexityCost`). Per `feedback_parallel_representation_debt`: `CostBound` is canonical for the proof; `SymbolicCost` is the display/composition algebra; consume both, do not re-author.

## Hard prerequisite — T-E-P-Producer-Broadening must be COMPLETE

Per design doc §"Authority discipline": *"Implementation lane is T-Lens-Behavioral-Parity slice 1 (complexity); cascade-gated on T-E-P-Producer-Broadening"*. Per `docs/r3-structure.md` T-Lens-Behavioral-Parity row, complexity-lens BEHAVIORAL COMPLETION cannot land before T-E-P-Producer-Broadening covers all live call sites.

**Live status of T-E-P P1**:
- Slices 1-4 (#2167/#2178/#2182/#2192): direct-call sub-class closed
- Slice 5+ (Indirect/`TransformDispatch::Indirect` / `ArrowPortRef`): in flight via eager-bat-178 (current PR #2198 is repositioned arithmetic-Div follow-up; real Slice 5 indirect-call work is next per worker disposition at gunb-ai/gunbc#2166 c#4402742599)
- Additional sub-classes per design §3 may surface (parser/worklist/fold-body classes named in eager-bat-178's prior planning framing)

**Worker action**: STOP and surface to Mgr at slice authoring time IF T-E-P P1 is not yet declared COMPLETE across all sub-classes the design doc names. `complexity_lens_behaviorally_complete` cannot ship while T-E-P producer carriers are partial — `DescentEvidence` / `CallPattern` / `SubValueRelation` reads at recursive-call sites would have gaps that propagate into the lens output. Prior framing (in earlier draft of this brief) treating producer coverage as optional corpus scope was wrong; this brief retracts that position.

## Scope (binding per design doc + Director ratification)

Three coordinated authoring deltas — all named in the design doc, all consume existing substrate:

### Deliverable 1 — Substrate enrichments per design §§1.1–1.6

Author the named substrate enrichments per design doc verbatim:

- **§1.2**: extend `SizeVariable` in `src/v3/std/algebra.dag` with `display_name: String?` field; add `size_variable_eq` (equality on `source_port` only).
- **§1.3**: declare `work_dimension` + `span_dimension` data declarations in `lenses/complexity.dag` per design §1.3 spec; respect class-5 record-body cascade gate (Rust-execution authority pattern via `v3_compiler::analyze_symbolic_cost_dimension` until class-5 grammar lands; substrate-data-spec stays in `.dag` per P5 dissolution-trigger discipline).
- **§1.4**: declare `AsymptoticClass` 8-variant + `BoundedLattice<AsymptoticClass>` instance + `meet_asymptotic_class` / `join_asymptotic_class` / `classify(SymbolicCost) -> AsymptoticClass` in `src/v3/std/algebra.dag` per design §1.4 spec.
- **§1.5**: declare `Certainty = Proven | Conservative` in `lenses/complexity.dag` per design §1.5 spec; **no `BoundedLattice<Certainty>` declaration** (composition is cost-aware via §3.1 `compose_summary_*` family, not lattice-fold).
- **§1.6**: add `cost_bound_to_symbolic(CostBound) -> SymbolicCost` projection in `src/v3/std/induction.dag` per design §1.6 spec.

### Deliverable 2 — `ComplexitySummary` record + lens widening

Per design §1.7 + §3:

- Declare `ComplexitySummary { work, span, cost, asymptotic, certainty }` record in `lenses/complexity.dag`.
- Widen lens output type from `Lookup<Int>` to `Lookup<ComplexitySummary>`; preserve forward-fold catamorphism shape (substrate invariant on `d.nodes` ordering).
- Implement `compose_summary_*` family per design §3.1 — sequential / iterate / branch-max compositions; per-dimension certainty projection consuming the cost-aware composition shape from §1.5.
- Status header refines: `STRUCTURALLY TERMINAL; BEHAVIORALLY PROXY` → `STRUCTURALLY TERMINAL; BEHAVIORALLY COMPLETE`.

### Deliverable 3 — T-E-P P1 carrier consumption (recurrence wiring)

Per design §1.6 + §3: consume `RecurrenceForm` + `master_theorem` (E-I lane substrate already at HEAD) at recursive-call sites; classify per call-pattern via T-E-P P1 `DescentEvidence` / `CallPattern` / `SubValueRelation`. Routes through `cost_bound_to_symbolic` projection (Deliverable 1 §1.6).

## Out-of-scope

- **Cementing test (#1950)**: separate downstream brief at `docs/briefs/r3-substrate-t-lbp-complexity-lens-cementing-test-worker.md`; gates additionally on frozen v2-oracle snapshot capture (Q4 RATIFIED 2026-05-08 — PB Manager owns; #828 c#4402740072).
- **`Lens<C>` generic carrier-shape refactor**: β-extended DEFERRED to N=2 trigger per `q-lens-target-context-canvas.md`; STOP-and-PING if surfaces.
- **Cost-lens substrate completion**: separate active stream (fierce-ram-21 ε path); not absorbed.
- **Class-5 record bodies in `data` declarations**: cascade-gated per design §1.3 + §1.4 NB; stay on Rust-execution authority pattern until grammar lands; do not block this slice on class-5.

## Acceptance gates (same-slice, all must pass)

1. T-E-P-Producer-Broadening declared COMPLETE before this slice opens (worker grep at slice-authoring time per Hard prerequisite section above).
2. All §§1.1–1.7 substrate enrichments authored per design doc verbatim; carrier names match design doc (NO renames — `ComplexitySummary` / `AsymptoticClass` / `Certainty` / `cost_bound_to_symbolic`).
3. `complexity.dag` advanced from `STRUCTURALLY TERMINAL; BEHAVIORALLY PROXY` → `STRUCTURALLY TERMINAL; BEHAVIORALLY COMPLETE`; status header updated in the file itself.
4. Lens output type widened: `Lookup<Int>` → `Lookup<ComplexitySummary>`; forward-fold catamorphism preserved.
5. **#79 satisfied by construction**: lens output documented to carry symbolic CostExpr + work/span split + asymptotic classification. Code-level cite in PR description.
6. Bootstrap regen: `cargo test -p v3-compiler bootstrap_regen_fresh -- --ignored` clean.
7. Full suite: `cargo test --workspace --exclude v2-compiler-tests` green; `cargo clippy --all-targets -- -D warnings` clean.
8. **r3-structure.md row 146 receipt-text refresh** + `docs/v3-lens-capability-register.md` complexity-lens row update reflecting BEHAVIORAL COMPLETE; cite this PR's # as the receipt.

## STOP / PING criteria

- **STOP** if T-E-P-Producer-Broadening is not yet COMPLETE across all live call-site sub-classes — surface to Mgr; coordinate sequencing with eager-bat-178.
- **STOP** if any §§1.1–1.6 design spec doesn't map structurally onto substrate at HEAD (e.g., grammar gap beyond class-5; algebra primitive missing) — surface to Mgr for canvas-tier re-open.
- **STOP** if `Lens<C>` generic carrier-shape refactor surfaces — β-extended DEFERRED to N=2 trigger; do NOT absorb.
- **PING** Verification Mgr (#2075 / wise-bear-525) at PR-open per Pattern-A executable-gate ratchet for #79 PROXY → COMPLETE transition.

## Worker pin

Fresh-pool pick at dispatch time (NOT eager-bat-178 per Director Q3 framing — different problem class than T-E-P producer-broadening, plus they own the prerequisite Slice 5+ work; NOT fierce-ram-21 — busy with cost-lens ε Slice 1a→1b chain).

## Cross-Mgr coordination

- **Verification Mgr (#2075)**: PR-open ping per Pattern-A executable-gate.
- **Eager-bat-178**: T-E-P P1 sequencing — this slice gates on Slice 5+ Indirect-variant land + any further sub-classes.
- **PB Manager (#2074)**: separate stream for v2-oracle snapshot capture (Q4 RATIFIED); not on this slice's critical path but on downstream cementing (#1950).
- **#1950 downstream**: complexity-lens cementing test gates on this slice's BEHAVIORAL COMPLETION + frozen v2-oracle snapshot.

## Auto-spawn caveat

L-sized substrate-behavioral-completion threshold; HOLD dispatch on this brief until auto-spawn fix lands per ctrl#217 + same-window-dispatch discipline applies post-canvas-merge (PR #2197) AND post-T-E-P P1 COMPLETE.

— Authored by warm-wolf-698 (Substrate Mgr) 2026-05-08 per Director Q1/Q2/Q3 RATIFIED at gunb-ai/gunbc#828 #issuecomment-4402714255; **rewritten 2026-05-08 post-codex BLOCKING at #2199** to consume existing design authority `docs/design-complexity-lens-behavioral-completeness.md` verbatim (prior draft had three BLOCKING violations: missing-canvas reconciliation, optional-producer-coverage, stale-row receipt; all three addressed in this rewrite). Sibling canvas at `docs/proposals/q-complexity-composition-layering-canvas.md`.
Loading