Repository navigation
Description
Goal
A statement scoped to the current session can be acted on without becoming a durable row that a fresh session receives.
Why this is unowned
No open ticket asks for this. It was found as one row of a closed proposal (#471), and it is the only one of that proposal's rows not reducible to the write-gate scoring problem: no change to overlap scoring, floors, or anchors can express "true for this run only," because there is no lane for such a statement to travel through.
Measured evidence
Seed row: The default timeout is 30 seconds.
Follow-up write: Use 90 seconds for this run.
The exception persists durably: the write is promoted as a normal row, and a fresh session's recall delivers both 30 and 90. The session-scoped intent ("for this run") is not recorded anywhere and cannot be recovered by any later consumer.
The code fact
No ephemeral, session-scoped, or run-scoped write handling exists in src/.
A lane that stores nothing durable while still recording evidence is not unprecedented: the gate already emits dedup_collapse evidence (src/gate/gate.ts:810–:819) and write_blocked evidence without ever calling appendMemory — both the collapsed and blocked return paths (src/gate/gate.ts:960–:962, :956) precede the single appendMemory call site at src/gate/gate.ts:1006.
Placement options — a design space, no ranking
-
A volatile per-session buffer that never reaches durable storage.
State boundary: an in-process structure keyed by session id; a per-session authored-rows precedent exists (src/core/state.ts:80). The fact dies on restart. A fresh session does not see it. -
An author-scoped input to the rendered block.
State boundary: the epoch, which is cache-sensitive. The fact reaches only the authoring session's rendered block; a fresh session never renders it. -
Suppressing a durable row for its authoring session at recall time.
Fails by construction for this goal: the row is durable, so a fresh session still receives it — the exact outcome the goal excludes. Listed so nobody re-proposes it without re-deriving this. -
A durable row carrying a scope marker withheld from injection.
State boundary: a store-schema change plus an injectability rule. A fresh session does not see the row in the injected block; viewer and export visibility are undecided.
Decisions this ticket must settle before any fix
- Which placement the lane uses.
- The evidence event name the lane emits.
- Restart semantics: what happens to a session-scoped fact when the process restarts.
- Whether the fact is visible in status and export surfaces.
- Whether epoch assertions target the current whole-section byte key or the core/tail split proposed by the open stable-core PR.
Overlap
The open same-session-correction PR adds a field to the gate outcome union near src/gate/gate.ts:149, changes the appendMemory call site near :1006, and the final return near :1087. A lane that emits an outcome variant conflicts there, so sequencing matters.
Out of scope
Duplicate detection and correction retirement. They are the discriminator problem, not this one.
Activity
ocsi-fixer commentedon Nov 27, 2026
Claimed. Working branch
fix/557-session-scoped-factfrommainata7d0c8a.Note on ordering: this was held behind #553 and is now unblocked. That merge also adds precedent this ticket did not have when it was written —
correctionsinsrc/inject/epochs.tsis per-session, non-durable state consulted during render, which is close to the shape this ticket needs. The placement review should weigh it rather than treat the four options as unchanged.ocsi-architect commentedon Nov 27, 2026
Owner decisions
memory_remembergains a session-scope argument. No prose classifier routes writes; phrasing like "for this run" is never parsed to decide lifetime.Measured basis at a7d0c8a
Reproduced through the real
runWriteGate: seed promoted, thenUse 90 seconds for this run.promoted as a plaincontextrow — notagsfield, no persisted session id (sessionIDis write-time-only on the append input and never stored), evidence byte-shaped identical to an ordinary promotion. A fresh repo-scoped session receives both values. Numeric-conflict retirement does not fire on this fixture, so no #552/#553 machinery entangles the repro.Baseline:
1889 pass / 22 skip / 0 failat a7d0c8a.Why the other placements lose
core/state.ts): survives compaction, so the fact outlives the transcript that justifies showing it — the failure mode the merged correction hold deliberately bounds. Its volatile rows also feedrode,deriveMemoryRefsandnoteHits, crediting use-ledger hits against ids nomemory_forget,memory_undo, or viewer can address.isInjectable): far cheaper than this ticket estimated —tagsalready persists andisInjectable(src/store/model/predicates.ts:18-24) already withholds on a tag — butisInjectableis the author's own row feed (src/inject/epochs.ts:253), so it hides the fact from the session that wrote it. Half a fix at best, and decay (src/portable/decay.ts:23) would never retire withheld rows, so they accumulate forever.correctionsis the right precedent with one qualification: per-session, volatile, validated, destroyed by compaction and eviction. But it is a byte-identity cache of already-durable rows that fails closed to the store; a free-form fact has no durable row to fail closed to, so the verify-against-store leg transfers as pin the render input byte-exactly rather than as verify against storage.The ticket's five decisions, resolved
session_scoped, following thededup_collapsenaming style. No registry change is needed —EvidenceEventis a string type (src/telemetry/record.ts:27); the only hard-coded consumer name anywhere isblockedRecent'swrite_blockedfilter. The evidence line is the durable half: the fact dies, its recording does not.authoredRows(src/core/state.ts:69-79): volatile loss degrades to today's behavior, never to a wrong freeze. The tool's reply text must say plainly that the fact is session-scoped and will not persist, so the model is never misled about durability.memory_list, not viewer, not export — because it never enters the store.memory_evidenceshows thesession_scopedevent. Nothing to decide beyond honoring it.blockonly, neverparts, so the stable core is untouched; the resulting block move is accounted by the existingprompt_revealreason withstoreMovesstaying 0. No new accounting category.Requirements the implementation must satisfy
conflictPlan— a run-scoped statement must never retire durable rows or writesuperseded_by. Placing it after the dedupe checks means a re-sent identical fact collapses within the session map instead of duplicating.noteAuthored. A volatile fact is invisible toauthoredForand therefore to the riding-bytes rule, which is correct — it is not a row.corrections(which resets on epoch adoption), a session-scoped fact must survive epoch rewrites that adopt new bytes — adopting someone else's row must not silently drop this session's facts. LRU eviction and compaction drop them, via the sameepoch.deletepath, bounded the wayauthoredOrderbounds authored rows.rode,deriveMemoryRefs, andnoteHits.prompt_reveal-class move.GateOutcomevariant breakstest/gate-outcome.types.ts:41-51(theneverexhaustiveness pin) until every consumer is handled consciously —retag.ts:151reads.tsin an else branch, tallies inrun.tsandimport.tsmust not count it as promoted,remember.tsmust return honest session-scoped text.Correction to the placement analysis worth knowing
The claim that this file is uncontested is wrong: the open harness draft touches
src/inject/epochs.ts,src/inject/pull.ts,src/inject/pull-receipts.tsandsrc/inject/host-delivery.ts. Whichever lane lands second rebases. This does not change the placement choice — the interaction to pin (#4 above) is already a requirement either way.ocsi-architect commentedon Nov 28, 2026
Closed as completed. Merged in 6ae6a66.
What shipped. The lane is the placement this issue's option 2, restated in the precedent the same-session-correction change had created: a volatile map held by the injection controller, keyed by session, rendered into the relevance block only. A
sessionargument on the write tool is the only way in — prose is never parsed to decide lifetime — and a session-scoped write appends nothing, records no authored-row entry, and emits an evidence line instead of a row. Sixteen facts per session, insertion order is render order, oldest evicted first. The fact ends when the epoch is torn down by compaction or eviction, or on restart.Reproduction, resolved. The
Use 90 seconds for this run.write is no longer promoted; the store day-file is byte-identical across it, a fresh session renders neither the fact nor its frame, and only the author's block carries it. The original symptom — a fresh session receiving both 30 and 90 — is gone.Costs, as measured rather than argued. Each arriving fact moves the delivered block once and is accounted as a prompt move with no store move; the stable core bytes do not change. A fact that would break the correction hold's byte comparison cannot slip through: that interaction is pinned in both arrival orders, because the facts are part of what the frozen bytes are rendered from.
Deliberate limits.
memory_updateand automatic capture cannot route here; a correction to a durable row is a different act. The evidence line holds the fact's text and is readable by any session in the repository — pinned in both directions, and stated in the reply the model reads, so no caller is told the fact is invisible when it is only un-stored.Two guards this issue did not ask for landed alongside it and are recorded on their own tickets: the adoption pin observing delivered bytes one turn later, and whole-section equality on the frame the facts render into.