Qualify resource and watchdog accounting controls - #56
Open
dovvnloading wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the next Phase 2 release-gate slice for bounded resource and watchdog accounting.
What changed
scratch.auto.v1andartifact.transform.v1resource budgets with hard ceilings for wall time, CPU, memory, messages, input/output bytes, console bytes, and observations.resource-watchdog.v1qualification corpus, Windows kill-on-close descendant reaping, regression tests, CI strict gating, and updated ADR/evidence documentation.HRESULTbinding fallback; this fixes the CI-only failure on the repository's Python 3.11 runner.Root cause
The prior qualification queried configured Job Object limits but did not prove actual accounting or deterministic logical watchdog behavior. While implementing the accounting query, the native probe exposed an ABI defect: the Windows basic accounting structure requires both per-period user and kernel-time fields; omitting the kernel field caused
ERROR_BAD_LENGTH. The first remote run then exposed a second portability gap: CPython 3.11/3.12 does not exposectypes.wintypes.HRESULT. Both the structure and the HRESULT binding are now corrected and covered.Release interpretation
This closes the fixed-control resource/watchdog qualification gate only. Provider enablement remains blocked until the immutable signed worker generation, live broker identity binding, external security review, and production lifecycle health gates are complete. No host-process fallback or provider authorization was added.
Validation
python -m pytest -q— 289 passed, 1 expected Windows-platform skip, 1 warning on the GitHub Python 3.11 runner.python tools/execution_spikes/resource_watchdog_qualification.py --json --strict— 15/15 passed on the GitHub Python 3.11 runner and local Python 3.12/3.14; corpus digest5eac03e2b4981543.python tools/execution_spikes/artifact_security_review.py --json --strict— 12/12 passed.python -m compileall -q main.py backend tests tools/execution_spikes— passed.git diff --check— passed.Ready for maintainer review and merge.