Repository navigation
test(api): prove resume stays closed on a real store (M4 row 3) - #453
Conversation
Resume answers 401 without the API token and 409 with an absent, wrong or current verdict token. The direct store call fails closed, and control state, journal cursor, claims, runs, launches and runtime capabilities stay the same, also after reopening the database. The test fake delegates control to its native store when one is set; no production behaviour changes. Test-First: src-tauri/src/api/tests/resume_closed_tests.rs::resume_remains_closed_for_every_verdict_and_preserves_runtime_state Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
… pr453) The fake's no-store fallback now words its refusal differently from the store's, so the route assertions fail when the store leaves the path. The state fingerprint also covers goals and root policies; the module doc is narrowed to what the test presents. Test-First: src-tauri/src/api/tests/resume_closed_tests.rs::api::tests::resume_closed_tests::resume_remains_closed_for_every_verdict_and_preserves_runtime_state Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@Mergifyio queue |
Merge Queue Status
This pull request spent 7 minutes 42 seconds in the queue, including 7 minutes 27 seconds running CI. ReasonThe merge conditions cannot be satisfied due to failing checks
Failing checks:
HintYou may have to fix your CI before adding the pull request to the queue again. Waiting for
All conditions
Requeued — the merge queue status continues in this comment ↓. |
Host admission samples the clock on every read, so the runtime-state snapshot differed by one second whenever a boundary passed between reads (merge queue run 37269346495). Strip observedAt before comparing; the closed-resume and unchanged-state assertions are untouched. Regression-For: f2ba7e4 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@Mergifyio queue |
Merge Queue Status
This pull request spent 12 minutes 6 seconds in the queue, including 11 minutes 49 seconds running CI. Required conditions to merge
|
Dieser PR fügt einen Test hinzu, der auf einer echten Datenbank beweist, dass "resume" in v1.5.0 geschlossen bleibt. Ohne API-Token kommt 401, mit API-Token und fehlendem, falschem oder gültigem Verdict-Token immer 409. Zustand, Journal, Claims, Runs und Starts bleiben unverändert, auch nach dem Neuöffnen der Datenbank; am Verhalten ändert sich nichts.
Report
without_clockstrips wall-clockobservedAtfrom the runtime-limits snapshot; prepush lane exit 0, log /tmp/prepush-rc.log).What changed (2 files, +132/-2): new test
api::tests::resume_closed_tests::resume_remains_closed_for_every_verdict_and_preserves_runtime_state(src-tauri/src/api/tests/resume_closed_tests.rs), plus a test-helper change inapi.rs: theFakeBackend::control_continuousdelegates tonative_storewhen set (otherwise the old canned error). No production code touched. Characterization of matrix row 3, Option A (resumestays closed).The test covers: 401 without API token (also with only a verdict token); 409 with absent / wrong / current verdict token and the fail-closed message; direct
Store::control_continuous(.., "resume")returns the fail-closed error; fingerprint of control row, journal, claims, runs and launch rows plus context cursor andcontinuousScheduler/launchIntent(both false) unchanged; same after reopening the database and booting a new server.Evidence
cargo test --bin projecta resume_remains_closed-> exit 0bash scripts/ci/gates.sh lane prepushat f2ba7e4 -> exit 0 (log /tmp/row3-prepush.log on the server)bash scripts/ci/red-first.sh --plan-> count=1, specs=1Test-First: <path>::<name>. It is a characterization test, so it is green by construction on the unchanged behaviour.Architecture drift: no new findings.
NICHT ABGEDECKT:
#[cfg(windows)]tests and the Windows half (runs in the merge queue); GUI; realmain.rsApiBackend(the test uses the store through the fake's delegation, the route and store code are the production ones); no real worker/launch process.Review: done, see disposition.
Review disposition
Tier A (api seam, test helper). Reviewers: kimi-k3:cloud and glm-5.2:cloud (Ollama, via
scripts/review/run-local.sh); the author family is Claude. Reviewed candidate f2ba7e4; fixes in 5a40bd8. Driver cross-checked every finding against the code.fake backend without a store: resume is fail-closed(still 409), soassert_closedfails when the store leaves the path.control_continuousthrough a store-backed fake (planning_access_tests.rs:254returns 403 before the backend;api.rs:4129uses a store-less fake). Productionmain.rs:2923already delegates the same way. Non-resume actions are out of this package (resume-only characterization).defaults()policy, no apostrophes; a migration that changes columns should fail loudly.continuous_goalsandcontinuous_root_policiesadded to the state fingerprint. NULL concat refuted:continuous_events.detailisNOT NULL(store/continuous.rs:170).block_onconstraint (same pattern as the neighbouring fakes).Verdicts: kimi-k3 approve with conditions (F1 addressed, F2 rejected with reason); glm-5.2 approve. Architecture drift: none (existing fake-delegation pattern reused).
Evidence at 5a40bd8:
cargo test --bin projecta resume_remains_closed-> exit 0; pre-push hook (gates.sh lane prepush) -> exit 0, push verified withgit ls-remote;bash scripts/ci/red-first.sh --plan-> exit 0, count=2.🤖 Generated with Claude Code