Fail stale applying memory proposals - #283
caioribeiroclw-pixel wants to merge 1 commit into
Conversation
|
Thank you for your contribution! Before we can merge this PR, you need to sign our Contributor License Agreement. To sign, please comment below with:
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
|
Thanks for the contribution! Clean fix for a real edge case — the stale-apply sweep is well-scoped, all three adapters are consistent, and the test coverage is solid. Appreciate you closing out #277. @caioribeiroclw-pixel Before we can merge, you'll need to sign our CLA. Just post a comment on this PR with exactly: Details here: CLA Document |
|
@caioribeiroclw-pixel — this is approved and ready, but it is blocked on one To unblock it, comment exactly this on this PR: That is the only step. Nobody else can sign on your behalf, which is why this Why I am asking nowI built the same fix for #277 in #416 before noticing this PR existed. That was So this is not a courtesy ping — #416 is waiting on it. One thing worth a look when you get to itThe two implementations time staleness differently. This PR uses Yours is simpler and needs no migration, and the two are equivalent today Not a blocker, and not a reason to change this PR. Worth recording in the code Also note this branch last ran CI in June. It reports mergeable against current |
|
Heads up: #416 was merged as-is, which includes the stale- Recording the one substantive difference for anyone reading later: this PR times staleness from Thanks for the contribution, and sorry it landed this way. |
Summary
applyingafter the apply grace windowfailedwith astale_applyapplied_result and audit eventWhy
Issue #277 notes that a crash after
approved -> applyingcan leave a visible applying row forever. This keeps that safe failure mode during the crash window, but lets the normal expiration cron surface old stuck applies as failed instead of requiring manual inspection.Checks
SKIP_DOCKER_SETUP=true pnpm test -- --runTestsByPath src/storage/adapters/__tests__/memory-proposals.spec.ts src/storage/adapters/__tests__/memory-proposals-sqlite.spec.ts✅git diff --check✅I also tried the service spec path, but this checkout currently fails before running that suite because
../../proprietary/memory-proposals/memory-apply.dispatcher.tscannot resolve@betterdb/agent-memory; leaving the service-level tests in this PR so CI with the normal workspace setup can exercise them.Closes #277