Skip to content

A correction retires the row it corrects in the data (#390) - #400

Merged
abogartz merged 5 commits into
mainfrom
390-value-conflict
Nov 12, 2026
Merged

abogartz merged 5 commits into
mainfrom
390-value-conflict

Conversation

@abogartz

Copy link
Copy Markdown
Owner

Part of #386. Addresses #390 (narrowed scope below; the live half of AC 2 is recorded unmeasured, so this does not close).

What changed and why the scope is narrow

R3 (results-stale-x5/, 2150 → 1900) kept both values in the store: the correction won only because a language model happened to write "this supersedes the earlier 2150 bps figure" and retrieval happened to prefer it. GATE-3 rivalry cannot cover this class — it competes only decision/preference rows, and corrections of remembered facts are context/learning.

R3c narrowed the exposure honestly: with a 30-day gap the newer row wins 10/10 either write order. So this changes no outcome timestamp resolution had already settled. What it fixes is the same-instant tie (3/10) and any retrieval that would surface the stale row alone: the retirement is now an explicit superseded_by pointer written at gate time, and superseded rows fail isInjectable.

The retirement guard is threefold

A retirement hides the row from every future session even though it destroys nothing, so the guard is stricter than #393's refusal guard:

guard rule what it stops
anchor both rows name the same symbol (SCREAMING_CASE or dotted member) MAX_RETRIES is 3 vs TIMEOUT_MS is 30000 in one scope coexist
value valuesAgree must be false "2150" restated as "2150, confirmed by finance" is one fact
shape numbers stripped, jaccard ≥ 0.3 (GATE-3's existing CONFLICT floor) "VAT_BPS was introduced in 2024" vs "VAT_BPS … is 2150 basis points" measures ~0.07 and retires nothing — the misfire class #393 accepted for a refusal is not accepted for a retirement

An inferred write never retires a user-guided row (the user is the stronger claim); a guided write may retire anything. Open planning rows and quarantined rows retire nothing. The plan is computed before the append and applied after it lands — a blocked or collapsed write cannot delete the old value with no successor behind it. Marking follows the drift/canonical contract: one batch publish, the caller's durable ledger updated before any audit line, evidence only for rows THIS call retired (#208).

AC status, stated before review

# criterion status
1 superseded row is not an injection candidate — in the data met by construction + test: after two gate writes the stale row carries superseded_by → new ts, reason=numeric_conflict, and a block for a VAT-rate prompt contains 1900 and not 2150; the retired row is still on disk, recoverable
2 hand-seeded both-rows store resolves to 1900 in ≥4/5 real sessions not measured — needs a quiet seat (F19: the bench seat is shared with the driving agent). The deterministic half AC 2 depends on — only the newer row is injectable — is pinned here
3 no prose-marker reliance met — the retirement is a data pointer; prose supersession text is not read by the rule

Verification

bun run gate: 1223 unit tests, 30 e2e against a real opencode host, typecheck and lint clean. test/value-conflict.test.ts: 14 tests, 3 of which fail without the gate wiring.

Addresses #390 (narrowed scope, see below). AC 2 live half recorded unmeasured — not closing.

R3 (results-stale-x5/, 2150 -> 1900) showed the store keeping BOTH values: the
correction won only because a language model happened to write "this supersedes
the earlier 2150 bps figure" and retrieval happened to prefer it. GATE-3 rivalry
cannot cover this class -- it competes only decision/preference rows, and
corrections of remembered facts are context/learning.

R3c narrowed the exposure honestly: with a 30-day gap the newer row wins 10/10
either write order, so this changes no outcome timestamp resolution had already
settled. What it fixes is the same-instant tie (3/10) and any retrieval that
would surface the stale row alone: the retirement is now an explicit
superseded_by pointer written at gate time, and superseded rows fail
isInjectable. AC 1's "superseded in the data, not only in the wording" is met by
construction, and the test asserts the retired row cannot appear in a block
without the correction.

The retirement guard is threefold, because a retirement hides the row from every
future session even though it destroys nothing:
- anchor: both rows must name the SAME symbol token (SCREAMING_CASE or a dotted
  member). MAX_RETRIES 3 and TIMEOUT_MS 30000 in one scope share no anchor and
  coexist;
- value: valuesAgree must be false, so "2150" restated as "2150, confirmed by
  finance" is one fact, not a conflict;
- shape: with numbers stripped the rows must be the same sentence (jaccard >=
  the 0.3 CONFLICT floor GATE-3 already uses). "VAT_BPS was introduced in 2024"
  against "VAT_BPS ... is 2150 basis points" measures ~0.07 there and retires
  nothing -- the misfire class #393 accepted for a refusal is not accepted for a
  retirement.

An inferred write never retires a user-guided row (the user is the stronger
claim); a guided write may retire anything. Open planning rows and quarantined
rows retire nothing. The plan is computed before the append and applied only
after it lands, so a blocked or collapsed write cannot delete the old value
with no successor behind it. Marking follows the drift/canonical contract: one
batch publish, the caller's durable ledger updated before any audit line, and
superseded_by evidence recorded only for rows THIS call retired (#208).

AC 2's live half (hand-seeded both-rows store resolves 1900 in >=4/5 real
sessions) needs a quiet seat and is recorded as unmeasured, same as #389 AC 3
and #393 AC 3/4: the bench seat is shared with the agent driving it (F19). The
deterministic part AC 2 depends on -- only the newer row is injectable -- is
pinned here.

- src/gate/value-conflict.ts: symbol anchor + value + shape guard, per-call
  regex (the #393 lastIndex lesson)
- src/gate/gate.ts: plan before append, apply after, numeric_conflict evidence
- test/value-conflict.test.ts: 14 tests; 3 fail without the gate wiring

Co-authored-by: OpenCode <[email protected]>

@WhollyMindless WhollyMindless left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 — a different environment's value retires a still-valid fact (src/gate/value-conflict.ts, valueConflicts, head bcba2f4f589b216eec82183a3f9700540958e19a).

Independently wrote these two context rows through runWriteGate, both in site-config:

  1. The MAX_RETRIES constant is 3 in production.
  2. The MAX_RETRIES constant is 5 in staging.

Both writes promote. The second marks the production row superseded_by=<staging ts>, reason=numeric_conflict; a subsequent production/MAX_RETRIES recall contains only 5 in staging and omits 3 in production. The rows describe different environments, so neither corrects the other. The shared symbol and sentence-overlap floor establish similar wording but cannot establish that the values refer to the same configuration context.

Could automatic retirement require an unambiguous correction/same-context signal, and preserve both rows when their environment or other qualifier differs? This matters more than a warning misclassification: a normal new fact hides a correct prior fact from later sessions. No data erasure is claimed; the superseded row remains recoverable.

Validation: 14 focused value-conflict tests and typecheck pass, plus a separate two-write/recall probe (6 assertions) reproduces the retirement. Windows/Bun 1.4.4, synthetic trusted gate context and throwaway store; no live model or user incidence claimed. Please feel free to defer automatic retirement rather than adopt the suggested direction.

Review finding on #400 (WhollyMindless), reproduced as stated: two `context`
rows in one scope — "The MAX_RETRIES constant is 3 in production." then
"...is 5 in staging." — both promote, and the second marked the production
row superseded (reason=numeric_conflict), so a later MAX_RETRIES recall
carried only the staging value. A normal new fact hid a correct prior fact.

Guard 4, in the direction the review asked: automatic retirement now needs
the environments to AGREE — both rows unscoped, or naming at least one
environment in common. A mismatch, and one-sided scoping too ("is 3" may be
the default; hiding it behind one environment's value is the same defect),
retires nothing and both rows stay injectable. Closed vocabulary of
deployment words; region/edition/tenant qualifiers are NOT detected, and
every miss lands on the safe side — coexistence, the pre-#390 state, never
a hidden fact.

Found while testing the guard: tokens() keeps dots (they carry dotted
members), so "staging." arrives as "staging." — the first implementation
matched nothing and the reviewer's pair still retired. The qualifier check
compares the bare word; the test pins the sentence-final period.

Also fixed in the same extractor, same class as the #399 sign bug: the
value window matched unsigned digits, so "-5" extracted as "5" and a sign
flip read as agreement. The sign is now part of the value; "-5" corrects
"5", "-5" restated is still one fact.

- src/gate/value-conflict.ts: guard 4 + signed extraction
- test/value-conflict.test.ts: the reviewer's pair both directions,
  one-sided scoping, same-environment still corrects (the cost), the
  two-write/recall probe, sign flip; the four fail on the pre-fix code

Cost named: a genuine correction that ADDS an environment word ("actually
in production it is 1900") no longer auto-retires the bare row — both
inject, retrieval shows both, the model sees the scoping instead of a
silent winner. Retirement is the destructive half; precision wins there.

Co-authored-by: OpenCode <[email protected]>
@abogartz

Copy link
Copy Markdown
Owner Author

@WhollyMindless confirmed and fixed in 64184c5, in the direction you proposed — automatic retirement now requires a same-context signal.

Guard 4 (environments). Retirement requires the environments to AGREE: both rows unscoped, or naming at least one environment in common. Your production/staging pair retires nothing in either direction; the two-write/recall probe is pinned as a test — both rows stay active and a MAX_RETRIES query carries both. One-sided scoping also coexists: "is 3" may be the default, and hiding a default behind one environment's value is the same defect as your pair.

Two things your report indirectly bought:

  • while testing the guard, found that tokens() keeps dots (they carry dotted members), so "staging." arrives as "staging." — the first implementation matched no environment word at all and your pair still retired. The check compares the bare word; the sentence-final period is pinned.
  • the value window matched unsigned digits — same class as your An unverified row says so where the model reads it (#393) #399 finding: "-5" extracted as "5", so a sign flip read as agreement and could never retire. The sign is now part of the value.

Cost named: a genuine correction that ADDS an environment word ("actually in production it is 1900") no longer auto-retires the bare row — both inject, retrieval shows both. Retirement is the destructive half; precision wins there, per your own framing. Region/edition/tenant qualifiers are not detected; every miss lands on coexistence, never a hidden fact.

Four new tests fail on the pre-fix code (verified by checkout). bun run gate green: 1228 unit, 30 e2e, typecheck, lint.

@WhollyMindless WhollyMindless left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original production/staging replay now keeps both rows on 64184c51a9f9f0fdcc7405589da49c6d7b439ffc. The same-context P2 remains for qualifiers outside the closed environment list, and the stated fail-open limitation is reversed in that case (src/gate/value-conflict.ts, sameEnvironment).

Independently wrote these two context/site-config rows through the gate:

  • The MAX_RETRIES constant is 3 for tenant Alpha.
  • The MAX_RETRIES constant is 5 for tenant Beta.

Both promote, but Alpha is marked superseded_by=<Beta ts>, reason=numeric_conflict. Recall for MAX_RETRIES tenant Alpha retry constant returns only 5 for tenant Beta. Neither fact corrects the other. Both qualifier sets are empty, so sameEnvironment() returns true; an unrecognized tenant/region/edition distinction therefore causes retirement, rather than the coexistence promised in the new code comment and response.

Could retirement be limited to cases where same-context correction is established, leaving ambiguous qualified facts alongside one another? Expanding an environment dictionary alone cannot establish that arbitrary qualifiers refer to the same fact. Keeping the changes request for this remaining P2; the original environment-specific fix itself is verified.

19 focused value-conflict tests, two separate two-write/recall probes (12 assertions, original pair plus tenant counterexample), and typecheck pass on Windows/Bun 1.4.4. Synthetic trusted gate context and throwaway store only; no user incidence or physical data erasure claimed. Please feel free to defer the automatic-retirement rule if that is preferable.

Review round 2 on #400 (WhollyMindless), tenant counterexample reproduced:
"MAX_RETRIES is 3 for tenant Alpha." then "...is 5 for tenant Beta." — both
qualifier sets empty, guard 4 granted same-context, Alpha retired. The
response to round 1 claimed every miss lands on coexistence; for any
qualifier class outside the environment dictionary it landed on hiding.
The claim was wrong; the guard is now the claim.

Guards 3 (jaccard floor) and 4 (environment dictionary) merge into one
residual rule: strip pure numbers and prose glue from both rows, and every
word one row says that the other does not must be EDITORIAL — closed
narration of the act of correcting ("corrected", "actually", "supersedes",
"now") that names no dimension of the world. One unmatched content word —
"production", "tenant", "alpha", "v2" — and nothing retires.

Why this and not a bigger dictionary (the reviewer's own reasoning,
adopted): qualifier vocabulary is open — tenants, regions, editions,
customers, versions — so no list can establish same-context. What CAN be
established mechanically is that the correction is the ONLY thing the two
rows state differently. Unknown qualifier classes are then coexisting by
construction, not by lookup.

- src/gate/value-conflict.ts: residualWords + sameSentenceExceptValue
  replace SIM_FLOOR, ENV_WORDS, sameEnvironment; "v2" stays a word (not a
  pure number), copulas join the ignore list so "was 3" -> "is now 5" is
  still one correction, "should" stays out (desired-vs-actual is real)
- test/value-conflict.test.ts: the tenant pair both directions, the
  editorial-narration correction still retires, v2/v3 coexist; the two
  new coexistence tests fail on the round-1 code

Cost named, larger than round 1's: a genuine correction that RESTATES with
new content words ("the queue retries, 5" correcting "MAX_RETRIES is 3")
no longer retires — both rows inject and retrieval prefers the newer, the
pre-#390 state for that narrower class. R3's measured harm (same-instant
ties, stale-row-alone retrieval) stays structurally fixed for the
word-for-word corrections capture actually produces.

Co-authored-by: OpenCode <[email protected]>
@abogartz

Copy link
Copy Markdown
Owner Author

@WhollyMindless tenant counterexample confirmed — and you were right on the point that mattered: my round-1 response promised every miss lands on coexistence, and for qualifier classes outside the dictionary it landed on hiding instead. Fixed in 0d0afbe by taking your framing: same-context is now established, not looked up.

The environment dictionary and the jaccard floor are gone, merged into one residual rule: strip pure numbers and prose glue (copulas, the shared stopword set) from both rows; every word one row says that the other does not must be in a closed EDITORIAL set — words that narrate the act of correcting (corrected, actually, supersedes, now) and that name no dimension of the world. One unmatched content word — production, tenant, alpha, v2 — and nothing retires. Your Alpha/Beta pair coexists in both directions, pinned; so does v2/v3 ("v2" is not a pure number, it stays a word).

What survives retirement: the word-for-word correction (R3's shape) and corrections narrated with editorial words only ("Corrected: ... is now 4 in production." retires "... is 3 in production." — pinned both ways).

Cost named, larger than round 1's: a genuine correction that RESTATES with new content words no longer retires — both rows inject, retrieval prefers the newer, the pre-#390 state for that narrower class. R3's measured harm stays structurally fixed for the corrections capture actually produces.

The two new coexistence tests fail on the round-1 code (verified by checkout). bun run gate green: 1231 unit, 30 e2e, typecheck, lint.

@WhollyMindless WhollyMindless left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independently replayed 0d0afbef578f20dfca094bc37da660c3e84feb86: both the production/staging and tenant Alpha/Beta pairs now coexist and remain recallable. The stricter residual comparison fixes those reports.

A narrower same-context P2 remains for numeric qualifiers (src/gate/value-conflict.ts, residualWords discards every pure number, not only the compared value). Through the same two-write/recall path:

  • The MAX_RETRIES constant is 3 for tenant 101.
  • The MAX_RETRIES constant is 5 for tenant 202.

Both promote, but the second retires tenant 101 with reason=numeric_conflict; recall for MAX_RETRIES tenant 101 retry constant returns only the tenant 202 value. The value matcher compares 3 against 5, while the residual matcher discards 101 and 202 too, so the distinguishing context is erased. This is a different tenant, not a correction.

Could numbers outside the value being corrected remain part of the context comparison, or could multi-number statements stay coexistent when the check cannot identify which numbers qualify the fact? The remaining issue does not require another qualifier dictionary: it is the loss of additional numeric context before sameness is decided. Keeping the changes request for this case; the earlier fixes themselves are verified. Deferring automatic retirement remains a reasonable option.

Validation: 22 focused value-conflict tests, three separate two-write/recall probes (18 assertions including the two passing earlier cases), and typecheck pass on Windows/Bun 1.4.4. Synthetic trusted gate context and throwaway store only; no live-user incidence or physical data erasure claimed.

Review round 3 on #400 (WhollyMindless), tenant-101/202 reproduced:
residualWords discarded EVERY pure number, so "The MAX_RETRIES constant is
3 for tenant 101." and "...is 5 for tenant 202." looked like one sentence
— the digits that proved they were different tenants were erased before
sameness was decided. Alpha/Beta survived only because the qualifier words
were letters.

Numbers now stay in the residual. The two compared values are skipped at
compare time, on BOTH sides (sameSentenceExceptValues): they are the change
being sanctioned, and skipping the candidate's value against the target too
keeps R3's correction shape working — "...is 1900 basis points, was 2150."
still retires 2150, pinned. tokens() strips signs ("-5" arrives as "5"),
so the skip set drops signs: a sign flip retires through the value guard,
never through a residual mismatch.

- src/gate/value-conflict.ts: residualWords keeps numbers; the pair rule
  takes both compared values and skips only those
- test/value-conflict.test.ts: the tenant 101/202 pair both directions
  (fails on the round-2 code), the quoting correction still retires

Cost named: a row whose only difference from the target is a DIFFERENT
number that is not the compared value now coexists — correct by design
(that number is context: a tenant, a version, a count); and a correction
of two changed values at once ("VAT 1900, timeout 45") retires nothing,
both rows injecting with retrieval preferring the newer.

Co-authored-by: OpenCode <[email protected]>
@abogartz

Copy link
Copy Markdown
Owner Author

@WhollyMindless round 3 confirmed — tenant 101 retired exactly as you described. Your diagnosis was the fix: the loss happened before sameness was decided, so the rule now keeps every digit in the residual and drops only the two compared values, skipped at compare time on both sides (d24744b).

  • residualWords no longer filters numbers; "tenant 101" vs "tenant 202" differ in the comparison itself. Your pair coexists both directions, pinned.
  • Skipping both values on both sides keeps R3's correction shape: "Corrected: the VAT_BPS constant is 1900 basis points, was 2150." still retires 2150 — pinned, so the fix cannot regress the case the module exists for.
  • tokens() strips the sign ("-5" arrives as "5"), so the skip set drops signs: a sign flip retires through the value guard, never through a residual mismatch.

Cost named: a row differing from the target only by a non-compared number now coexists — that number is context (tenant, version, count), which is the point; and a correction of two changed values at once retires nothing, both rows injecting with retrieval preferring the newer.

The tenant test fails on the round-2 code (verified by checkout). bun run gate green: 1233 unit, 30 e2e, typecheck, lint.

@WhollyMindless WhollyMindless left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All three earlier pairs now coexist on d24744bfd57b6171b85d4682a5709683f3a152db: production/staging, Alpha/Beta, and numeric tenant 101/202, independently replayed.

One narrower P2 remains: value-based removal also removes a qualifier carrying the same literal (src/gate/value-conflict.ts, sameSentenceExceptValues). The skip set excludes every token equal to either compared value, rather than only the occurrences asserting that value.

Two gate writes in context/site-config:

  • The MAX_RETRIES constant is 3 for tenant 3.
  • The MAX_RETRIES constant is 5 for tenant 5.

Both promote. Tenant 3 is then retired with reason=numeric_conflict, and its recall returns only tenant 5. The tenant identifiers disappear along with the compared values because both 3 and 5 are skipped globally. The prior 101/202 pair is a passing control; this remaining case requires the identifier/context number to coincide with a compared value, so the trigger is narrower than the previous report. Frequency in real stores is unknown.

Could removal identify the compared number's occurrence next to the symbol, retaining repeated occurrences in qualifiers, or preserve ambiguous statements instead? The current literal skip still cannot establish same context in this case. Keeping the changes request for the reproduced false retirement; please feel free to accept or defer this narrower residual if you judge it outside the intended automatic-retirement contract.

Windows/Bun 1.4.4: 24 focused tests, four separate two-write/recall probes (24 assertions; three fixed-case controls plus the remaining collision), and typecheck pass. Synthetic trusted gate context and throwaway stores only; no live-user incidence, general semantic guarantee, or physical erasure claimed.

Review round 4 on #400 (WhollyMindless), reproduced: "The MAX_RETRIES
constant is 3 for tenant 3." then "...is 5 for tenant 5." — the skip set
removed EVERY token equal to a compared value, so the tenant identifiers
disappeared with the values and tenant 3 retired. Alpha/Beta and
101/202 survived only because their identifiers were letters or distinct
digits.

The corrected value is now excised POSITIONALLY: the span symbolValues
actually reads (first number within WINDOW after the symbol, falling back
to before) is cut from the content before tokenizing, and only that
occurrence. "is 3 for tenant 3" keeps its "tenant 3".

The citation case (a correction naming the number it replaces — "...is
1900 basis points, was 2150.") still retires: a unique number is excused
when it equals the OTHER row's asserted value and its preceding raw token
is not a content word. "was 2150" cites; "tenant 5" qualifies. Adjacency
is read on the raw token stream — the IGNORE filter that serves the
comparison would otherwise erase exactly the "was"/"tenant" distinction.
Consequence, pinned: the swapped pair "is 3 for tenant 5" / "is 5 for
tenant 3" coexists — each extra number follows a content word, so neither
reads as a citation, and the rule refuses to retire on an ambiguous
reading rather than guessing.

- src/gate/value-conflict.ts: assertedValueSpan (mirrors symbolValues'
  search exactly), residualTokens with positional excision,
  sameSentenceExceptValue with the citation excuse
- test/value-conflict.test.ts: the tenant 3/5 pair both directions and
  the swapped pair; both fail on the round-3 code

Cost named: a citation whose preceding word is itself a content word
("(old value: 2150)") no longer retires — coexistence, the safe side.

Co-authored-by: OpenCode <[email protected]>
@abogartz

Copy link
Copy Markdown
Owner Author

@WhollyMindless round 4 confirmed — tenant 3 retired exactly as reported. Fixed in 8114cec by your first suggestion: the removal now identifies the compared number's occurrence next to the symbol.

  • assertedValueSpan mirrors symbolValues' search exactly (first number within WINDOW after the symbol, falling back to before) and that span — not the literal — is cut before tokenizing. "is 3 for tenant 3" keeps its "tenant 3"; your pair coexists both directions, pinned.
  • The citation shape still retires ("...is 1900 basis points, was 2150."): a unique number is excused only when it equals the OTHER row's asserted value AND its preceding raw token is not a content word — "was" cites, "tenant" qualifies. Adjacency is read on the unfiltered token stream because the comparison's own glue filter would erase the distinction.
  • Consequence pinned: the swapped pair ("is 3 for tenant 5" / "is 5 for tenant 3") coexists — each extra number follows a content word, so the rule refuses to retire on an ambiguous reading rather than guessing which number qualifies the fact.

Cost named: a citation preceded by a content word ("(old value: 2150)") no longer retires — coexistence, the safe side.

Both new tests fail on the round-3 code (verified by checkout). bun run gate green: 1235 unit, 30 e2e, typecheck, lint.

@WhollyMindless WhollyMindless left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independently verified the reported false-retirement cases resolved on 8114cecf0478cdb9e952fe64f8784e067402de42. Replayed all four through two gate writes and recall: production/staging, Alpha/Beta, tenant 101/202, and tenant 3/value 3 versus tenant 5/value 5. Each now leaves both facts active and recallable; the last case no longer loses its qualifier when the asserted occurrence is removed.

The focused suite also preserves genuine correction retirement, including the old-value citation shape and the ambiguous swapped-qualifier coexistence control. Review of the positional excision and raw-token citation check found no further actionable defect in this revision.

26 focused value-conflict tests, four separate two-write/recall probes (24 assertions), and typecheck pass on Windows/Bun 1.4.4. This supersedes my earlier changes requests for the reproduced cases. Approval is for this pinned implementation and the tested boundaries, not a claim that arbitrary prose equivalence is decidable or that the pending live #390 benchmark has run. Synthetic gate contexts/stores only.

@abogartz

Copy link
Copy Markdown
Owner Author

Thanks for five rounds of reproducible counterexamples — each one became a pinned test, and the final rule (positional excision + citation excuse with raw-token adjacency) is what your reports shaped. Recorded state: 8114cec, 26 focused tests green, CI green on all four checks, the module's contract documented in its header with the costs named at each round. Merging is the maintainer's call.

@abogartz
abogartz merged commit 1c600da into main Nov 12, 2026
4 checks passed
abogartz-opencode-self-improvement Bot pushed a commit that referenced this pull request Nov 12, 2026
# [0.23.0](v0.22.2...v0.23.0) (2026-11-12)

### Bug Fixes

* **capture:** redact attested args, and match a citation as a whole field ([15e764e](15e764e)), closes [#384](#384) [#132](#132)
* **capture:** the prose extractor keeps the sign before granting code-checked ([838ac7e](838ac7e)), closes [#399](#399)
* **gate:** different environments are two facts, never a correction ([64184c5](64184c5)), closes [#400](#400) [pre-#390](https://github.com/pre-/issues/390) [#399](#399)
* **gate:** digits are context; only the corrected value may drop out ([d24744b](d24744b)), closes [#400](#400)
* **gate:** excise the asserted value by position, not by literal ([8114cec](8114cec)), closes [#400](#400)
* **gate:** same-context is established by the words, not looked up ([0d0afbe](0d0afbe)), closes [#400](#400) [pre-#390](https://github.com/pre-/issues/390)

### Features

* **capture:** let a failed session leave a lesson, but only an attested one ([458b8ce](458b8ce))
* **gate:** a correction retires the row it corrects in the data ([bcba2f4](bcba2f4)), closes [#390](#390) [#393](#393) [#208](#208) [#389](#389) [#393](#393) [#393](#393)
* **provenance:** an unverified row says so where the model reads it ([8bcb6ac](8bcb6ac)), closes [#386](#386)
@abogartz-opencode-self-improvement

Copy link
Copy Markdown

🎉 This PR is included in version 0.23.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@WhollyMindless

Copy link
Copy Markdown
Contributor

Follow-up to my approval: its four regression cases still pass, but it missed another P2 false retirement. Reproduced on current main 62ea742 through both runWriteGate and the plugin's memory_remember / memory_recall tools, in a throwaway store:

  1. Remember The TIMEOUT_MS for stage 1 is 500. as context, scope site-config.
  2. Remember The TIMEOUT_MS for stage 2 is 500. with the same type/scope.
  3. Both writes succeed, but the stage-1 row receives reason=numeric_conflict and superseded_by pointing at stage 2. Recall for TIMEOUT_MS stage 1 returns only the stage-2 fact.

The values agree; the stages differ. symbolValues reads the first nearby number as the asserted value, so it compares 1 with 2. assertedValueSpan then removes precisely the distinguishing qualifier, making the residual sentences equal. MAX_RETRIES for tenant 3 is 10. / for tenant 5 is 10. behaves the same way.

A possible follow-up is to require evidence that the number is the symbol's value before excising it, keeping both rows when that relationship is ambiguous. The old row remains recoverable on disk, but disappears from normal recall/injection. This is a deterministic storage observation, not a live-model result. My earlier approval was too broad; please weigh this follow-up in your prioritization.

@abogartz
abogartz deleted the 390-value-conflict branch November 19, 2026 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants