Skip to content

fix(release): forward-port #29412 cron gate agent identity to 0.12 - #29565

Merged
buluoray merged 1 commit into
release/0.12.0from
crew/slack/fwd-0.12-cron-agent-scope
Nov 4, 2026
Merged

buluoray merged 1 commit into
release/0.12.0from
crew/slack/fwd-0.12-cron-agent-scope

Conversation

@buluoray

@buluoray buluoray commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Cron turns on 0.12 are governed by the profile an administrator binds to their agent, the same as chat turns on that agent.

On release/0.12.0 a cron turn hands the PreToolUse gate its cron:<job> session key but no agent, so resolve_active_scope skips the task bind on the agent name. A profile bound to an agent governs its chat turns but not its cron turns. #29412 fixed this on main; #29386 brought the other 0.12 picks without this cron mirror.

Why it matters

An operator who restricts an agent with a bound profile expects every turn that agent runs to obey it. On 0.12 a scheduled job on that agent runs outside the restriction, unattended.

Not a goal

What changed (motivation → approach → change)

Cherry-pick (-x) of #29412's merged commit 46af64f9 onto release/0.12.0. The gate now gets the alias or crew record name a chat turn on that agent would hand it: each step's alias on an agent_sequence; on a single-agent job whose capture selected a member, the member's live alias (via member_config_for_id), else its captured selection_name; otherwise the job's agent_id, else the agent that runs. It is read before a crewmate's worker swap. The dispatched template stays on session acquisition and message build.

Forward-port conflict: test/test_cron_sequence_member_alias.py. On main the new test follows tests from #28410, which this branch does not carry. Kept the release file and appended only the new test. The other four files applied cleanly, and all five files match #29412's added and removed lines.

Backwards compatibility

Compatible: cron turns gain an agent at the gate; a job whose agent has no bound profile resolves the same scope as before.

Removes nothing: the change only adds an agent argument to the cron gate call.

Tests

Proof: not provable -- other: release-branch pick of a merged fix; the proof ran on #29412

Run on this branch, one file at a time with -n 0:

  • test/test_governance_unattended_turns.py: 22 passed
  • test/test_cron_sequence_member_alias.py: 12 passed
  • test/test_cron_ephemeral_session.py: 17 passed
  • test/test_cron_crewmate_worker.py: 12 passed

flake8, isort, black and mypy are clean on the touched files.

Manual verification

N/A — unit coverage sufficient; the same change passed review and CI on #29412.

Related Issues

Refs #29412
Part of #29411

Sibling sweep

Siblings: none -- the heartbeat and Slack-nudge sites are tracked in #29411 and are not part of this pick

Pattern harvest

Not generalizable: a release pick of one merged fix; the class is tracked on #29411.

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

Contributed under the project's Apache-2.0 license.

…29412)

A cron turn handed the PreToolUse gate its cron:<job> session key but
no agent, so resolve_active_scope skipped the task bind on the agent
name. A profile an administrator binds to an agent governed its chat
turns but not its cron turns.

Hand the gate the alias or crew record name a chat turn on that agent
hands it: each step's alias on an agent_sequence. On a single-agent
job whose capture selected a member, the member's live alias (the record
dispatch resolves through member_config_for_id), else its captured
selection_name, whatever the job's agent names; otherwise the job's
agent_id, else the agent that runs. Read before a crewmate's worker
swap. The dispatched template stays on session acquisition and message
build.

(cherry picked from commit 46af64f)

Forward-port conflict: test/test_cron_sequence_member_alias.py. On
main the new test follows tests from #28410, which this branch does
not carry. Kept the release file and appended only the new test.
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 4, 2026 10:35
@buluoray
buluoray requested review from cruisercohen and removed request for a team November 4, 2026 10:35
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision ff2dca24017c243eea645abc09d04e5de92b310f touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: this is a clean release pick of a fix already merged on main, it removes nothing, and the gate's agent keyword already exists on this branch (turn_stream.py:118).

Notes

  • An admin's bound profile now applies to cron turns that used to run outside it. The description should say how an operator undoes a profile that turns out too tight, since an unattended job now gets refused.

[DESIGN-REVIEWED] ff2dca2

Description read

[DESCRIPTION-READ] 9301e670fc2e16dac1719a0f7048f3c020276a52afca1785f4157d9e781b242c

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 4, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of ff2dca24017c243eea645abc09d04e5de92b310f — 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 merged fix #29412 to 0.12, and nothing in it blocks. One sibling-site set is still unfixed, and the PR says so: heartbeat and Slack-nudge, tracked in #29411.

Notes

What this change ships

Inventory (5 items) — 4 justified

Intent: on 0.12, a profile an administrator binds to an agent also governs that agent's scheduled cron turns, not only its chat turns. FIX.

  1. Each step of a cron agent-sequence job is now governed by the profile bound to that step's agent alias, not left ungoverned by it — justified
  2. A single-agent cron job is now governed by the profile bound to the job's agent alias — justified
  3. A cron job whose captured context selected a member is governed by the member's current alias, or its captured name as a fallback, even when the job names a template or another member — point patch, siblings deferred to Cron turns skip a task governance profile bound to their agent #29411
  4. The governance spec now describes the agent name the cron gate receives — justified
  5. Added tests pin the gate's agent identity for sequence, single-agent, member and crewmate-worker cron turns — justified

[FIRST-PRINCIPLES-REVIEWED] ff2dca2

Description read

[DESCRIPTION-READ] 9817e3f496b312f0acf92503d3daf5c7aa346e0368e321a1181b09b098c645ff

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 4, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] ff2dca2

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

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

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of ff2dca24017c243eea645abc09d04e5de92b310f and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ff2dca2

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

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 4, 2026
@buluoray
buluoray merged commit dc5cf57 into release/0.12.0 Nov 4, 2026
22 checks passed
@buluoray
buluoray deleted the crew/slack/fwd-0.12-cron-agent-scope branch November 4, 2026 15:15
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 4, 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