Repository navigation
feat: implement issue #1494 — [Phase 4] Initiative driver counts human-gated and zombie sub-issues as in-flight — epic #1402 silently deadlocked at slots=0 for days - #1543
Conversation
…n-gated and zombie sub-issues as in-flight — epic #1402 silently deadlocked at slots=0 for days
🤖 CodeAnt AI — Review Status
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Warning Review limit reached
Next review available in: 56 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 6a1b05d550c8a33b34783823c603d2a021a72a0d
Review mode: triage-approved (single reviewer)
Summary
Adds gated-slot exclusion and zombie reporting to the initiative driver: dev-lead:needs-human carriers no longer consume an in-flight slot (but are still never re-released), stale dev-lead slot-holders are surfaced via a log line plus one idempotent epic comment, and slot math is now logged explicitly. Confirms the triage assessment: well-scoped shell change with matching bats coverage; all substantive CI checks green.
Linked issue analysis
Closes #1494 and substantively addresses all five acceptance criteria: (1) needs-human carriers are excluded from the in-flight count while still entering released[] so they are never re-released while gated; (2) zombie detection via the most recent dev-lead labeled event older than STALE_HOURS (default 72h, configurable), surfaced with a driver log line and an idempotent epic comment keyed on the exact zombie set; (3) the per-epic log reports the slot math explicitly ('in-flight=N (M gated excluded), cap=K, releasing R'); (4) bats tests cover gated exclusion, cap enforcement after exclusion, and zombie reporting with labels untouched; (5) hands-off/hold semantics and release ordering are unchanged, and labels are never auto-removed from gated/zombie items. The cap's new meaning ('actively workable items') is called out in the header comment as the issue requested.
Findings
No blocking issues.
- (Non-blocking, fail-safe) Per-page jq in
dev_lead_label_ts—gh api --paginate --jqapplies the filter per page, so an issue with a multi-page event history can emit multiple timestamps;is_stalethen fails to parse the multi-line value and treats the slot as NOT stale. This fails in the safe direction (never a false zombie) but can miss real zombies on issues with long event histories. Considerjq -s/--slurp-style aggregation in a follow-up. - (Non-blocking) Staleness proxy — CodeAnt flagged that the last
labeledevent is a proxy that could mark an actively-progressing long-running issue as a zombie. The dev-lead responded 'no-changes'; this is acceptable because zombie flagging is report-only (no label mutation, the slot still counts toward the cap), so a false positive costs at most one idempotent epic comment. Matches the issue's 'exclude/report only' guidance. date -u -dis GNU-date-specific — fine on ubuntu runners; on non-GNU platformsis_stalefails safe (returns not-stale).- Secret scan: gitleaks CI check passed. The
run_secret_scanningMCP tool was not available in this run; no secrets are present in the diff (shell logic + tests only).
CI status
All substantive checks green: shellcheck, ShellCheck, bats, unit-tests, Lint, actionlint, CodeQL (actions + python), SonarCloud quality gate, Agent Security Scan, agent-shield, gitleaks secret scan, holdout-guard, caller-stub-freeze, template-drift, and all validate-* checks SUCCESS. One review / review check shows CANCELLED (a superseded run of this review pipeline itself) and one dev-lead / dispatch instance is IN_PROGRESS (orchestration; another instance already SUCCESS) — neither reflects on code quality.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
There was a problem hiding this comment.
Code Review
This pull request introduces changes to scripts/initiative-driver.sh to exclude human-gated sub-issues from the in-flight count and to detect and report stale 'zombie' slot-holders on epics. It also adds comprehensive tests in tests/test_initiative_driver.bats. The review feedback recommends several robustness improvements: replacing short-circuit && logic with standard if statements to prevent premature exits under set -e, using jq optional chaining to safely handle null or missing JSON properties, and asserting an exit status of exactly 1 instead of using ! when testing for the absence of a pattern with grep in BATS tests.
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
|
CI checks on this PR are still running. Once they complete, re-mention Posted by the donpetry-bot PR-review cascade. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 13f07eefc1b6d3c1f299819ceb791b4275fb15ca
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)
Summary
PR #1543 implements issue #1494: dev-lead:needs-human carriers are excluded from the in-flight count (never re-released), and stale dev-lead slot-holders are surfaced via a log line plus one idempotent epic comment without mutating labels. Well-scoped shell change to initiative-driver.sh with matching bats coverage (gated exclusion, cap enforcement, zombie report, and not-a-zombie-on-recent-activity); all substantive CI checks are green (shellcheck, bats, unit-tests, CodeQL, SonarCloud, gitleaks, agent-shield, actionlint). Downstream impact: (none). No auth/secrets/migration/injection surface — MEDIUM risk, approving.
Findings
- INFO: (scripts/initiative-driver.sh:line 146) gemini flagged '[[ -z "$ts" ]] && return 1' (is_stale) and '[[ -z "$label_ts" ]] && return 0' (last_activity_ts) as unsafe under set -e. Empirically verified this is NOT a bug: a failing non-final command in a && list is exempt from set -e, so the guard falls through and the function continues. The not-a-zombie bats test exercises this exact path and passes in CI. No change required.
- MINOR: (tests/test_initiative_driver.bats:line 424) gemini nit: '! grep -qF ...' assertions (e.g. 'issue edit 3', 'issue comment 1', 'issue edit') could mask a grep exit code of 2 (e.g. missing file) as a pass; asserting '[ "$status" -eq 1 ]' is stricter. Low severity and fail-safe here — $GH_LOG is always created in setup, so grep never returns 2. Non-blocking; worth a follow-up for strictness.
- INFO: (scripts/initiative-driver.sh:line 124) Pre-existing edge case (noted by prior bot review, unchanged here): 'gh api --paginate --jq' applies the jq filter per page, so an issue with multi-page event history can emit multiple label timestamps. last_activity_ts now prefers updated_at (single value) when newer, so this fails safe toward not-stale (never a false zombie). Acceptable for a report-only path; consider slurp-style aggregation in a follow-up.
- INFO: run_secret_scanning MCP tool not available in this run (GitHub Secret Protection not exposed). gitleaks CI check passed; diff is shell logic + bats tests with no secret material. No fabricated scan result.
Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). Reply if you need a human review.
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-08-19T13:34:47Z. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 13f07eefc1b6d3c1f299819ceb791b4275fb15ca
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)
Summary
PR #1543 (closes #1494) excludes dev-lead:needs-human carriers from the initiative driver's in-flight count and surfaces stale 'zombie' dev-lead slot-holders via a log line plus one idempotent epic comment, never mutating labels. Well-scoped change to initiative-driver.sh with matching bats coverage; all substantive CI checks green; downstream impact (none). The triage-escalated gemini 'HIGH' (&&-short-circuit under set -e) is a false positive and the grep-assertion 'MEDIUM' is a fail-safe test nit, so no genuine HIGH surface remains — approving.
Findings
- INFO: Gemini flagged '[[ -z "$ts" ]] && return 1' (is_stale) and '[[ -z "$label_ts" ]] && return 0' (last_activity_ts) as unsafe under 'set -euo pipefail'. This is NOT a bug: bash exempts a non-final command in a && list from set -e, so a false [[ ]] test falls through to the next line rather than exiting. The not-a-zombie bats test exercises this exact fall-through path and passes in CI. (scripts/initiative-driver.sh:130)
- MINOR: Gemini nit: '! grep -qF ...' assertions could mask a grep exit code of 2 (e.g. missing file) as a pass; '[ "$status" -eq 1 ]' would be stricter. Fail-safe here since $GH_LOG is always created in setup(), so grep never returns 2. Non-blocking; worth a follow-up for strictness. (tests/test_initiative_driver.bats:424)
- INFO: 'gh api --paginate --jq' applies the jq filter per page, so an issue with multi-page event history can emit multiple label timestamps; last_activity_ts prefers updated_at when newer and is_stale rejects unparseable/multiline values, so this fails safe toward not-stale (never a false zombie). Acceptable for a report-only path; consider slurp-style aggregation in a follow-up. (scripts/initiative-driver.sh:124)
- INFO: 'date -u -d' is GNU-date-specific — fine on ubuntu runners; on non-GNU platforms is_stale fails safe (returns not-stale). (scripts/initiative-driver.sh:138)
- INFO: run_secret_scanning MCP tool not available in this run (GitHub Secret Protection not exposed). gitleaks CI check passed; diff is shell logic + bats tests with no secret material. No fabricated scan result. (n/a)
Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). Reply if you need a human review.
Superseded by automated re-review at 13f07ee.
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 13f07eefc1b6d3c1f299819ceb791b4275fb15ca
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)
Summary
PR #1543 adds gated-slot exclusion and zombie detection to scripts/initiative-driver.sh (closes #1494), a gh-CLI automation script with no secrets/auth/crypto/migration surface. All substantive CI gates are green (shellcheck, bats, unit-tests, CodeQL, gitleaks, SonarCloud, agent-shield) and the change is well-structured with thorough tests. The run_secret_scanning MCP tool was not available in this environment, so the gitleaks CI check (passing) is relied upon; downstream impact is (none).
Findings
- INFO: Gemini HIGH finding on line 146 (
[[ -z "$ts" ]] && return 1under set -e) is a FALSE POSITIVE. The left operand of an&&list is exempt from set -e, and is_stale is invoked inside anifcondition where set -e is inert regardless. Verified empirically: the idiom continues past the line without premature exit. shellcheck is clean. (scripts/initiative-driver.sh:146) - MINOR: Gemini MEDIUM: test assertions use
! grep -qF ...rather than[ "$status" -eq 1 ], which could theoretically mask a grep exit code 2 (missing file) as a pass. Low impact here — $GH_LOG is always created by the gh mock before these assertions run, and the pattern matches the file's pre-existing test style. Non-blocking nit. (tests/test_initiative_driver.bats:424) - MINOR: Same
! grepvs[ "$status" -eq 1 ]robustness nit as line 424. Non-blocking. (tests/test_initiative_driver.bats:495) - INFO: jq filter strings interpolate $DEV_LEAD_LABEL (e.g. last_activity_ts); this is trusted workflow config (default 'dev-lead'), not user-controlled input, and issue numbers come from GitHub's sub_issues API as integers. No injection risk in practice. (
scripts/initiative-driver.sh)
Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). Reply if you need a human review.
Superseded by automated re-review at 13f07ee.
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 13f07eefc1b6d3c1f299819ceb791b4275fb15ca
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)
Summary
PR #1543 excludes human-gated (dev-lead:needs-human) sub-issues from the in-flight slot count and surfaces stale 'zombie' dev-lead carriers via one idempotent epic comment (addresses #1494 / epic #1402 slots=0 deadlock). The triage-escalated gemini HIGH on scripts/initiative-driver.sh:146 ([[ -z "$ts" ]] && return 1 under set -e) is a false positive — bash exempts the left operand of && from errexit, execution continues on a false condition (verified empirically and by the passing not-a-zombie bats test that exercises that path). The gemini MEDIUM grep-assertion items are test-only robustness nits (GH_LOG always exists, so grep never returns 2). All CI is green (ShellCheck, actionlint, bats, unit-tests, gitleaks, CodeQL, SonarCloud, AgentShield); no secrets/auth/crypto/migrations; downstream impact is (none). MEDIUM logic change, all gates pass — approving.
Findings
- INFO (
scripts/initiative-driver.sh:146): gemini HIGH: '[[ -z "$ts" ]] && return 1' under set -e claimed to exit prematurely. False positive: the left operand of && is exempt from set -e; a false condition short-circuits and execution continues. Verified empirically and by the passing 'not-a-zombie' bats test which drives is_stale with a non-empty timestamp. No change required. - MINOR (
tests/test_initiative_driver.bats:424): gemini MEDIUM: 'grep' negative assertions use '! grep -qF ...' rather than 'run grep ...; [ "$status" -eq 1 ]'. A grep exit of 2 (e.g. missing file) would falsely pass. Non-blocking here because GH_LOG is always created by the mock gh, so grep only returns 0/1. Optional hardening. - MINOR (
tests/test_initiative_driver.bats:495): Same '! grep -qF' negative-assertion pattern as line 424; optional hardening to assert exact exit status 1. Non-blocking. - INFO (
scripts/initiative-driver.sh:124): last_activity_ts compares ISO-8601 UTC (…Z) timestamps as plain strings and takes the freshest of the last DEV_LEAD_LABEL event and updated_at; string ordering is valid for the fixed same-zone format, correctly resetting the zombie clock on any activity. is_stale treats empty/unparseable timestamps as not-stale (documented fail-safe). Logic is sound. - INFO (
scripts/initiative-driver.sh:152): report_zombies keys its epic comment on a marker containing the sorted slot set, and skips re-commenting when the marker already exists; DRY_RUN is honored. Comment body interpolates only numeric issue IDs, so no injection surface.
Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). Reply if you need a human review.
Superseded by automated re-review at 13f07ee.
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 2fcd947e176d95494831a899c26514ae52e1836f
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)
Summary
Implements #1494 (gated-slot exclusion + zombie slot detection) in initiative-driver.sh with strong test coverage. The triage-escalated 'high-priority' set -e finding from Gemini is a verified false positive: I reproduced the [[ cond ]] && return N pattern under set -euo pipefail with no premature exit, and both new functions are additionally called in tested contexts (if-condition and command substitution) that disable set -e inside them. Shellcheck is clean, the bats CI check passed (unit-tests was CANCELLED/superseded, not failed), and there is no auth/secret/crypto/migration/injection surface. Remaining items are minor test-assertion style nits. Downstream impact: none.
Findings
- INFO: Gemini high-priority finding is a FALSE POSITIVE.
[[ -z "$ts" ]] && return 1under set -euo pipefail does not cause premature exit (the left side of && is exempt from set -e), and is_stale/last_activity_ts are called in tested contexts (if-condition / command substitution) that disable set -e inside them regardless. Reproduced empirically and via the passing bats zombie/not-a-zombie tests. No change required. - MINOR: Negative assertion uses
! grep -qF ...which would pass on grep exit 2 (e.g. missing file). Preferrun grep -qF ...; [ "$status" -eq 1 ]. Low risk here since GH_LOG always exists (mock writes on every gh call). Non-blocking nit. - MINOR: Same negative-assertion nit as line 424: prefer asserting grep exit status == 1 over
!. Non-blocking. - INFO: unit-tests check is CANCELLED (superseded run), not FAILED. Authoritative test evidence is green: bats, shellcheck, ShellCheck, actionlint, CodeQL, SonarCloud, gitleaks all SUCCESS. mergeStateStatus=BLOCKED only because reviewDecision was empty (awaiting this approval).
- INFO: run_secret_scanning MCP tool not available in this environment; skipped per instructions. Diff is shell orchestration with no credential/secret content.
Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). Reply if you need a human review.
Superseded by automated re-review at 2fcd947.
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-08-19T17:04:24Z. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 2fcd947e176d95494831a899c26514ae52e1836f
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)
Summary
Well-scoped fix to scripts/initiative-driver.sh (closes #1494): human-gated (dev-lead:needs-human) sub-issues are excluded from the in-flight count so they stop starving epics, and stale dev-lead slot-holders are surfaced as zombies via one idempotent epic comment without mutating labels. Non-security logic change (no auth/secrets/crypto/DB/injection); all CI checks pass (ShellCheck, gitleaks, CodeQL, SonarCloud, bats). Downstream impact: (none). Gemini's HIGH finding is a false positive and the MEDIUM test nits are minor and non-blocking, so this is MEDIUM risk with all gates satisfied — approving without escalation to Tier 3.
Findings
- INFO: Gemini HIGH on line 146 (
[[ -z "$ts" ]] && return 1under set -e) is a false positive. Theguard && actionidiom is safe underset -euo pipefail: a non-last command in an AND-OR list is exempt from set -e, so when $ts is non-empty the[[ ]]returns 1,&& return 1is skipped, and execution continues — no premature exit. is_stale is also only invoked asif is_stale ...; then, where set -e is disabled in the condition regardless. The author demonstrates correct set -e understanding at the subshell( set -e; drive_epic "$e" )and all bats tests pass. (scripts/initiative-driver.sh:146) - MINOR: Gemini MEDIUM:
! grep -qF ...assertions of absence (e.g. lines 251, 322, 358-359 in the diff) do not distinguish grep exit 1 (no match) from exit 2 (error such as missing file). Non-blocking here because the mockghappends to $GH_LOG on every invocation and the script always calls gh, so the file always exists and grep returns 1. Optional hardening:run grep -qF ...; [ "$status" -eq 1 ]. (tests/test_initiative_driver.bats:251) - INFO: Secret-scanning MCP (mcp__github__run_secret_scanning) not available in this environment (only context7 MCP exposed); skipped per instructions. gitleaks CI check passed. No secrets/credentials in the diff.
- INFO: Reviewed new logic: gated carriers are marked released[] before the exclusion check (never re-released) but excluded from in_flight (correct per AC); zombies count toward in_flight (slot not auto-freed) and are only surfaced; report_zombies is idempotent via a marker comment and honors DRY_RUN; ISO-8601 UTC (…Z) string comparison for freshest-activity is chronologically valid; is_stale fails safe (empty/unparseable ts => not stale). No injection surface: zombie
listis integer issue numbers (sort -n) posted via quoted--body "$body". (scripts/initiative-driver.sh)
Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). Reply if you need a human review.
Superseded by automated re-review at 2fcd947.
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 2fcd947e176d95494831a899c26514ae52e1836f
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)
Summary
PR #1543 implements issue #1494: initiative-driver.sh now excludes dev-lead:needs-human sub-issues from the in-flight slot count (freeing epics that deadlocked at slots=0) and surfaces stale 'zombie' slot-holders via one idempotent epic comment without mutating labels, with four new bats cases. Risk is MEDIUM (non-trivial shell logic; no auth/secrets/DB/CI-security/GHA surface). shellcheck clean, gitleaks/bats/CodeQL/SonarCloud/actionlint all green; downstream impact is (none).
Findings
- INFO: Gemini HIGH (initiative-driver.sh:146,
[[ -z "$ts" ]] && return 1in is_stale; same idiom in last_activity_ts) is a FALSE POSITIVE. Underset -euo pipefail, the left operand of&&is exempt from set -e, and this compound is NOT the terminal command of the function (execution continues to the next statement when $ts is non-empty). is_stale is additionally invoked in anifcondition, which disables set -e within the function body. The idiom is safe; no premature exit occurs. - MINOR: Gemini MEDIUM (test lines ~424/495):
! grep -qF ...could theoretically false-pass if grep returned 2 on a missing file; asserting[ "$status" -eq 1 ]is stricter. Non-blocking here: $GH_LOG is created via mktemp in setup() and is always present, so grep cannot return 2. Standard BATS negation idiom; a nice-to-have hardening, not a defect. - INFO: Independent review of new logic is sound: lexicographic
>comparison of fixed-format ISO-8601 UTC (…Z) timestamps sorts chronologically; undateable/empty timestamps fail safe as NOT stale; gated carriers are recorded in released[] (never re-released) yet excluded from in_flight; zombie report comment is idempotent keyed on the sorted slot set; labels are never auto-mutated. Matches issue #1494 intent. - INFO: run_secret_scanning MCP tool is not exposed in this environment (only context7 MCP available); skipped the MCP secret scan and relied on the gitleaks CI check, which passed. No scan result fabricated.
Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). Reply if you need a human review.
Superseded by automated re-review at 2fcd947.
Assert grep's exit status is exactly 1 (pattern absent) rather than inverting with '!', so a grep error (status 2, e.g. missing GH_LOG) fails the test instead of false-passing (gemini-code-assist threads). The third thread (is_stale's '[[ -z ... ]] && return 1' under set -e) is refuted in-thread: a non-final member of an && list is exempt from errexit, and the only call site is an if condition. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
|
Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-08-20T03:21:34Z. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 1e3816be65b488c3dbe282477c061e6b5b4dcd98
Cascade: triage → deep (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5)
Summary
Phase 4 of the initiative-driver (#1494): human-gated (dev-lead:needs-human) carriers are excluded from the in-flight slot count while never being re-released, and stale 'zombie' slot-holders are surfaced via a log line plus one idempotent epic comment without mutating labels. Risk is MEDIUM (shell automation logic change; no auth/secrets/crypto/migrations). All CI gates are green (shellcheck, bats, actionlint, CodeQL, gitleaks, SonarCloud) and every advisory finding is resolved at the current head. Downstream impact: (none).
Findings
- info: Triage escalated on gemini's 'set -e + && causes premature exit' finding for is_stale(). This is a verified false positive: a failing NON-final member of an && list (the [[ -z "$ts" ]] test) is exempt from errexit per the bash manual, so execution continues to the next line. Empirically confirmed under
set -euo pipefail(all three cases reached, no early exit), and the base file already relies on this idiom (lines 152, 156). is_stale is additionally called inside anifcondition, where set -e is disabled in the function body anyway. Author correctly refuted the finding at the current head SHA; no code change warranted. - info: codeant-ai's zombie-clock concern was addressed: last_activity_ts() keys staleness on the freshest of the DEV_LEAD_LABEL
labeledevent and the issue'supdated_at, so comments/dispatches that record progress without reapplying the label reset the clock. Covered by the new 'not-a-zombie: old label but recent activity' bats test. - info: gemini's jq optional-chaining suggestion (.label?.name) was not code-changed but is harmless: jq's
andshort-circuits, so.label.nameis only evaluated for events where.event=="labeled", and such events always carry a.labelobject; null-propagation would yield null rather than error regardless. Non-blocking. - info: gemini's BATS hardening (assert grep status == 1 rather than using
!) was applied in 1e3816b, distinguishing pattern-absent from grep-errored (status 2). Test suite is comprehensive: gated exclusion, cap enforcement after exclusion, zombie report, and not-a-zombie cases. - info: report_zombies() builds the epic comment body and the marker from sorted integer sub-issue numbers only (sourced from the sub_issues API
.numberfield), so the#${list//,/, #}interpolation carries no injection risk. Comment posting is idempotent via a<!-- initiative-driver:zombie slots=... -->marker keyed on the exact zombie set.
Reviewed by the PR-review cascade (triage: haiku 4.5 → deep: opus 4.8 + duck: o4-mini → audit: fable 5). Reply if you need a human review.



User description
Closes #1494
Implemented by dev-lead agent. Please review.
CodeAnt-AI Description
Prevent human-gated and stalled sub-issues from silently blocking initiative progress
What Changed
dev-leadassignments are identified as zombies, logged, and reported once on the epic without changing their labelsImpact
✅ Fewer initiative deadlocks✅ Ready sub-issues resume when a slot is human-gated✅ Clearer alerts for stalled work💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.