Add controlled runtime verification - #10
Draft
200lz wants to merge 7 commits into
Draft
Conversation
Real llama.cpp answers every controlled endpoint with
"Content-Type: application/json; charset=utf-8". OMIV compared the recorded
response content type for raw equality against "application/json", so A6
Attempt 4 saw /health return HTTP 200 {"status":"ok"} 23 consecutive times and
still refused readiness with "controlled server readiness deadline expired".
RFC 9110 permits media-type parameters, so compare only the type/subtype.
Add one fail-closed is_json_media_type predicate and use it at all six response
sites: readiness, tokenize and completion on both the live execution path and
the offline verification path, so the two can never disagree about the same
evidence bytes. Outbound request-header invariants are unchanged.
The synthetic fixture emits a bare media type, which is why CI never observed
this class; the regression drives the fixture's single header site with the
llama.cpp form through the real controlled runtime and re-verifies the written
evidence offline.
200lz
force-pushed
the
codex/p7b3-controlled-runtime-verification-20260815T153049Z
branch
from
August 17, 2026 14:15
2fdd96b to
976aca8
Compare
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.
Phase 7B.3 adds a controlled runtime verification path: a canonical controlled
request, plan, execution, evidence, and offline verification, bound to a stable
executable and loaded-artifact identity within a single pinned runtime profile.
Stacked on #9 (
codex/p7b2-runtime-evidence-ingestion-20260815T060125Z), which isitself stacked on #8.
What this changes
status. Runner-authored text has no authority.
allocation; bounded stdout/stderr collection.
fixed-PNG, and drafter bindings; post-shutdown work inspection; controlled
cleanup evidence.
setsid,setpgid, leader exit, double-fork,an atomic pre-exec gate, PID-namespace containment independent of
/proc, andseparate bounded binary supervisor channels for stdout and stderr.
bytes, 716,989,504 evidence bytes — replacing the previous shared 64 MiB
ceiling. A 464,256,193-byte evidence object completes canonical write, load,
and offline verification.
and privacy / no-partial-output enforcement.
Loader hardening in this change
Untrusted JSON pathnames are opened exactly once, atomically, with
O_NOFOLLOW.A platform lacking the flag, or a kernel rejecting it, fails closed before any
open or read, and the open is never retried without it. The previous
non-following
statfallback is removed: a following open after such a check canbe raced by replacing the pathname with a symlink to the same inode, which a
device/inode comparison would still accept. The fail-closed gate is evaluated on,
and returns, the exact value used as an open flag, so a non-integer, a boolean,
or a value that is truthy yet truncates to zero cannot admit a following open.
What this does NOT claim
This is the important part of this PR.
reaches five PASS stages, 4/4 probes, and
VERIFIED_WITHIN_PROFILE. Thatexercises the machinery. It says nothing about any real model.
BLOCKEDpending a real pinned GPU run. No Museverdict is asserted by this change.
five processes
INCOMPLETE, all five runtime stagesUNKNOWN, the fixed-PNGpredicate
OBSERVEDrather than PASS, three artifactsMATCHED_PLAN_OBSERVATION, zero artifact payloads upgraded to verified fromreport prose, and drafter PNG and Ollama
NOT_RUN.Ingested external evidence is a planning input only; it is structurally
incapable of yielding
VERIFIED_WITHIN_PROFILE.production-readiness claim is added, and no claim of general Muse Glimmer
compatibility or source-to-GGUF binding.
Any verdict this code can produce is scoped to one pinned runtime profile and to
the specific artifact and executable identities recorded in its own evidence.
Validation
Full hermetic offline suite: 2386 passed, 10 expected integration skips. Strict
mypy over 261 source files,
ruff check,compileall, andgit diff --checkall clean. Public-release-readiness audit:
classification=PASS, 22/22 checkspassed.
An independent read-only review of the loader hardening recorded no P0/P1/P2
findings. Known residual P3 items are tracked as follow-up: the open precedes the
S_ISREGcheck so a directly named device node with open-time side effects isnot fully covered; three of the added no-follow tests also pass against the prior
code on Linux, so regression coverage for the removed race rests on the
missing-flag test; and several unrelated readers
(
payload_integrity/observation.py,tokenizer_parity/observation.py,provenance/loading.py,provenance/adapters.py,tokenizer_parity/artifact_index.py, and twocli.pysites) retain weakersymlink handling on independent code paths not reachable from this loader.