mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-06 15:52:22 +01:00
Merge recovery fixture settlement repairs into sleep-14-decision-retention
Propagate the verified foreground recovery and login cleanup fixture corrections while preserving this PR boundary. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
commit
a8a986dba7
4 files changed
+93
-8
No files matched your search
@@ -104,3 +104,32 @@ text for cursor comparisons, leaving business grace deadlines unchanged. The
|
||||
invalid claim remains durable debt and is revisited after paging wraps; the valid
|
||||
claim progresses without repeating its completed effect.
|
||||
All 18 effect-recovery lifecycle cases and server typechecking pass after repair.
|
||||
|
||||
### Foreground join test timing
|
||||
|
||||
CI exposed a timing assumption in the foreground/recovery overlap test: it
|
||||
expected exactly two lifetime recovery sweeps. A controlled PostgreSQL replay
|
||||
waited for the committed claim's deadline discovery before advancing time. It
|
||||
recorded two completed, zero-resumption scans before the deadline (startup and
|
||||
claim notification), followed by the legitimate deadline scan. The old assertion
|
||||
then failed deterministically with three calls. No recurring idle poll or duplicate
|
||||
effect was found in that sequence.
|
||||
|
||||
The test now waits for discovery, measures the deadline recovery relative to that
|
||||
point, and proves that its promise stays pending while foreground execution holds
|
||||
the effect lock. Advancing through several retry periods cannot start another
|
||||
sweep or effect. After release, recovery completes, one comment and one continuation
|
||||
wake exist, and the worker performs no SQL through the existing hour-long quiet
|
||||
check. Counting actual lock attempts also distinguishes joining from a second
|
||||
execution blocked on the same PostgreSQL advisory lock. A temporary mutation that
|
||||
removed flight joining made this stronger assertion fail; production code was
|
||||
restored before final verification. No runtime code, retry policy, timeout, or
|
||||
business deadline changed.
|
||||
|
||||
All 123 tests across the four complete effect-recovery, decision-service, expiry,
|
||||
and startup suites passed, followed by server typechecking. Evidence:
|
||||
`/tmp/sleep-effect-join-red.log`, `/tmp/sleep-effect-join-green.log`,
|
||||
`/tmp/sleep-effect-join-mutation.log`, `/tmp/sleep-effect-join-owning-tests.log`,
|
||||
and `/tmp/sleep-effect-join-root-types.log` with their status files. The initial
|
||||
failure and mutation failure are expected evidence, not passing runs. Remaining
|
||||
review findings and fresh stack CI remain separate acceptance requirements.
|
||||
@@ -95,3 +95,20 @@ cover the surrounding login contracts.
|
||||
The fake-clock database fixture warms its connections and disables pool idle/lifetime
|
||||
expiry so time jumps test the worker rather than racing socket connection timers.
|
||||
Database suspension and reconnect behavior require separate qualification.
|
||||
|
||||
## CI fixture settlement across the migration stack
|
||||
|
||||
The setup-token consume fixture can finish its initial fake-clock jump while
|
||||
cleanup is still performing database work. A write during that pass can request
|
||||
another generation whose coalesced deadline lies beyond the jump. Waiting for
|
||||
zero tracked work without advancing to that registered deadline then times out,
|
||||
even though cleanup has a valid wake and can finish.
|
||||
|
||||
The existing fixture repair from `59f8c8b3e5` is now carried at the earliest stack
|
||||
branch so every intermediate PR receives it. The helper advances to registered
|
||||
deadlines only while work remains tracked, preserving its existing five-second
|
||||
observation limit and all production behavior. All 16 login-cleanup cases passed
|
||||
on this branch against a dedicated PostgreSQL database; the prior later-branch
|
||||
verification and failed CI history remain documented in the GitHub review-check
|
||||
migration audit. No runtime change or weakened quiet assertion is included.
|
||||
Evidence: `/tmp/sleep-login-settlement-owning-tests.log` and its zero status file.
|
||||
Reference in new issue
Block a user