Skip to content

fix(relay): preserve unknown native outcomes during recovery - #214

Merged
abruption merged 2 commits into
mainfrom
fix/201-recovery-unknown
Sep 27, 2026
Merged

abruption merged 2 commits into
mainfrom
fix/201-recovery-unknown

Conversation

@abruption

Copy link
Copy Markdown
Owner

Summary

Closes #201. Highest-priority v1.0.2 audit finding: a completed journal row with an unknown native result previously bypassed the recovery uncertainty gate.

  • Classify the stored result, not merely requests.status == done.
  • Preserve pending/unknown/missing/malformed/contradictory outcomes as unknown until explicit reconciliation. retryAllowed: false is not delivery evidence.
  • Confirmed refused outcomes become not_processed; successful submitted/queued/posted outcomes become already_processed submission evidence, never ACK/consumption evidence.
  • Add end-to-end offline recovery/restart/reconciliation regression tests and EN/KO/JA/ZH documentation.

Type

  • fix

Checklist

  • python3 cc_peer.py list works locally
  • python3 cc_peer.py list --host <a real host> works over SSH
  • --dry-run resolves a target without posting anything
  • Commits follow Conventional Commits
  • Docs updated if behavior changed
  • No secrets, tokens, or session keys in the diff

The unchecked native/SSH checks are outside this offline recovery change; no real messages or ACK requests were sent.

Verified against

macOS arm64, Python 3.14.7, websockets 17.1; worktree imports and temporary synthetic state.

  • Both new regression tests failed on unmodified main.
  • Full Python suite: 540 tests, OK, 12 skipped (opt-in/platform gates).
  • Final focused recovery suite: 7/7 pass under -X dev -W error::ResourceWarning, including persisted-plan reopen and deeply malformed JSON.
  • Full suite includes documentation/i18n checks; git diff --check passes.
  • Existing backup-fixture SQLite ResourceWarnings remain tracked separately in test: close backup snapshot fixture SQLite connections explicitly #209; focused recovery tests emit none.

Notes

No automatic resend, receipt deletion, version bump, deployment or release. Tests verify archived receipts are unchanged and no new native request is created by reconciliation/activation.

Existing recovery plans are deliberately preserved when resumed; this change classifies newly created plans. Operators must audit older plans against archived receipts and explicitly reconcile incorrectly classified unknown items before activation. Already activated plans are not silently rewritten or revoked.

@abruption abruption added this to the v1.0.2 milestone Sep 27, 2026
@abruption
abruption merged commit 03d4bd4 into main Sep 27, 2026
24 checks passed
@abruption
abruption deleted the fix/201-recovery-unknown branch September 27, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(recovery): keep unknown native outcomes unresolved during recovery

1 participant