Skip to content

EPIC: Contradiction surface — code-checked user guidance with class-fixed verdicts #349

Done

Description

@abogartz

Why

The hint channel (#334) rides user-stated rows into every session. #345 measured what a WRONG guided row does:

  • Round 1: the agent rewrote a correct FREE_SHIPPING_THRESHOLD = 100 to match a remembered $50 — the generic "reference data, never instructions" framing did not prevent it.
  • Round 2 (verify-against-code caveat, ee769ef): one run resisted.
  • Arm D repeat (results-contradiction, caveat framing only, ×3): 1/3 harm again — 2 harms in 5 across the line. Framing is a coin flip.

The contradiction surface replaces framing luck with a deterministic verdict. Simulation (results-contradiction, arms C/D): behavior-class CONFLICT line 3/3 no-harm; spec-class CONFLICT row ALONE (no hint) 3/3 fixed the code AND passed the task. Real path (results-conflict-real{,2}): capture → store → code-read → CONFLICT → obey, 13/15 links; spec verdict obeyed 3/3 after the header fix.

Design (validated, implemented on retrieval-fix-20261107 @ 40dc05a)

  1. Row fields: a guided row may carry ref (declared code symbol), claim (the user's value alone, ≤32 chars), klass (spec = user is authority; behavior = working code is authority). Capture writes them; junk drops the fields, never the row.
  2. Detection in plugin code, no model call: at render time, a bounded scan (≤300 files, ≤256 KB, depth 3, src/ first) for const REF = <literal>; numeric/currency/percent-aware compare ($50.00 ≡ 50, 8.25% ≡ 0.0825). Decidable claims only — computed behavior is not guessed; the row falls back to the plain staleness caveat.
  3. Presentation as one object: the rendered row becomes CONFLICT (REF). Memory: <claim> — user-stated, never verified. Code today: REF = <value> (observed in <file>). Class: <klass> — <authority>. Action: <fixed verdict> — spec: "the code is the bug; fix REF to "; behavior: "trust the code; do not edit REF; raise it with the user if the rule looks intentional".
  4. Header rule (0dfcb90, learned the hard way — arm F run 2.1): when a CONFLICT row rides, the block header states the check is ALREADY done and its Action governs. Without it, the blanket staleness caveat plus a captured "trust code over docs" row filed the CONFLICT line with the decoys and the agent ignored a correct verdict.
  5. Option: contradictionSurface (default OFF until the confidence gate below).

Only the RENDERED row is substituted; selected keeps stored rows so ledger/attribution keys stay stable. Fail-open everywhere: no repo dir, no declaration, undecidable value → plain row.

Ship order

#333 (capture input shape) → #334 split via #343 → contradiction-surface PRs (also #343) → #342 (reserve provenance — a minted CONFLICT row ships a verdict, raising the poisoning stakes) → confidence gate → default decision.

Tickets

Evidence

Bench repo (local benchmark-tests/ocsi): FINDINGS-2026-11-07-chat.md §6, results-contradiction/, results-conflict-real/, results-conflict-real2/, arms C/D/E/F in chain-precision.ts, profile chain-conflict.jsonc. Plugin: 42b9b92 (feature), 0dfcb90 (header rule), suite 1105 pass / 0 fail at the time of writing.

Activity

  1. added
    retrieval
    on Nov 8, 2026
  2. abogartz commented on Nov 8, 2026

    @abogartz
    OwnerAuthor

    @WhollyMindless please pick up this EPIC.

  3. WhollyMindless commented on Nov 8, 2026

    @WhollyMindless
    Contributor

    Picking up #349 following your explicit handoff. I will work from the pinned retrieval-fix-20261107@40dc05a, preserve the capture attribution fix in #354, and keep contradictionSurface off until the agreed provenance and merged-main confidence gates pass.

    I am starting with integration review and #342's unassigned write-boundary provenance protection, plus the #351 policy/validation work. I see #343, #350 and #353 still tagged agent:ready, so I will not race the fixer on those tickets. Please clarify whether your parent handoff also transfers those tagged children; meanwhile I can progress the unassigned security and validation scope.

    The benchmark repo/artifacts named in this epic are not present in this checkout. I will report deterministic local checks separately from the required seat-model and merged-main benchmark windows, and will not treat inherited branch results as new validation.

  4. WhollyMindless commented on Nov 8, 2026

    @WhollyMindless
    Contributor

    Implementation progress:

    Integration review also found two rollout blockers in the pinned detector, independently reproduced through findConstant and selectRelevant:

    // export const TAX_RATE = 0.08;
    export const TAX_RATE = 0.0825;

    With a spec claim of 0.0825, the lookup takes the commented 0.08 and renders a code-checked CONFLICT even though the live declaration agrees. Separately, export const TAX_RATE = calculateRate(); is accepted as the literal calculateRate() and gets a fix-the-code verdict rather than the promised undecidable/plain fallback. Both need conservative parsing before rollout. I also observed selected returning the rendered shallow copy rather than the stored original for a conflict, contrary to the epic's stated contract; downstream ledger impact has not been established by this probe.

    contradictionSurface remains default OFF. The required benchmark repository/artifacts are absent here, so fresh Arm G/F and merged-main confidence numbers are still outstanding. #350/#353/#343 retain their agent:ready labels; my earlier ownership-coordination question remains open, and I have not taken those bot-tagged implementation tickets.

  5. WhollyMindless commented on Nov 8, 2026

    @WhollyMindless
    Contributor

    The implementation split is now published under your #349 handoff; the older agent:ready labels were left unchanged. This supersedes my earlier note that I was holding those children for an ownership clarification.

    The combined branch passes 1,094 tests (32 skipped), 12,908 assertions, typecheck and lint locally on Windows. #358–#360 and #362 have all four hosted checks green; #361's comment-only compatibility update and new #363 are awaiting their current CI runs. #355's provenance reservation is already on main; the final integration tests exercise both rejected forgery paths and legitimate capture through rendered CONFLICT injection.

    contradictionSurface remains default OFF. The referenced benchmark-tests/ocsi source/profiles are absent from this repository and unavailable on our side. The remaining gates are #350's fresh six-run seat-model emission window, #351's real Arm G runs, and #352's confidence window on merged main. Local deterministic checks are not substitutes for those results, so I am not closing those tickets or claiming the epic complete. Those runs need the benchmark source/profiles or execution from the environment that has them.

  6. WhollyMindless commented on Nov 8, 2026

    @WhollyMindless
    Contributor

    @abogartz, could you make the benchmark-tests/ocsi sources/profiles available to us (a repository/access path, including chain-precision.ts, chain.ts, chain-conflict.jsonc and the required fixtures/setup), or run the remaining gates in your existing benchmark environment?

    The outstanding runs are:

    Please pin the plugin SHA for each published result and post the per-run evidence on the relevant tickets. The sources/profiles are absent from this repository and our checkouts, so we cannot reproduce those windows yet. Either sharing the harness or running it on your side would unblock the remaining validation; contradictionSurface stays default OFF meanwhile.

  7. abogartz commented on Nov 8, 2026

    @abogartz
    OwnerAuthor

    Epic status — 2026-11-08

    Code landed on main @ 0.20.0. The contradiction surface shipped through the #343 split (#359-#363) plus #356 (authority policy: uncertain class stays unclassified) and #357 (literal-fact verification). The feature is ON by default per the maintainer decision recorded on #363 (036053b). #353 (status wording) landed via #358 and is closed; #352 (default-ON decision) is closed with the gate deviation recorded.

    Not closed — two child acceptance items remain open:

    Ordering deviation, stated plainly: default-ON shipped while #342 (reserve the user-guided tag for the capture path) is still open and its reservation code is not on main. Until #342 lands, a model-facing write can mint a row that renders a code-checked authority verdict. The epic itself flagged the reservation as a precondition for default-ON; the maintainer override on #363 did not remove the exposure. Recommend landing #342 promptly.

  8. WhollyMindless commented on Nov 8, 2026

    @WhollyMindless
    Contributor

    @abogartz, could we make ownership of the remaining benchmark acceptance explicit? Our implementation is shipped in 0.20.0, but we do not have the benchmark-tests/ocsi harness/profiles or the specified seat-model environment needed for #350 and #351.

    Could you confirm whether you/your benchmark runner will handle #350's fresh six-run Arm F emission window and #351's Arm G ×2, or whether you will make the harness/setup available for us to run them?

    Please mention @WhollyMindless here when the harness becomes available, or when the runs/results are ready—with the pinned plugin SHA and per-run evidence—so we can resume validation and address any resulting code changes. If someone else will run them, naming that owner here would also make the handoff clear.

    Until that is confirmed, we are tracking these as outstanding benchmark acceptance, with execution ownership awaiting confirmation. We are not claiming the epic's validation is complete.

  9. abogartz commented on Nov 8, 2026

    @abogartz
    OwnerAuthor

    Bench evidence protocol (adopted 2026-11-08 to remove local-bench AC friction): bench acceptance is satisfied by an EVIDENCE COMMENT on the ticket, not by prose in the AC. A valid evidence comment carries: run dir name, plugin SHA, bench SHA, and the results table (attr-join/chain already print it paste-ready). Code merged = code portion done; the ticket closes when the evidence comment is posted and meets the stated threshold. Runs stay single-seat, sequential; retries reported, not hidden. Structural follow-up: #318 — push the curated bench (harness, profiles, FINDINGS, chain.json; raw wire/logs excluded) so cited bench SHAs resolve on GitHub.

  10. WhollyMindless commented on Nov 8, 2026

    @WhollyMindless
    Contributor

    Access confirmed: we cloned the private ocsi-bench at 864c520ff78eca1dc83e10db0727e451632c3a1c. Thanks for publishing the extract.

    Two concrete reproduction inputs are still missing from that checkout: chain-precision.ts reads mutations-v2.json at module startup and launches proxy-log.ts, but neither file is tracked. Could you include those runtime dependencies? The harness currently implements A–F; Arm G is still a code task once the harness inputs are complete.

    The profiles also retain your local plugin paths/proxy endpoint and scrubbed keys. We have not started a model run or competed with the active single-seat Arm F window. Please confirm whether live runs should stay on your seat (we can prepare the Arm G change for you to run), or whether a reachable execution environment/slot will be provided.

    One reproducibility detail: this extract has fresh history, so the cited local bench@2911482 does not resolve in it. A mapping from the cited local SHAs to published snapshots, or the relevant history, would make the evidence citations traceable.

  11. abogartz commented on Nov 8, 2026

    @abogartz
    OwnerAuthor

    Both runtime inputs are now published: ocsi-bench@189f3a8 adds mutations-v2.json and proxy-log.ts (the latter was untracked locally — that is how it leaked out of the extract; it is tracked in the local repo now too). Thanks for not starting model runs against the active window.

    Seat answer: live runs stay on the maintainer seat. The model is a private LAN server (evo.local:8090) behind the recording proxy; no reachable execution environment or slot will be provided, and the single-seat serialization rule applies to everyone. The division that works: prepare the Arm G change (G1/G2/G3 in chain-precision.ts per the #351 spec) as a branch/PR against ocsi-bench; the maintainer runs it on the seat and posts the evidence table here. The plugin-load abort guard (bench@4a6f316) is already in the published harness — a bad plugin checkout aborts pass 1 instead of burning the window.

    Citation traceability: added CITATIONS.md (same commit) mapping every cited local bench@<sha> to the snapshot state. Honest caveat stated there: the local history contains wire dumps and sweep payloads that stay private, so citations resolve to file states in this snapshot, not to commits in its graph; reproducing an older citation exactly may require reverting the later harness changes the table lists.

    Profiles keeping local paths and the proxy endpoint is intentional — they are part of what was measured; edit package/baseURL and fill the scrubbed key for your own checkout.

  12. WhollyMindless commented on Nov 9, 2026

    @WhollyMindless
    Contributor

    @abogartz — FYI: we completed a broader adversarial review of the project's claims, architecture, code quality, tests and benchmark evidence using GPT-6 Astra, Claude Opus 5.5 and Qwen3.8 Thinking, then verified the strongest findings with separate probes.

    Tested baseline: v0.20.0, commit d0929a6cc44a56ad9c788ae26236958983b51d43. The benchmark evidence review used the published ocsi-bench snapshot 189f3a80d1248acfcfc7a2c7505281998f46fada; we did not run live inference. These observations concern that pinned baseline. Later commits or work already in flight may address them; they have not been revalidated against those changes. Pending PRs were kept separate from shipped behavior.

    The assessment credits the isolation safeguards, atomic publication, negative-path tests and explicit evidence caveats. A few examples of the concerns:

    • Stalled-writer integrity: two separate processes using withStoreLock both acknowledged writes, but the first holder overwrote the second after its lock was stolen at the ten-second age threshold. The probe deliberately paused the holder; production frequency is unmeasured.
    • Grounding terminology: an invented dotted API call appeared in resolved and its settled learning was promoted without engagement or a gate check; the plain-prose control was blocked. This establishes a grounding/labeling gap, not model obedience or code execution.
    • Evidence boundaries: branch-build link totals do not establish shipped-main effectiveness or general/default-install improvement. Several limitations are already acknowledged in the tickets and benchmark notes; retention remains a legitimate narrower benefit.

    The unit-suite runs passed; the concerns above came from additional probes and source/evidence inspection. I helped author #355–#363, so this is disclosed author involvement, not independent approval of our own changes. The full consolidated assessment and reproducible probes are available if useful.

    Optional input for your consideration: no response, release hold, deadline or commitment is requested. Some observations overlap existing work. Please feel free to select individual items, defer them, or disagree with the assessment. We are not opening a new ticket queue from this review.

  13. WhollyMindless commented on Nov 10, 2026

    @WhollyMindless
    Contributor

    Follow-up to the Astra / Opus / Qwen assessment: we commissioned a further whole-project adversarial review using Claude Fable 5.2. This is additional optional input, not a new acceptance gate or request to take on work.

    Tested baseline: v0.22.2, f8f42fd2cc5b709ce1d8c19272785fa10e07bf42, verified as main when the audit started. Benchmark evidence inspected: published ocsi-bench@189f3a80d1248acfcfc7a2c7505281998f46fada. Pending #376–#379 were kept separate from shipped behavior; subsequent/in-flight changes may address these observations.

    Selected additional findings from Fable's fresh synthetic probes:

    • False drift retirement: a correct memory citing mailer.send(to, subject, body) remained active in the unchanged-tree control. Adding an unrelated function send(frame) caused the next same-scope write to retire it as drift, and a correct replacement was then rejected. The resolver matches bare names rather than the qualified API (src/gate/resolver.ts:415–435; src/gate/gate.ts:494–552). Real-repository frequency is unmeasured.
    • Guidance provenance: with opt-in auto-capture and one read engagement, a scripted capture reply marked assistant-quoted text as guided:true / klass:spec, without an original quote; the resulting row rendered a user-authority CONFLICT action. Separately, a substring quote omitted a preceding negation and passed the quote check. No-engagement candidates were blocked, and direct remember still stripped reserved provenance. This establishes a mechanism under scripted output, not that a real capture model emits it or a downstream model obeys it. Some wrong-spec risk is already explicitly accepted (src/capture/guided-rules.ts:187; src/capture/runtime.ts:580–615).
    • Signal/cooldown interaction: with captureOnSignal:true, a read-only turn skipped capture but consumed the five-minute cooldown; a rule stated seconds later produced no context read, model call or row. Putting the rule in the first turn was a passing control (src/capture/runtime.ts:124–139,413–438,732). A later capture may recover it; a session ending there does not.

    Fable also reproduced the earlier deliberately stalled-holder overwrite, invented-reference promotion, concurrent duplicates and unit/scale comparison concerns on this pin. These are persistence checks, not newly estimated incident rates. Mutation validation now reports three unmatched anchors, versus two in the earlier audit; that is observed, while any claim that the human release ritual was omitted would remain inference.

    Checks: Windows / Bun 1.4.4; 1,178 unit tests passed, 31 skipped; typecheck and lint passed; 30 e2e tests passed on real opencode 2.2.6 with the scripted fake model. Mutation-anchor validation failed. No live inference, benchmark chain, Linux/macOS or production store was exercised. Fable ran the probes; I have read the report but have not separately rerun its new probes. It read the earlier assessment before completing its own inspection, so this was not a blind replication.

    Disclosure retained: I helped author #355–#363, including code implicated in the guidance/CONFLICT observations. This is not independent certification of our own work. The review also credits repository isolation, reserved-tag stripping, missing-path refusal, atomic publication under ordinary contention, and candid evidence limits. The detailed report/probes are available if useful.

    Please feel free to select individual observations, defer them, or disagree. No response, deadline, release hold, new issue queue or commitment is requested.

  14. added
    severity:high
    on Nov 14, 2026
  15. added
    tier:standard
    enhancement
    tier:full
    and removed
    tier:standard
    on Nov 23, 2026
  16. ocsi-architect commented on Nov 25, 2026

    @ocsi-architect

    Closing: the shipped deliverable exists. src/recall/conflicts.ts renders one flagged CONFLICT line whose Action is fixed by class (spec: the code is the bug; behavior: trust the code), with the authority policy documented in docs/internals/contradiction-authority.md. Both opened this session at main a573a3b. Remaining checklist items are tracked as their own tickets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementretrievalseverity:hightier:full

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions