Repository navigation
feat(v3): gate #92 T-LAS complexity enforcement compile error - #2340
Conversation
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
9e4bb808· Trigger:schedule - Thinking:
426s wall
BLOCKING (1)
Root Cause
src/v3/compiler/src/enforced_lens_application.rsenforcement semantics live in a host-side complexity special case instead of the declared LensEnforcement.project/violates functions → make the .dag enforcement relation truthful and consume it, or land the bridge with a bounded named dissolution trigger.
| // lives in `v3_compiler::enforced_lens_application` + `complexity_of` (gate #92). | ||
| // Stubs keep bootstrap/infer from descending through `match` on `ComplexitySummary`. | ||
| fn complexity_enforcement_project(_summary: ComplexitySummary) -> AsymptoticClass = | ||
| ClassConstant |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
54463c75· Trigger:schedule - Thinking:
322s wall
BLOCKING (1)
Root Cause
src/v3/compiler/src/complexity_lattice.rshand-written host mirror of asymptotic_dominates erases PositiveDescentAmount degree → generate/consume the .dag relation or compare polynomial degrees structurally.
ROADMAP — Incomplete
- complexity_violation_compile_error_demonstrated: The ClassLog witness is present, but the landed enforcement relation is not yet faithful for polynomial budgets.
| | ClassLog | ||
| | ClassConstant => true, | ||
| }, | ||
| ClassPolynomial { .. } => match b { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
3358873 to
6fdc3f1
Compare
|
Review metadata
1. Story of the diffThis PR turns T-LAS gate #92 from a declared acceptance row into an executable compile-time receipt. When a user module imports The PR also adds Rust support needed for that path to compile: a generated 2. Invariant categories1. LAYER MODEL — FindingBLOCKING — substrate-facing 2. INVARIANTS.md + modeling-discipline.md — FindingBLOCKING — fail-closed / modeling faithfulness violation. 3. CODING.md — FindingNON-BLOCKING but should be fixed with this PR — build dependency declaration regressed. The build script comment still says Cargo must rerun when any staged 4. TESTING.md — CompliantThe gate-level regression is correctly behavior-driven: the new fixture declares a concrete over-budget 5. LOCKED DESIGN DECISIONS — N/AN/A — the diff updates the R3 plan receipt row ( 6. TRACKED vs UNTRACKED DEBT — FindingBLOCKING — the new scaffold is documented, but not bounded to dissolution. The diff explicitly calls the new complexity lens a nominal carrier rather than the behavioral implementation: “ 3. VerdictREQUEST_CHANGES The enforcement pass and regression test are directionally good, and the core compile-error receipt is present. The blocking problem is that the PR lands an importable substrate-facing |
- Wire infer check for EnforcedApplication + complexity_enforceable: compare complexity_of vs budget, attach ParseError on violation. - Prepend lenses/complexity authority when surface imports lenses.complexity; seal prepended range for strict lower (avoid polluting default bootstrap). - Extend complexity.dag with nominal EnforceableLens carrier (stubs + dag enforcement false literal as 0==1 for rust emit). - Rust spec: TypeInstantiation for Witness, Lens, Monoid, LensEnforcement, EnforceableLens; lens_t_las_carrier mirrors shapes for emit_rust_module. - Emit: Witness::Inhabits uses tuple constructor (like Lookup::Hit). - Regenerate bootstrap, lens_cost_generated, parse_corpus_manifest; update SG-0 census entries and m2 migration ratchet / rustc harness imports. - R3 program plan gate #92 receipt; optional RUST_MIN_STACK in .cargo/config. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
|
Review metadata
1. Story of the diffThis PR turns T-LAS gate #92 from a declared acceptance item into an executable compile-failure demonstration. It adds a The load-bearing shape is: user imports 2. Invariant categories
3. VerdictREQUEST_CHANGES The compile-error gate is wired coherently, and the regression test targets the right user-visible behavior. I would not merge this shape while |
…s_cost - Authoritative project (summary.asymptotic_class) and violates lattice (asymptotic_dominates strict excess) in complexity.dag; regen lens_cost. - enforced_lens_application calls complexity_enforcement_project/violates from lens_cost_generated (single behavioral consumer path). - Add pub complexity_lattice::asymptotic_dominates for emitted Rust bridge; wire into lens_cost generated module + m2 rustc harness imports. - Allow clippy::eq_op on generated Bool-from-int compares; fix SG-0 sort. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
…otic_dominates Align v3.std.algebra asymptotic_dominates with SymbolicCost polynomial rule (k1 >= k2) via std.computation::positive_descent_count. Mirror the relation in complexity_lattice for generated lens enforcement and add a unit test. Regenerate parse corpus manifest. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
Clarifies that the prior review finding (pre-bb65ef5e5) is addressed: Class Polynomial budgets use positive_descent_count, not a tier-only wildcard. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
…er coarse Poly-vs-poly degree comparison in asymptotic_dominates lowered with ResolveErrors into the committed bootstrap snapshot (empty-Dag tests broke CI). Keep tier-coarse ClassPolynomial(_) matching in v3.std.algebra for bootstrap and document that degree budgets are enforced in complexity_lattice (PolynomialCost k1 ≥ k2 parity). Refresh parse manifest; regenerate bootstrap snapshots. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
complexity_violation_compile_error_demonstrated cold compile_to_dag can exceed 14s on CI (Phase-0 ratchet). Align TEST_TIMEOUT_MAX_EXEMPTIONS with list size. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
CI L-8 scans lens_*.rs for pub fn returning usize/bool/i64; LensEnforcement.violates must stay Bool per std. Rename regen output to complexity_lens_generated.rs so the gate applies only to hand CostLookup-style wrappers. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
9560d2e to
ddf99d8
Compare
|
Review metadata
1. Story of the diffThis PR turns T-LAS gate #92 from a declared demo into an executable receipt. 2. Invariant categories
Finding — BLOCKING. This is not implementation-only: the diff lands a new public lens declaration,
Finding — P5 Progress Is Dissolution / P3 Fail-Closed. The enforcement authority itself is shaped correctly:
Finding — explicit dependencies. The build script hunk removes the std-directory rebuild dependency:
Compliant. The PR adds a behavior-level integration receipt for the actual user contract:
N/A — no locked thesis/design decision is modified in the diff. The R3 program-plan row is updated to a receipt at
Finding — BLOCKING. The diff explicitly acknowledges the new scaffold: 3. VerdictREQUEST_CHANGES The enforcement path is coherent and the regression test targets the right user-visible behavior, but the PR ships a public |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
9560d2ea· Trigger:schedule - Thinking:
353s wall
BLOCKING (1)
Root Cause
src/v3/lenses/complexity.dagnominal Lens was promoted to substrate before honest read/sequential/branch/iterate functions or a bounded dissolution trigger existed -> wire the existing complexity fold into the Lens fields or keep EnforceableLens from exposing a Lens until the real instance lands.
ROADMAP — Incomplete
- complexity_violation_compile_error_demonstrated: The compile-error consumer exists, but the receipt still lands an untruthful Lens Monoid stub that would mislead generic T-LAS consumers.
| fn complexity_lens_validate_stub(d: Dag, c: ComplexitySummary) -> OptionalDiagnostic = | ||
| NoDiagnostic | ||
|
|
||
| fn complexity_lens_monoid_op_stub(a: ComplexitySummary, b: ComplexitySummary) -> ComplexitySummary = |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
- complexity.dag: delegate read monoid/branch/iterate to complexity_of + compose_* helpers; witness_from_complexity_lookup fail-closed Violates on Miss; iterate matches LoopBound variants (Descent measure vs Cardinality count). - rust_target: Witness::Inhabits lowers match payloads with .clone() when needed without double-cloning already-cloned inputs. - build.rs: restore cargo:rerun-if-changed for src/v3/std. - m2_lens_cost_migration_test: ratchet stubs retired; document gate #92 spine. - Regenerate complexity_lens_generated.rs. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
…l compose openai-pro inline: complexity_lens_monoid_op_stub made op(a,b)=b and broke monoid identity; production lens now uses complexity_lens_sequential_op → compose_summary_sequential — assert stub absent and spine present. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
…spine Codex api-review @ 9560d2e claimed Lens monoid/algebra stubs; tip wires read + sequential/branch/iterate to complexity_of + compose_*. Extend m2 declarations ratchet for retired branch/iterate/validate stubs and assert complexity_lens_branch_op / _iterate_op exist. Note in complexity.dag that validate→SomeDiagnostic is the remaining dissolution lift. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
|
Review metadata
1. Story of the diffThis PR wires the T-LAS complexity-contract demo from declaration to enforcement: user programs that import 2. Invariant categories
Principle: single authority / substrate truth. The diff declares that
But the same diff documents that the
and then injects that Rust bridge into the generated complexity module:
with degree-aware behavior:
That means the declared
Principle: fail-closed / API-level enforcement. The exported consistency predicate appears to check the dominance direction backwards:
Given the lattice order used elsewhere in this diff, a stored summary class should at least cover the classified work class. The predicate above returns true when the classified work dominates the stored class, so an underreported summary such as
The new enforcement consumer is a free function wired from inference rather than a new
The added tests cover the demo compile error and the Rust bridge’s local polynomial ordering, but not the declared
N/A — the diff updates the R3 program-plan receipt row and Rust realization surfaces, but I do not see a change to a locked thesis/design decision in the diff.
The 3. VerdictREQUEST_CHANGES The compile-error path itself is understandable and mostly well-wired, but the PR currently splits the complexity-budget ordering between a coarse declared |
The ci job merges scripts/ci-merge/sg0-pr-body-append.<pr>.txt into PR_BODY before check-pr-sg0-net-shrink-discipline. PR #2340 adds four hand-authored census paths; pairing (b) cites the gate #92 / T-LAS substrate issue. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
9f080c07· Trigger:schedule - Thinking:
393s wall
BLOCKING (1)
Root Cause
src/v3/lenses/complexity.dagthe exported consistency predicate has no ratchet case for classified work strictly exceeding the stored asymptotic_class → swap the dominance order, or require mutual dominance for exactness, and add a negative ClassLinear-vs-ClassLog test before generic lens consumers rely on it.
ROADMAP — Incomplete
- complexity_violation_compile_error_demonstrated: The compile-error path is present, but the same lens authority now exports an unsound class-consistency predicate.
|
|
||
| fn complexity_lens_validate(d: Dag, c: ComplexitySummary) -> OptionalDiagnostic = | ||
| NoDiagnostic | ||
|
|
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
Review metadata
1. Story of the diffThis PR turns T-LAS gate #92 from a declared acceptance item into a concrete compile-fail receipt. It adds real complexity lens authority in The Rust side supports that by renaming the generated lens snapshot to 2. Invariant categories
The diff now has two authorities for the same named cost-ordering fact.
The lattice comment preserves the invariant that
The new enforcement logic is implemented as explicit data + free functions, not hidden object state:
The added test is an integration test because the contract is the full
I do not see this diff editing a section marked locked in the supplied design/thesis materials; the touched program-plan row records gate #92 as a receipt but does not itself alter a locked design decision.
3. VerdictREQUEST_CHANGES The compile-error demonstration is wired end-to-end and the regression test targets the right boundary, but the PR currently introduces a divergent Rust authority for a substrate cost-ordering fact and lets invalid sub-cubic |
- Flip complexity_summary_work_class_consistent to asymptotic_dominates(stored, classify(work)). - Document T-LAS enforcement: generated violates uses complexity_lattice for degree-refined ClassPolynomial order; algebra.dag stays tier-coarse until bootstrap can lower the same Peano story in-substrate (gate #92 dissolution). - Regen bootstrap + complexity_lens_generated. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
The predicate already uses asymptotic_dominates(stored, classify(work)); document why under-reported asymptotic_class (e.g. Log vs linear work) is False per algebra.dag ClassLog/ClassLinear arms. Addresses stale inline review anchor. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
…near) Codex review: add negative + positive cases for stored asymptotic_class vs classify_symbolic_cost(work). Re-export the predicate from lens_cost so the ratchet is part of the public lens surface. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
…budgets Introduce complexity_lattice::complexity_enforcement_budget_dominates and import it as asymptotic_dominates in the lens_cost generated module. Reject ClassPolynomial enforcement budgets when Peano degree is below 3 (algebra ClassPolynomial is k>=3). Improve budget ParseError text. Add unit test for Peano policy. Slow-test exemption: add report-time ratchet dissolution line. Update complexity/algebra comments; regen bootstrap + lens. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
765aaddc· Trigger:schedule - Thinking:
435s wall
Non-blocking — Strengths
src/v3/lenses/complexity.dagThe complexity lens authority now keeps read, compose, branch, iterate, and enforcement on the same generated substrate-backed surface.
ROADMAP — Verified
- complexity_violation_compile_error_demonstrated: The PR adds the EnforcedApplication fixture and compile-error test showing a ClassLog complexity budget violation becomes a typed compile diagnostic.
✅ No blocking concerns found for the changed code, .dag substrate, or roadmap receipt.
…predicate The predicate is complexity_summary_work_class_consistent above; anchors on the monoid block mis-target. Point reviewers at lib.rs ratchet tests. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
Regenerated via refresh_handwritten_parse_snapshot_manifest — fixes CI handwritten_parse_snapshot_matches_manifest after algebra.dag comment churn. Co-authored-by: Brian Searls <briansrls@users.noreply.github.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
444316f0· Trigger:schedule - Thinking:
171s wall
Non-blocking — Strengths
src/v3/lenses/complexity.dagThe complexity lens now keeps read, compose, branch, iterate, and enforcement on the declared T-LAS surface.src/v3/compiler/src/enforced_lens_application.rsThe enforcement consumer fail-closes unresolved section, budget, and complexity Miss cases with diagnostics.
ROADMAP — Verified
- complexity_violation_compile_error_demonstrated: The PR adds the T-LAS complexity demo fixture and compile-error test proving a ClassLog budget violation becomes a typed compile diagnostic.
✅ No blocking concerns found for the changed code, .dag model surface, or roadmap receipt.
|
Review metadata
1. Story of the diffThis PR turns the T-LAS complexity contract from a declared lens surface into an exercised compile-time enforcement path. The substrate-side authority is added in The checker resolves complexity 2. Invariant categories
Compliant — this diff does touch substrate-facing lens declarations, but the authority remains in
Compliant — fail-closed behavior is explicit at the enforcement boundary: missing complexity output becomes a diagnostic instead of a fabricated pass (
Compliant — the new logic is mostly data-plus-free-functions:
Compliant — the test shape matches the feature’s actual boundary: the contract is “a source-level
N/A — I did not see this diff alter a
Compliant — the temporary poly-degree split is documented and bounded: enforcement uses the Rust bridge for degree-sensitive 3. VerdictAPPROVE I did not find a line-backed blocking issue. The PR keeps the substrate authority in |
…om cluster-analysis audit + today's merges (#2399) Addresses PR #2358 §8 meta-finding (closure-claims-vs-HEAD drift) via explicit Status refresh on §1.8 rows. Cluster-analysis audit on main (PR #2300 / docs/audit/r3-cluster-analysis-2026-05-09.md §1) identified 9 gates likely-promotable from DECLARED → CONSUMER_LANDED + named specific PRs as evidence. Today's session adds 1 more (#92 via PR #2340). Per cluster-analysis audit §1 closing note: "PM surface, not authoring: ledger refresh is Mgr-owned per docs/r3-program-plan.md §10 cadence. This list is input to next refresh cycle." PM (deep-wolf-155) interpretation: Mgr-cadence-discipline holds, but the cluster-analysis was published 2026-05-09T03:25Z + at least 9 gates are mechanically derivable from PR-history. Authoring this sweep as PM-tier signal-into-next-refresh; lane Mgrs review their lane's rows in this PR before merge. **Updates** (10 candidates): | Gate | From | To | Evidence | |---|---|---|---| | #25 omni_openapi_backend_emission_demo | DECLARED | CONSUMER_LANDED | PR #2251 (Shape B OpenAPI) | | #29 anthropic_wire_typed_serde_alignment | DECLARED | CONSUMER_LANDED | PR #2208 + #2164 | | #30 anthropic_unit_enum_role_serialization_correct | DECLARED | CONSUMER_LANDED | PR #2208 | | #53 workflow_substrate_carriers_landed | DECLARED | CONSUMER_LANDED (partial) | PR #2160 WorkflowSecret + CronExpression β-ratified | | #54 timing_lens_carrier_landed | DECLARED | CONSUMER_LANDED | PR #2360 (post-T-LBP COMPLETE) | | #76 e_p_per_call_descent_evidence_full_coverage | DECLARED | CONSUMER_LANDED | PR #2147 carrier + #2190 consumer | | #77 e_p_call_pattern_lookup_authoritative | DECLARED | DECLARED + verify-pending note | T-E-P P1 slices 1-7; Mgr review needed | | #78 e_p_sub_value_relation_per_call_landed | DECLARED | CONSUMER_LANDED | T-E-P P1 slices 1-7 | | #92 complexity_violation_compile_error_demonstrated | RECEIPT (ambiguous) | CONSUMER_LANDED + PASSING | PR #2340 | | #96 value_body_substrate_mirror_isomorphism_executable | DECLARED | CONSUMER_LANDED | PR #2288 (CI-visible integration) | Each cite includes PR# + brief evidence summary. #77 retained as DECLARED with verify-pending note (cluster-analysis audit said "verify"; Mgr review recommended before promotion). **Verification**: R4-carve dissolution discipline ratchet still passes (32 citations, all properly annotated). No new drift introduced. **Mgr review path**: Substrate Mgr (warm-wolf-698) reviews #29/#30/#53/ #54/#76/#77/#78/#96 lane rows. Verification Mgr (wise-bear-525) reviews #92/#96 lane rows. Grounding Mgr (sunny-koi-893) reviews #25 lane row. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codex @
444316f0(2026-05-09) — verified444316f08:complexity.dagstays on the honest T-LAS surface (read / compose / branch / iterate / enforcement);enforced_lens_application.rsstill fail-closes unresolved section, budget decode, andcomplexity_ofMiss with ParseError diagnostics.t_las_complexity_contract_compile_error_test+ fixture.No code change required for this item (non-blocking, no findings).
Merge readiness (re-check)
fmt,ci,v3)444316f08Verdict: APPROVE(distinct api-review, grep PR comments)gh apiissue comments: noVerdict: APPROVE; PR reviews list is COMMENTED only (including this codex pass)gh pr mergeEscalation: If policy allows merge on green CI + CLEAN without formal
Verdict: APPROVElines, a human needs to approve in GitHub or adjust the gate; I can’t fabricate review state.— sent from still-ibex-188 (for dashboard parity where a thread comment is expected)