fix: quality cleanup - fail-closed foundations (chunk 1/11) #514

Closed
didericis-codex wants to merge 15 commits from chore/misc-quality-cleanup into main
Collaborator

Code-quality and failure-boundary cleanup tracked by #444. This is the root of the cleanup stack. PRD 0082 records the project-wide failure-boundary review and covers findings 1–5; the requested line-count-only finding 6 is intentionally excluded.

In this PR

  • Firecracker cleanup treats only pgrep exit 1 as an authoritative empty result and aborts destructive cleanup on operational scan failures.
  • Docker enumeration and gateway-address inspection fail closed instead of allocating from uncertain state.
  • Persisted egress credentials use separated encryption/MAC keys, authenticate ciphertexts, and migrate legacy rows after successful reprovision.
  • Orchestrator HTTP requests authenticate before body reads and enforce length, size, timeout, and concurrency limits.
  • Firecracker active enumeration reports live bottles to generic backend consumers.
  • The egress request coordinator is split into context resolution, Git policy, and route-policy stages.

Still to come in this stack

  • #518 — migrate the orchestrator HTTP control plane to FastAPI/Uvicorn and finish streamed-body resource boundaries.
  • #523 — extract the egress policy pipeline from the mitmproxy lifecycle adapter.
  • #524 — separate supervisor MCP transport from tool dispatch and proposal formatting.

Remaining stack

  • #525 — authoritative backend cleanup and destructive revalidation.
  • #526 — bounded gateway HTTP work and strict policy introspection.
  • #527 — gateway shutdown diagnostics.

Final stack extension

  • #528 — authoritative resource identities and bounded artifact transfers.

Validation: The complete eleven-PR stack passes all 2,520 unit tests; full-repository Pyright reports 0 errors; git diff --check passes.

Refs #444.

Final stack extension

  • #530 — cleanup execution and mandatory authenticated-secret integrity.

Final stack extension

  • #531 — bounded heavy Git and cleanup operations.

Final stack extension

  • #532 — fail-closed shared database and gateway credential permissions.
Code-quality and failure-boundary cleanup tracked by #444. This is the root of the cleanup stack. PRD 0082 records the project-wide failure-boundary review and covers findings 1–5; the requested line-count-only finding 6 is intentionally excluded. **In this PR** - Firecracker cleanup treats only `pgrep` exit 1 as an authoritative empty result and aborts destructive cleanup on operational scan failures. - Docker enumeration and gateway-address inspection fail closed instead of allocating from uncertain state. - Persisted egress credentials use separated encryption/MAC keys, authenticate ciphertexts, and migrate legacy rows after successful reprovision. - Orchestrator HTTP requests authenticate before body reads and enforce length, size, timeout, and concurrency limits. - Firecracker active enumeration reports live bottles to generic backend consumers. - The egress request coordinator is split into context resolution, Git policy, and route-policy stages. **Still to come in this stack** - #518 — migrate the orchestrator HTTP control plane to FastAPI/Uvicorn and finish streamed-body resource boundaries. - #523 — extract the egress policy pipeline from the mitmproxy lifecycle adapter. - #524 — separate supervisor MCP transport from tool dispatch and proposal formatting. **Remaining stack** - #525 — authoritative backend cleanup and destructive revalidation. - #526 — bounded gateway HTTP work and strict policy introspection. - #527 — gateway shutdown diagnostics. **Final stack extension** - #528 — authoritative resource identities and bounded artifact transfers. **Validation:** The complete eleven-PR stack passes all 2,520 unit tests; full-repository Pyright reports 0 errors; `git diff --check` passes. Refs #444. **Final stack extension** - #530 — cleanup execution and mandatory authenticated-secret integrity. **Final stack extension** - #531 — bounded heavy Git and cleanup operations. **Final stack extension** - #532 — fail-closed shared database and gateway credential permissions.
didericis-codex changed title from fix: fail closed on orchestrator auth and Docker enumeration to fix: complete fail-closed quality cleanup 2026-07-26 18:33:11 -04:00
didericis added the Kind/EnhancementKind/Security labels 2026-07-26 19:49:47 -04:00
didericis-codex changed title from fix: complete fail-closed quality cleanup to fix: fail-closed quality cleanup 2026-07-26 22:16:48 -04:00
didericis added 10 commits 2026-07-26 22:19:29 -04:00
didericis force-pushed chore/misc-quality-cleanup from adf68ff240 to 6e46a9b191 2026-07-26 22:19:29 -04:00 Compare
didericis added 1 commit 2026-07-26 22:58:15 -04:00
docs(prd): define authoritative failure boundaries
prd-number-check / require-numbered-prds (pull_request) Successful in 9s
test / unit (pull_request) Successful in 52s
test / integration-docker (pull_request) Waiting to run
test / coverage (pull_request) Blocked by required conditions
test / image-input-builds (pull_request) Successful in 2m42s
tracker-policy-pr / check-pr (pull_request) Failing after 12s
ecaf23cdb5
didericis-codex changed title from fix: fail-closed quality cleanup to fix: quality cleanup - fail-closed foundations (chunk 1/7) 2026-07-26 23:16:56 -04:00
didericis added 1 commit 2026-07-26 23:39:25 -04:00
docs(prd): extend authoritative cleanup boundaries
prd-number-check / require-numbered-prds (pull_request) Successful in 13s
test / image-input-builds (pull_request) Successful in 3m18s
test / unit (pull_request) Successful in 57s
test / integration-docker (pull_request) Successful in 1m9s
test / coverage (pull_request) Successful in 19s
tracker-policy-pr / check-pr (pull_request) Failing after 10m30s
0146450951
didericis-codex changed title from fix: quality cleanup - fail-closed foundations (chunk 1/7) to fix: quality cleanup - fail-closed foundations (chunk 1/8) 2026-07-26 23:40:41 -04:00
didericis added 1 commit 2026-07-26 23:55:43 -04:00
docs(prd): require cleanup execution integrity
test / image-input-builds (pull_request) Failing after 14m11s
test / unit (pull_request) Failing after 14m19s
prd-number-check / require-numbered-prds (pull_request) Failing after 14m25s
test / integration-docker (pull_request) Has been cancelled
test / coverage (pull_request) Has been skipped
tracker-policy-pr / check-pr (pull_request) Failing after 12m36s
3bb90da11c
didericis-codex changed title from fix: quality cleanup - fail-closed foundations (chunk 1/8) to fix: quality cleanup - fail-closed foundations (chunk 1/9) 2026-07-27 00:02:30 -04:00
didericis added 1 commit 2026-07-27 00:17:47 -04:00
docs(prd): bound heavy gateway operations
prd-number-check / require-numbered-prds (pull_request) Successful in 10s
test / unit (pull_request) Successful in 54s
test / coverage (pull_request) Has been skipped
test / integration-docker (pull_request) Has been cancelled
test / image-input-builds (pull_request) Successful in 53s
tracker-policy-pr / check-pr (pull_request) Failing after 14m19s
ff4da6f41e
didericis-codex changed title from fix: quality cleanup - fail-closed foundations (chunk 1/9) to fix: quality cleanup - fail-closed foundations (chunk 1/10) 2026-07-27 00:25:52 -04:00
didericis added 1 commit 2026-07-27 00:45:53 -04:00
docs(prd): require shared storage permissions
prd-number-check / require-numbered-prds (pull_request) Successful in 11s
test / image-input-builds (pull_request) Successful in 45s
test / integration-docker (pull_request) Successful in 1m8s
test / unit (pull_request) Successful in 2m30s
test / coverage (pull_request) Successful in 25s
tracker-policy-pr / check-pr (pull_request) Failing after 12m49s
3dbf1780b4
didericis-codex changed title from fix: quality cleanup - fail-closed foundations (chunk 1/10) to fix: quality cleanup - fail-closed foundations (chunk 1/11) 2026-07-27 00:47:58 -04:00
didericis-codex closed this pull request 2026-07-27 01:35:06 -04:00
Some required checks failed
prd-number-check / require-numbered-prds (pull_request) Successful in 11s
test / image-input-builds (pull_request) Successful in 45s
test / integration-docker (pull_request) Successful in 1m8s
test / unit (pull_request) Successful in 2m30s
test / coverage (pull_request) Successful in 25s
tracker-policy-pr / check-pr (pull_request) Failing after 12m49s
Required
Details

Pull request closed

Sign in to join this conversation.