fix(sdlc): prevent bare primary alpha role inference#3830
Conversation
Remove the legacy hapax-council -> alpha path fallback so bare primary sessions do not inherit the alpha claim slot. Tighten the FM-1 regression to prove an alpha/* branch with a session id resolves through roleless and ignores a stale alpha claim.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR removes an implicit role inference fallback from the agent role resolution function, which no longer treats the primary ChangesPrimary Checkout Path Role Semantics
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cdd2545583
ℹ️ 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".
| # The primary hapax-council checkout is not a lane identity. Bare sessions | ||
| # there must not phantom-inherit alpha; launchers export explicit roles. | ||
| case "$base" in | ||
| hapax-council--*) suffix="${base#hapax-council--}" ;; |
There was a problem hiding this comment.
Align primary-session identity with existing consumers
When a bare session starts in the primary checkout with only a session id, this branch now makes hapax_agent_identity return empty, so cc-claim/cc-task-gate degrade to roleless. Existing consumers were not updated: for example hooks/scripts/session-context.sh still falls back from an empty helper result to */hapax-council) ROLE="alpha", and scripts/cc-close only asks hapax_agent_identity, so the same session can be prompted/onboarded as alpha while claims and gate decisions are keyed as roleless and close can miss clearing the roleless lease. Please update those remaining identity fallbacks to use the same effective-role behavior, or keep the primary checkout mapping consistent until they are migrated.
Useful? React with 👍 / 👎.
| # The primary hapax-council checkout is not a lane identity. Bare sessions | ||
| # there must not phantom-inherit alpha; launchers export explicit roles. | ||
| case "$base" in | ||
| hapax-council--*) suffix="${base#hapax-council--}" ;; | ||
| *) return 1 ;; |
There was a problem hiding this comment.
Skip relay inference for the primary checkout
In a primary hapax-council checkout with no explicit role but a session id, this only makes hapax_agent_identity fail; hapax_effective_role then checks hapax_relay_inferred_role before falling back to roleless. If exactly one relay file exists, e.g. ~/.cache/hapax/relay/alpha.yaml, cc-claim and cc-task-gate still resolve the bare primary session as that lane and can inherit its claim, so the intended “primary checkout is not a lane identity” behavior is bypassed in the normal relay-enabled environment.
Useful? React with 👍 / 👎.
Summary
Verification
Summary by CodeRabbit
Bug Fixes