Skip to content

fix: durably invalidate revoked session caches#217

Merged
Joncallim merged 11 commits into
architecture/issue-179-context-packet-evidencefrom
codex/pr198-session-cache-invalidation
Jul 27, 2026
Merged

fix: durably invalidate revoked session caches#217
Joncallim merged 11 commits into
architecture/issue-179-context-packet-evidencefrom
codex/pr198-session-cache-invalidation

Conversation

@Joncallim

Copy link
Copy Markdown
Owner

Summary

Makes PostgreSQL session revocation durably schedule Redis cache invalidation without allowing Redis to authorize a session.

  • records pending, claimed, deferred, and completed cache-purge state with the revocation transaction;
  • deletes the digest-derived v2 key and only the applicable v1 legacy key after commit;
  • retries failed deletion through the existing bounded worker maintenance sweep using FOR UPDATE SKIP LOCKED, expiring claims, and bounded backoff;
  • preserves PostgreSQL revocation and expiry as the sole authority.

Evidence

  • npm test — 1,580 passed, 16 environment-gated skips
  • focused session/static tests — 68 passed
  • npm run lint -- --max-warnings=0
  • npx tsc --noEmit
  • npm run build
  • git diff --check

The mandatory S4 PostgreSQL command is CI-only locally: it correctly failed closed because this worktree has none of the six provisioned role URLs. The added S4 PostgreSQL state-machine proof is not conditionally skipped when CI supplies those URLs.

Scope

This child changes only session authority/cache invalidation, its existing worker maintenance hook, migration/schema parity, and focused tests. It does not alter executor, packet, history, leakage, docs, or PR #198 metadata.

@Joncallim
Joncallim merged commit 8435f04 into architecture/issue-179-context-packet-evidence Jul 27, 2026
2 checks passed
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.

1 participant