You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Systematic hardening + quality pass over QuadWork v2.4.0, driven by a full 4-part codebase audit (routes.js / server runtime / CLI+packaging / frontend). Close confirmed security holes, data-integrity races, and lifecycle leaks, then pay down the two god-files (routes.js 4.9k, index.js 2.1k) and frontend duplication — without breaking the working orchestrator.
Prime directive (non-negotiable)
A working QuadWork must never regress from this EPIC. Every sub-ticket states its blast-radius. Sequencing enforces safety:
Phase 0 lands first: CI + release test-gate. This is the safety net that protects every later change — nothing else dispatches until PRs actually run the test suite.
Isolated fixes before core-loop surgery. Refactors last, only after the fix tickets have landed and CI is green, each behind full v7 review (structural gate → EPIC alignment → kill-list → evidence verdict).
Any sub-ticket touching the batch/queue/PTY hot path requires a live-verify step in its acceptance criteria (spawn a throwaway-port instance, run a real batch cycle, confirm no regression) before merge.
Architecture Direction
Fixes are minimal and local; they do not rearchitect. Refactors are pure extraction (move code, keep behavior) guarded by the existing test suites (self-heal, watchdog, pty-dispatcher, reseed, batch-progress) plus new tests.
Security model stays "bind 127.0.0.1 + opt-in token for tailnet"; the WS/PTY surface gains an Origin allowlist + shared-token auth without breaking the local dashboard (token auto-provisioned locally).
Contracts (respect across sub-tickets)
writeConfig (server/config.js:173) becomes atomic; all mutators go through it or field-scoped endpoints — no new whole-config PUT writers.
WS auth: Origin allowlist in the server.on("upgrade") handler (index.js:1528) + token check on /ws/terminal, /api/agents/:p/:a/write, /interrupt; back-compatible default for localhost.
Reseed/seed section-heading invariants from guidelines v7 still hold (no H2 renames; re1/re2 ## GitHub Authentication→## Forbidden Actions adjacency).
Goal
Systematic hardening + quality pass over QuadWork v2.4.0, driven by a full 4-part codebase audit (routes.js / server runtime / CLI+packaging / frontend). Close confirmed security holes, data-integrity races, and lifecycle leaks, then pay down the two god-files (routes.js 4.9k, index.js 2.1k) and frontend duplication — without breaking the working orchestrator.
Prime directive (non-negotiable)
A working QuadWork must never regress from this EPIC. Every sub-ticket states its blast-radius. Sequencing enforces safety:
Architecture Direction
migrate-ac.jsalready uses) + field-scoped endpoints (extend the Pinned projects (and sidebar groups) reset on server restart — pinned_projects dropped from config.json #944 pattern) so no path does whole-config read-modify-write.Contracts (respect across sub-tickets)
writeConfig(server/config.js:173) becomes atomic; all mutators go through it or field-scoped endpoints — no new whole-config PUT writers.server.on("upgrade")handler (index.js:1528) + token check on/ws/terminal,/api/agents/:p/:a/write,/interrupt; back-compatible default for localhost.## GitHub Authentication→## Forbidden Actionsadjacency).[#<issue>]PR-title prefix — unchanged.Sub-Tickets (ordered by phase)
Phase 0 — safety net (must land first)
Phase 1 — security (confirmed holes)
Phase 2 — data integrity & lifecycle
quadwork stopPID handling — isolatedPhase 3 — correctness (isolated, safe)
Existing tickets folded in
Phase 4 — refactors (file JIT when the phase starts; fixes must be merged + CI green first)
Non-Goals
Audit provenance
Findings from a 4-agent audit of v2.4.0 (commit a344307). Full finding tables (severity/confidence/blast-radius/file:line) captured per sub-ticket. Cross-corroborated headline items: WS/PTY no-auth (2 independent auditors), whole-config race (2), lifecycle/caffeinate orphan (2).