Repository navigation
T-12 — lens/cost.dag + lens/complexity.dag (one mechanism, two projections per U2; complexity is asymptotic projection of cost; NEVER re-derives; scaffold-against-T-9-contract; Practice 11 + lens-over-substrate enforced) - #3470
briansrls wants to merge 16 commits into
Conversation
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
14cdfd53· Trigger:schedule - Thinking:
559s wall
BLOCKING (1)
Root Cause
src/v4/lens/complexity.dagComplexityVariables depends on an unlanded refinement substrate → land the v4.std.refinement carrier here or use existing v4 std carriers until that substrate exists.
| Unavailable | ||
| } | ||
| import v4.std.node { Node, Symbol } | ||
| import v4.std.refinement { Refined, refined_base } |
There was a problem hiding this comment.
BLOCKING: The new import of v4.std.refinement is unresolved, so the v4 compile gate fails instead of preserving the thesis structural-correctness baseline.
|
T-12 content is review-ready — the implementation is solid. To unblock synthesis (T-17):
Architecture check passed: No blocking findings. Ready to flip. |
|
Review metadata
1. Story of the diffI could not inspect the primary review surface. The attached chatgpt-review-ab175a21-72cc-49… So the expected story for this PR is clear — one cost mechanism, with complexity as an asymptotic projection rather than a second derivation path — but I cannot honestly say whether the diff implements that story without changed lines. 2. Invariant categories
2.5. Top-down PM intent reviewN/A — no concrete diff-cited mismatch is available. The PM-level intent is visible in the uploaded authorities: correctness dimensions are structural facts read from the program model, and v4 applies cost/complexity/parallelism lenses recursively to its own modeled build/CI pipeline; cost is the U2 time/complexity dimension, not a separate mechanism. chatgpt-review-ab175a21-72cc-49… chatgpt-review-ab175a21-72cc-49… I cannot verify whether PR #3470 preserves or dilutes that intent without the changed lines. 3. VerdictREQUEST_CHANGES. I am not asserting a code defect; I am refusing to approve without the primary diff. This PR appears to touch substrate/lens |
|
Closing as superseded: all T-12 content (SymbolicCost lattice, cost_lens, complexity_lens, 4 lens_complexity test claims) was already squash-merged to main via PR #3452. The net diff of this branch vs main is empty. T-12 is complete. |
Auto-opened by session-dashboard for session
sharp-owl-625.Pushing to
session/sharp-owl-625advances this PR.Worker attestation
cargo test --workspace— CI passing (run 26201523192, 2026-05-21).Closes #Ndirective.Summary
Fills
lens/cost.dag(9-variantSymbolicCostlattice +cost_lensfold) andlens/complexity.dag(ComplexityBoundtype +complexity_lens = asymptotic_projection ∘ cost_lens). Design: one mechanism, two projections — cost_lens is the authoritative fold over a Node; complexity_lens is its asymptotic projection, never re-deriving. Implements Practice 11 (lens-over-substrate: cost lens reads Node through the substrate, never adds a cost type to std/). Adds 4 structural test claims undertest/claim/lens_complexity/.What changed
src/v4/lens/cost.dag:SymbolicCostcoproduct (ConstantCost | LinearCost | LogCost | PolynomialCost | PolyLogCost | ExponentialCost | FactorialCost | SumCost | ProductCost | UnknownCost),CostCompositionMode,AsymptoticClass,cost_lens(n: Node) -> Witness<SymbolicCost>,asymptotic_class_of_costexported for complexity.dag.src/v4/lens/complexity.dag:ComplexityBound = ConstantComplexity | SizedComplexity { class, variables } | UnknownComplexity { diagnostic },complexity_lens(n: Node) -> Witness<ComplexityBound>as one-linerasymptotic_projection(cost_witness: cost_lens(n: n)).src/v4/test/claim/lens_complexity/: 4 claims — map_id (Cardinality → LinearCost → linear_complexity), nested (nested Cardinality), algebra_receipts (constant + sum + product composition rules), while_external_condition (Loop → UnknownComplexity with T-9-not-landed diagnostic).What was explicitly deferred
UnknownCost { reason: "T-9-not-landed: loop bound" }— correct and honest, with structural test claim (while_external_condition) pinning this.complexity_lensas input for lower-bound comparison — that is T-17 scope, not T-12.Test plan
cargo test --workspace— passed (CI run 26201523192, 2026-05-21T02:18:14Z)