Skip to content

perf(sessions): reuse bounded worker history projections - #174275

Merged
steipete merged 10 commits into
mainfrom
dbasync/bigturn-history
Oct 16, 2026
Merged

steipete merged 10 commits into
mainfrom
dbasync/bigturn-history

Conversation

@steipete

@steipete steipete commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

History pages repeatedly rebuild visible marker positions and linearly search them. Cache-TTL prefix selection can scan message rows to locate a small number of control markers. Those costs grow with retained session history.

User Impact

The history worker retains marker positions for recently read sessions and extends them from newly appended navigation. Indexed maps replace linear marker lookup, and the TTL query starts with indexed control-event candidates. Page limits and SQL-side payload-size projections stay intact. Same-generation payload rewrites invalidate the recent payload cache through its existing update timestamp.

Cold/evicted projections and branch/reset/rewritten-marker changes retain the canonical builder. Accepted edge: cold or evicted marker projections still pay a rebuild; repeated pages and ordinary append refreshes reuse or extend them. The deprecated synchronous SDK title reader retains its canonical uncached path through the documented compatibility window. The new incremental SQL query lives only in the history worker.

This is the second scoped change in the large-session turn campaign. It does not change model prompt selection, stored transcript bytes, schemas, or the public SDK.

Validation and scope

The corrected focused owner batch passed 57 tests across eight files, including accounting rollback/rewrites, completion eviction and old retries, pending-input custody, history readers, query plans before and after ANALYZE, and live session previews. Formatting, type-aware lint, source-contract/export checks, types, Madge, PostgreSQL conformance, selected changed tests, and T1/dialect ratchets passed on the final PR heads. Accounting CI: 38916493040; history CI: 38919216838. Both required CI gates passed; no CI/admin exception was used.

Knip's lane-caused obsolete export was removed. Two remaining unused exports, redactSensitiveText in packages/ai/src/transports/transport-utils.ts and I18nController in ui/src/i18n/lib/lit-controller.ts, reproduced under the same rules/files on main cf7522093c8832429689ac32d5e79d2eafdb3f3a and were routed for repair. Knip is not described as wholly green. Two Codex review rounds completed; the remaining P2 history-cache finding is recorded below.

T1 inventory: touched shared modules 28 → 28, broader session/history scope 164 → 164, global 222 → 222, global compatibility tier 12 → 12. Retained synchronous SDK/opaque-callback roots require a public-contract/owner cutover; not every shared primitive has independently proven SDK reachability. No worker-only relabel hides that debt. Dialect ratchet: mechanical 2 → 2, design 12 → 9, engine-maintenance 0 → 0. No public SDK surface, schema, update, Doctor, plugin-loading, or service-lifecycle change; the update cell is not applicable.

Combined measurement

These measurements cover both the accounting and history changes together. The 25 owned production files at the final history merge are byte-identical to measured candidate 027ba984fb63a06d323303ef5caa728406df7484; CI fixture/type-only integration fixes do not change that implementation. This does not establish session-size-independent end-to-end turns. withTranscriptContextSnapshot still reads the entire navigation projection before bounding context, and older model-size batches grow with history. Cold accounting, cache eviction, marker-dense TTL work, and the legacy unindexed-prefix join also remain.

Base 95a27d0779d1c8e0c44b35e6cab9d7662e3bb6e7; candidate 027ba984fb63a06d323303ef5caa728406df7484. Three alternating pairs. Counts are median [min–max]. Ordinary warm rows have n=9 per available side; supplemental profiles have n=1. No quiet-host latency claim. Sizes are initial synthetic transcript-event counts; ordinary turns append normally. Full active history is retained with the supported 20-message channel history limit, disabled transport and memory search, and synthetic completion rows.

Ordinary warm turns

Causal SQL / requests / MAIN follow turn ownership, including work outside the observed window.

Events Base causal SQL / requests / MAIN Candidate causal SQL / requests / MAIN
1,000 89 [89–90] / 23 [23–24] / 0 [0–0] 85 [85–86] / 23 [23–24] / 0 [0–0]
10,000 127 [127–140] / 25 [25–27] / 0 [0–0] 123 [123–137] / 25 [25–27] / 0 [0–0]
30,000 unavailable 172 [172–186] / 25 [25–27] / 0 [0–0]
60,000 unavailable 247 [247–251] / 25 [25–25] / 0 [0–0]

Raw SQL / requests / MAIN include all work observed in the named phase.

Events Base raw SQL / requests / MAIN Candidate raw SQL / requests / MAIN
1,000 89 [82–96] / 23 [23–25] / 0 [0–0] 86 [85–89] / 23 [23–25] / 0 [0–0]
10,000 127 [119–129] / 25 [25–26] / 0 [0–0] 123 [118–124] / 25 [25–27] / 0 [0–0]
30,000 unavailable 174 [172–193] / 25 [25–32] / 0 [0–0]
60,000 unavailable 248 [247–251] / 25 [25–25] / 0 [0–0]

Baseline 30k/60k paired warm samples are unavailable after product worker timeouts. An earlier excluded 30k diagnostic succeeded; the 30k failure is not universal. Later baseline arms were restricted to 1k/10k; no further large-session timeout probes were run.

Cost diagnostics

Logical returned MB follow causal turn ownership, including work outside the observed window; they are decoded values, not disk I/O. MAIN CPU is thread CPU measured within the tighter operation snapshots. These loaded-host instrumented CPU values do not support latency or speedup claims. Snapshot bytes, service and elapsed observations remain in the local measurement artifact. No quiet Testbox was immediately available; the queued lease was cancelled.

Events Base causal logical MB Candidate causal logical MB Base snapshot MAIN CPU ms Candidate snapshot MAIN CPU ms
1,000 0.356 [0.354–0.358] 0.325 [0.323–0.327] 343.6 [216.9–392.7] 295.0 [234.4–382.7]
10,000 4.521 [4.515–9.489] 4.490 [4.484–9.458] 389.6 [272.4–467.2] 315.4 [245.2–367.2]
30,000 unavailable 11.154 [11.148–16.178] unavailable 316.2 [216.9–587.7]
60,000 unavailable 21.443 [21.437–21.449] unavailable 292.1 [231.3–507.0]

Remaining model-context growth

SQL families use full observed phases; request families use causal ownership. Full-phase SQL-family bytes need not reconcile with the causal bytes above. The zero at 1k means this named model-context worker request was not used; it does not mean there was no context assembly.

Candidate events Named model-context worker SQL / requests Full navigation MB Model-size statements
1,000 0 [0–0] / 0 [0–0] 0.000 [0.000–0.000] 0 [0–0]
10,000 36 [36–36] / 1 [1–1] 3.235 [3.234–3.236] 26 [26–26]
30,000 85 [85–85] / 1 [1–1] 9.745 [9.744–9.746] 76 [76–76]
60,000 160 [160–160] / 1 [1–1] 19.510 [19.509–19.511] 151 [151–151]

At the matched 1k/10k sizes, median causal SQL falls by four and total causal request counts are unchanged. Four measured native read classes shrink: active COUNT/SUM, latest active boundary, exact-entry snapshots and participant projection. Individual turn deltas vary, and observed phases can straddle operation boundaries. Other shared entry/row/watermark reads remain. The generic accounting-associated request lacks a retained domain caller at 10k, so its request-level attribution is positional and is not included as a machine-classified family. Actor operations are mixed reads/writes, not an actor-rehydration-only total. Candidate 30k/60k first warm turns can still include a boundary lookup; no universal zero-boundary claim is made.

Shared native-read families (statements per warm phase, median [min–max]; n=9 per cell):

Family Base 1k Candidate 1k Base 10k Candidate 10k Candidate 60k
Active accounting COUNT/SUM 1 [0–2] 0 [0–0] 1 [1–1] 0 [0–0] 0 [0–0]
Latest active boundary 1 [0–2] 0 [0–0] 1 [0–1] 0 [0–0] 0 [0–1]
Exact entry with snapshot subqueries 3 [2–4] 2 [2–2] 3 [2–3] 2 [2–2] 2 [2–2]
Batched entries with snapshot subqueries 1 [1–1] 1 [1–1] 1 [1–1] 1 [1–1] 1 [1–1]
Participant projection 2 [1–2] 1 [1–1] 2 [1–2] 1 [1–1] 1 [1–1]
Row/transcript facts 1 [1–1] 1 [1–1] 2 [2–2] 2 [2–2] 2 [2–2]
Watermark/index facts 1 [0–2] 1 [1–2] 1 [0–1] 1 [0–1] 1 [1–1]

Actor hydration and entry-cache loads are not separately isolated in retained request origins. Snapshot-bearing SELECTs above are directly measurable native reads, not independent cache-load requests. Mixed actor command counts are retained separately in JSON and must not be relabeled as hydration. No zero-hydration or flat-rehydration claim is made.

History and session list

Ordinary chat.history first page, observed SQL / requests / MAIN and snapshot logical returned MB (n=3 per available side). UI bytes use the tighter operation snapshots, not the full observed phase:

Events Base SQL / requests / MAIN Base snapshot logical MB Candidate SQL / requests / MAIN Candidate snapshot logical MB
1,000 19 [17–19] / 2 [1–2] / 0 [0–0] 0.308 [0.308–0.339] 13 [12–16] / 2 [1–2] / 0 [0–0] 0.308 [0.308–0.308]
10,000 21 [21–21] / 2 [2–2] / 0 [0–0] 0.341 [0.341–0.341] 17 [16–18] / 2 [2–2] / 0 [0–0] 0.310 [0.310–0.310]
30,000 unavailable unavailable 17 [16–29] / 2 [2–4] / 0 [0–0] 0.312 [0.312–5.329]
60,000 unavailable unavailable 17 [17–17] / 2 [2–2] / 0 [0–0] 0.312 [0.312–0.312]

The marker/reply-heavy supplemental profile shows the following after-append refresh (n=1); raw counts use the full observed phase, while bytes use the operation snapshots:

Events Base raw SQL / requests / snapshot bytes Candidate raw SQL / requests / snapshot bytes Base direct-handler SQL / requests Candidate direct-handler SQL / requests
1,000 227 / 4 / 138,386 170 / 2 / 93,776 210 / 2 170 / 2
60,000 210 / 2 / 2,690,770 170 / 3 / 94,680 210 / 2 170 / 2

At 60k the metadata projection changes from 41 calls/2,596,325 logical bytes to 1 call/235 bytes. The extra candidate observed request is a nested readonly-worker request with no retained domain caller; do not label it confidently unrelated background. Its associated SQL finishes outside the named phase. sessions.list at 60k has 0 observed SQL/requests on both sides. Initial 1k UI observations include initialization/background work.

Unchanged shared harness

Scope Base SQL / requests / MAIN Candidate SQL / requests / MAIN
causalWarm 72 [72–78] / 23 [23–25] / 0 [0–0] 70 [70–76] / 23 [23–25] / 0 [0–0]
rawWarm 72 [72–111] / 23 [23–28] / 0 [0–13] 70 [70–97] / 23 [23–29] / 0 [0–9]
whole 4,149 [4,147–4,154] / 1,049 [1,045–1,049] / 185 [185–185] 4,112 [4,109–4,130] / 1,042 [1,041–1,051] / 185 [185–186]

Warm rows pool 30 turns per side; whole rows have 3 runs per side. Observed warm MAIN outliers are background lease-expiry reads (openclaw-state-lease-store.ts:131), not causal turn SQL.

Prompt and evidence limits

Across 26 matched prompts, all 63 differing fields are observed wall-clock prefixes after fixture-root normalization. Exact bytes differ; source comparison retains every difference. 30k/60k prompts are unpaired. Provider input items and bytes are retained in the measurement artifact; exact selected source-event counts are not fully retained.

The source inventory is distinct from measured MAIN statements: changed shared files retain 28 T1 sites; the measured ordinary scale path is 0 MAIN.

Remaining review follow-up

P2: the per-connection history cache key contains session ID, while display-source identity also includes logical agent. Two logical agents reading the same physical session may reuse the first agent's cursor source. No data-loss or disclosure effect was demonstrated. This cursor-consistency case is deferred under the requested two-round review cap; it is not claimed fixed.

Change size: 12 files, +512/−48 lines relative to main after accounting; production +266/−48, tests +240, docs +6.

Retain worker-owned marker positions across ordinary appends, use indexed
marker lookups, and seek cache-TTL controls without scanning message history.
Preserve canonical cold, branch, reset, and deprecated synchronous SDK paths.
…ions

Keep exact context accounting in the session actor across ordinary appends and
metadata rewrites. Bound resident completion history and preserve durable retry
lookup. Remove duplicate completion and transcript reads during input staging.
@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T14:55:41.748416Z 2255dce New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: L labels Oct 16, 2026
Carry the complete actor projection into cold accounting without another snapshot read.
Correct the regression fixtures to exercise the existing worker message path.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0607f14438

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return buildVisibleHistoryProjection(projection);
}
const sessions = historyProjections(projection.database.db);
const key = projection.resolved.sessionId;

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 Badge Include the logical agent in the projection-cache key

When one retained history-worker connection serves a shared physical store for multiple logical agents, this session-ID-only key can return a projection built for another resolved.agentId. The projection retains displaySource, whose identity explicitly includes the logical agent, and the adjacent recent-page cache already keys by agent ID; reusing it across agents therefore returns the wrong display/read-window source and can make cursors collide across logical owners. Include projection.resolved.agentId in this cache key.

AGENTS.md reference: src/gateway/AGENTS.md:L60-L60

Useful? React with 👍 / 👎.

@steipete

Copy link
Copy Markdown
Contributor Author

The PR-caused Madge failure is fixed by moving the history projection types into a dependency-free leaf. The four changed modules emit identical executable JavaScript after type stripping.

Follow-up: qualify the per-connection history cache key with the logical agent ID, matching the recent-page cache. Logical agents sharing a physical session can currently reuse the first agent's display-source/cursor identity. This is a valid P2 cursor-consistency finding; it is deferred under the requested two-review-round cap. No disclosure or data-loss effect was demonstrated.

Supply the required validateTurn flag and retain the literal message event type.
Production behavior and regression assertions are unchanged.
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR reuses worker-local history marker projections across reads and ordinary appends and makes cache-TTL control queries selective.

Example: Read a three-event history page after appending one message to a session containing 4,001 visible events.

  • Before: The reader rebuilds the existing marker projection.
  • After: The worker extends its retained projection from appended navigation and returns the newest three events.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Focused integration coverage supports the approach, but logical-agent cache isolation requires correction before merge.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; supplied support exercises real SQLite history owners in integration tests, while shipped-Gateway performance measurements remain pending.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Repeated history pages and cache-TTL dependency selection perform work that grows with retained session history.
Reason: Maintainer-authored direction targets repeated work in existing owners without adding configuration, stored formats, or SDK contracts.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-directed optimization is useful, but a verified shared-store cursor-identity defect remains.

Priority: P2
Reviewed head: 3cee46fb1e7cca51a25680ce56fba952b28671d6

Before merge

  • Include the logical agent in the retained projection key (P2) - When logical agents main and other read the same physical session through one retained worker connection, both use the session-only key. With matching generation and indexed sequence, the second read returns cached.history, including the first agent's displaySource. readTranscriptDisplaySource explicitly includes resolved.agentId, so display positions and captured read windows acquire the wrong logical source and cross-agent windows can incorrectly compare equal. Include resolved.agentId in the key and add a two-agent shared-connection regression.

Findings

  • [P2] Include the logical agent in the retained projection key — src/config/sessions/session-accessor.sqlite-history-projection.worker.ts:152-153

Tests

  • Missing end-to-end proof: The supplied evidence does not yet include the pending shipped-Gateway baseline/candidate measurements or a shared-store cross-agent cursor regression.
Agent review details

How this fits together

Gateway history and preview requests enter read-only transcript workers, which combine SQLite projection metadata with bounded payload reads and return positioned events and cursor identities.

flowchart LR
  A[Gateway history or preview request] --> B[Read-only worker]
  B --> C[Current transcript snapshot]
  C --> D[Retained marker projection]
  D --> E[Bounded SQLite payload read]
  E --> F[Positioned events and cursors]
Loading

Technical review

Best possible solution:

Qualify worker projection reuse by logical agent and session while preserving incremental appends, canonical fallback, and payload limits.

Do we have a high-confidence way to reproduce the issue?

Source establishes the failing case: two logical agents read the same session through one retained physical connection, and the second receives the first agent's cached display source; no target code was executed.

Is this the best way to solve the issue?

Incremental reuse fits the existing worker owner, but its key must include every logical identity component retained in the projection.

Full review comments:

  • [P2] Include the logical agent in the retained projection key — src/config/sessions/session-accessor.sqlite-history-projection.worker.ts:152-153
    When logical agents main and other read the same physical session through one retained worker connection, both use the session-only key. With matching generation and indexed sequence, the second read returns cached.history, including the first agent's displaySource. readTranscriptDisplaySource explicitly includes resolved.agentId, so display positions and captured read windows acquire the wrong logical source and cross-agent windows can incorrectly compare equal. Include resolved.agentId in the key and add a two-agent shared-connection regression.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 33f497e178d7.

Provenance checked

  • Visible marker projection and cursor paging keeps the original intent (0ee3503: Bound history work while preserving snapshot-consistent cursor windows.)
  • Selective marker query planning keeps the original intent (ee1173e: Choose selective stored-marker or active-branch access without changing ordering or visibility.)
  • Read-only history owner separation keeps the original intent (932846b: Separate canonical read-only queries from writable dependencies for worker isolation.)
  • Cache-TTL prefix reconstruction keeps the original intent (0257a7d: Restore checkpoint and delta dependencies while preserving exact projected tool-result bytes.)
  • Committed cache ownership keeps the original intent (1919beb: Avoid caching uncommitted history and bind retained facts to the physical connection.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/config/sessions/session-accessor.sqlite-history-query-plan.test.ts src/config/sessions/session-accessor.sqlite-history-cache.test.ts --maxWorkers=1
  • pnpm test src/gateway/session-history-readonly-reader.test.ts --maxWorkers=1
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 0257a7d adds src/config/sessions/session-cache-ttl-prefix.ts:24 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0257a7dab0ff; files: src/config/sessions/session-cache-ttl-prefix.ts)
  • Vincent Koc: Raw commit 932846b adds src/config/sessions/session-accessor.sqlite-history-query.ts:23 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 932846b521c0; files: src/config/sessions/session-accessor.sqlite-history-query.ts)

PR surface

Source +218, Tests +239, Docs +6. Total +463 across 12 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 8 266 48 +218
Tests 3 239 0 +239
Docs 1 6 0 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 511 48 +463

Review metrics

Metric Value Why it matters
Production versus test changes Production +266/-48; tests +239/-0 Growth implements retained incremental projections and indexed lookups; tests exercise selective queries, append reuse, branch fallback, and rewrite freshness.

Labels

Label changes:

  • add P2: The optimization has normal priority, with a concrete cursor-consistency defect limited to logical agents sharing a physical session.
  • add merge-risk: 🚨 session-state: Session-only cache identity can associate returned display positions and read windows with the wrong logical agent.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The optimization has normal priority, with a concrete cursor-consistency defect limited to logical agents sharing a physical session.
  • merge-risk: 🚨 session-state: Session-only cache identity can associate returned display positions and read windows with the wrong logical agent.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 16, 2026, 10:47 AM ET / 14:47 UTC.

Base automatically changed from dbasync/bigturn-accounting to main October 16, 2026 14:50
Integrate the landed accounting change and preserve the existing lazy history resolver type. Supply currentOnly for the byte-capped by-ID fixture and the database storePath for the prepared history target. Production behavior and assertions are unchanged.
@steipete
steipete merged commit e55a4e6 into main Oct 16, 2026
124 of 128 checks passed
@steipete
steipete deleted the dbasync/bigturn-history branch October 16, 2026 15:22
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…4275)

Reuse and incrementally extend visible history marker projections in the history worker. Use indexed marker lookup and portable control-event selection for cache-TTL prefixes while preserving bounded payload projections and canonical cold readers.

Focused history and query-plan tests, two Codex review rounds, and CI/static proof cover the change. The known logical-agent cursor-source consistency case remains a P2 follow-up. Full large-session measurements follow separately; no latency saving is claimed.

Release notes: repeated history pages and ordinary append refreshes reuse worker-owned projection facts instead of rebuilding retained marker history.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant