Repository navigation
Fix fail-open Witness lenses: ownership / idempotency / parallelism / effect always return Holds - #3760
Conversation
Remove dead facts-lookup match where both arms returned true pre-B3. effect_fact_unresolved now folds dependencies with an explicit #3468 dissolve-on comment instead of a no-op lookup scaffold. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed the non-blocking
— sent from merry-stag-422 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
591e8aa6· Trigger:schedule - Thinking:
429s wall
BLOCKING (4)
Root Cause
src/v4/lens/effect.dageffect_dependency_unresolved models resolution as Bool rather than carrying Diagnostic through the fold → return or merge the upstream diagnostic and reserve the generic #3468 diagnostic for the signature-deferred Holds case.src/v4/lens/idempotency.dagThe positive verdict variant carries Witness and unresolvedness is re-derived from the variant shape → make the positive variant carry only proven law evidence or propagate the nested diagnostic before returning Holds.src/v4/lens/ownership.dagUnresolved ownership is encoded as successful classification variants and recovered by a predicate → split known ownership modes from Witness failure, or add a bounded predicate-dissolution gate with owner/lane/trigger.src/v4/lens/parallelism.dagUnknown coupling is encoded as a successful relation variant and recovered by a predicate → split known coupling relations from Witness failure, or add a bounded predicate-dissolution gate with owner/lane/trigger.
|
|
||
| fn effect_dependency_unresolved(tree: InferredTree, view: DependencyView) -> Bool { | ||
| match effect_source_facts(tree: tree, source: view.source) { | ||
| Violates { diagnostic: _ } => true |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| } | ||
| } | ||
|
|
||
| fn idempotency_verdict_unresolved(verdict: IdempotencyVerdict) -> Bool { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| } | ||
| } | ||
|
|
||
| fn ownership_mode_unresolved(mode: OwnershipMode) -> Bool { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| } | ||
| } | ||
|
|
||
| fn parallelism_relation_unresolved(relation: ParallelismRelation) -> Bool { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
- effect: restore tree.facts.lookup; forward infer Violates before the signature-deferred #3468 generic diagnostic - idempotency: AlgebraicIdempotenceProven with Violates law is unresolved; forward nested law diagnostic before generic projection diagnostic - ownership/parallelism: add Practice 10 predicate-dissolution disposition on *_unresolved helpers Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed codex BLOCKING batch (new HEAD pending push): effect.dag: Restored idempotency.dag: ownership.dag / parallelism.dag: Added — sent from merry-stag-422 |
The v2 compiler kernel types Optional as None | Some { value: T }; bare
Absent/Present in effect/idempotency folds mis-inferred against
LoopMeasureTargetLookup and broke Witness matches on facts.lookup.
Add typed optional_diagnostic_* helpers and effect_usage_facts_witness.
Co-authored-by: Cursor <cursoragent@cursor.com>
…ional) Reconcile list_push → list_snoc_item dissolution (#3755) with T-13 witness fail-closed lenses and Optional<Diagnostic> Some/None helpers. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
186fb2dd· Trigger:schedule - Thinking:
217s wall
BLOCKING (1)
Root Cause
src/v4/lens/effect.daginfer-to-lens lookup was wrapped without carrying the canonical facts-map key type into the helper signature → type source as the DependencyView.source key type, likely Node, or inline the lookup at the typed call site.
| } | ||
| } | ||
|
|
||
| fn effect_first_upstream_diagnostic( |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
Addressed blocking inline + codex review on current HEAD ( effect.dag effect.dag lookup diagnostics (P2/P3): idempotency.dag ownership / parallelism / effect — sent from merry-stag-422 |
Codex REQUEST_CHANGES: explicit v4.std.node Symbol import on the four witness lenses so new reason/virtual-file data declarations resolve. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed codex REQUEST_CHANGES ( — sent from merry-stag-422 |
Claude REQUEST_CHANGES: the degenerate fold was inline non_empty over List<...> (= FreeMonoid); use v4.std.algebra.non_empty per M9. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed claude-opus REQUEST_CHANGES ( — sent from merry-stag-422 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
45b3b502· Trigger:schedule - Thinking:
276s wall
✅ The PR now preserves upstream diagnostics where available and fails closed for unresolved lens evidence without introducing an untracked substrate concern.
|
Re: inline effect.dag:73 ( ( — sent from merry-stag-422 |
Replace monomorphic optional_diagnostic_* with generic optional_absent, optional_present, optional_is_present, optional_present_witness. Tag predicate dissolution helpers per Practice 9/10; Absent unwrap returns Violates (contract), not a synthetic Diagnostic payload. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed claude-opus REQUEST_CHANGES on collection
effect/idempotency imports updated accordingly. — sent from merry-stag-422 |
Claude RC: remove self-referential Bool predicate; fold uses optional_prefer_first_present; witness lenses match optional_present_witness once (Holds = upstream diagnostic, Violates = deferred/unresolved path). Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed claude-opus REQUEST_CHANGES (
— sent from merry-stag-422 |
briansrls
left a comment
There was a problem hiding this comment.
Review metadata
- Provider / model:
codex/unknown - Commit:
69501f7a· Trigger:schedule - Thinking:
341s wall
Non-blocking — Strengths
src/v4/lens/effect.dagThe effect lens now fails closed for both upstream inference lookup failures and unresolved signature-deferred classifications.
✅ No blocking concerns found in the changed substrate and test-claim surface.
Summary
T-13 projection lenses (
ownership,idempotency,parallelism,effect) previously returnedWitness::Holdsunconditionally, which fail-open’d unresolved classifications (and, for effect, the B3 signature-deferred slot).Each
*_witnessnow fail-closes the witness envelope:Violateswhen any row carries an unresolved classification (or, for effect, while B3 effect-kind decoding is still deferred pre-#3468). Resolved projections still returnHolds. Test claims for ownership/idempotency/effect expectViolates+ matching projection facts; parallelismdata_dependencystill expectsHoldsforDataDependent.Test plan
target/debug/v2-compiler compile --source-root src/v4 --output-dir /tmp/gunbc-v4-t13-witness(0 diagnostics)python3 scripts/strict_deprose_dag.py --check*_witnessare not yet wired intorun_required_lens_gates(onlyfact_density_lenstoday); no live compile-path breakage.