Skip to content

Draft the V5 diagnostic-prequalification harness - #3601

Open
joshlf wants to merge 1 commit into
Gbwo6xhidw7eogojb7aokfi2gthtzr6wqfrom
Ghh32fbkyuqkrndyfjzwwarkb4dmfosug
Open

Draft the V5 diagnostic-prequalification harness#3601
joshlf wants to merge 1 commit into
Gbwo6xhidw7eogojb7aokfi2gthtzr6wqfrom
Ghh32fbkyuqkrndyfjzwwarkb4dmfosug

Conversation

@joshlf

@joshlf joshlf commented Aug 29, 2026

Copy link
Copy Markdown
Member

Add an explicitly unsealed V5 evaluation design that can be reviewed before any semantic agent sees a fixture. The draft defines eight modes, three conditions, five replicates per cell, 109 theorem atoms, closed defect rules, 31 controls, fixture manifests, authority material, and exact schemas for the planned collection and scoring pipeline.

Add seven new fixture trees, reuse the V4 predicate fixture by declaration, and preserve the current V5 runtime skill as a content-addressed frozen package. The package bytes are intentionally exact, including existing Markdown hard line breaks.

Add deterministic schedule generation, atom and gate composition, scorer and consistency data structures, attempt leasing/finalization primitives, word counting, projection contracts, and synthetic self-tests. Keep the run conspicuously DRAFT/UNSEALED: twenty-five blocking integration hooks and a constant static-integrity failure prevent the scaffolding from producing a favorable diagnostic result or being mistaken for release evidence.

No reports, scores, adjudications, condition maps, seeds, lock, or results are included. This commit preserves the pre-integration design as a reviewable baseline; the next phase must repair and implement the promotion/runtime path before any evaluation launches.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T10:50:55.382481Z 091e9d6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov-commenter

codecov-commenter commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.85%. Comparing base (3253c71) to head (953089a).

Additional details and impacted files
@@                        Coverage Diff                         @@
##           Gbwo6xhidw7eogojb7aokfi2gthtzr6wq    #3601   +/-   ##
==================================================================
  Coverage                              91.85%   91.85%           
==================================================================
  Files                                     20       20           
  Lines                                   6093     6093           
==================================================================
  Hits                                    5597     5597           
  Misses                                   496      496           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 091e9d6f5a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +3121 to +3124
def verify_draft() -> None:
from prepare import verify_draft as verify_preparation

verify_preparation()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid creating artifacts during draft verification

On a clean writable checkout, a normal protocol.py verify-draft invocation imports prepare, which creates __pycache__/prepare.*.pyc inside the run tree; the same invocation then rejects that artifact at the scan near the end of verify_draft. This makes the documented draft verification fail unless callers happen to set PYTHONDONTWRITEBYTECODE, so load the helper without bytecode output or perform the artifact check before importing it.

Useful? React with 👍 / 👎.

Comment on lines +4092 to +4096
validate_direct_score(
read_json(args.score),
read_json(args.atoms),
read_json(args.rules),
args.scorer,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pass bound inputs through the scoring CLI

Every invocation of validate-score reaches validate_direct_score without an input packet, so it always raises ProtocolError("direct score validation requires the exact launch-bound input packet"); the neighboring consistency, adjudication, and merge dispatches are likewise still wired to older signatures and raise TypeError because their required score packets, two consistency reviews, and evidence digest are absent. The parser also exposes no options for these inputs, leaving the entire scoring pipeline unusable through protocol.py.

Useful? React with 👍 / 👎.

Comment on lines +4150 to +4151
elif args.command == "lease":
print(pretty_json(acquire_lease(args.state_root, args.slot, args.agent, args.envelope_spec)), end="")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Supply the launch record and attempt root when leasing

Any protocol.py lease invocation immediately fails because acquire_lease requires (state_root, launch_path, agent_id, spec_path, attempt_root), while this dispatch passes only four arguments and treats the slot ID as the launch path. The parser has neither a launch-record option nor an attempt-root option, so callers cannot acquire the prerequisite lease and consequently cannot use the sealing workflow.

Useful? React with 👍 / 👎.

Comment on lines +3965 to +3969
unreadable = failed_output / "report.md"
unreadable.write_text("unreadable synthetic report\n", encoding="utf-8")
os.chmod(unreadable, 0)
try:
seal_attempt(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make the failed-seal self-test independent of privileges

When the self-test runs as root or another process able to bypass discretionary read permissions, changing the report to mode 000 does not make it unreadable, so seal_attempt succeeds and the test raises synthetic failed seal unexpectedly succeeded. This occurs in privileged CI/container environments and prevents the advertised synthetic self-test from passing; trigger a deterministic capture failure instead of relying on file permission denial.

Useful? React with 👍 / 👎.

Comment on lines +3185 to +3188
"freeze/controls.json",
"freeze/controls-completeness.md",
"freeze/validate_controls.py",
"freeze/validate_oracle_materials.py",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include fixture manifests in draft verification

The static verifier requires and runs the control and oracle validators but omits freeze/validate_fixture_manifests.py and every freeze/fixtures/*.json file. After working around the bytecode issue, protocol.py verify-draft still succeeds when both that validator and a fixture manifest are deleted, so missing or malformed hidden fixture definitions can pass the advertised harness validation and reach later integration unnoticed.

Useful? React with 👍 / 👎.

Comment on lines +2454 to +2458
chunk = os.read(fd, 1024 * 1024)
if not chunk:
break
chunks.append(chunk)
after = os.fstat(fd)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bound output reads before buffering files

If an agent writes an unexpectedly large or sparse output file, scan_output reads the entire file into an in-memory chunk list and joins it before capture_envelope checks either the per-file or total-output limit. A malformed attempt can therefore exhaust coordinator memory and abort sealing instead of producing the intended oversize violation; enforce the bound while streaming or reject from the stable file size before allocating its contents.

Useful? React with 👍 / 👎.

Comment on lines +32 to +34
- Scoring: two blind mode-level direct-decision scorers each see all A–O in an
independent order (16 scorer agents total), one condition-blind consistency
review per mode, and at most one adjudicator per mode. The deterministic

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align the documented consistency-review count

The plan and scoring policy specify one consistency review per mode, but the generator schedules both c1 and c2, the schemas describe two independent reviews, and merge_final_scores requires both. An integration following the stated design would allocate eight consistency agents and then be unable to build or merge the required packets because all sixteen reviews are mandatory in the executable protocol; choose one topology and update the plan, policy, schedules, and validators consistently.

Useful? React with 👍 / 👎.

Comment on lines +2385 to +2389
lease = {
"schema_version": 1,
"status": "STARTED",
"slot_id": slot_id,
"attempt_id": f"{slot_id}-{secrets.token_hex(12)}",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep generated attempt IDs within the accepted length

For any otherwise valid slot ID longer than 103 characters, appending the hyphen and 24-character token produces an attempt_id longer than the 128-character limit enforced by require_safe_id. acquire_lease writes and returns that lease without validating the generated ID, but every later seal_attempt or verify_state call rejects it, permanently stranding a slot that the launch-record schema accepted.

Useful? React with 👍 / 👎.

Comment on lines +258 to +263
flags = os.O_WRONLY | os.O_CREAT | os.O_EXCL | getattr(os, "O_NOFOLLOW", 0)
fd = os.open(path, flags, 0o600)
try:
view = memoryview(data)
while view:
written = os.write(fd, view)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Publish exclusive ledgers atomically

If the process crashes or a write/fsync fails after the final-path O_EXCL open, exclusive_write leaves a zero-length or partial ledger at its authoritative name. This helper publishes leases, terminal claims, failures, and canonical pointers, so subsequent operations treat the path as already claimed while verify_state cannot parse it; write and fsync a private temporary file first, then use an atomic no-replace publication step for the terminal name.

Useful? React with 👍 / 👎.

Comment on lines +155 to +159
def canonical_json_bytes(value: Any) -> bytes:
return (
json.dumps(value, sort_keys=True, separators=(",", ":"), ensure_ascii=False)
+ "\n"
).encode("utf-8")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject non-finite values from canonical JSON

When coordinator metadata contains Python's accepted NaN or infinity literals, json.dumps emits the same non-standard tokens because allow_nan defaults to true. The resulting content-addressed envelope is accepted by this module's equally permissive parser but is not valid JSON under the supplied schemas and fails strict downstream parsers, so canonical serialization must reject non-finite values.

Useful? React with 👍 / 👎.

Add an explicitly DRAFT/UNSEALED eight-mode, three-condition,
five-replicate-per-cell diagnostic design. After independent review, correct
and validate the 115-atom, 35-control oracle, including F's unavailable-root
and fan-out separation and Q's invalid-str invariant escape and later-UB
semantics.

Bind exact fixture surfaces, frozen skill packages, V4 lineage, authority
propositions and quotations, deterministic schedules, schemas, projection
contracts, and strict-JSON semantic validators. Preserve synthetic self-tests
for schedule generation, atom and gate composition, attempt lifecycles,
projection, scoring, consistency, and aggregation data structures.

Keep the design conspicuously non-executable as release evidence: blocking
integration hooks and a static-integrity failure prevent promotion, and no
reports, scores, adjudications, condition maps, seeds, lock, or result are
recorded.

gherrit-pr-id: Ghh32fbkyuqkrndyfjzwwarkb4dmfosug
@joshlf
joshlf force-pushed the Ghh32fbkyuqkrndyfjzwwarkb4dmfosug branch from 091e9d6 to 953089a Compare August 29, 2026 11:11
@joshlf
joshlf force-pushed the Gbwo6xhidw7eogojb7aokfi2gthtzr6wq branch from ddfd561 to 3253c71 Compare August 29, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants