Skip to content

refactor: wave a correctness hardening - #95

Merged
iamjr15 merged 5 commits into
mainfrom
arch/hardening
Jul 29, 2026
Merged

refactor: wave a correctness hardening#95
iamjr15 merged 5 commits into
mainfrom
arch/hardening

Conversation

@iamjr15

@iamjr15 iamjr15 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Wave A of the Codex-approved architecture-hardening plan (rev 5.3). Five commits, each gate-verified; A1 adversarially reviewed twice (verdicts: EQUIVALENT).

  • A1: ProjectSandbox's 5-level inheritance chain dissolved into one DurableObject + composed operation modules over an explicit runtime handle. Commit 1 made all 9 hidden virtual-dispatch lease edges explicit with a zero-delta lease-scope proof; commit 2 restructured with method-for-method parity (policy table SHA-identical, 36/36 RPC surface, storage keys unchanged). deleteAccountState now inventoried under a no-lease control policy (lease-wrapping it would self-deadlock); the lease core is its own auditable module.
  • A2 Phase 1: QuotaTracker implementation + retention extracted to worker-only @cheatcode/billing/quota-runtime (not root-exported; Node-side consumers verified unaffected) with runtime input validation on every public method and an RPC-only dependency-cruiser guard.
  • A3: one writer for stream-driven workspace-surface state — pure part interpreter + shared applier; statuses are idempotent reductions, tab-open is once-per threadId:toolCallId. Live-QA'd: two consecutive runs in one thread, mid-run reload rehydration, SSE reconnect replay, zero console errors.
  • A4: sandbox file/exec wire shapes single-sourced in @cheatcode/types; golden compare proves all four wire schemas byte-identical (SHA-256).

Gates per commit: biome, tsc, turbo build --force (23/23 incl. wrangler dry-runs), knip zero findings, dependency-cruiser clean.

@iamjr15 iamjr15 changed the title refactor: wave a correctness hardening (sandbox composition, quota runtime, surface writer, wire shapes) refactor: wave a correctness hardening Jul 29, 2026
@iamjr15 iamjr15 closed this Jul 29, 2026
@iamjr15 iamjr15 reopened this Jul 29, 2026
@iamjr15
iamjr15 merged commit 5b45ec4 into main Jul 29, 2026
10 of 16 checks passed
@iamjr15
iamjr15 deleted the arch/hardening branch July 29, 2026 07:44
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