Repository navigation
fix: backport the helper-turn memory gate and Ultra Mode chip fix to 0.12.1 (batch 34) - #32242
Conversation
Background helper sessions (the _bg one-liners behind titles, tags, labels and summaries, and the _consolidate history pass) read no memory figure before starting, so on a host near its memory floor they kept starting until the gateway stalled and the watchdog restarted it, ending every live session. run_bg_oneliner at BACKGROUND priority and background_turn now ask resource_status.admission_check, the verdict cron firings and task-runner steps already defer on, and raise before acquiring a session while it refuses. The raise lands where a failed acquisition already does, so each caller's existing failure path handles it. The nudge.wake judge passes memory_gate=False: a refused judge fails open and would fire the full wake turn it exists to suppress. Test modules that drive a helper turn opt into the ample_host_free_memory pin so they no longer depend on the runner's free memory. (cherry picked from commit 9a2fc37) Release backport, hand-resolved: test/test_history_consolidator.py conflicted next to a comment divider this branch keeps; this change's pytestmark block was added above it unchanged. Every other file applied unchanged. Original author: Bolin Chen (#31626).
(cherry picked from commit c005d9d) Release backport, hand-resolved: docs/decisions/README.md conflicted in the index table; only this change's own row was added (the other rows name decision records this branch does not carry). Every other file applied unchanged. Original author: Bolin Chen (#31635).
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing a screenshot of the composer's Ultra Mode chip while off, which this PR re-colours from the accent to grey. The PR attaches no image, so the blind read was not performed. Evidence gaps
[UX-REVIEWED] a1d785a Description read[DESCRIPTION-READ] fa3fa30ffa46bb431c99950a39ad0cac944179d98634e75450056e65ef1871ee That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This backports two fixes already merged on Notes
What this change shipsInventory (6 items) — 6 justifiedIntent: give 0.12.x users two fixes already merged on
[FIRST-PRINCIPLES-REVIEWED] a1d785a Description read[DESCRIPTION-READ] 1a0f23672565f657df97d385293907c66dbd46d17b1f440f438bd3d3d4b9058a That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Both picks are byte-identical to fixes already merged on Notes
[DESIGN-REVIEWED] a1d785a Description read[DESCRIPTION-READ] 9525a27ad59dba9dc87739ece1180db7648ab10cfce7afbe968e8752f6ac7c31 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- docs/decisions/2026-11-06-the-ultra-mode-chip-is-grey-while-off.md:5 -- Superseding decision requires a maintainer override
[BLOCK-MERGE] a1d785a Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 (fenced): this is not a security harm. The finding is a by-design process gate, and the condition that triggers it is always true here, not rare. The PR carries an entry with a False positive or not applicable? A repository writer can comment: |
Problem / Motivation
Goal: Bring two KAS and Bot fixes that merged on
mainafterv0.12.0ontorelease/0.12.0, one commit per fix, in a PR of their own so they can be reviewed and reverted apart from the low-risk batches.Why it matters
_bg,_consolidate) have no memory admission, so titles, labels, summaries and history consolidation keep starting while the host is under critical memory pressure.Not a goal
main; nothing is changed only here.CHANGELOG.mdchange. Cuttingv0.12.1-rc.Nand the bare tag follow docs/build/release.md and stay with the maintainers.crew_pause.pycomes from feat(crew-mode): Ultra Mode Pause all / Resume all, team lead by default, Overview tracks the goal #29928 (Ultra Mode Pause all / Resume all) andconnections/crew_oauth.pyfrom feat(connections): Crew-owned GitHub OAuth on KAS behind connections.crew_oauth (default off) #29543 (Crew-owned GitHub OAuth); neither file exists onrelease/0.12.0.What changed (motivation → approach → change)
Each main squash commit was cherry-picked with
-xontorelease/0.12.0@4d9f6b123e, in merge order, one commit each. The branch merges cleanly onto the current headca12cbdabf.9a2fc37b46c59ca57496c005d9dec2a1d785a799Hand-resolved hunks:
test/test_history_consolidator.pypytestmark = pytest.mark.usefixtures("ample_host_free_memory")block was added above a comment divider this branch keeps.docs/decisions/README.mdmain's side name decision records this branch does not carry.Both resolutions came out with added and removed lines identical to the main commits, and every other file applied unchanged. #31626's config edits (
config-baseline.json,config/sections_agent.py) change help text only, not a setting. These commits are authored with the public identity the push guard requires, because of the hand-resolved hunks, and each names its original author in its message.builder-security checked: no pick changes a bind, a listener, a route, an auth check, an ingress rule or a storage grant.
Backwards compatibility
Compatible: each change is the one already merged on
main, and each PR's own compatibility note applies unchanged. Under critical host memory, background helper turns are now skipped; chat turns and manually triggered cron runs are never gated, and an unreadable memory probe still admits.Removes nothing: no pick hides, deletes or renames anything 0.12.0 accepts.
Tests
Proof: not provable -- other: a backport of main commits whose proofs ran on their own PRs
release/*, so the related set was run here: every touched test file plus every test file that imports a touched module or reads the memory-posture fixture or config baseline, 205 files, one pytest process per batch of 20,-n 0. 9735 passed. 4 failed, none from these picks: threetest_acp_copilot_backend.pytests this branch already fails, andtest_file_line_cap.py::TestTheCheckout::test_the_change_keeps_the_cap_and_its_baseline_rows, which failed at the base4d9f6b123eand is cleared on the current head by refactor: backport the agents.py effort-levels split to 0.12.1 (batch 29) #32184.CrewModeChip.test.tsxand every test that readsCrewModeChip, 2 files, 31 passed.Manual verification
N/A - every pick was verified on its own main PR. The 0.12.1 RC soak is the end-to-end check.
Screenshots / video
Why no screenshot: #31635's chip style is applied from
mainunchanged; its look is reviewed on its own PR, not here.Related Issues
Backport to the 0.12 line for 0.12.1 of #31626 and #31635. Source issues: #26089, #31609.
Sibling sweep
Siblings: none -- each source PR carried its own sibling sweep; this PR only carries those fixes.
Pattern harvest
Not generalizable: this PR only carries fixes already on
main. Each source PR has its own harvest.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.