Skip to content

feat(sandbox): detached lock-free dry-runs (immediate ROLLBACK), wire PII masking & ChatOps cards - #60

Merged
divyanshujethi merged 2 commits into
mainfrom
feat/phase2-lockfree-dryrun-and-wire-masking
Nov 17, 2026
Merged

divyanshujethi merged 2 commits into
mainfrom
feat/phase2-lockfree-dryrun-and-wire-masking

Conversation

@divyanshujethi

Copy link
Copy Markdown
Contributor

Phase 2: Runtime Wire Proxy & Detached Zero-Commit Gate (DBShield)

Summary of Changes:

  1. Detached Lock-Free Dry-Run Transaction Engine (src/sandbox/detached-dryrun.ts):
    • Speculative execution in an isolated session with guaranteed immediate ROLLBACK in all execution paths.
    • Zero production lock contention (lock_timeout = 100ms, isolationLevel = READ UNCOMMITTED / NON-BLOCKING SHADOW).
    • Structured diff preview and cryptographic commit tokens.
  2. Wire-Level Streaming PII Masking (src/proxy/wire-masker.ts):
    • Binary packet decoding and on-the-wire masking for PostgreSQL DataRow (0x44) and MySQL resultset row packets.
    • Format-preserving pseudonymization maintaining referential integrity.
  3. Interactive Slack & Microsoft Teams Approval Cards (src/approval/chatops.ts):
    • Interactive Block Kit and AdaptiveCard messages with "Approve", "Reject", and "Inspect Dry-Run Diff".
    • HMAC-SHA256 signed action URLs with timestamp expiration preventing replay and CSRF attacks.
  4. Automated Test Suite (tests/phase2-wire-engine.test.ts):
    • 10/10 tests passing across all suites.

…nd chatops approval cards

- Add DetachedDryRunEngine in src/sandbox/detached-dryrun.ts with guaranteed immediate ROLLBACK, lock-free non-blocking isolation, diff previews, and commit tokens
- Add wire-level PostgreSQL DataRow ('D') and MySQL text row packet parsing and streaming masking in src/proxy/wire-masker.ts
- Enhance ChatOpsNotifier with HMAC-SHA256 signed action URLs, diff inspection buttons, and interactive Block Kit / AdaptiveCard payloads
- Add 10-test unit & integration test suite in tests/phase2-wire-engine.test.ts
@divyanshujethi
divyanshujethi merged commit ef8b78f into main Nov 17, 2026
8 checks passed
@divyanshujethi
divyanshujethi deleted the feat/phase2-lockfree-dryrun-and-wire-masking branch November 17, 2026 09:31
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