Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
4d4cd69
docs(roadmap): fold 2026-05-01 paired exploratory + reflective analyses
briansrls May 1, 2026
fddf206
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
c01ddc7
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
3d33bdf
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
37c7629
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
4cf1cba
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
48df2ce
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
b3caf1c
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
25502a3
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
16cf2b2
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
7bbc361
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
9282e39
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
96b8919
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
e18a533
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
0b83317
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
634f05e
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
6d1040f
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
3b9428f
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
eaa51c6
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
6b1ee04
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 1, 2026
a332543
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
f3251db
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
900b443
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
cf6f314
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
7ff9a17
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
f742104
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
2edf970
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
c72017b
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
7d843d3
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
0c91a12
Merge branch 'main' of https://github.com/gunb-ai/gunbc into session/…
briansrls May 2, 2026
acc869b
WIP: Gunbc PM
briansrls May 2, 2026
0f32605
docs(r3): R3 scope expansion 12 → 16 lanes + standing R3 Debt-Paydown…
briansrls May 2, 2026
eaafa6a
docs(r3): T-Numeric-Construction row — 8-type → 13-type scope citatio…
briansrls May 2, 2026
5fee995
docs(r3): address PR #1480 cursor findings — §P5 mix-up + restored lo…
briansrls May 2, 2026
0de2bda
docs(r3): close P5 escape hatch in r3_debt_paydown_zero_remaining gate
briansrls May 2, 2026
0c449a8
WIP: Gunbc PM
briansrls May 2, 2026
cd4b5ec
docs(r3): reconcile T-Tests-As-Data-Completeness Evaluator-gating con…
briansrls May 2, 2026
8a7f722
docs(r3): T-Lens-Application-Surface design doc — substrate shape + 4…
briansrls May 2, 2026
3f7e3d1
docs(r3): resolve all 5 §8 open design questions in-doc per minimize-…
briansrls May 2, 2026
4250419
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
e6d700e
WIP: Gunbc PM
briansrls May 2, 2026
58f49e9
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
16340c5
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
c0b8fc3
docs(r3): cross-design coherence pass + master design index
briansrls May 2, 2026
7db8222
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
8640e67
docs(r3): address 4 cursor findings on PR #1480 (sha 16340c52)
briansrls May 2, 2026
ef21e1a
docs(r3): retract cost-lens parallel SizeExpr proposal — align with c…
briansrls May 2, 2026
92d9b11
docs(r3): effect-enumeration — read/write distinction via algebra inh…
briansrls May 2, 2026
255cca3
docs(r3): lens-application — collapse ApplicationConfig into sum-type…
briansrls May 2, 2026
a733df2
docs(r3): codex non-blocking findings #2 + #3 — heading/count consist…
briansrls May 2, 2026
d7628ea
docs(r3): fix line 199 active-surface arithmetic + line 23 explorator…
briansrls May 2, 2026
0a02e73
docs(r3): drop SizeVariable.display_name; InternTable single-authorit…
briansrls May 2, 2026
98f2fc4
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
4d87806
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
812f6a1
docs(r3): codex review wave (sha 98f2fc4f) — 4 BLOCKING + 2 NB findin…
briansrls May 2, 2026
7514855
docs(r3): scrub residual non-parametric LensBudget references
briansrls May 2, 2026
33583ff
docs(r3): lens-application — dissolve regression_baseline_pinned opti…
briansrls May 2, 2026
c545cc2
docs(r3): drop certainty_lattice — Certainty composition is cost-awar…
briansrls May 2, 2026
95b54f5
docs(r3): effect-enumeration §8.4 — derive readonly deletion from alg…
briansrls May 2, 2026
fa5f167
docs(r3): fix tests-as-data dissolution-trigger cross-reference §10 → §6
briansrls May 2, 2026
265d8ef
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
25c34d0
docs(r3): cost-lens cementing — tighten Band-C parity claim to full S…
briansrls May 2, 2026
e9d6711
docs(r3): remove implicit Enforce-with-inferred-baseline; align Certa…
briansrls May 2, 2026
c4b96d9
WIP: Gunbc PM
briansrls May 2, 2026
eb8c718
docs(r3): lens-application — add LensEnforcement<Output, Budget> proj…
briansrls May 2, 2026
c6e6191
WIP: Gunbc PM
briansrls May 2, 2026
18e7abb
WIP: Gunbc PM
briansrls May 2, 2026
9689948
docs(r3): split SectionedLensApplication into per-variant carriers + …
briansrls May 2, 2026
85a6bb0
docs(r3): r3-structure default-policy text — sync with design-lens-ap…
briansrls May 2, 2026
e554f85
docs(r3): LensEnforcement carries violation relation, not just projec…
briansrls May 2, 2026
01a0f4c
docs(r3): per-dimension certainty composition (work + span independen…
briansrls May 2, 2026
f86dfd0
docs(r3): effect-enumeration — lens body MUST change to read inhabita…
briansrls May 2, 2026
a525baf
docs(r3): add lens_enforcement_carrier_landed to r3-structure lane gates
briansrls May 2, 2026
c41b8ce
docs(r3): §8.5 implementation note — read EnforcedApplication.budget,…
briansrls May 2, 2026
75a6ab5
docs(r3): effect-enumeration lens body reads signature directly, not …
briansrls May 2, 2026
8c7be7f
WIP: Gunbc PM
briansrls May 2, 2026
955cafe
docs(r3): per-coordinate certainty on ComplexitySummary (no global co…
briansrls May 2, 2026
6beeeb9
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
37f3bc6
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
e301001
docs(r3): align lens-application doc with per-coordinate certainty (w…
briansrls May 2, 2026
e755310
WIP: Gunbc PM
briansrls May 2, 2026
2e513a2
docs(r3): codex BLOCKINGs #1-3 (sha 37f3bc62) — substrate assumptions…
briansrls May 2, 2026
9455ffa
docs(r3): cementing test asserts per-coordinate certainty (work + spa…
briansrls May 2, 2026
031ef89
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
a037c59
docs(r3): gpt-5-5-pro REQUEST_CHANGES (sha 2e513a2c) — 3 BLOCKING pro…
briansrls May 2, 2026
5db04cc
docs(r3): scrub residual SectionedLensApplication pseudo-syntax + §10…
briansrls May 2, 2026
e903fc3
Merge remote-tracking branch 'origin/main' into session/deep-wolf-155…
briansrls May 2, 2026
25fb5b6
docs(r3): rename application_config_violation_policy_routing → enforc…
briansrls May 2, 2026
57ff054
WIP: Gunbc PM
briansrls May 2, 2026
7daeded
docs(r3): cost-lens — scrub residual InternTable references; align al…
briansrls May 2, 2026
73cfdc3
docs(r3): cost-lens §10 step 1 — fix closure gate name + description …
briansrls May 2, 2026
958c837
docs(r3): cementing test — assert meet-projection, not per-coordinate…
briansrls May 2, 2026
c547605
docs(r3): cross-doc SizeVariable display_name alignment + Lens<C> ver…
briansrls May 2, 2026
bef5781
docs(r3): introduce EnforceableLens<Output, Budget> bundled authority…
briansrls May 2, 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
210 changes: 168 additions & 42 deletions docs/design-complexity-lens-behavioral-completeness.md

Large diffs are not rendered by default.

87 changes: 42 additions & 45 deletions docs/design-cost-lens-sizevar-dimension-wiring.md

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions docs/design-effect-enumeration-resource-threading.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

> Audit verdict is path (ii): live primitives still require ambient resource/transport metadata rather than returned-modified-resource signatures (`dsl/std/resources.dag`, `dsl/std/primitives.dag`, `dsl/extdeps/shell.dag`, `dsl/extdeps/github/auth.dag`). Full `OperationEffect` retirement, resource-threading migration, and caller-side effect-set pinning are follow-up work.

That sentence names four substrate-level moves bundled under one closure gate (`effect_enumeration_lens_behaviorally_complete`). This doc specifies them as one atomic migration. Per [`feedback_closed_system_effects`](../README.md#) and [`../INVARIANTS.md`](../INVARIANTS.md) §P1: effects are not a parallel taxonomy alongside the substrate — they derive structurally from typed primitive composition. Today's substrate violates that by carrying effect intent in three places (resource block, transport block, `OperationEffect` record); this design collapses all three onto one structural authority — the callable's arrow signature.
That sentence names four substrate-level moves bundled under one closure gate (`effect_enumeration_lens_behaviorally_complete`). This doc specifies them as one atomic migration. Per [`feedback_closed_system_effects`](../README.md#) and [`../INVARIANTS.md`](../INVARIANTS.md) §P1: effects are not a parallel taxonomy alongside the substrate — they derive structurally from typed primitive composition. Today's substrate violates that by carrying effect intent in three places (resource block, transport block, `OperationEffect` record); this design collapses all three onto **two orthogonal structural authorities** (per §2.4): (a) the callable's arrow signature carries the **effect set** (which resource types are involved); (b) the callable's algebra inhabitance (`inhabits IdempotentRead<R>` / `inhabits Mutating<R>`) carries the **effect kind** (read/write/append). Neither is convention-level; both are structural. The signature alone cannot distinguish read from write since `R in / R out` and `R in / R' out` have the same typed signature.

This comment was marked as resolved.


## §1. Ambient-metadata audit (current state)

Expand Down Expand Up @@ -370,7 +370,7 @@ In one PR:

Three structural reasons make this PR-shippable rather than requiring a multi-stage migration:

- **The lens body does not change.** `src/v3/lenses/effect_enumeration.dag::callable_arrow_effect` already implements §2.4's rule. The migration is upstream of the lens; once the substrate threading lands, the lens fold becomes COMPLETE on the same fold body.
- **The lens body changes only in its kind-classification dispatch.** `src/v3/lenses/effect_enumeration.dag::callable_arrow_effect` today derives kind from signature/body shape — that path retires. The new lens body reads the **effect set** directly from the callable's arrow signature (the existing substrate query — resource types in input ∩ output; structurally derivable per §2.4(a) without any lens-application-surface artifact) and dispatches on `callable_inhabits(callable, idempotent_read_for(resource))` / `callable_inhabits(callable, mutating_for(resource))` for the **kind classification** (per §2.4(b)). Both queries are within T-Lens-Behavioral-Parity slice 4 scope; **neither depends on `LensEnforcement` from T-Lens-Application-Surface** (the cascade flows the other direction — lens-behavioral-parity COMPLETE → lens-application-surface). The fold structure (per-callable walk; aggregation into the report carrier) is unchanged; only the per-callable kind classifier changes from signature-shape inference to inhabitance lookup. **This change is in scope and required** — without it, the new inhabitance facts §2.4 declares would not be consumed (facts-flow-forward / P2 violation per cursor BLOCKING at sha 96899484 line 17).
- **`Operation` already exists.** `src/v3/std/services.dag:122` declares the carrier with `callable: CallableRef + inputs: Map + endpoint: RestEndpointBinding` — exactly what §3.2 needs. No new substrate type. The PR-β..ω lineage in `services.dag:9-14` is the dispatch frame for the per-extdep population work.
- **`Arrow.body` E-9 binding is landed (DB-14).** The transport block migration target is already a live substrate facility per [`../INVARIANTS.md`](../INVARIANTS.md) §E-9 and DB-14. Moving `transport shell { argv: [...] }` to per-target binding is mechanical, not novel substrate work.

Expand Down Expand Up @@ -439,9 +439,9 @@ This preserves the existing `EffectShape = IsIdempotent(IdempotentShape) | IsBre

**Question:** `dsl/extdeps/shell.dag` operations carry a `readonly` keyword on operations. Does that survive migration?

**Resolved:** deleted. Per [`feedback_closed_system_effects`](../README.md#): *"effects are not annotations."* `readonly` is exactly the annotation pattern P1 names. After migration, `readonly` is structurally derivable: an operation is read-shaped iff every threaded resource appears unchanged in input and output. The keyword's only role today is to short-circuit the algebra; once the algebra reads the signature directly, the keyword is a redundant annotation that can drift from the structural fact (the [`feedback_state_space_vs_behavioral_invariants`](../README.md#) failure mode: a behavioral invariant maintained by convention, not by the type).
**Resolved:** deleted. Per [`feedback_closed_system_effects`](../README.md#): *"effects are not annotations."* `readonly` is exactly the annotation pattern P1 names. After migration, **read kind is declared via algebra inhabitance** (`inhabits IdempotentRead<R>` per §2.4 + §8.1) — a structural fact on the callable declaration. The `readonly` keyword duplicates that inhabitance: same fact, two carriers. Per P2 single-authority and `feedback_no_annotations`, the annotation goes; the inhabitance stays. The keyword's only role today is short-circuiting the algebra ahead of the (heuristic) `derive_op_effect`; once the algebra reads the declared `inhabits IdempotentRead<R>` directly, the keyword is redundant *and* structurally drift-prone (`feedback_state_space_vs_behavioral_invariants`: a behavioral invariant maintained by convention rather than by the type — the keyword could disagree with the inhabitance).

**Implementation note:** existing `is_idempotent_effect` / `operation_is_breaking` continue to work — they read the partition off the derived `EffectShape`, not off a keyword.
**Implementation note:** existing `is_idempotent_effect` / `operation_is_breaking` continue to work — they read the partition off the `EffectShape` derived from algebra inhabitance (`IdempotentRead<R>` → `IsIdempotent(ReadShape)`), not off a keyword. The `readonly` deletion is mechanical: every operation currently using `readonly` already has a corresponding `inhabits IdempotentRead<R>` declared at the migration site (one-to-one mapping during the atomic migration PR per §6).

### §8.5 `OperationEffect.evidence: IdempotencyEvidence` — does it follow `OperationEffect` to deletion? — RESOLVED: yes, derived projection

Expand Down Expand Up @@ -476,7 +476,7 @@ This document does NOT modify:
- The `CompositionVerdict` 2-variant shape (`ComposedEffect` reshape R3 lock; per §4.4).
- The `EffectShape` partition (`IsIdempotent | IsBreaking`; per §4.3).
- The `BoundedLattice<EffectShape>` algebra (per `src/v3/std/effects.dag` invariants).
- The lens fold body (`callable_arrow_effect` already implements the §2.4 rule; per §6.2 first reason).
- The lens fold structure (per-callable walk; report aggregation). The per-callable kind classifier IS modified — it changes from signature-shape inference to inhabitance lookup (per §6.2 first reason; required for facts-flow-forward of the new inhabitance authority).

## §10. Implementation order (sketch)

Expand All @@ -486,12 +486,13 @@ Within T-Lens-Behavioral-Parity slice 4 (per [`docs/r3-structure.md`](r3-structu
2. **`uses` clause migration** (Substrate Manager). Migrate 20 `uses x: Resource` call-sites to threaded inputs/outputs per §2.3. Same PR as step 1 (atomic per §6).
3. **Transport-block migration to E-9 binding** (Grounding Manager). Migrate 27 services × 67 operations across `dsl/extdeps/*.dag` from `transport <kind> { ... }` blocks to `Arrow.body` per-target realizations per §8.3. Same PR.
4. **`OperationEffect` retirement** (Substrate Manager). Delete `OperationEffect` declaration + `derive_op_effect` + Rust mirror; reshape `compose_effects(List<Operation>) → CompositionVerdict`; reshape `WorkflowEffect.LinearEffect.ops: List<Operation>`. Same PR.
5. **Cementing test** (Verification Manager). Author `effect_enumeration_lens_behaviorally_complete` cementing test under `src/v3/compiler/tests/integration/cementing/` per [`TESTING.md`](../TESTING.md) Band-C discipline. Tests minimal-`Dag` shapes asserting (a) read-shaped operations report `ReadShaped`, (b) write-shaped operations report `WriteShaped`, (c) operations with no resource thread report `NoEffect`, (d) coverage gaps surface explicitly. Same PR.
6. **Capability-register row update** (Verification Manager). Flip `docs/v3-lens-capability-register.md` row for `effect_enumeration.dag` from `BEHAVIORALLY PARTIAL` to `BEHAVIORALLY COMPLETE`; clear the "What v2 has that v3 drops" cell per the discipline at register §"Discipline" item 2. Same PR.
5. **Lens kind-classifier rewrite** (Substrate Manager). Rewrite `src/v3/lenses/effect_enumeration.dag::callable_arrow_effect`'s per-callable kind dispatch from signature/body shape inference to algebra-inhabitance lookup (`callable_inhabits(callable, idempotent_read_for(resource))` / `callable_inhabits(callable, mutating_for(resource))`). The fold structure (per-callable walk + report aggregation) is unchanged; only the per-callable kind classifier changes. Required for the new `inhabits IdempotentRead<R>` / `inhabits Mutating<R>` facts to flow forward into lens output. Same PR.
6. **Cementing test** (Verification Manager). Author `effect_enumeration_lens_behaviorally_complete` cementing test under `src/v3/compiler/tests/integration/cementing/` per [`TESTING.md`](../TESTING.md) Band-C discipline. Tests minimal-`Dag` shapes asserting (a) read-shaped operations report `ReadShaped`, (b) write-shaped operations report `WriteShaped`, (c) operations with no resource thread report `NoEffect`, (d) coverage gaps surface explicitly. Same PR. **Cross-lens cementing format alignment**: this Rust cementing test is the staged form. Dissolution trigger: at T-Tests-As-Data-Completeness step 5 (per [`docs/design-tests-as-data-completeness.md`](design-tests-as-data-completeness.md) §6 step 5 — *cementing dispatch port*), the test ports to a `.dag` `TestClaim`/`QuantifiedTestClaim` declaration. All three behavioral-parity lenses (complexity / cost / effect-enumeration) follow the same staging — Rust cementing today, .dag port at migration step.
7. **Capability-register row update** (Verification Manager). Flip `docs/v3-lens-capability-register.md` row for `effect_enumeration.dag` from `BEHAVIORALLY PARTIAL` to `BEHAVIORALLY COMPLETE`; clear the "What v2 has that v3 drops" cell per the discipline at register §"Discipline" item 2. Same PR.

Steps 1–6 land as **one PR** per §6 atomic discipline. Internal sequencing within the PR is mechanical — substrate authoring (1) → consumer migration (2, 3) → algebra reshape (4) → tests (5) → docs (6) — but the PR is a single atomic unit per [`../INVARIANTS.md`](../INVARIANTS.md) §P5.
Steps 1–7 land as **one PR** per §6 atomic discipline. Internal sequencing within the PR is mechanical — substrate authoring (1) → consumer migration (2, 3) → algebra reshape (4) → lens kind-classifier rewrite (5) → tests (6) → docs (7) — but the PR is a single atomic unit per [`../INVARIANTS.md`](../INVARIANTS.md) §P5.

Total estimate (per L-XL sizing in lane row 146): substrate + extdeps consumer migration is the L-XL surface; lens-fold itself is unchanged; cementing test is M; doc is S. End-to-end: 3-5 weeks worker time at standard R3 cadence given coordinated cross-manager dispatch.
Total estimate (per L-XL sizing in lane row 146): substrate + extdeps consumer migration is the L-XL surface; lens-fold structure is unchanged; per-callable kind classifier rewrite (signature-shape → inhabitance lookup) is S; cementing test is M; doc is S. End-to-end: 3-5 weeks worker time at standard R3 cadence given coordinated cross-manager dispatch.

---

Expand Down
Loading
Loading