Skip to content

State safety: pin the KV and GDN pools for matrix runs and record allocated pools - #102

Merged
SamMausberg merged 11 commits into
mainfrom
state/pinned-pools
Oct 1, 2026
Merged

SamMausberg merged 11 commits into
mainfrom
state/pinned-pools

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Pins the KV and GDN pools for the state-safety matrix runs, per the BRIEF rule "Equality comparisons pin the pools". Also records the pools every existing run allocated.

What changes

  • server.py:
    • POOL_PIN sets --max-running-requests 8, --max-total-tokens 49152 and --max-mamba-cache-size 40.
    • With 40 GDN slots, the cap of 8 binds in every configuration. SGLang reserves 5 slots per running request with the radix cache and overlap scheduler on, 4 with overlap off, and 1 with the radix cache off (_calculate_mamba_ratio).
    • resolved_pools() reads the sizes the server actually allocated from its log.
    • launch_with_retry(expect_pools=...) restarts a server whose pools differ from the pin. Its last attempt raises instead of running unpinned.
    • startup_lock(min_free=...) follows GPU_STARTUP_MIN_FREE_GB semantics. It waits until enough memory is free: 68 GB for MTP, 52 GB for plain, which is 4 x (weights + pinned pools) at --mem-fraction-static 0.25.
  • run_matrix.py:
    • Pins by default. Extra flags come last, so the retraction test's --max-total-tokens 6000 still wins.
    • Writes to ~/vp-data/state/runs_pinned and records pool_pin in each run's meta.
    • --no-pin reproduces the earlier runs (cap 16, pools from free memory) in ~/vp-data/state/runs.
  • compare.py:
    • run_meta.json now has resolved_pools for every run. For older runs they come from the server log.
    • noise_floor.csv gains a pools_identical column.
  • Evidence README:
    • The two fresh-server repeat rows compare servers with different pools: 97,672 vs 133,885 KV tokens, 122 vs 167 GDN slots, both at cap 16.
    • The concurrency-32 repeat's 24/320 differences can therefore come from pools or from timing.
    • The pinned rerun is queued.
  • Targeted tests compare runs on one server and are unchanged.

Queue

All my queued holds were resubmitted at their original arrivals (GPU_LOCK_ARRIVAL). The matrix runs pick up the pins when they start, and a pinned rerun of the plain baseline (c1, c32, the warm passes and a second fresh session) shares the MTP matrix's arrival.

Checks

  • pre-commit passes, including mypy.
  • There are 3 new unit tests (tests/test_state_safety_server.py): pin override, log parsing, and the free-memory wait. 13 state-safety tests pass in total.
  • analyze_all.sh regenerates the evidence. The only changes are the new pool fields and column.

Provenance of the existing comparisons (258f9ff)

evidence/state_safety/pools.json records the pools of both servers for every comparison in the evidence. Comparisons on one server have identical pools; every comparison across two servers had different pools.

Comparison Servers Pools (KV tokens / GDN slots / cap)
Concurrency 1 vs 32 floor (3.42 per 1,000), plain one server identical: 97,672 / 122 / 16
Same-server repeats; deterministic validations; verify-split c1 vs c32 one server identical
Fresh-server repeat, plain c1 and c32 two 97,672 / 122 vs 133,885 / 167
Tapped mechanism, plain c1 vs c32 two 159,322 / 199 vs 89,652 / 111
Tapped mechanism, plain c1 vs MTP c1 two 159,322 / 199 vs 166,522 / 97
Tap check (tapped vs untapped plain c1) two 159,322 / 199 vs 97,672 / 122
Tap signature v1 vs v3, plain two 93,742 / 118 vs 159,322 / 199
Tap signature v1 vs v3, MTP two 84,003 / 55 / 11 vs 166,522 / 97 / 16

The evidence README flags each of these where it is reported.

  • In the target model, a different copy of a shared prefix's KV would first show at a full-attention layer's output.
  • For plain c1 vs c32, the pools stay a possible cause for the 6 prompts that first differ at an attention output.
  • MTP has a second route. Its draft layer reads its own cached prefix KV, so a different copy can change the proposals, the accept lengths and later verify forwards, without any target attention output differing first. For MTP comparisons, the first-difference location therefore does not rule out the pools.
  • In plain vs MTP, all 167 first differences are at the first row of the first verify forward. That row cannot depend on the proposals, so the location bounds only that first difference.

Analysis (5784971)

  • analyze_all.sh analyses runs_pinned/ with pairs_pinned.json (cap 8 labels) into *_pinned evidence files. It also keeps analysing the unpinned runs/.
  • compare.py and cycles.py now require --runs.
  • Once runs_pinned/ exists, a pair with a missing run fails the script, unless STATE_ALLOW_MISSING=1 is set. compare.py also records missing_pairs.

Mixed regimes are refused (0ac8751)

  • run_matrix.py refuses to write into a root that already holds runs of the other pool regime, including linked reference directories.
  • compare.py refuses any pair of a pinned and an unpinned run.
  • --allow-mixed-pins overrides either refusal, and the output keeps the flag (pinned_a/pinned_b per pair, mixed_pin_pairs).
  • Bench's equality_tuned.sh passes --no-pin, so it matches its unpinned reference.

run_matrix.py now starts every server with --max-running-requests 8,
--max-total-tokens 49152 and --max-mamba-cache-size 40, and restarts it until the
pools it allocates (read from the server log) are exactly those sizes. Before
each start it waits until enough GPU memory is free (68 GB for MTP, 52 GB for
plain, or GPU_STARTUP_MIN_FREE_GB). Pinned runs go to ~/vp-data/state/runs_pinned,
and each run's meta records the pin and the resolved pools. --no-pin restores
the earlier unpinned runs.
compare.py reads the pools each server allocated (from its log for runs that
predate the record) into run_meta.json, and noise_floor.csv gains a
pools_identical column. The two fresh-server repeat rows had different pools
(97,672 vs 133,885 KV tokens, 122 vs 167 GDN slots), and the evidence README now
says so; the pinned rerun is queued.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 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-10-01T11:04:36.549135Z 5c3f1d2 Manual request
ℹ️ 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.

analyze_all.sh writes pools.json: for each noise-floor pair, tapped mechanism
run, tap check and tap signature, the pools each server allocated and whether
they match. Only single-server comparisons had identical pools. The evidence
README flags every comparison across servers with its pools and states what the
difference can and cannot explain: KV provenance would first show at a
full-attention layer.

@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: 7f3748f397

ℹ️ 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".

raise SystemExit(f'bad pass name {p!r}')

pin = not args.no_pin
root = Path(args.out_dir or Path.home() / 'vp-data/state' / ('runs_pinned' if pin else 'runs'))

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 Point analysis at the pinned run directory

With the default invocation used by run_all.sh, this now writes every new matrix result under ~/vp-data/state/runs_pinned, but analyze_all.sh and compare.py still read ~/vp-data/state/runs. Consequently, running the documented collection and analysis workflow silently regenerates evidence from the old unpinned data rather than the newly collected pinned runs. Update the analysis inputs/defaults alongside this output-directory change.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 5784971. analyze_all.sh now also analyses ~/vp-data/state/runs_pinned with pairs_pinned.json, writing the *_pinned evidence files, and keeps the unpinned runs/ analysis in the unsuffixed files. compare.py and cycles.py take the root as a required --runs, so neither can fall back to the old directory. Once runs_pinned/ exists, any pair with a missing run makes compare.py --require-all exit non-zero and stops the script (STATE_ALLOW_MISSING=1 allows a partial regeneration), and missing pairs are recorded in the output JSON.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES

Reviewed head 258f9ff (65a4012, f1f7b00, 7f3748f, 258f9ff).

What checks out

  • Check (2), pin enforcement. POOL_PIN (cap 8, 49,152 KV tokens, 40 GDN slots) is added after the configuration's flags. expected_pools honours later overrides. launch_with_retry reads the allocated sizes from the server log, restarts on any mismatch, and makes its last attempt raise ("not running unpinned"). The resolved pools are recorded per run in .meta.json and run_meta.json.
  • Check (1), comparisons flagged. pools.json lists both servers' allocated pools for all 14 committed comparisons. I checked several against the server logs:
    • every same-server comparison has identical pools, including the 3.42/1K plain c1-vs-c32 floor (97,672 / 122 / cap 16);
    • the c32 fresh-server repeat (97,672 / 122 against 133,885 / 167) is flagged;
    • the tap check (159,322 / 199 tapped against 97,672 / 122 untapped) no longer attributes its exceptions to the tap;
    • the v1/v3 tap signature lists the pool difference, and the README notes the plain KV pool never filled (72,056 and 56,630 tokens);
    • the two tapped mechanism comparisons are flagged with what pools can and cannot explain. Plain c1 vs c32 has 6 of 40 first differences at attention, which I counted in the JSON, and plain vs MTP has all 167 at the GDN recurrence.
  • Checks. The state tests pass (22), pre-commit passes, and the commits are Sam's with no AI attribution.

Blocking

B1 (Codex P1, run_matrix.py:71): analysis still reads the old directory. run_matrix.py now writes to ~/vp-data/state/runs_pinned/ by default, but analyze_all.sh and compare.py still read ~/vp-data/state/runs/. Running the documented workflow after the pinned reruns would regenerate the evidence from the old unpinned data, silently. Point the analysis at runs_pinned, or take the directory as an argument with that default. Make it fail if the pinned directory lacks a run the analysis expects.

B2 (integrator check 3): the MTP draft-KV caveat is missing. For plain vs MTP, the README rules out pools because "a different copy of a shared prefix's KV would first show at a full-attention layer's output, and every first difference is at layer 0's GDN recurrence". That covers the target's KV. MTP's draft layer has its own attention over cached KV, and with the radix cache on, a request can read a different copy of the draft's prefix KV. That changes draft proposals, then acceptance lengths, then the verify passes' shapes. The verify shape changes the target's layer-0 GDN arithmetic without any target attention output differing first. State this route, and that the pool difference (84,003 / 55 against 166,522 / 97 for the MTP tap sessions; 159,322 / 199 against 166,522 / 97 for v3 plain against v3 MTP) is therefore not ruled out for the MTP comparisons by the first-difference location.

analyze_all.sh analyses runs_pinned/ with pairs_pinned.json (cap 8 labels) into
*_pinned evidence files, next to the unpinned runs/ analysis. compare.py and
cycles.py now require --runs, so neither falls back to the old root. Once
runs_pinned/ exists, a missing pinned run fails the script unless
STATE_ALLOW_MISSING=1, and compare.py records missing pairs.

The evidence README no longer says the first-difference location rules out the
pools for plain vs MTP. MTP's draft layer reads its own cached prefix KV, so a
different copy can change proposals, accept lengths and later verify forwards
without any target attention output differing first. The location bounds only
the first difference, at the first row of the first verify forward.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Re-reviewed 5784971.

B1 is fixed.

  • analyze_all.sh analyses runs_pinned/ with pairs_pinned.json into separate *_pinned evidence files, and leaves the unpinned analysis of runs/ unchanged.
  • compare.py and cycles.py now require --runs, so neither can silently read the old root.
  • Once runs_pinned/ exists, --require-all fails the script on any missing pair. STATE_ALLOW_MISSING=1 allows a partial regeneration, and the missing pairs are recorded. The unpinned noise_floor.json now lists its missing pairs too, and its numbers are unchanged.

B2 is fixed.

  • The README now states MTP's draft-KV route: a different cached copy changes proposals, then accepted lengths, then later verify forwards, without any target attention output differing first. So the first-difference location does not rule out the pools for MTP comparisons.
  • The bound it keeps is narrow and labelled as reasoning. All 167 plain-vs-MTP first differences are at output index 1, which I counted in mechanism_plain_c1_vs_mtp_s3_c1.json. That is the first row of the first verify forward, whose layer-0 GDN output depends on its token and the post-prefill state.
  • Whether the pools contributed to the divergences after that is stated as undetermined, pending the pinned rerun.

Checks.

  • The state tests pass (22), and pre-commit passes, including mypy.
  • The Codex P1 thread has a reply.
  • Codex has not run on 5784971.

Integrator checks (1)–(3) are now all met.

@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@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: 57849713ac

ℹ️ 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 +70 to +71
pin = not args.no_pin
root = Path(args.out_dir or Path.home() / 'vp-data/state' / ('runs_pinned' if pin else 'runs'))

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 Keep the tuned equality campaign on one pool regime

When bench/campaigns/equality_tuned.sh invokes this runner with a custom output directory, it does not pass --no-pin, while its reference plain directory is explicitly linked from the legacy unpinned ~/vp-data/state/runs/plain. Consequently, every newly collected missing arm is now pinned at cap 8 and compared against the old dynamically sized cap-16 reference, reintroducing the pool-size confound this change is intended to eliminate and potentially corrupting the campaign's equality conclusions. Update that campaign to use the pinned reference or explicitly request the legacy unpinned behavior.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 221e6c8. bench/campaigns/equality_tuned.sh now passes --no-pin to run_matrix.py. Its reference is state's unpinned runs/plain, so the arms it collects stay in that same regime (cap 16, pools sized from free memory) instead of being pinned at cap 8 against an unpinned reference. Moving the campaign to the pinned reference (runs_pinned/plain) is bench's call once that run lands; I've told bench.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Further in 0ac8751: mixing pool regimes now fails instead of passing silently. run_matrix.py refuses to write into an output root that already holds runs of the other regime, including linked reference directories such as the campaign's plain link, and compare.py refuses any pair of a pinned and an unpinned run. --allow-mixed-pins overrides either refusal and keeps the flag in the output (pinned_a/pinned_b per pair, mixed_pin_pairs). Checked on the bench equality root: with --no-pin no runs clash; with the pin default all 9 sessions are reported and the run is refused. Bench is keeping --no-pin. Its committed pairs compared servers with different KV pools (c=1, radix cache off in every arm); bench now records each server's pools in pools.csv.

bench/campaigns/equality_tuned.sh compares new arms against state's unpinned
runs/plain reference, so it now passes --no-pin and its arms keep the same
regime (cap 16, pools sized from free memory) rather than becoming pinned at
cap 8 against an unpinned reference. Also show --runs in the cycles.py usage.
run_matrix.py refuses to write into a root that already holds runs of the
other regime (linked reference directories included), and compare.py refuses
a pair of a pinned and an unpinned run. --allow-mixed-pins overrides both.
compare.py records pinned_a/pinned_b per pair and the mixed pairs.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Re-reviewed 0ac8751 (221e6c8, 0ac8751, and the main merge 813c152).

  • Codex's second P1 (on 5784971) is fixed. equality_tuned.sh passes --no-pin, with the reason, so its arms stay in the unpinned regime of their reference.
  • The coordinator's guard against mixing regimes is in. server.mixed_pin_runs finds sessions under an output root, links followed, whose regime differs. Runs without pool_pin count as unpinned. run_matrix.py exits before starting a server if any exist, unless --allow-mixed-pins is given. compare.py refuses a mixed pair unless the same flag is given, and records pinned_a/pinned_b and mixed_pin_pairs. In noise_floor.csv the new columns are appended and every number is unchanged.
  • The merge is pure. Re-doing 0b8ca46 into 5784971 gives no conflict and no difference from 813c152.
  • Checks.
    • The state tests pass (24), and pre-commit passes.
    • The commits are Sam's, with no AI attribution.
    • Both Codex threads have replies. Codex has not run on 0ac8751.

My approval at 5784971 on the analysis path and the MTP draft-KV caveat carries to this head.

@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@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: 0ac87518a9

ℹ️ 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 thread experiments/state_safety/compare.py Outdated
Comment on lines +359 to +360
if la == lb:
s['pools_identical'] = True

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 Derive server identity from per-pass metadata

When passes for one session are collected in separate invocations—for example, plain/c1 first and plain/c32 later—run_matrix.py starts a new server and overwrites the session's single server.log, but both runs still produce the same la/lb path here. The comparator therefore reports pools_identical: true even for unpinned servers that allocated different pools, corrupting the provenance of resumed or incrementally collected experiments. Compare the pool values recorded in each pass's metadata rather than treating a shared directory as proof of a shared server.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 1b85947. Server identity now comes from each pass. New runs record a per-process server_id and the allocated pools in every pass's meta (server.launch). For older runs, compare.pass_server uses the session's server.log only if the pass's started_at lies inside that log's first-to-last timestamp span, which means that server ran it; otherwise the server and pools are unknown. A shared directory is no longer treated as proof of a shared server. noise_floor.csv gains a same_server column, and pools.json uses the same per-pass logic for matrix runs. The existing evidence is unchanged: every same-directory pair's passes fall inside one server's log span.

Comment thread experiments/state_safety/compare.py Outdated
Comment on lines +361 to +362
elif la.exists() and lb.exists():
s['pools_identical'] = resolved_pools(la) == resolved_pools(lb)

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 Treat unresolved pool fields as unknown

When both server logs exist but one of the allocation patterns is absent—for example after an incomplete log write or a future SGLang log-format change—resolved_pools() returns None for that field in both dictionaries, so dictionary equality marks the pools identical. This silently converts missing evidence into a positive equality result; require every resolved value to be non-None before comparing, otherwise report pools_identical as unknown.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 1b85947. server.pools_known() requires every resolved field to be non-None. compare.pools_match and the pools.json step report pools_identical as None (unknown) when either side has a missing field, instead of comparing two dicts of None. There is a test for this case.

…nknown

A shared session directory no longer counts as a shared server. New runs record
a server id and the allocated pools in every pass's meta. For older runs the
session's server.log, which each new server overwrites, is used only for passes
that started inside that log's time span. A pool field missing from the log
makes pools_identical unknown (None) instead of equal. noise_floor.csv gains
same_server, and both CSVs now quote fields, since pair labels contain commas.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Re-reviewed 1b85947, which fixes Codex's two P2s on 0ac8751.

  • Each pass is matched to its own server. server.launch records a per-process server_id and the resolved pools in every pass's meta. compare.pass_server reads them from there. For older runs it uses the session log only when the pass's started_at falls inside that log's time span, and otherwise reports unknown. noise_floor.csv gains same_server.
  • Unknown pool fields stay unknown. pools_known requires every field, so a missing value gives pools_identical = None rather than true.
  • The CSV quoting fix changes no values. I parsed the old files, rejoining the labels their unquoted commas had split, and compared them with the new quoted files column by column. All 222 rows of divergences.csv and all 8 rows of noise_floor.csv agree in every shared column. The only addition is same_server.
  • Checks. The state tests pass (25), and pre-commit passes, including mypy. Codex finished on 0ac8751, and both of its threads have replies. It has not run on 1b85947.

@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@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: 1b85947427

ℹ️ 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 thread experiments/state_safety/analyze_all.sh Outdated
la, lb = dir_a / 'server.log', dir_b / 'server.log'
pa = resolved_pools(la) if la.exists() else None
pb = resolved_pools(lb) if lb.exists() else None
a, b = str(dir_a.relative_to(root)), str(dir_b.relative_to(root))

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 Resolve mechanism sessions against the current data root

When analyze_all.sh runs under a home directory other than /home/ubuntu, the committed mechanism summaries still contain absolute paths such as /home/ubuntu/vp-data/state/tap/v3_plain_c1, while root is $HOME/vp-data/state. This relative_to(root) call then raises ValueError, so evidence regeneration stops before writing pools.json. Rebase the stored session names onto the current root/tap directory or handle paths outside the current root.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 0f96d71. The pools record moved into experiments/state_safety/pools.py, and analyze_all.sh now calls it. pools.data_relative() rebases data paths onto the current root. A path under the current ~/vp-data/state, or a relative one, is kept. An absolute path from another home directory is cut at its .../vp-data/state/ segment, and anything else raises with a clear message. The committed /home/ubuntu/... mechanism summaries therefore resolve under any HOME. mechanism.py now writes a, b and untapped_run relative to the data root. tests/test_state_safety_server.py::test_pools_record_regenerates_under_another_home sets HOME to a temporary directory and builds the record from a summary naming /home/ubuntu paths. The regenerated pools.json is byte-identical.

The pools record moves into pools.py. It maps data paths recorded under
another home directory (the committed mechanism summaries name
/home/ubuntu/vp-data/state/tap/...) onto the current ~/vp-data/state, so
regeneration no longer fails under a different HOME. mechanism.py now writes
its run paths relative to the data root. A test builds the record under a
different HOME. pools.json is unchanged.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Re-reviewed 0f96d71, which fixes Codex's P2 on 1b85947 (committed absolute /home/ubuntu/vp-data/state/… paths broke under another $HOME).

  • The pools record moved from the analyze_all.sh heredoc to experiments/state_safety/pools.py.
  • data_relative() keeps relative paths and paths already under the root. It rebases an absolute path at its …/vp-data/state/ segment and raises on anything else.
  • mechanism.py now writes a, b and untapped_run relative to the data root.
  • pools.json is byte-identical to 1b85947.
  • The new test regenerates the record under a temporary HOME from a summary naming /home/ubuntu paths.
  • The state tests pass (26), and pre-commit passes, including mypy.
  • The partial *_pinned outputs from the pinned holds that started at 10:46 were correctly left uncommitted.

Codex has not run on 0f96d71.

@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@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: 0f96d713c4

ℹ️ 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 thread experiments/state_safety/compare.py Outdated
Comment on lines +453 to +454
if args.require_all and missing:
raise SystemExit(f'{len(missing)} pairs have missing runs under {root}: {missing}')

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 Validate required pairs before overwriting evidence

When runs_pinned/ exists but collection is incomplete, the default analyze_all.sh invocation supplies --require-all, yet this check runs only after noise_floor_pinned.json, both CSVs, and run_meta_pinned.json have already been replaced with partial results. The command exits nonzero as intended, but the committed evidence is nevertheless left truncated and can be consumed or committed later; perform this validation before writing outputs, or write temporary files and publish them only after validation succeeds.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed in 5c3f1d2. compare.py now runs the missing-run check (--require-all) and the mixed-regime check before it loads or writes anything. A refused regeneration exits before touching noise_floor_pinned.json, the CSVs or run_meta_pinned.json, so the previous complete outputs stay in place. tests/test_state_safety_server.py::test_compare_refuses_before_writing_any_output checks that an existing output is unchanged and that no CSV is created.

compare.py now checks for missing runs (with --require-all) and mixed pool
regimes before it writes anything, so a refused regeneration leaves the
previous evidence files intact instead of replacing them with partial
results. A test checks that a refused run leaves an existing output unchanged.
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 5c3f1d2fc1

ℹ️ 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".

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Re-reviewed 5c3f1d2, which fixes Codex's P2 on 0f96d71. compare.py used to write its outputs before refusing. It now runs the missing-run check (--require-all) and the mixed-regime check before loading or writing anything, so a refused run leaves earlier outputs untouched. test_compare_refuses_before_writing_any_output checks that an existing output stays byte-identical and that no CSV is created.

No evidence file changes. The state tests pass (27), and pre-commit passes. Codex finished on 5c3f1d2 with no comments. Keeping the new exact_b targeted results out of this PR, for their own PR, is right.

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.

1 participant