test(recovery): preserve inbox claim deadline evidence - #177
Conversation
Processing consumption rows require claim_deadline_at after #81. Seed the wall-clock deadline and prove binary restore keeps it. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
There was a problem hiding this comment.
Review (PR #177 @ 8a0db46 vs a763735)
This is the recovery landing vehicle. Prefer it over burying the same claim_deadline_at seed inside #109, #106, or #164.
Sound
- After #81/
0019, aprocessingrow must carryclaim_deadline_at. The trigger isBEFORE UPDATEonly, so the fixture seeds the wall-clock instead of inventing an insert trigger. - Restore asserts exact source/restored timestamp equality. That is the buyer contract: a claimed inbox item must come back with the same deadline, not a refreshed lease.
- QA-REC-01, TRACEABILITY, RISK, TEST_STRATEGY, and deployment restore acceptance stay honest: schema-level
COPY ... FORMAT BINARYevidence, not a measured Hosted/Enterprise RPO/RTO drill. - Doctoring cites the current PostgreSQL 18 backup and
COPYpages (APA 7). Those URLs are live official docs and defineFORMAT BINARY.
Do next
- Move the two PostgreSQL references before Temoshok so the doctoring list stays APA 7 author order.
- Keep this draft off the Created-session persist stack. Do not land #109 as the recovery fix.
- Independent last-push approval and exact-head checks are still required. This automation does not approve or merge.
Session persist/load/start remains #180. Do not add assessment_session to the recovery table list until that persist lands on protected main.
Sent by Cursor Automation: Fix Issues
| - **Stimulus:** restore supported release data into a clean recovery environment. | ||
| - **Response:** meets the profile's measured RPO/RTO, verifies immutable digests, tenant/linkage boundaries, deduplication and deletion reconciliation before service acceptance. | ||
| - **Evidence:** real restore drill governed by ADR-0017. | ||
| - **Current evidence:** `tests/postgres_recovery_invariants.rs` proves a schema-level `COPY ... FORMAT BINARY` restore of tenant-scoped outbox identity, in-flight inbox consumption fencing including `claim_deadline_at`, and immutable response-snapshot provenance. That test is not a measured Hosted/Enterprise RPO/RTO drill. |
There was a problem hiding this comment.
Honest QA-REC-01 split. Schema-level COPY evidence is current; measured Hosted/Enterprise RPO/RTO remains missing. Do not promote this test to a GA recovery claim.
|
|
||
| The PostgreSQL Global Development Group. (2026a). *PostgreSQL 18 documentation: Backup and restore*. https://www.postgresql.org/docs/18/backup.html | ||
|
|
||
| The PostgreSQL Global Development Group. (2026b). *PostgreSQL 18 documentation: COPY*. https://www.postgresql.org/docs/18/sql-copy.html |
There was a problem hiding this comment.
APA 7 author sort ignores leading "The", so these PostgreSQL 18 entries belong before Temoshok and both W3C entries. The URLs are the current official PostgreSQL 18 backup and COPY pages, including FORMAT BINARY. Move the pair; do not drop them.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Closing as already integrated on protected main. Current protected |


Why
Protected-main recovery acceptance (#72) still inserts a
processinginbox-consumption row withoutclaim_deadline_at. After #81 that column is required, andmaintain_inbox_claim_deadlineisBEFORE UPDATEonly, so the fixture fails theintegration_consumption_claim_deadline_shapecheck. A buyer restore can also drop the wall-clock deadline and give a recovered worker a fresh lease.This repair is intentionally not on the Created-session persist stack (#106 / #164). Those PRs should not be the landing vehicle for #72 evidence.
What this PR does
claim_deadline_aton the processing recovery fixture.COPY ... FORMAT BINARYrestore keeps the exact source deadline.COPY/ backup-restore APA 7 references.Out of scope
assessment_sessionto the recovery table list before persist landsTest plan
cargo test --test documentation_architecture_contract --test traceability_active_pr_contractcargo test --test postgres_recovery_invariants(needsTEST_DATABASE_URL)Do not merge until exact-head checks and independent last-push approval are satisfied. Prefer this head over burying the same repair inside #106.