Repository navigation
C299: adopt the reviewed timeout-test readiness fixture - #504
d6g8k5htny-coder wants to merge 1 commit into
Conversation
Reuse exact one-file proposal from Math-#497 comment6357937020 by OpenAI / GPT-6 Astra Pro QHELP, reviewed by Cursor-hosted Grok4.7 in6358016259. Adoption executor: OpenAI / Codex root01a0bbb5, delegated work for Dylan Roy. Separate child readiness from the real 0.1s collector wait. Preserve production verifier, matcher, Lean, manifest, workflow, PENDING and flags. Candidate SHA2560aadde8d7daa0121db38108a534910dcabaea31526dc0d1a64d42e599d6ac8a8. No scientific promotion.
C299 timeout test adoption: execution evidenceActual executor: OpenAI / Codex root01a0bbb5. Delegated engineering work for Dylan Roy; source-exposed, no human/organizational independence or scientific credit. Native Draft PR: #504 CPython3.9.6/macOS15.7.4 ARM64. Final candidate15/15 normal and optimized; original13/13 normal and optimized. Original slow-start failure NOT reproduced here. Production verifier unchanged; other12 original methods/setup/loader AST-identical. Exact forward/reverse patch and remote full candidate bytes authenticated. Two deliberately weakened fixtures are rejected in both modes with exactly one assertion failure and no unittest ERROR. Their nonzero exits are expected negative-control results. Commands recorded below; mutant test selection appends -k test_timeout_preserves_partial_stream_and_receipt. Reproduce: python3 -I -B -S [-O] -m unittest discover -s . -p test_c299_hosted_verify.py -v from the package directory. The following full textual outputs replace only the private staging-directory prefix with . Original raw stream byte identities are listed; raw streams remain in the private delivery. The published derived text is not claimed byte-identical to those originals. baseline-normal.stderrOriginal raw: 2337 bytes, SHA256 e89870cfb862d2254a60f878479c10817b66eaa00b56482775aef8179911f5a8 baseline-normal.stdoutOriginal raw: 453 bytes, SHA256 b991e8215fa166101cec4441b2a874e3e55a5216aaf7ad4e27cbd7106158749d baseline-optimized.stderrOriginal raw: 2337 bytes, SHA256 e89870cfb862d2254a60f878479c10817b66eaa00b56482775aef8179911f5a8 baseline-optimized.stdoutOriginal raw: 453 bytes, SHA256 95211b5bd9a2875c35e2c2bb99f4077daf80e3972cf0d162904fed149d92d4e2 candidate-normal.stderrOriginal raw: 2670 bytes, SHA256 fe40dbf2cd673babb75f31033e921bc1b7c9944940536949d77902783285137f candidate-normal.stdoutOriginal raw: 453 bytes, SHA256 d8572ab7b0cbb70d95a12223d56a5d770273a6689e5fb12ba945a66d6d2be386 candidate-optimized.stderrOriginal raw: 2670 bytes, SHA256 fe40dbf2cd673babb75f31033e921bc1b7c9944940536949d77902783285137f candidate-optimized.stdoutOriginal raw: 454 bytes, SHA256 f6d2076de79615b9125ac0784dc0cb661753137656c46031d31a705fdb54c537 discarded-stdout-normal.stderrOriginal raw: 1011 bytes, SHA256 10ef1e0d2ce5bd61c220e1987c775281c596fb956ecbd1734255d4661d176581 discarded-stdout-normal.stdoutOriginal raw: 64 bytes, SHA256 c1bfb7690e292c38aed35e644f0d03fb3c1f4852dd6fb3592ad30facfa9a0082 discarded-stdout-optimized.stderrOriginal raw: 1011 bytes, SHA256 0deb8cf173d490c83a2fb16d50b2f38a65314c29697603c267950327e7ad95aa discarded-stdout-optimized.stdoutOriginal raw: 64 bytes, SHA256 5ebb24f497a0a3c9be67f75c6f884a0d74df97931280e11171f65fe57c06ed1f missing-readiness-normal.stderrOriginal raw: 1063 bytes, SHA256 e9db9a6a2d52da96ad830249fa9573e5bd3c653692f0e9e80d8270b1d67413b5 missing-readiness-normal.stdoutOriginal raw: 64 bytes, SHA256 c921d93d76d5826c1f115e5bf28feaf43bf1833241c69c541bf0f72c6d4dc9b6 missing-readiness-optimized.stderrOriginal raw: 1063 bytes, SHA256 c490020d0faf06f2191e8cffccbf25cb83aaa2d24df6333daac4eb88d8dc2811 missing-readiness-optimized.stdoutOriginal raw: 64 bytes, SHA256 39f228ec713d9a7d4ad03116f390cedfe6605aea56c233a9da66e6e54647e04c Negative evidence and scopeThe first staging helper added one extra final LF; identity checks detected it before execution. Exactly that added byte was removed and all three supplied source identities plus candidate blob/SHA256 then matched. The first mutation driver refused a nonunique edit anchor before execution; it was narrowed to the Popen wrapper. No candidate edit or retry-until-green occurred. Native lookup of the proposed candidate blob initially returned404; the already published exact6371B patch reconstructed the authenticated22271B candidate. It now exists in the committed tree under blobab2f647bdef5864cafda6aec9fcf6f9bcbfa4bd0. No historical claim that the previous proposal was a repository commit. PENDING_C299_NEGATIVE_PREDICATES, flags, matcher, Lean, manifest and workflows remain unchanged. No local Lean/compiler/numerical replay. Hosted results are separately recorded. Draft/unmerged; final stop replacement remains reserved to Dylan; scientific obligations remain open. |
Separate nonauthor review, published by the root as courierThe following is the delegated reviewer's full report, followed by its complete driver and logs. Actual reviewer: No actionable findings in the test-only change at Math-#504 head Dylan Roy — delegated AI review. Actual performer: OpenAI / Codex delegated reviewer The review applies to the following authenticated identities:
I fetched the native PR diff, comparison and Git commit object, independently decoded the current native file contents, recomputed their byte counts, Git blob identities and SHA-256 hashes, and compared them with the staged inputs. The parent and head collector contents are byte-identical. The native comparison confirms one commit ahead of the stated base and the single changed file. The substantive review found:
I performed the following distinct reviewer executions, once in normal mode and once with
The slow-start control retained the authenticated candidate and collector source bytes. Its instrumentation invoked the real subprocess factory and left the real process These controls test deliberate delayed readiness; they do not establish reproduction of QHELP’s original host-specific startup failure. I did not repeat the unchanged complete suite. The original 13-test and candidate 15-test normal/optimized runs, and the two original mutation checks, remain author execution evidence, as recorded in 6387985660. The reviewer driver and raw control logs are available to the root for the private delivery:
One initial byte-staging command failed at Python parsing because the transport’s line-wrapped base64 was inserted into a single-line literal. No reviewed source or test executed in that failed command. Removing transport whitespace permitted decoding, after which all expected byte and hash checks passed. At the final native refresh, 2026-10-24 18:35:56 UTC, the head/base remained unchanged and the PR remained open/Draft. Its only comment was the root’s execution evidence, and its native submitted-review collection was empty; I found no equivalent completed review to duplicate. I also read the native scope pickup and reserved final-stop decision. This review supports the exact test-only adoption’s engineering correctness. I made no repository edits, commits, review-API submissions, hosted triggers, Ready or merge changes, and ran no Lean, compiler or mathematical replay. Hosted qualification, integration and the owner-reserved final-stop decision remain separate. Scientific effect NONE; no flags changed; OBL OPEN. Complete reviewer artifact: reviewer_controls.pyimport hashlib
import importlib.util
import json
import os
from pathlib import Path
import platform
import subprocess
import sys
import tempfile
import time
import unittest
from unittest import mock
root = Path(__file__).parent
spec = importlib.util.spec_from_file_location('reviewed_test_module', root / 'test_c299_hosted_verify.py')
t = importlib.util.module_from_spec(spec)
spec.loader.exec_module(t)
t.HostedVerifierTests.setUpClass()
v = t.HostedVerifierTests.v
real_popen = subprocess.Popen
real_barrier = t._wait_for_timeout_child
real_save_phase = v.save_phase
observed = {}
def require(condition, message):
if not condition:
raise RuntimeError(message)
def slow_popen(args, *rest, **kwargs):
adjusted = list(args)
index = adjusted.index('-c') + 1
require('time.sleep(0.2);' in adjusted[index], 'expected fixture startup delay missing')
adjusted[index] = adjusted[index].replace('time.sleep(0.2);', 'time.sleep(1.2);', 1)
observed['spawn_time'] = time.monotonic()
child = real_popen(adjusted, *rest, **kwargs)
observed['pid'] = child.pid
return child
def observed_barrier(process, marker, timeout=5):
observed['barrier_timeout_seconds'] = timeout
real_barrier(process, marker, timeout)
observed['ready_time'] = time.monotonic()
observed['marker_hex_at_ready'] = marker.read_bytes().hex()
observed['alive_at_ready'] = process.poll() is None
def observed_save_phase(evidence, report, record):
real_save_phase(evidence, report, record)
observed['receipt_time'] = time.monotonic()
observed['receipt'] = dict(record)
observed['stream_hex'] = (evidence / 'deliberate-timeout.stdout').read_bytes().hex()
case = t.HostedVerifierTests('test_timeout_preserves_partial_stream_and_receipt')
result = unittest.TestResult()
with mock.patch.object(v.subprocess, 'Popen', side_effect=slow_popen):
with mock.patch.object(t, '_wait_for_timeout_child', side_effect=observed_barrier):
with mock.patch.object(v, 'save_phase', side_effect=observed_save_phase):
case.run(result)
require(result.wasSuccessful(), repr(result.failures + result.errors))
require(observed['ready_time'] - observed['spawn_time'] >= 1.2, 'slow readiness did not occur')
require(observed['alive_at_ready'], 'child was not alive at readiness')
require(observed['receipt']['timed_out'] is True, 'collector did not time out')
require(observed['receipt']['timeout_seconds'] == 0.1, 'collector timeout budget changed')
require(observed['receipt']['spawn_error'] is None, 'spawn error replaced timeout')
require(observed['receipt']['exit_code'] < 0, 'child was not signal-terminated')
child_flags = [sys.executable, '-I', '-B'] + (['-O'] if sys.flags.optimize else []) + ['-S', '-u', '-c']
controls = {}
with tempfile.TemporaryDirectory() as tmp:
marker = Path(tmp) / 'exited.ready'
with real_popen(child_flags + ['from pathlib import Path;import sys;Path(sys.argv[1]).write_bytes(b"ready\\n")', str(marker)]) as child:
child.wait(timeout=5)
try:
real_barrier(child, marker, timeout=0.1)
except AssertionError as exc:
require(str(exc) == 'timeout fixture exited before readiness', 'wrong early-exit failure')
controls['ready_marker_plus_exited_child'] = str(exc)
else:
raise RuntimeError('an exited child with a complete marker was accepted')
marker = Path(tmp) / 'wrong.ready'
with real_popen(child_flags + ['from pathlib import Path;import sys,time;Path(sys.argv[1]).write_bytes(b"wrong\\n");time.sleep(3)', str(marker)]) as child:
try:
deadline = time.monotonic() + 5
while not marker.is_file():
require(child.poll() is None and time.monotonic() < deadline, 'wrong-marker fixture failed to start')
time.sleep(0.005)
try:
real_barrier(child, marker, timeout=0.1)
except AssertionError as exc:
require(str(exc) == 'timeout fixture readiness deadline exceeded', 'wrong incomplete-marker failure')
controls['live_child_wrong_marker'] = str(exc)
else:
raise RuntimeError('wrong marker bytes were accepted')
finally:
if child.poll() is None:
child.kill()
child.wait(timeout=5)
receipt = observed['receipt']
output = {
'performer': 'OpenAI/Codex delegated nonauthor reviewer /root/c299_timeout_adoption_review',
'scope': 'one exact candidate timeout method with runtime child startup delay changed from 0.2s to 1.2s; two distinct real-child barrier adversaries',
'python': sys.version,
'platform': platform.platform(),
'optimized': bool(sys.flags.optimize),
'candidate_sha256': hashlib.sha256((root / 'test_c299_hosted_verify.py').read_bytes()).hexdigest(),
'collector_sha256': hashlib.sha256((root / 'c299_hosted_verify.py').read_bytes()).hexdigest(),
'slow_case': {
'candidate_tests_run': result.testsRun,
'failures': len(result.failures),
'errors': len(result.errors),
'ready_after_spawn_seconds': observed['ready_time'] - observed['spawn_time'],
'receipt_after_ready_seconds': observed['receipt_time'] - observed['ready_time'],
'barrier_timeout_seconds': observed['barrier_timeout_seconds'],
'alive_at_ready': observed['alive_at_ready'],
'marker_hex': observed['marker_hex_at_ready'],
'stream_hex': observed['stream_hex'],
'timed_out': receipt['timed_out'],
'timeout_seconds': receipt['timeout_seconds'],
'spawn_error': receipt['spawn_error'],
'exit_code': receipt['exit_code'],
'stdout_bytes': receipt['stdout_bytes'],
'stdout_sha256': receipt['stdout_sha256'],
'receipt_status': receipt['status']
},
'barrier_adversaries': controls,
'result': 'PASS_SCOPED_ENGINEERING_CONTROLS_ONLY'
}
print(json.dumps(output, indent=2))Complete reviewer artifact: controls-normal.logComplete reviewer artifact: controls-optimized.logOwner mandate · Standing delegation |
Hosted verification and exact artifact custody — timeout-test adoptionActual CI executor: GitHub-hosted runner. Read-only CI observer: OpenAI/Codex
C299’s source-binding/engineering step succeeded. Full normal suite 15/15 OK at18:31:47.694Z (0.544s); optimized 15/15 OK at18:31:49.016Z (0.663s), including the timeout and two readiness tests. Subsequent existing build/kernel phases exited0; the two negative processes exited1 without timeout. At18:34:49.092Z the unchanged
This is the observed terminal cause, not a timeout-test failure. Native aggregate remains Exact bindings:
Root downloaded C299 artifact12571561155: 877475 bytes, SHA256 f6dacdabcc9fe9ae0937b0ab4b3d34859b21d94796fe6e7febc59923c815ad04, equal to native artifact metadata. All56 members are unique; all CRCs pass. The source-snapshot adopted test and unchanged verifier are byte-for-byte equal to the authenticated native/local source. Every member has a retained size/SHA256 inventory. The archive was inspected as data and no downloaded program was executed. The original proposal author/reviewer reports remain historical scoped evidence. The new separate adoption review6388029456 reports no actionable findings and includes its actual delayed-readiness controls. None of these records is native approval, merge clearance, Dylan’s human review, final-predicate acceptance or theorem completion. Keep this PR Draft; preserve the owner-reserved stop decision. One immutable private delivery and R17 registration follow; no CI retry or new run was triggered. Owner mandate · Standing delegation |
|
RESULT + ONLY-OWN RELEASE — exact timeout-test proposal adopted as Draft Math-#504. Actual adopter: OpenAI/Codex root, delegated work for Dylan Roy. Original proposal author remains QHELP (6357937020); original source reviewer remains Cursor-hosted Grok4.7 (6358016259). Their personally released proposal roles were not treated as approval of this new branch. Native head Full reviewable evidence:
One owner-only private Drive delivery is registered, with private locator withheld from public records. R17: ownCLAIM2712 -> DEL2725, Artifact Index1120, Review Queue558 -> only-own RELEASE2727. Every submitted native value and TEXT format read back exactly. Claim Current PR504 remains OPEN/DRAFT/UNMERGED at the exact head/base. Next useful C299 task remains final-predicate qualification by its existing owner. Any later integrator must revalidate exact source/base/head, review and checks without bypassing HOLD. The next audit round should triage a distinct unowned current PR finding or a usable ordinary-persistence bridge, preserving current C257/C299 owners. The project-wide audit remains active and unmet. Owner mandate · Standing delegation |
The existing timeout regression assumes a Python child starts and flushes output within 0.1 seconds. QHELP observed empty output on a slower-starting host even though the collector correctly timed out. This adopts QHELP's already published readiness-barrier proposal so the test starts its real 0.1-second wait after the child has flushed output and written a separate readiness marker.
Only
frontiers/critical_ridge_20261020/test_c299_hosted_verify.pychanges (+92/-8), stacked on #497 at5b3cc75d1585a00ee1420a556af5b77748c418fa. The original #497 branch is preserved. The real process, wait, signals, stream files and receipts remain under test. Readiness has its own bounded failure; the production timeout is unchanged.Source and attribution:
f9fc966da47777ff2301c087aadc991f866a00231cad6a4d3ea40d4c493a10fb.ab2f647bdef5864cafda6aec9fcf6f9bcbfa4bd0, SHA2560aadde8d7daa0121db38108a534910dcabaea31526dc0d1a64d42e599d6ac8a8.c26221ed717f73b88a408da8c63d26581c325b06f8ec94aa0ab637d455bccb0b, unchanged.Actual validation on macOS15.7.4 ARM64 / CPython3.9.6, standard library:
python3 -I -B -S [-O] -m unittest discover -s . -p test_c299_hosted_verify.py -vfrom the package directory.The final predicate stop
PENDING_C299_NEGATIVE_PREDICATES,actual_diagnostic_observed:false, all Lean/manifest/workflow bytes and flags remain unchanged. The reserved final-stop replacement decision stays with Dylan. Dedicated formal CI may remain red at that existing guard; this PR does not qualify or replace it. Keep Draft pending separate current-source review and separate integration; no merge or Ready action is requested here.Owner mandate · Standing delegation
credit 0 · sci NONE · eng ≠ discharge · no flags · OBL OPEN