Skip to content

Skip identical cost cache database rewrites - #2852

Merged
steipete merged 12 commits into
steipete:mainfrom
Yuxin-Qiao:fix/cost-cache-stable-save-2495
Aug 12, 2026
Merged

Skip identical cost cache database rewrites#2852
steipete merged 12 commits into
steipete:mainfrom
Yuxin-Qiao:fix/cost-cache-stable-save-2495

Conversation

@Yuxin-Qiao

@Yuxin-Qiao Yuxin-Qiao commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

This branch fixes the Codex SQLite cost-cache write amplification without weakening cross-process correctness.

Refs #2495

This intentionally does not close #2495: PlanUtilizationHistoryStore still rewrites history/claude.json and history/codex.json byte-identically. That remains a separate follow-up.

Current-main integration

  • Rebases and preserves all nine contributor commits on current main, including contributor authorship and messages.
  • Keeps fix: preserve Codex request-tier pricing across forks #2863's parser-compatibility and SQLite lock-preservation behavior.
  • Adds the already-pushed PR producer hash as a compatible predecessor; local intermediate fingerprints are not accepted.
  • Does not add a schema, sidecar, PlanUtilizationHistoryStore, or changelog change.

Persistence contract

  • Scanner saves opt into semantic no-op detection; other callers retain full-save behavior.
  • The complete reconstructed cache is compared, normalizing only persistence-derived spellings and lastScanUnixMs freshness.
  • Retention and file/row budgets run before the no-op return path.
  • After optimistic equality, the store acquires BEGIN IMMEDIATE and rechecks the complete semantic snapshot under that writer lock.
  • If another process committed different content first, the stale save rolls back, preserves the newer rows and timestamp, and reports catchUpRequired so the scanner reloads and rescans.
  • If content is still identical, only the metadata freshness row advances, monotonically, inside the already-held transaction.
  • Writer-lock acquisition or commit failure reports retry-required and never falls through to unprotected writes.
  • Real content changes continue through the all-or-nothing full-save transaction.

Physical write behavior

An unchanged scan no longer rewrites files, snapshots, usage rows, aggregates, lineage, buffers, discovery/lookback state, or accumulators. It performs one bounded metadata-row update so refresh debounce survives reloads and app restarts. The regression test measures the real SQLite database and -wal paths and does not claim zero physical writes.

Regression coverage

  • unchanged cache: content tables remain identical and only freshness advances;
  • repeated unchanged cache: one metadata-row write and bounded WAL/page activity;
  • real content change: full save persists new rows;
  • tightened budgets: retention still runs before no-op completion;
  • concurrent writer between optimistic comparison and writer lock: newer content wins, stale save retries;
  • unavailable writer lock: no-op and full-save paths preserve the database and retry;
  • monotonic freshness across multiple store instances;
  • compatible predecessor adoption remains constrained to known row-compatible producers.

Local proof

  • swift test --filter 'CostUsageStoreTests|CostUsagePerformanceGateTests': 99 tests in 2 suites passed.
  • make check: 0 formatting or SwiftLint violations across 1,846 Swift files; generated parser hash current at 47144baa8daccf52.
  • make test: 840 selections in 70 groups, 70 first-pass successes, 0 retries, 0 timeouts.
  • Local and full branch autoreview: no accepted/actionable P0-P2 findings; TruffleHog clean.

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: ef0e5f33dd

ℹ️ 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".

else { return false }
guard (cache.codexScanCatchUpPending ?? false) == restored.codexScanCatchUpPending
else { return false }
restored.lastScanUnixMs = cache.lastScanUnixMs

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Persist the refreshed scan timestamp

When an unchanged refresh supplies a newer lastScanUnixMs, this assignment deliberately masks the difference and the early return leaves the old timestamp in SQLite. On the next independently loaded request, makeCodexRefreshPlan compares that stale value against the 60-second refresh interval, so once it expires every subsequent request can rescan the session history instead of being debounced. Persist this freshness marker or change refresh planning so it does not depend on a timestamp discarded here.

Useful? React with 👍 / 👎.

Comment on lines +79 to +83
return CostUsageStoreBudgetResult(
deletedRows: 0,
rowCount: previous.files.count,
fileBytes: fileBytes,
catchUpRequired: false)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Honor tighter budgets before returning early

When the persisted content matches but the caller supplies a smaller rowBudget or fileBudgetBytes than was used for the preceding save, this return bypasses enforceBudgets entirely and reports success while leaving the database over the requested limit. This affects the exposed custom-budget path and would also prevent a future reduction of the defaults from pruning otherwise unchanged caches; only take the shortcut after confirming the existing row and byte counts satisfy the current limits.

Useful? React with 👍 / 👎.

@Yuxin-Qiao
Yuxin-Qiao force-pushed the fix/cost-cache-stable-save-2495 branch from ef0e5f3 to f6b9fa4 Compare August 11, 2026 03:00
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 11, 2026
@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 8:13 PM ET / August 12, 2026, 00:13 UTC.

ClawSweeper review

What this changes

The PR avoids full SQLite cost-cache rewrites for unchanged Codex scans while retaining budget enforcement, durable refresh timing, and concurrent-writer recovery.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for normal merge review: the latest head resolves the prior writer-lock race finding and has focused regression coverage. Likely related people: Peter Steinberger (high confidence) and Robert (medium confidence).

Priority: P2
Reviewed head: 31ba5645f98cb0b8ef322e4ab77b28a77f00440c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The repaired head has direct race coverage and credible exact-head validation, with the remaining consideration limited to the explicit persisted-cache compatibility choice.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The PR body and the owner’s exact-head follow-up provide focused and full-suite terminal results for the changed SQLite persistence behavior.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body and the owner’s exact-head follow-up provide focused and full-suite terminal results for the changed SQLite persistence behavior.
Evidence reviewed 5 items Latest head rechecks under the writer lock: After the optimistic equality check, the save path acquires a transaction, reconstructs the snapshot under that lock, and returns catch-up-required rather than overwriting newer content on mismatch.
Prior concurrency finding has regression coverage: The test injects a competing write between the preflight comparison and lock acquisition, then verifies the newer content remains and the stale scanner requests a retry.
Persistence failure paths are contained: The head makes transaction acquisition and commit explicit success conditions; unavailable locks return retry-required instead of continuing with unprotected writes.
Findings None None.
Security None None.

How this fits together

CodexBar scans local Codex session data into a SQLite usage cache that feeds cost reports and refresh debouncing. The new decision path compares reconstructed scan content with the cache, then either advances freshness under a writer lock or performs the existing full save.

flowchart LR
  A[Codex session files] --> B[Cost scanner]
  B --> C[Reconstructed usage cache]
  C --> D[SQLite content comparison]
  D --> E[Retention and writer lock]
  E --> F[Freshness update]
  E --> G[Full cache save]
  F --> H[Usage reports]
  G --> H
Loading

Before merge

  • Resolve merge risk (P1) - The explicit parser-hash compatibility allowlist reuses existing SQLite rows rather than rebuilding them, so its named producer hashes remain an upgrade-compatibility boundary.
  • Complete next step (P2) - No repair lane is needed: the prior writer-lock revalidation finding is fixed on the latest head, leaving ordinary maintainer review and active checks.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production versus test delta production +297/-78, tests +660/-8 The larger test delta exercises unchanged scans, budget enforcement, lock contention, and metadata freshness around the persistence change.
Files affected 12 files The change is concentrated in the cost-cache implementation, generated parser fingerprint, and focused regression suites.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #2495
Summary: This PR is a candidate fix for the SQLite-cache portion of the canonical disk-write report; the report’s separate JSON-history rewrite concern remains outside this branch.

Members:

  • canonical: lot of disk write for codexbar #2495 - The PR explicitly addresses the issue’s SQLite cost-cache write amplification while leaving the separate history JSON behavior for follow-up.

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Retain the narrow cache compatibility boundary (recommended)
    Accept the three explicit predecessor hashes as row-compatible while preserving rebuild behavior for every unknown producer.
  2. Remove the PR-build predecessor admission
    If maintainers do not want to support caches produced by the earlier pushed branch, remove only that hash and retain the released-version compatibility paths.

Technical review

Best possible solution:

Land the narrow scanner-only optimization with its explicit compatibility allowlist and keep unknown cache producers on the existing rebuild path.

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

Yes: the focused store tests construct an unchanged cache, inject a competing writer at the former race boundary, and verify the retry and preservation behavior; source inspection confirms the path is scanner-only.

Is this the best way to solve the issue?

Yes: semantic comparison followed by a locked recheck is the narrowest approach because it avoids full rewrites without weakening retention, cache compatibility, or concurrent-writer safety.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7b5510b22847.

Labels

Label justifications:

  • P2: This is a bounded reliability and disk-write improvement in the Codex cost-cache path.
  • merge-risk: 🚨 compatibility: The PR deliberately accepts several prior cache producer hashes and therefore changes upgrade behavior for persisted SQLite caches.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body and the owner’s exact-head follow-up provide focused and full-suite terminal results for the changed SQLite persistence behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body and the owner’s exact-head follow-up provide focused and full-suite terminal results for the changed SQLite persistence behavior.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Authored the latest atomic-save repairs and the merged current-main work on the same cost-store surface. (role: recent cost-store contributor; confidence: high; commits: 4befde4bbdf0, c735150bef29, 31ba5645f98c; files: Sources/CodexBarCore/Vendored/CostUsage/CostUsageStore.swift, Sources/CodexBarCore/Vendored/CostUsage/CostUsageStore+CodexCache.swift)
  • Robert: Authored the current-main executor isolation repair used by this shared cost-store persistence area. (role: adjacent concurrency contributor; confidence: medium; commits: b3c1bfa390a9, 27054465bd86; files: Sources/CodexBarCore/Vendored/CostUsage/CostUsageStore.swift)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Let the in-progress platform checks complete before merging.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-11T05:48:23.788Z sha dae98ae :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-11T06:27:40.938Z sha dae98ae :: needs changes before merge. :: [P1] Preserve existing cost caches across this hash change
  • reviewed 2026-08-11T06:51:13.721Z sha 636888c :: needs changes before merge. :: [P1] Restrict the legacy cache upgrade to its known target
  • reviewed 2026-08-11T06:55:49.561Z sha 636888c :: needs changes before merge. :: [P1] Restrict the legacy cache upgrade to its known target
  • reviewed 2026-08-11T07:10:31.172Z sha f569db5 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-11T07:20:48.058Z sha f569db5 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-11T22:25:50.851Z sha c735150 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-11T22:35:43.046Z sha c735150 :: needs changes before merge. :: [P2] Revalidate cache identity under the writer lock

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 11, 2026
@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. and removed merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. labels Aug 11, 2026
@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 11, 2026
@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: 636888c0c9

ℹ️ 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".

Comment on lines +324 to +325
let isPreviousReleasedGeneration = userVersion == Int64(Self.previousSchemaVersion)
&& parserHash == Self.previousParserHash

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restrict the one-time cache-generation upgrade

When a user skips this release and later upgrades directly from b975eb705f905b9a to a build whose parser hash changed for an actual parsing change, this condition still accepts the old database and upgradePreviousReleasedGeneration relabels its rows with that future hash instead of rebuilding them. Those rows can then remain based on obsolete parsing behavior indefinitely; gate the exception on the known no-op target generation (15a5f81888046ea4) or model migrations as explicit source/target pairs.

Useful? React with 👍 / 👎.

@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

1 similar comment
@Yuxin-Qiao

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed the status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. label Aug 11, 2026
@steipete
steipete force-pushed the fix/cost-cache-stable-save-2495 branch from f569db5 to c735150 Compare August 11, 2026 22:19
@steipete

Copy link
Copy Markdown
Owner

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 11, 2026
@steipete

Copy link
Copy Markdown
Owner

Final concurrency repair pushed at 31ba5645f98cb0b8ef322e4ab77b28a77f00440c.

The optimistic no-op comparison is now only a preflight. The store acquires BEGIN IMMEDIATE, reconstructs and rechecks the complete snapshot under that writer lock, and either advances freshness in the same transaction or rolls back and requests catch-up when a concurrent save won. Failed lock acquisition or commit also returns retry-required; neither the no-op nor full-save path falls through to unprotected writes.

Local proof on this exact head:

  • swift test --filter 'CostUsageStoreTests|CostUsagePerformanceGateTests' — 99 tests in 2 suites passed.
  • make check — parser hash current at 47144baa8daccf52; 0 formatting or SwiftLint violations across 1,846 Swift files.
  • make test — 840 selections in 70 groups; 70 first-pass successes, 0 failed groups, 0 retries, 0 timeouts.
  • Local and full branch autoreview — no accepted/actionable P0-P2 findings; TruffleHog clean.

The contributor commits and authorship remain preserved. This remains Refs #2495, not Fixes, because the separate PlanUtilizationHistoryStore JSON rewrites are outside this PR.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 12, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 12, 2026
@steipete

Copy link
Copy Markdown
Owner

Maintainer compatibility decision: retain 98da5914d2f6a9cd in the narrow predecessor allowlist. It was the previously pushed PR producer, its persisted row shape is unchanged, and unknown producer hashes still take the existing rebuild path. The released/current-main producers remain explicitly listed rather than accepting a broad migration range.

Exact-head CI is green on 31ba5645f98cb0b8ef322e4ab77b28a77f00440c, and ClawSweeper reports no actionable code findings.

@steipete
steipete merged commit 1271af5 into steipete:main Aug 12, 2026
9 checks passed
@steipete

Copy link
Copy Markdown
Owner

Landed and verified.

  • PR head: 31ba5645f98cb0b8ef322e4ab77b28a77f00440c
  • Merge commit: 1271af571f148d8963e99f21f5ba242583904282
  • Changelog closeout: fa83a42fb0cb8c974aba0d347b06cb90d5978ba2
  • Exact-head PR CI: https://github.com/steipete/CodexBar/actions/runs/31549215078 — all required checks passed, including both macOS test shards, Linux x64/arm64, musl, lint, aggregate gate, and GitGuardian.
  • Final main CI: https://github.com/steipete/CodexBar/actions/runs/31550759074 — passed on fa83a42fb0cb8c974aba0d347b06cb90d5978ba2.
  • Local proof: 99 focused store/performance tests passed; full suite ran 840 selections in 70 groups with 70 first-pass successes, zero retries, and zero timeouts; make check and branch autoreview were clean.

The fix keeps unchanged Codex cost-cache content tables intact, advances only freshness under the SQLite writer transaction, preserves a concurrent winner, and requests catch-up rather than performing an unprotected or stale save. Contributor commits and authorship are preserved, and the 0.49.3 — Unreleased changelog thanks @Yuxin-Qiao.

GitHub auto-closed #2495 during merge despite the final Refs wording. I am reopening it because the separate byte-identical PlanUtilizationHistoryStore rewrites of history/claude.json and history/codex.json remain outside this PR.

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

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lot of disk write for codexbar

2 participants