Repository navigation
fix(accounting): preserve durable credit and monitor failures - #4852
Conversation
Refs #4447. Preserve the complete source and regression tree from PR #4811 at d0f314b, including the exact Clippy import repair. This clean successor uses the same prerequisite base because the prior branch contains an immutable 74-character commit header rejected by the unchanged 72-character gate. The original branch and all contributor commits remain intact; no force update, assertion weakening, or release changes.
|
There was a problem hiding this comment.
🔍 Devin Review: 1 flag
Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
Refs #4447. Apply the two byte-for-byte formatter hunks from CI run 42702961402 to the active replacement PR. Preserve existing semantics, registered-store regression assertions, and branch ancestry. Do not change CI gates or retry budgets.
|
Exact-head CI repair — 2026-11-09. CI 42702961402 on Committed and pushed cf2bd55587d via exact expected-old-head |
Scope — Refs #4447
This is the source-identical, nonforce successor to #4811, not a second accounting implementation. Keep #4447 open: durable per-response replay/idempotency, reset/restart/disconnect and complete fault-stage acceptance remain outstanding.
Confirmed CI repairs
The preceding exact-head CI 42625612229 at
aa3a706d505b22ce62cf40efe0383c23e523a7f8has two independent blockers:tracedecay_runtime_core::db::engine::Executor as _import in the ledger regression. Commit d0f314b, safely appended to the original branch, removes it and moves the usedToolTokenAccountingimport to module scope. The exact one-file patch is +1/-3; production statements and all test assertions are unchanged.aa3a706under the existing 72-character rule. A later commit cannot repair that history. Rather than force-push, rewrite peers, or weaken commitlint, this replacement has a single conforming commit on the same intended prerequisite base.Exact source preservation
0ebb86a6a717c80833150093c5548aeadf210901.0bdd2a376dea87086bf6ea9c8e4e57ff5d4b88ce(fix(sessions): serve live projection during historical ingest #4831).042b48cab2d5fe17d3d5f97866f551b3938bd40d, exactly the tree of fix(accounting): credit monitor only after durable token commit #4811 atd0f314b.Existing production behavior and regressions retained
Only committed project-store token savings may credit the live monitor, savings history or analytics. Refused/dropped commits retain raw activity without positive savings. The response commit receipt settles before the optional profile projection, so a blocked profile writer cannot conceal a committed project credit. Monitor filesystem refusals are returned and logged rather than silently dropped.
Real registered-store regressions cover a successful 7-token credit, forced checked-u64 overflow without phantom monitor/history/analytics credit, a held independent profile writer with an already-settled canonical receipt, restart/shutdown counters, and occupied monitor paths preserving foreign data. Assertions and deadlines are unchanged by this replacement.
Verification and merge hold
The preceding
aa3a706run passed Linux fleet, Dashboard and Windows build/typecheck, but failed Clippy and commitlint; native macOS was skipped. These are predecessor results, not a passing result for this new commit. Current-head hosted Bazel tests, Clippy, formatter and commit gates must execute and be inspected. Local Bazel/native macOS are unavailable; no Cargo or unexecuted test pass is claimed.This PR still targets the existing #4831 prerequisite. Do not merge it into that feature branch or bypass the prerequisite: land prerequisites through their own reviews, retarget to master, inspect the resulting diff and revalidate normally. No merge/auto-merge or issue closure on the evidence above.
Protected #4776/#4797 and release #4763 are untouched. No workflow, protection, release, tag, production, infrastructure, credential or automation-schedule changes.