Repository navigation
Guard K4 timing test under host load: repeat rounds on a bound failure, host factor beside the exceeding measurement - #594
seathatflowsinourveins wants to merge 2 commits into
Conversation
…ctor beside the exceeding measurement After the guard reinstall on 2026-10-02 the workstation, at a load average of 25 to 50 from other lanes' measurement workers, failed test_k4_timing on linear work: whole-check processor times of 0.58 to 0.65 s against a host-scaled bound of 0.56 s, with a different set of helpers each run. A host factor taken once at the start missed contention that moves during the run, and a helper repeated its rounds only when the growth exponent failed. Now: - a helper repeats its round (up to three, elementwise minimum per size) when an absolute bound fails too, and a repeated round divides its times by the host factor measured just before and after it; - a row's child keeps the minimum of its three spans (the least-disturbed run) and, only when that exceeds the workstation bound, asks for the host factor by two reference runs right after. An unloaded run costs the same as before. Three runs at a load average of 25 to 30 passed (51 to 59 s). A negative control that injects work quadratic in the command length into k4_join still fails the test: through the absolute bound at the stronger setting, and through the growth exponent alone (1.62 against 1.5) at the weaker one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
manifests/evidence.json re-registers tests/test_secret_path_guard.py and docs/secret-storage.md; scripts/validate.py passes with 186 receipts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Cross-family read (GPT-6.1 Sol, max effort, read-only, clean detached checkout of BLOCKING findings: 2; NON-BLOCKING findings: 3.
Checked and correct:
|
|
The two blocking and three non-blocking findings of the cross-family read above are repaired in #600: this head plus two commits (the K4 timing test and its documentation paragraph, then the manifest rows). A GPT-6.1 Sol worker implemented a written contract; Claude Opus reviewed it (13 of 13 reviewer mutants of the decision functions killed by seven new control tests; the full module and the validator pass locally). #600 supersedes this pull request: merge one of the two. From Claude session |
…owth on raw timings, capped host factor, permanent controls) (#600) * Guard K4 timing under host load: repeat rounds on a bound failure, factor beside the exceeding measurement After the guard reinstall on 2026-10-02 the workstation, at a load average of 25 to 50 from other lanes' measurement workers, failed test_k4_timing on linear work: whole-check processor times of 0.58 to 0.65 s against a host-scaled bound of 0.56 s, with a different set of helpers each run. A host factor taken once at the start missed contention that moves during the run, and a helper repeated its rounds only when the growth exponent failed. Now: - a helper repeats its round (up to three, elementwise minimum per size) when an absolute bound fails too, and a repeated round divides its times by the host factor measured just before and after it; - a row's child keeps the minimum of its three spans (the least-disturbed run) and, only when that exceeds the workstation bound, asks for the host factor by two reference runs right after. An unloaded run costs the same as before. Three runs at a load average of 25 to 30 passed (51 to 59 s). A negative control that injects work quadratic in the command length into k4_join still fails the test: through the absolute bound at the stronger setting, and through the growth exponent alone (1.62 against 1.5) at the weaker one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Register the K4 timing test change (hot-file commit, last) manifests/evidence.json re-registers tests/test_secret_path_guard.py and docs/secret-storage.md; scripts/validate.py passes with 186 receipts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Guard K4 timing test: growth on raw timings, capped minimum-of-five host factor, shared decision functions and permanent controls Repairs the five findings of the cross-family read of dfdce8f (posted on pull request 594, 2026-10-02): 1. The growth exponent is always computed on raw per-size minima; the host factor applies to the absolute processor-time bound only, so the fixed 5 ms allowance is never scaled. Quadratic helper timings of 10, 40 and 160 ms are rejected at host factors 1.0, 2.6 and 4.0. 2. The host factor is min(4.0, max(1.0, min(five reference samples) / 0.188)): one noisy reference sample can no longer relax the bound, and the bound cannot exceed 2.0 s. Reference runs use timeit.repeat. 3. Permanent controls exercise the retry path, the per-size minimum over rounds, calibration, the measurement budget and the nesting probe through the same pure functions the live test calls (k4_timing_passes, k4_run_timing_rounds, k4_host_scale, k4_min_timings, k4_nesting_passes). 4. Comments and docs/secret-storage.md describe what the code does: when calibration runs, five reference runs, minimum, cap, raw growth, repetition only while a criterion fails. 5. The cost statement gives exact measurement counts for a first-round pass and for the maximum. The hosted-runner failure this removes: helper k4_shell_words, {25000: 0.009996, 50000: 0.019747, 100000: 0.117139}, exponent 1.5129 against 1.5 (run 36946042633): one noisy 100k sample, accepted once a second round supplies a clean one, still rejected when three rounds repeat it. Implemented by a GPT-6.1 Sol max worker (Codex SDK through the gateway) under a written contract in an owned worktree; reviewed by Claude Opus: guard sha256 unchanged (33a11fc0...), thirteen reviewer mutants of the decision functions all killed by the seven controls, tests.test_secret_path_guard 82 tests OK (2 skipped), test_k4_timing three consecutive passes. SOTA sources: CPython timeit, Timer.repeat (minimum of repeats): https://docs.python.org/3/library/timeit.html#timeit.Timer.repeat Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Register the K4 timing test repair (hot-file commit, last) manifests/evidence.json: the sha256 and bytes of tests/test_secret_path_guard.py and docs/secret-storage.md only; scripts/validate.py passes (69 components, 8975 hashed files, 4 profiles, 186 receipts). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Scout <scout@local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
Superseded by #600, merged as 6080214 at 2026-10-02T04:33:26Z: the same change plus the repair of the two blocking and three non-blocking findings of the cross-family read posted here (growth measured on raw timings, per-size minimum over at most three rounds, capped host factor, shared decision functions, permanent negative controls). Closing without merging; the branch is left in place. |
Scope
test_k4_timinghold on a loaded host without loosening it. A helper repeats its round, up to three with the elementwise minimum per size, when an absolute processor-time bound fails as well as when its growth exponent fails. A repeated round divides its times by the host factor measured just before and after it. A row's child keeps the minimum of its three spans and asks for the host factor, two reference runs right after, only when that minimum exceeds the workstation's 0.5 s. An unloaded run costs the same as before. Test and docs only; the guard is unchanged (sha25633a11fc0…).8b51946e(main).lane:foundation.tests/test_secret_path_guard.py,docs/secret-storage.md(one sentence in the K4 paragraph), and the shared hot filemanifests/evidence.json(re-registration only).SOTA sources
examples/claude-native/workflows/test-child-usage.mjs), which K4 adopted in Guard K4: runner commands, bounded interpreter reading, OmniRoute management routes #567.timeitdocumentation, "Note: … the min() of the result … the other values are … caused by other processes interfering", https://docs.python.org/3/library/timeit.html#timeit.Timer.repeat.Evidence-class table
local_integrationlocal_integration(negative control)local_integrationLocal commands run
Decision record
docs/secret-storage.md, the K4 paragraph on timing bounds.Checklist
🤖 Generated with Claude Code