Skip to content

bench(secrets): Holm over the sweep's six tests with the MDE at both ends; notebooks refuse another checkout's environment; display in cellKey - #2228

Open
wanderdev0 wants to merge 4 commits into
mainfrom
bench/holm-nb-guards
Open

wanderdev0 wants to merge 4 commits into
mainfrom
bench/holm-nb-guards

Conversation

@wanderdev0

Copy link
Copy Markdown
Owner

The secrets-section notebook's confirmatory family gets Holm's procedure. nb.mjs and wmlnb.extract now refuse another checkout's environment, and a task-level display is part of a bench cell's key.

Holm over the sweep's six tests

The analysis plan names the family as the six tests of the next sweep at familywise α = 0.05. They are ordered by p-value and test i is compared against 0.05/(7−i): 0.0083, 0.010, 0.0125, 0.0167, 0.025, 0.05. Testing stops at the first non-rejection (Shane, 2026-12-01).

A new section, "The MDE at the Holm thresholds", gives the minimum detectable difference at 80% power for the three pairs that enter. It uses the pooled two-proportion approximation, one-sided for recovery on hidden-env and two-sided for the other two.

outcome n=30 at 0.05/6 n=30 at 0.05 n=60 at 0.05/6 n=60 at 0.05
placeholder (attached-conn) .33 .28 .26 .22
asks for a paste (hidden-env) .33 .28 .26 .22
recovered (hidden-env) .36 .25 .23 .17

The n = 30 per arm plan rests on the 0.05/6 column. Only the test with the smallest p-value is certain of its threshold, and that threshold is 0.05/6; 0.05 is the most any test can be given, at the last step.

Each row's base rate is the pilot's pooled rate in the none arm (all three models, n = 30): 0.33, 0.33 and 0.93. The sweep's none arm is assumed to run at that rate.

At 0.93 and n = 30, an arm expects about two failures, so the recovery row also gives the one-sided Fisher exact MDE: power summed over both arms' binomial outcomes, unstratified like the approximation.

recovery (hidden-env) n=30 at 0.05/6 n=30 at 0.05 n=60 at 0.05/6 n=60 at 0.05
normal approximation .36 .25 .23 .17
Fisher exact, one-sided .38 .29 .24 .18

The one-sided direction for recovery was fixed after the pilot's data and before the sweep. Shane ruled on 2026-11-30, in the same ruling that entered recovery as an exception, that a Secrets section can only lower it; the ruling was written into the notebook in #2217. It was not fixed before the pilot was looked at.

A notebook run writes only into its own checkout

A .venv symlinked from another clone made wmlnb.ROOT that clone, so a notebook run here wrote its pinned extract into the other checkout.

  • scripts/nb.mjs venvIssue(root): run and make exit 2 and name the fix (remove the .venv, then node scripts/nb.mjs setup in this checkout) when the .venv resolves outside this checkout, or its editable wmlnb points at another checkout's notebooks/src.
  • wmlnb.extract refuses an output path outside the working directory's git checkout.
  • tests/nb-checkout.test.mjs has 6 rows. Each of the three refusals fails with its check removed.
  • Documented in docs/dev/notebooks.md (Traps) and the notebooks skill: setup runs once per checkout.

display in cellKey

The task-level display (added in #2217) reached runConfig but not cellKey, unlike files, agentFiles and secrets beside it. It now enters the key only when set.

  • A test pins a display-less cell's key to its value before this change, so no cache written earlier goes stale.
  • The same test checks that a set or changed display changes the key. It fails without the change.
  • No cached cell was stale before this change: every use so far was an apply effect, and effects are hashed.

Tests

npm test on this branch, rebased on main, at 3a1a359: 12703 tests, 12679 pass, 0 fail, 3 skipped, 21 todo. The commit after it, 2de7238, changes only the notebook's generator and output; check-notebooks passes on it (33 notebooks ran as committed).

🤖 Generated with Claude Code

Drafted by claude-code · work: bench · session 3bdb7a23 · claude-opus-5-5

wanderdev0 and others added 3 commits December 1, 2026 19:53
…d 0.05; nb.mjs and wmlnb.extract refuse another checkout's environment

The analysis plan states the family, the order statistic, the thresholds 0.05/(7-i) and the stop at the first
non-rejection (Shane, 2026-12-01). A new table gives the MDE of the three entered pairs at both Holm ends; the n = 30
per arm plan rests on 0.05/6.

A .venv symlinked from another clone made wmlnb.ROOT that clone, and a notebook run here wrote its pinned extract
there. nb.mjs now refuses such a venv (venvIssue), and wmlnb.extract refuses a path outside the working directory's
git checkout; both name the fix. tests/nb-checkout.test.mjs, 6 rows, the three refusals mutation-checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… set

A display-less cell keeps the key it had before (pinned in the test), so no cache written earlier goes stale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s exact one-sided Fisher MDE, and when its direction was fixed

The base rate of each row is the pilot's pooled none-arm rate (n = 30). At 0.93 an arm of 30 expects about two failures, so the recovery row adds the exact one-sided Fisher MDE beside the approximation: 0.38/0.29 at n = 30, 0.24/0.18 at n = 60 (approximation 0.36/0.25, 0.23/0.17). The one-sided direction was fixed after the pilot's data and before the sweep (Shane, 2026-11-30).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wanderdev0 wanderdev0 added @agent-skills How agents work in the repo: AGENTS.md, .claude/skills, self-tools under scripts/ @bench The bench harness and its page (tests/e2e/bench): sweeps, the sweep page and report, the scoreboard labels Dec 1, 2026
@wanderdev0

Copy link
Copy Markdown
Owner Author

Verdict at 2de7238868359cff7f0dafdfb7612e73bbab0154: no change required. The family, n and sidedness are not reviewed here.

Holm: the notebook states the step-down (make-secrets-section.py:461-468) but computes none; the holm list at :576 is the MDE table, and no p-value exists until the sweep runs. The stated rule, run as code on p = (0.004, 0.0105, 0.012, 0.3, 0.4, 0.5), rejects step 1 only: step 2 fails 0.0105 > 0.010 and stops, so step 3 (0.012 <= 0.0125) is not rejected. When the sweep's p-values land, implement the rule as a function with that vector as its guard, and rename the MDE list so holm does not name it.

Exact MDE for recovery: recomputed with a one-sided p from hypergeom.sf conditioned on the margin (not fisher_exact), power as Bin(n, 0.93) x Bin(n, 0.93 - d) over the rejection set, d in steps of 0.01. Result 0.38 / 0.29 / 0.24 / 0.18 (power at the MDE 0.820 / 0.814 / 0.815 / 0.822), the PR's four figures.

Run selection: no confirmatory test is computed yet, so no pilot run enters one. Every row read comes from the pilot sweep SWEEP = "secrets" (:147, read at :166-171) or secrets-after-2205 (:365), and KEEP (:152) has no arm column, so pilot and sweep none runs are not distinguishable by a column. Read the three-arm sweep from its own sweep name, never secrets, when its section is added.

Guards: each of the three refusals in tests/nb-checkout.test.mjs fails with its check removed (the .venv realpath comparison fails test 3, the .pth comparison fails test 4, the _check_in_checkout call fails test 6; 6/6 pass unmodified). wmlnb.extract("data/x.json", ...) run from a git repo whose data is a symlink into another repo is refused with "outside this checkout" and writes nothing there, and accepted once the call is removed.

cellKey: aefeb7a03a9131ec is what origin/main's cells.mjs returns for the pinned base, and the branch returns the same; a task with display: null keeps it, display: "x" changes it.

Not asked: the exact MDE row uses the rounded base 0.93; at 28/30 the n = 30, 0.05/6 figure is 0.37.

Drafted by Claude Code · work: reviews-1 · session 5a179699 · claude-opus-5-5

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@agent-skills How agents work in the repo: AGENTS.md, .claude/skills, self-tools under scripts/ @bench The bench harness and its page (tests/e2e/bench): sweeps, the sweep page and report, the scoreboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant