Skip to content

fix: backport the helper-turn memory gate and Ultra Mode chip fix to 0.12.1 (batch 34) - #32242

Merged
buluoray merged 2 commits into
release/0.12.0from
crew/slack/0.12.1-batch-34
Nov 7, 2026
Merged

buluoray merged 2 commits into
release/0.12.0from
crew/slack/0.12.1-batch-34

Conversation

@buluoray

@buluoray buluoray commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Needs Bolin's OK before merge. #31626 changes 36 files across the background-helper paths, above the small-diff bar. Each pick has one small hunk resolved by hand (a test-module marker and a docs index row), listed under What changed.

Problem / Motivation

Goal: Bring two KAS and Bot fixes that merged on main after v0.12.0 onto release/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

PR Source issue What a 0.12.0 user sees today
#31626 #26089 (gwapoats) Background helper sessions (_bg, _consolidate) have no memory admission, so titles, labels, summaries and history consolidation keep starting while the host is under critical memory pressure.
#31635 #31609 While Ultra Mode is off, the composer's Ultra Mode chip still looks on.

Not a goal

What changed (motivation → approach → change)

Each main squash commit was cherry-picked with -x onto release/0.12.0 @ 4d9f6b123e, in merge order, one commit each. The branch merges cleanly onto the current head ca12cbdabf.

# PR main commit release commit Pick
1 #31626 skip background helper turns while host memory is critical 9a2fc37b46 c59ca57496 one test hunk resolved by hand
2 #31635 keep the Ultra Mode chip grey while it is off c005d9dec2 a1d785a799 one docs hunk resolved by hand

Hand-resolved hunks:

PR File Resolution
#31626 test/test_history_consolidator.py #31626's pytestmark = pytest.mark.usefixtures("ample_host_free_memory") block was added above a comment divider this branch keeps.
#31635 docs/decisions/README.md only #31635's own index row was added; the other rows on main'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

  • CI does not run the backend suite on PRs into 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: three test_acp_copilot_backend.py tests this branch already fails, and test_file_line_cap.py::TestTheCheckout::test_the_change_keeps_the_cap_and_its_baseline_rows, which failed at the base 4d9f6b123e and is cleared on the current head by refactor: backport the agents.py effort-levels split to 0.12.1 (batch 29) #32184.
  • Frontend: the touched CrewModeChip.test.tsx and every test that reads CrewModeChip, 2 files, 31 passed.
  • flake8 passes on the changed Python files.

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 main unchanged; 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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

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).
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 7, 2026 09:32
@buluoray
buluoray requested review from tim-finnigan and removed request for a team November 7, 2026 09:32
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

UX-level review of a1d785a7996a1750abc6b2dd275441a485585a1f — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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

  • Ultra Mode chip, off: the bolt and the "Ultra Mode" label change from ultra-accent to text-muted hover:text-text (CrewModeChip.tsx; the .crew-chip-text accent rule is removed from crew-mode.css). There is no screenshot, recording or blind-read entry for it. To close the gap, attach one still of the composer showing the chip off next to the other composer chips, in light and dark themes.
  • Ultra Mode chip, on: the same chip, still showing the accent tint, the 2px edge and the gradient label. A still is needed to confirm a glance tells off from on now that off has lost its accent colour.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of a1d785a7996a1750abc6b2dd275441a485585a1f — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

This backports two fixes already merged on main. Each has a named issue (#26089, #31609), and the memory gate reuses the existing admission_check gate instead of adding a new one.

Notes

  • Item 3 — the manual "Regenerate title" path gets a second exemption: it opts out with memory_gate=False, but run_bg_oneliner already exempts StartPriority.FOREGROUND, which the documented rule reserves for "a caller a person is waiting on". That is exactly the comment's case: "Ungated: a person is waiting". Subtraction: in generate_manual_title, replace memory_gate=False with start_priority=StartPriority.FOREGROUND and drop the memory_gate pass-through from _generate_title_via_kiro. Counted memory_gate= call sites in src/: 2 (the judge and this one). The judge cannot use FOREGROUND, so the parameter itself stays. Clears when: the fix lands on main first and is backported, or a human keeps it as is.

What this change ships

Inventory (6 items) — 6 justified

Intent: give 0.12.x users two fixes already merged on main: helper LLM turns stop starting under critical memory, and the off Ultra Mode chip stops looking on. This is a FIX.

  1. Background helper turns (titles, labels, summaries, history consolidation) are skipped while host memory is critical, and each skip writes one INFO log line — justified
  2. The nudge.wake judge still runs under critical memory — justified
  3. The manual "Regenerate title" still calls the model under critical memory — justified
  4. The admission-gate help text now lists the skipped background helpers — justified
  5. The Ultra Mode chip's bolt and label are grey while it is off — justified
  6. A new decision record and index row for the grey off chip — justified

[FIRST-PRINCIPLES-REVIEWED] a1d785a

Description read

[DESCRIPTION-READ] 1a0f23672565f657df97d385293907c66dbd46d17b1f440f438bd3d3d4b9058a

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of a1d785a7996a1750abc6b2dd275441a485585a1f — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Both picks are byte-identical to fixes already merged on main. The memory gate fails open and reuses the existing admission_check switch, so nothing here is new design or a one-way door.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed a1d785a7996a1750abc6b2dd275441a485585a1f — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] a1d785a

Verdict parsed from the review's SHA-scoped output markers for commit a1d785a7996a1750abc6b2dd275441a485585a1f.

False positive or not applicable? A repository writer can comment:
/ai-review override fable a1d785a7996a1750abc6b2dd275441a485585a1f false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — 🔴 changes requested (blocking)

GPT 6.1 found at least one blocking issue that must be resolved before merging a1d785a7996a1750abc6b2dd275441a485585a1f. 1 of 1 blocking finding(s) are security-class and were withheld from adjudication, so the blocking verdict stands.

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

Supersedes: 2026-10-30-the-ultra-mode-name-wears-the-purple-to-blue-gradient.md (in part: "the bolt and every other Ultra Mode surface keep the solid accent", for the composer chip while off only); 2026-10-29-crew-mode-ships-behind-a-default-off-feature-preview.md (in part: "one solid theme accent", for the composer chip while off only)
Trigger: With the preview enabled and Ultra Mode off, ComposerDockView renders an unpressed CrewModeChip; the changed component removes the bolt’s accent and the changed stylesheet removes the label’s accent.
Outcome: The release changes recorded product behavior. The base rule explicitly requires blocking a PR carrying a superseding entry until a maintainer overrides the flag, including the accompanying implementation.
Anchor: recorded-decisions-are-not-regressions
Fix: Obtain the maintainer review override for this backport; the linked decision on the source PR does not exempt this PR from the rule.

[BLOCK-MERGE] a1d785a
[GPT-REVIEWED] 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 Supersedes: line (docs/decisions/2026-11-06-the-ultra-mode-chip-is-grey-while-off.md:5). Rule recorded-decisions-are-not-regressions (.review-base-rules/AUTOSDE.yaml:827-828, blocking: true) says to flag such a PR at lines 860-865, and only a maintainer's override clears it. The entry names maintainer Bolin Chen (MAINTAINERS.md:11) and links their ruling (:22), but the rule (:864-865) says the entry doesn't clear the flag by itself; only the override does. The FLAG test needs an extreme, unlikely trigger, and that isn't met, so UPHOLD-FENCED.

[ADJUDICATION] a1d785a7996a1750abc6b2dd275441a485585a1f total=0 uphold=0 downgrade=0
[GPT-ADJUDICATED] a1d785a7996a1750abc6b2dd275441a485585a1f

[ADJUDICATION-FENCED] a1d785a7996a1750abc6b2dd275441a485585a1f fenced=1 flagged=0
UPHOLD-FENCED F1 docs/decisions/2026-11-06-the-ultra-mode-chip-is-grey-while-off.md:5 -- The PR carries a Supersedes entry, which recorded-decisions-are-not-regressions (blocking: true, AUTOSDE.yaml:860-865) flags by design until a maintainer override, so the trigger is certain, not extreme, and FLAG does not apply.
[GPT-ADJUDICATED-FENCED] a1d785a7996a1750abc6b2dd275441a485585a1f

False positive or not applicable? A repository writer can comment:
/ai-review override gpt a1d785a7996a1750abc6b2dd275441a485585a1f false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@buluoray
buluoray merged commit deac2ef into release/0.12.0 Nov 7, 2026
20 of 23 checks passed
@buluoray
buluoray deleted the crew/slack/0.12.1-batch-34 branch November 7, 2026 15:55
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Nov 7, 2026
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