Repository navigation
site/ops: the reducer's bot/state inputs are release-affecting - #75
Conversation
brain/authority/reducer-inputs-v1.json declares five bot/state/*.json files as curated_git_input, read by brain/build_cells.py, but bot/ is a neutral directory, so a commit changing one let main move past a release built from the old bytes. They are now affecting exceptions, and a test checks every reducer scope file and curated input against the policy. The comment on AFFECTING_EXCEPTIONS claimed the list must agree with brain-nightly.sh's uncommitted-source check. That check is broader: it also refuses local edits to Worker tests, READMEs and site/ops/brain-canary.py, none of which reach release bytes. The comment now says so, and a test pins the canary as the only file the nightly names that the policy leaves neutral. docs/BRAIN-ACTIVATION-2026-10-04.md's copy of the neutral list picks up these exceptions and #68's AGENTS.md and CONTRIBUTING.md.
Review fixes: - The AFFECTING_EXCEPTIONS comment called brain-nightly.sh's uncommitted-source check "broader". It is a different set: it watches code, not curated inputs, so it covers Worker tests, READMEs and the canary but never bot/state/ or catalog/data/. The comment also gave a reason for site/test_frontier_page.py that other neutral gating tests contradict; it now just names the file. - The curated-input test reads every brain/authority/reducer-inputs-v*.json, not only v1. - The canary test's comment says it checks only the files the nightly names explicitly. - docs/BRAIN-ACTIVATION-2026-10-04.md is a record checkable at 37b7036, so its neutral list is restored and one sentence notes #68's and this PR's changes. The operator runbook's neutral list gains the bot/state exception instead.
|
Recommendation: fix (comment and doc wording only), then merge. An independent adversarial review of
|
…ate files Review fixes: - brain-nightly.sh still names site/ops/brain-canary.py in its uncommitted-source check but has not run it since afdf3a6 (the promoter and .github/workflows/brain-canary.yml run it). The policy comment and the canary test's comment no longer say "the canary it runs", and the comment drops the loose "watches code" causality. - The runbook and the activation record said `bot/state/*.json`, which reads as the whole directory; they now say the five files the reducer reads. - The inventory test also checks every input v2+ inventories root in the repository ("root": "repo"), not only curated_git_input entries. - bot/README.md's fold-back instructions note that folding any of the four tracked Brain-build files is release-affecting.
|
Follow-up: fixes applied in
Still open, as decisions rather than fixes:
|
site/ops: the reducer's bot/state inputs are release-affecting
|
Re-review on main ( Optional test hardening:
Stale docs:
Outside this PR, and the most important item:
|
Two mismatches between
site/ops/brain_release_authority.pyand what the Brain build actually reads.1. The reducer's
bot/stateinputs were release-neutralbrain/authority/reducer-inputs-v1.jsondeclares these ascurated_git_input, read bybrain/build_cells.py:bot/state/brain_queue.jsonbot/state/cut_log.jsonbot/state/pool_candidates.json(gitignored today)bot/state/recycle_queue.jsonbot/state/seed_queue.jsonThey sit under
bot/, a neutral directory. So a commit that changed one letmainmove past a release built from the old bytes. That is the unsafe direction: the promoter and bundle freezer would accept a release that doesn't matchmain's reducer inputs.They are now in
AFFECTING_EXCEPTIONS. The rest ofbot/state/(bot_state.json,batchN_approved.json, …) stays neutral; it is bot operating state, not a reducer input.2. The nightly's check is a different set, not a mirror
The comment on
AFFECTING_EXCEPTIONSsaid that list must agree withbrain-nightly.sh's uncommitted-source check. The two sets differ in both directions:wiki/test/, 4 underwiki/e2e/,wiki/README.md, twotest_*.pyfiles underwiki/scripts/, andsite/ops/brain-canary.py. None of them reach release bytes, so refusing them is harmless. The canary entry is a leftover: the nightly stopped runningbrain-canary.pyinafdf3a67, and the promoter and.github/workflows/brain-canary.ymlrun it now. The repo's own tests already treat the canary both ways:test_brain_nightly.pypins it in the nightly list, andtest_brain_promote_release.pyuses it as a neutral change.bot/state/norcatalog/data/. It expands$REDUCER_SCOPEto the inventory'sscopecode files only.The comment now describes that instead of claiming agreement.
Not changed here, and worth a decision: the nightly runs
brain/build_cells.pyagainst its working tree. A local edit to a curated input on the nightly host would therefore be frozen into a release whose authority commit doesn't hold those bytes. Runningpython3 bot/brain_queue.py, whichbot/README.mddocuments, is one way that edit happens. Closing that means adding the curated inputs to the nightly's source check. That is abrain-nightly.shchange, which is itself release-affecting, so I left it out.Tests (
site/ops/test_brain_release_authority.py)test_reducer_code_and_curated_inputs_are_release_affecting: across all fourbrain/authority/reducer-inputs-v*.jsoninventories, every reducerscopefile, everycurated_git_inputpath and every input rooted in the repository ("root": "repo") must be release-affecting. It fails on main for the fivebot/statefiles.test_the_canary_is_the_only_nightly_watched_file_left_neutral: among the files the nightly names explicitly, the canary is the only one the policy calls neutral. It doesn't look inside watched directories likewiki/.bot/state/bot_state.jsonandbatch7_approved.jsonneutral,bot/state/cut_log.jsonandseed_queue.jsonaffecting._nightly_watched()with the existing NEUTRAL_FILES test.Docs
docs/BRAIN-RELEASE-RUNBOOK.md, the operator runbook, now excepts the fivebot/state/files the reducer reads from its neutral list.bot/README.md's fold-back instructions note that folding any of the four tracked Brain-build files frombot-stateintomainis release-affecting, so the next promotion needs a new release.docs/BRAIN-ACTIVATION-2026-10-04.mdis a record whose values can be checked at37b7036d, so its list stays as it was. One sentence notes Release policy: AGENTS.md and CONTRIBUTING.md are release-neutral #68's change and this one.Effect
site/ops/, so this PR is itself release-neutral.neutral_changesagainst the current policy (brain_activation_bundle.py:719,1698), so a bundle that recorded one of the five files as neutral now fails validation. That is the intended result.POLICYstayswikilean.release-neutral-paths/v1, as it did in Release policy: AGENTS.md and CONTRIBUTING.md are release-neutral #68. That ID now names three rule sets (Releases survive release-neutral merges to main; pin-only edge diffs aggregate (semantic-diff/v3) #45, Release policy: AGENTS.md and CONTRIBUTING.md are release-neutral #68, this PR), and the promoter records it in intents, so a durable record can't say which rules it was checked under. Bumping it is a separate call.Testing
CI runs the updated test file through
scripts/ci-python.sh; the first push's run passed all 10 tests. I didn't run it locally because machine load was above the agreed limit. I checked the classifications directly:bot/state/cut_log.jsonis affecting, whilebot/state/bot_state.json,bot/poll.pyandsite/ops/brain-canary.pyare neutral.