managed runner, deterministic benchmark, and causal evidence (PR3 draft of #377 split) - #822
Draft
BColsey wants to merge 4 commits into
Draft
managed runner, deterministic benchmark, and causal evidence (PR3 draft of #377 split)#822BColsey wants to merge 4 commits into
BColsey wants to merge 4 commits into
Conversation
This was referenced Aug 4, 2026
…cture, monitor identity Lay the sound skeleton for PR3's three own modules without overreaching into claim-producing logic: * ramdisk_support/supervision.py (NEW): a self-contained (stdlib + os) cgroup-v2 membership-based absence check that closes the setsid/ env-shedding descendant escape the donor leaves at the UID+nonce boundary. ``cgroup_descendants_absent`` declares absence only when ``/sys/fs/cgroup/<path>/cgroup.procs`` is empty, raises a clear RamdiskError off-Linux, and is the function the recovery layer calls IN ADDITION to the nonce scan. read_procs/platform_supported seams make the guard and enumeration independently testable. * benchmark.py: STRUCTURE only for the causal four-cell PIN/RAMMAP matrix. ``causal_four_cell_spec`` enumerates the four fixed cells (anon-PIN interleaved/local, tmpfs-RAMMAP interleaved/local) with a per-cell neutral counter skeleton (>=7 fresh replicates, DRAM traffic, file/anonymous/shmem accounting, NUMA placement, throughput/latency, output hashes). ``run_causal_four_cell_matrix`` returns a neutral result (claim=None, thresholds_defined=False); it makes NO paired-CI claim and is wired only through a cell_runner seam. * runtime_monitor.py: identity binding/revalidation scaffolding behind small helpers. _BoundResponse/_bind_response/_deployment_nonce/ _revalidate_binding bind a cached health/profile response to the (deployment_id, created_at, nonce) triple and revalidate it against the live identity before reuse. This is a scaffold/start, not complete: supervision is not yet wired into the recovery layer's stop/escalation path, the four-cell matrix has no real process launch or thresholds (so it intentionally claims nothing), and the monitor helpers are not yet invoked inside sample(). PR3's own tests (test_ramdisk_benchmark, test_ramdisk_runtime_monitor, test_ramdisk_benchmark_module, test_ramdisk_supervision) pass: 70 tests. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Draft successor — supersedes #377. Reconstructed from the frozen green donor
5f6f31a. Do not merge #377.docs/superpowers/specs/2026-08-01-pr-377-stabilization-design.md(PR3, L89-94, 99-123)docs/superpowers/specs/2026-08-02-pr-377-successor-reconstruction.mdScope
c/ramdisk_support/benchmark.py,c/ramdisk_support/runtime_monitor.pytest_ramdisk_benchmark.py,test_ramdisk_runtime_monitor.py,test_ramdisk_benchmark_module.pylifecycle.py/processes.py; live tmpfs cells oftest_rammap_e2e.py— split from PR1/PR2)Reconstruction work
setsid/env-shedding descendant escape the donor leaves at the cooperative UID+nonce attribution boundary.start/stopJSON (deferred from PR2).Dependency
Depends on PR2 (#821):
benchmark.pyimports.common/.accelerator;runtime_monitorimportsramdisk_support.processes(PR2). Started as DRAFT because the causal matrix and kernel-containment supervision are new reconstruction work.Build verification (subagent worktree)
from ramdisk_support import benchmark, runtime_monitorOK — PR2.common/.accelerator/.processesdeps present on this stacked branch). PR3 own tests GREEN:test_ramdisk_benchmark+test_ramdisk_runtime_monitor+test_ramdisk_benchmark_module= 47 passed / 0 failed. Full discovery hard-aborts only on PR2’s carried bundle self-check; no defect in benchmark/runtime_monitor.Reconstruction update
PR3 scaffold landed (commit 1be8751): NEW
ramdisk_support/supervision.py(cgroup-v2 membership absence check), causal four-cell matrix structure inbenchmark.py(neutral, claims nothing yet), runtime_monitor identity binding helpers. Green: 70 passed / 0 failed. Still TODO (large/new): wire supervision into recovery, real causal-matrix runner + thresholds, managed start/stop JSON.