Enforce resource quotas for untrusted sandboxes - #246
Conversation
|
INDEPENDENT_REVIEW: REQUEST_CHANGES Exact head reviewed: Hosted CI run 33170905762 is Blocking findings:
These behaviors violate issue #51's requirement to retain auditable configured limits, peaks, and termination cause, and spec 06 §10's explicit rule that a missing/corrupt control receipt cannot be interpreted as normal completion and successful publication must content-bind the resource receipt. Required before approval:
Please do not merge or close #51 on the current head. |
|
INDEPENDENT_REVIEW: REQUEST_CHANGES Exact head reviewed: Review scope: Issue #51 resource-quota contract; the d3604d9 failed packed-overlay receipt plus weak resume/audit/proposer binding; the a88a6f1 same-UID supervisor boundary, proposal execution atomicity, materialization wrapper/CAS audit and baseline/generated staging-claim lifecycle; exact-head production callers, tests and regressions. Verified improvements:
Independent exact-head validation passed: 6 targeted unit files / 22 tests, and 3 targeted E2E files / 11 tests (resource bombs, PID isolation, V011 admission and proposal sandbox). Blocking regression:
A read-only exact-head fault-state reproduction produced: {"manifestBefore":null,"retryError":"publish: final path already exists: .../gateway-receipts.json"}The added V011 boundary tests quarantine Required before approval:
|
|
INDEPENDENT_REVIEW: REQUEST_CHANGES Exact head reviewed: Independent read-only validation passed:
The exact-head repair closes the prior process-restart Three durability/audit blockers remain under the repository contract, which explicitly includes partial disk writes and requires durable intent before side effects:
Required before approval:
Review was independent and read-only. I did not edit files, commit, push, merge, close the issue, or rely on the implementation agent for the conclusion. Do not merge PR #246 or close Issue #51 on this head. |
|
INDEPENDENT_REVIEW: REQUEST_CHANGES Exact head reviewed: Independent read-only validation passed:
The exact head fixes the prior blockers around cgroup/resource enforcement, trusted-supervisor PID isolation, semantic resource validation, V011 execution/materialization authority, stable pre-manifest quarantine, gateway file/directory fsync ordering, atomic manifest publication, and stable resource-bundle replay. One blocking audit bypass remains in the new stable gateway-bundle verifier. A read-only exact-head reproduction published a manifest-valid proposal/resource/idempotency bundle whose only gateway receipt was: {
"requestId": "",
"requestHash": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
"responseHash": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
"routeHash": "sha256:6666666666666666666666666666666666666666666666666666666666666666",
"attempts": [null],
"error": ""
}
Required before approval:
Review was independent and read-only. I did not edit files, commit, push, merge, or close the issue. Do not merge PR #246 or close Issue #51 on this head. |
|
INDEPENDENT_REVIEW: REQUEST_CHANGES Exact head reviewed: Hosted CI run 33186141043 is Independent exact-head validation passed:
The latest patch does close the four concrete Two blocking audit gaps remain:
Required before approval:
Do not merge PR #246 or close Issue #51 on this head. This review was independent and read-only: I did not edit files, commit, push, merge, or close the issue. |
|
INDEPENDENT_REVIEW: REQUEST_CHANGES Exact head reviewed: Hosted CI run 33188550906 completed Independent read-only validation passed:
Verified repairs: the producer-owned shared validator rejects failure-only, success-with-error, post-success/non-retryable continuation and malformed receipt rows; stable final audit calls it with the frozen route; V011 execution load and materialization binding now reject One blocking V011 final-audit coverage gap remains. That misses a valid production state: the engine records Required before approval:
This head is not mergeable for Issue #51 closure. Do not merge PR #246 or close Issue #51 yet. Review was independent and read-only; I did not edit files, commit, push, merge, or close anything. |
|
INDEPENDENT_REVIEW: REQUEST_CHANGES Exact head reviewed: Hosted CI run 33191159992 completed Independent read-only validation:
The Two blockers remain.
Required before approval:
Do not merge PR #246 or close Issue #51 on this head. This review was independent and read-only; I did not edit files, commit, push, merge, or close anything. |
|
INDEPENDENT_REVIEW: REQUEST_CHANGES Exact head reviewed: Hosted CI run 33194958685 completed Independent read-only validation passed:
The new exporter does fsync every staged file and directory plus each authoritative parent rename/removal boundary before execution publication. Cached adoption and final audit also recompute the installed child tree and bind it to both Two blocking authority/recovery gaps remain:
{"inventory":[],"selectedMaterializationCount":1,"selectedActionRoot":"/tmp/review-actions/proposal-1-1/incomplete-executions/retained/proposal-1-1","selectedBasename":"proposal-1-1"}The recursive walker also silently ignores symlink/special entries (
Required before approval:
Do not merge PR #246 or close Issue #51 on this head. Review was independent and read-only: I did not edit files, commit, push, merge, or close anything. |
|
INDEPENDENT_REVIEW: REQUEST_CHANGES Exact PR head reviewed: Hosted CI run 33198187681 has the exact head SHA but is still Verified repairs:
Two cache-publication/adoption blockers remain:
Add negative tests for non-ENOENT cleanup/probe failure and an out-of-action cache hardlink, rerun exact-head hosted CI, and obtain a fresh independent review. Do not merge PR #246 or close Issue #51 on this head. Review was independent and read-only; I did not edit files, commit, push, merge, or close anything. |
|
INDEPENDENT_REVIEW: REQUEST_CHANGES Exact PR #246 head reviewed for Issue #51: Hosted CI run 33200808537 completed Independent read-only validation passed:
The two One publication blocker remains, so this head cannot close Issue #51:
{"outcome":"RESOLVED","requested":"ENOENT","movedBytes":"{\"ok\":true}\n"}A second exact-head probe simply unlinked the final path at that checkpoint. Cleanup removed the remaining staging link and again returned success with no authority name: {"outcome":"RESOLVED","requested":"ENOENT"}This is the unclosed half of the prior requirement to “prove the final authority file is still canonical and directory-durable before returning.” It is production-relevant: Required before approval:
Do not merge PR #246 or close Issue #51 on this head. Review was independent and read-only; I did not edit files, commit, push, merge, or close anything. |
|
INDEPENDENT_REVIEW: APPROVE Exact PR head reviewed: Hosted CI run 33203320750 completed Independent read-only validation passed:
The two
Static inspection confirms the action-directory and staging descriptors stay open through cleanup; cleanup checks staging inode identity; success requires the requested directory to match the held dev/inode and the final path to match the staged regular single-link inode, stable metadata, and exact bytes. The held directory is fsynced and all authority checks are repeated before return. A 200-publication descriptor probe had FD delta 0. Earlier blockers remain repaired: non-ENOENT staging inspection errors propagate; hardlinks introduced before or during load are never adopted; cache/execution/children are de-authorized together into fresh single-link retained evidence while durable gateway state remains; active inventory, resource-receipt semantics, cgroup quotas, manifest-last execution, installed-tree binding, and crash recovery all passed their regressions. No correctness, security, evidence, or Issue #51 closure blocker remains on this exact head. PR #246 is approved for merge; Issue #51 may be closed after the exact approved PR is merged. Review was independent and read-only. I did not edit files, commit, push, merge, or close the issue. |
Summary
/dev, disabled nested user namespaces, empty target capabilities, and whole-domain teardownCOMPLETEDwith exit 0/no signalIndependent review blocker resolution
Earlier reviews found and drove fixes for semantic resource receipts, the same-UID supervisor boundary, proposal publication/CAS/staging crash windows, manifest-less stable bundle recovery, disk durability around gateway and manifest publication, exact gateway schema/route validation, completed-receipt terminal semantics, and replay of every V011 materialization rather than only retained generations.
Exact-head review of
aeaea55246415f522cdfccde0bdc0dceea7b6f0cfound two crash/evidence gaps: an extra manifest-committed execution without a materialization was outside audit enumeration, and trusted child export returned without fsyncing files/tree/parent replacement boundaries.4224a080c417265d9abe91cb55639094286cb2c1added active manifest/materialization inventory, durable child export, installed-tree digest binding and committed execution/tree recovery.Exact-head review of
4224a080c417265d9abe91cb55639094286cb2c1then found that semantic replay rescanned quarantined materializations after inventory, active symlink/special entries were silently ignored, and a present or torn materialization cache bypassed recovery.38eb413ef7b80f0f664d7d037db07611f9cb9fc5changed inventory and replay to one direct canonical action scan, rejected non-canonical active entries, and added fsynced no-clobber cache publication plus pre-adoption recovery.Exact-head review of
38eb413ef7b80f0f664d7d037db07611f9cb9fc5found two remaining fail-open paths: an inaccessible staging cleanup probe was converted to “absent”, and a cache inode with an external hard-link alias could be adopted.f6a6754f0d996ad079f1d9e2ee210688d252ad18propagates staging inspection/cleanup failures, requires a regular single-link cache, reads it through anO_NOFOLLOWheld descriptor with stable inode/metadata checks before and after the read and adoption, and quarantines any multi-link cache with its execution/tree. Multi-link quarantine bytes are copied into fresh fsynced inodes so an external alias cannot mutate retained evidence; durable gateway request state remains active for deterministic replay.Exact-head review of
f6a6754f0d996ad079f1d9e2ee210688d252ad18then found publication could still resolve after the action directory was renamed/recreated or the final authority name was removed after the first directory fsync. Exact head8598ade5b0968594500e070b49ef0abf7f175f2dholds the original directory and staging descriptors through cleanup, requires the requested directory to retain the same dev/inode, verifies the final path is the exact stable single-link staged inode with unchanged metadata and bytes, fsyncs the held directory, and repeats those checks before returning. Regressions cover both directory replacement and final-name removal. A fresh exact-head independent review remains required.Validation
This is a denial-of-service containment/evidence repair and makes no benchmark or promotion claim.
Closes #51