Repository navigation
P9 evidence: scope the support oracle (padded verify, always-reuse); gated and free-verify bounds - #109
Conversation
The oracle charges a reused cycle the full block-16 verify. A program that verifies only the m + 1 remaining positions could pay less, so the upper-bound reading and the top-1 to top-4 rejections hold for a padded verify only. The README now says so, gives Delta as a function of the reused verify time, its value at a free verify (a lower bound on that cost, derived from the table) and the break-even verify times. Two table entries now round as the JSON does: top-2 Delta -0.66 (was -0.67) and the top-16 lower limit +0.89 (was +0.90).
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e068accaf2
ℹ️ 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".
| With the variable-width verify cost at its lower bound of zero (V_R = 0, every other phase still | ||
| charged; derived from the table, point estimates, no intervals), Delta would be +0.01 (K = 1), | ||
| +0.89 (2), +1.88 (4), +2.89 (8) and +3.86 (16): upper bounds for any verify width, and no K would |
There was a problem hiding this comment.
Recompute intervals before applying the rejection rule
The preregistered rule rejects based on the upper confidence bound, but the zero-cost results are explicitly only point estimates with no intervals. In particular, the K=1 estimate is just +0.0099 before rounding, and a positive point estimate alone does not establish that its bootstrapped upper bound exceeds zero. Recompute the request-level bootstrap under the variable verify cost before claiming that no K would be rejected, or limit this sentence to the point estimates.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 3d6064d. The zero-cost verify case is now scored with the same request-level bootstrap and resamples as the table (free_verify_always_reuse in the JSON): K = 1 +0.01 (+0.00, +0.02), 2 +0.89 (+0.81, +0.98), 4 +1.88 (+1.75, +2.05), 8 +2.89 (+2.71, +3.10), 16 +3.86 (+3.64, +4.11). Every upper end is above 0, so "no K would be rejected" now follows from the rule. The break-even verify times are still labelled as point estimates. A test checks Delta_free = Delta_padded + r_F p_K V(16) and that both interval ends dominate the padded ones. This PR also adds the always-reuse scope (d2c1e2f) and the omniscient-gate bound for gated programs (ae226fe).
…ffline sets The oracle reuses at every supported boundary. A gated program that falls back to fresh DFlash where reuse is unfavourable is not bounded by it, so the top-1 to top-4 rejections cover always-reuse policies only (Codex on #108). The table note, assumption (5) and the verdict now name the policy class, the padded block-16 verify and the offline-recomputed candidate sets.
Per supported boundary the gate takes the better of oracle reuse and fresh DFlash, knowing fresh DFlash's next accepted length. Its Delta is >= 0 and >= the always-reuse Delta by construction, so it rejects nothing; it bounds gated programs over the same candidate sets with a padded verify, and its excess is the most a perfect gate could add. Same seeds as the always-reuse bootstrap, so the intervals are paired; every existing field of the JSON is unchanged. Top-16: +2.05 (+1.93, +2.18), about one token per boundary above always-reuse. Tests: the gated Delta and both interval ends dominate always-reuse and are >= 0; the gate picks the better arm per boundary.
…stimates The zero-cost verify case (the lower bound of a variable-width verify's cost) was given as point estimates, so 'no K would be rejected' was not established at K = 1 (+0.0099). The script now scores it with the same request-level bootstrap and resamples (free_verify_always_reuse): every K's upper end is above 0, top-1 +0.01 (+0.00, +0.02). Other JSON fields are unchanged. Test: the free-verify Delta equals the padded Delta plus r_F p_K V(16), and both interval ends dominate the padded ones.
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Only K = 1, 2, 4, 8 and 16 were tested and Delta is not monotone in K, so 'top-1 to top-4' and 'every K from 2 to 16' claimed untested sizes (Codex on #108). The README now names top-1, top-2 and top-4 and the tested K.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 472b96423c
ℹ️ 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".
|
|
||
| A perfect gate would add about one token per post-rejection boundary at each tested K from 2 to 16 | ||
| (2, 4, 8 and 16). A real gate decides before the second cycle and does not see fresh DFlash's | ||
| outcome, so a gate is worth building only if features known at decision time (the correction |
There was a problem hiding this comment.
Remove the oracle-only suffix from observable gate features
When a gate decides before the second cycle, the supported suffix length is not known: U_K is computed from the realized greedy continuation, and only the already-revealed prefix through the correction can establish U_K >= J; the future quantity U_K - J used for the suffix remains oracle information. Listing it among features known at decision time therefore proposes an unavailable input for the real gate; remove it or describe it as an oracle target that observable confidence features might predict.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 7288c46. The supported suffix length U_K - J is no longer listed as a gate feature. The README now says it needs the greedy tokens after the correction, so it is an oracle target that observable features might predict. The features named are those known at decision time: the correction position J, the remaining horizon m and the old sets' probabilities at the remaining positions.
|
Verdict: REQUEST CHANGES Review on the exact head 472b964. What I verified
Blocking
Suggestions (non-blocking)
|
…over free verify Review of #109 and Codex on #108/#109: - The oracle bounds P9's program, which conditions on the whole corrected prefix through the frozen sets; a program whose support starts at the correction is a different class and is not covered (README paragraph, table note, assumption (4), verdict, docstring). - The supported suffix length U_K - J needs the greedy tokens after the correction, so it is an oracle target, not a gate feature; the features named are J, m and the old sets' probabilities at the remaining positions. - The verdict's gated bound says 'with a padded verify'; the free-verify bound states that the other phases stay at their block-16 values; a perfect gate adds 1.06 to 1.33 tokens. - New omniscient_gate_free_verify: the gate over free-verify scoring bounds gated programs at any verify width (top-16 +4.35 (+4.09, +4.64)). Test: it dominates both the gate and the free verify alone, end by end. Other JSON fields unchanged.
|
@codex review |
1 similar comment
|
@codex review |
|
Verdict: APPROVE (provisional: Codex's review of 7288c46 was still running when I posted this. I will re-check its threads on this head before merge.) Re-review on the exact head 7288c46. My three blocking items are fixed.
Checks
Blocking: none. Suggestion (non-blocking). The sentence that introduces |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7288c460d2
ℹ️ 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".
| r_f, d = estimate(comp, everything) | ||
| lo, hi = bootstrap(rows, comp, args.bootstrap, seed=k) | ||
| # Variable-width verify at its cost lower bound: the reused cycle's verify is free. | ||
| comp_free = components(rows, g2r, supported, ph, extra_us=-ph['verify']) |
There was a problem hiding this comment.
Remove every width-dependent cost from the upper bound
When a narrower reused cycle also reduces non-verify overhead, subtracting only ph['verify'] does not produce the claimed upper bound for every verify width. The committed timing data already exhibits this case: fresh_b16 retains 395.11 µs after draft and verify, whereas fresh_b8 retains only 383.81 µs (stage_a_timing.json), so a free-verify width-8 cycle can be faster than comp_free assumes and exceed both reported “upper bounds.” Set the entire reused-cycle cost to its zero lower bound, or restrict the JSON/docstring claims to implementations whose other phases cost at least the block-16 values.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in cf99c10 by restricting the claim, as you suggested. The free-verify and gate-over-free-verify bounds now cover only implementations whose non-verify phases cost at least their block-16 values. The README cites the measured counterexample (fresh_b8 keeps 383.81 µs after draft and verify against 395.11 µs for fresh_b16) and says these are not bounds for every implementation. The docstring says the same, and both JSON entries carry a scope string. No number changed.
Wording only, as in the sentences around it: the bound covers P9's program with any gate, at any verify width. No code path or number changes.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d16a1840e3
ℹ️ 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".
| always-reuse Delta by construction, so it rejects nothing. It bounds from above P9's program with | ||
| any gate over the same candidate sets with a padded verify, and its excess over always-reuse is the | ||
| most a perfect gate could add (same resamples as the table, so the intervals are paired): |
There was a problem hiding this comment.
Scope the gate gain to the oracle policy
This difference only compares the gated oracle with the always-reuse oracle; it is not the most a perfect gate could add for a real selector. If a real reuse contribution is x_i and its oracle upper bound is o_i, then x_i <= o_i, but the gate's improvement over always reusing is max(0, x_i) - x_i, which can exceed max(0, o_i) - o_i whenever the selector fails on a boundary where oracle reuse is favorable. Thus the later 1.06–1.33 claim can understate the value of gating a realizable program; retain the absolute gated-oracle upper bound, but describe this column only as the gain from gating the oracle reuse arm.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 28da072. The absolute gated-oracle Delta stays as the upper bound for P9's program with any gate and a padded verify. The column is now "gain from gating the oracle reuse arm". The README says that a real program's reuse arm is no better than the oracle's, so gating it can gain more, and that the column does not bound that gain. "Most a perfect gate could add" is gone from the README and the docstring, and the JSON key is renamed to gain_from_gating_oracle_reuse. The gate-feature sentence now says a real gate pays off only if decision-time features predict where its own reuse arm loses to fresh drafting. No number changed.
…osts Codex on #109: a narrower reused cycle can also cut non-verify overhead (fresh_b8 keeps 383.81 us after draft and verify, fresh_b16 395.11 us), so subtracting only the verify phase does not bound every implementation. The free-verify and gate-over-free-verify bounds are now stated for implementations whose non-verify phases cost at least their block-16 values, in the README, the docstring and a 'scope' string on both JSON entries. No number changes.
…racle's reuse arm Codex on #109: gated minus always-reuse oracle is not the most a gate could add to a real program. A real reuse arm x_i <= o_i can gain max(0, x_i) - x_i from gating, which can exceed the oracle's figure. The absolute gated-oracle bound stays; the 1.06-1.33 column is now only 'the gain from gating the oracle reuse arm' in the README, the docstring and the JSON key (gain_from_gating_oracle_reuse, renamed from gain_over_always_reuse). No number changes.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28da072b1b
ℹ️ 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".
| # Variable-width verify at its cost lower bound: the reused cycle's verify is free. | ||
| comp_free = components(rows, g2r, supported, ph, extra_us=-ph['verify']) |
There was a problem hiding this comment.
Tie the free-verify scope to the selected baseline
When the supported --baseline-run option selects anything other than fresh_b16, this calculation subtracts that run's verify phase and retains that run's non-verify costs, yet the emitted scope and documentation still describe block-16 costs. For example, --baseline-run fresh_b8 computes from the 0.384 ms width-8 remainder while labeling the result as using the 0.395 ms block-16 remainder; a run with a larger remainder could even invalidate the stated upper bound for implementations whose costs merely meet the block-16 minimum. Either restrict the option to fresh_b16 for these bounds or derive the scope from the selected run.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 57b017a. The oracle's cycles table is a block-16 trace (H = 15), so phases() now refuses a --baseline-run that is not fresh DFlash at block 16, and exits before writing output. The free-verify scope string is now built from the selected run: it names the run and its remainder beyond draft and verify (fresh_b16: 395.11 µs). The docstring says the baseline must be a fresh block-16 run. A new test checks that fresh_b8 and force_b16 baselines exit without output. Only the scope string changes in the JSON.
|
Verdict: REQUEST CHANGES Re-review on the exact head 28da072 (d16a184, cf99c10 and 28da072 on top of 7288c46). My provisional approval of 7288c46 is withdrawn: Codex's P2 on that head (r4155061029) needed the change in cf99c10, and there is a new Codex P2 on this head. What I verified
Blocking
Suggestions: none. |
…-verify scope Codex on #109: --baseline-run could select any run, whose non-verify remainder the free-verify bounds would then keep while the scope still said block 16. The cycles table is a block-16 trace (H = 15), so the script now refuses a baseline that is not fresh DFlash at block 16, and the scope string names the run and its remainder beyond draft and verify (fresh_b16: 395.11 us). Test: fresh_b8 and force_b16 baselines exit without output. Only the scope string changes in the JSON.
|
@codex review |
|
Verdict: APPROVE (provisional: Codex's review of 57b017a was still running when I posted this. I will re-check its threads on this head before merge.) Re-review on the exact head 57b017a ("P9 oracle: require a fresh block-16 baseline run; name it in the free-verify scope").
Blocking: none. Suggestions: none. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Appendix F.7: P9's free-verify and oracle-gate bounds (#109)
This narrows the scope of the P9 support oracle in
evidence/repair/README.mdand adds two bounds top9_support_oracle.py. All computation is on the CPU from the saved cycles table, with no GPU work. Every field already inp9_support_oracle.jsonis unchanged; the JSON only gains new keys. It follows Codex's two P1s on #108 (discussion_r4154812200 and r4154852822) and the P2 on this PR (r4154878753).The PR has four commits:
Padded verify; two roundings (e068acc).
components()charges every reused cycle a fresh block-16 cycle minus the draft phase, which includes the full 4.73 ms verify. After a correction at J, only m = 15 - J positions remain, and a narrower verify that costs less raises Delta at every K. So the upper-bound reading and the rejections of top-1, top-2 and top-4 hold only for a padded verify. The README states Delta = Delta_padded + r_F p_K (4.73 ms - V_R) and the break-even V_R per K, and notes that a sweep over verify widths 2 to 16 is queued.Always-reuse scope (d2c1e2f). The oracle reuses at every boundary with U_K >= J and m >= 1. A gated program can fall back to fresh DFlash, so the always-reuse oracle does not bound it. The table note, a new assumption (5) and the verdict now scope every verdict to always-reuse policies, a padded block-16 verify and the offline-recomputed candidate sets.
Omniscient-gate oracle (ae226fe). For each supported boundary, it takes the better of oracle reuse and fresh drafting, knowing fresh DFlash's next accepted length. This makes it at least 0 and at least the always-reuse Delta by construction, so it rejects nothing. It bounds P9's program with any gate over the same candidate sets with a padded verify. It uses the same seeds as the always-reuse bootstrap, so the intervals are paired.
Tests check that the gated Delta and both ends of its interval are at least the always-reuse ones and at least 0, and that the gate picks the better arm at each boundary.
Free-verify bound with intervals (3d6064d). The zero-cost verify case is the lower bound on a variable-width verify's cost. It was previously quoted only as point estimates, and K = 1 was +0.0099. The script now bootstraps it with the same resamples (
free_verify_always_reuse):No K is rejected. The test checks the identity Delta_free = Delta_padded + r_F p_K V(16) and that both interval ends dominate the padded ones.
Tested K only (472b964). Only K = 1, 2, 4, 8 and 16 were tested, and Delta is not monotone in K. The README therefore names top-1, top-2 and top-4 and the tested K instead of giving ranges (Codex on Appendix F: add P9, the cached-window reuse oracle (#97) #108).
Program class, gate features and a gate over free verify (7288c46), from the review and Codex on Appendix F: add P9, the cached-window reuse oracle (#97) #108/P9 evidence: scope the support oracle (padded verify, always-reuse); gated and free-verify bounds #109.
The oracle bounds P9's program, which conditions on the whole corrected prefix through the frozen sets. A program whose support starts at the correction is a different class and is not covered; with recomputed sets, such a program could also reuse where the recomputation drops an accepted token. The README states this in the reuse paragraph, the table note, assumption (4) and the verdict, matching F.7 on main.
The supported suffix length U_K - J needs the greedy tokens after the correction, so it is an oracle target, not a gate feature. The gate features named are J, m and the old sets' probabilities at the remaining positions.
The verdict's gated bound now says "with a padded verify".
The free-verify bound says the other phases stay at their block-16 values: 0.23 ms for accept, commit and append, plus 0.16 ms outside the timed phases.
The gating column (1.06 to 1.33 tokens) is described correctly (see commit 9).
New
omniscient_gate_free_verifyapplies the gate to the free-verify scoring, which bounds gated programs at any verify width:A test checks that it dominates both the gate and the free verify alone, at both interval ends.
Wording (latest commit). The gate-over-free-verify bound now names P9's program with any gate, at any verify width, matching the sentences around it. This is wording only, in the README and the docstring.
Free-verify scope (cf99c10, Codex on P9 evidence: scope the support oracle (padded verify, always-reuse); gated and free-verify bounds #109). A narrower reused cycle can also cut non-verify overhead:
fresh_b8keeps 383.81 µs after draft and verify, against 395.11 µs forfresh_b16. The free-verify and gate-over-free-verify bounds therefore now cover only implementations whose non-verify phases cost at least their block-16 values. This is stated in the README, the docstring and ascopestring on both JSON entries.Gating gain (28da072, Codex on P9 evidence: scope the support oracle (padded verify, always-reuse); gated and free-verify bounds #109). Gated minus always-reuse oracle is only the gain from gating the oracle's reuse arm. A real program's reuse arm x_i <= o_i can gain max(0, x_i) - x_i from gating, which can exceed that figure. The absolute gated-oracle bound stays. The column, the docstring and the JSON key (
gain_from_gating_oracle_reuse, renamed fromgain_over_always_reuse) now say only that.Baseline run (latest commit, Codex on P9 evidence: scope the support oracle (padded verify, always-reuse); gated and free-verify bounds #109).
--baseline-runcould select any run, whose non-verify remainder the free-verify bounds would then keep under a block-16 label. The cycles table is a block-16 trace, so the script now refuses a baseline that is not fresh DFlash at block 16. The scope string names the run and its remainder (fresh_b16: 395.11 µs). A test checks thatfresh_b8andforce_b16baselines exit without writing output.No number changed in commits 7 to 10.
Checks.
tests/test_repair_p9.py: 6 passed.codespellis clean on the README, which the hooks skip.