Skip to content

Phase 4: Non-Blocking Pre-Image Checksum Coordinator & Zero-Contention Concurrent Load Tests - #61

Merged
divyanshujethi merged 1 commit into
mainfrom
feat/phase4-preimage-coordinator
Nov 18, 2026
Merged

divyanshujethi merged 1 commit into
mainfrom
feat/phase4-preimage-coordinator

Conversation

@divyanshujethi

Copy link
Copy Markdown
Contributor

Summary

  • Added PreImageChecksumCoordinator (src/sandbox/preimage-coordinator.ts) implementing two-phase lock-free ChatOps approval coordination:
    • Phase 1 (Synchronous Inspection): Computes SHA-256 pre-image checksum (
      owCount + latestTimestamp + schemaHash), executes detached dry-run with guaranteed immediate ROLLBACK ( held locks), enqueues ChatOps request, and embeds checksum + HMAC seal in Slack Block Kit / MS Teams AdaptiveCard payloads.
    • Phase 2 (Asynchronous Commit): Opens a fresh execution path after human approval, recomputes the live table checksum, aborts on TOCTOU drift (PREIMAGE_DRIFT_DETECTED), or commits cleanly.
  • Added ests/phase4-preimage-coordinator.test.ts verifying 50 concurrent reads with zero lock contention while a destructive DELETE awaits Slack approval, plus TOCTOU drift rejection.
  • Verified 207/207 tests passing, Biome check clean, and sc build clean.

@divyanshujethi
divyanshujethi merged commit 4158a63 into main Nov 18, 2026
8 checks passed
@divyanshujethi
divyanshujethi deleted the feat/phase4-preimage-coordinator branch November 18, 2026 02:35
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