You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[scanner] Attention pilot: Hive-maintained Actions workflows update or skip when the runtime covers the condition #16363
Hive-maintained GitHub Actions workflows that post comments duplicating runtime narration (e.g. the Actions refs reminder and author-mentioning follow-ups seen on #15966 and #15862) are changed to update/skip when the runtime already covers the condition. Document external bots (Prow) as outside Hive's control in src/docs/notifications.md.
Acceptance
Each affected workflow either edits its existing comment or skips when a hive:status card already carries the condition.
Docs list the migrated workflows and the Prow exclusion.
Note: the hive App token cannot push .github/workflows/* changes; the agent prepares the branch and a human (or a maintainer-pushed PR) lands the workflow files. Non-workflow parts (docs) can ship separately.
🔒 Claimed by agent scanner (agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.
The hive App token cannot push .github/workflows/*, so a maintainer must apply this diff (git apply) on top of the companion PR, which adds .github/scripts/hive-status-card.sh that the workflow calls. Workflow touched: .github/workflows/issue-closed-reopen-hint.yml (skips when the hive:status card has issue-close, otherwise edits its own marker comment in place). The refs sweep needs no workflow edit: its logic lives in src/scripts/comment-merged-refs.sh, changed in the PR.
diff --git a/.github/workflows/issue-closed-reopen-hint.yml b/.github/workflows/issue-closed-reopen-hint.yml
index d0eea0c7c..38e8dbd73 100644
--- a/.github/workflows/issue-closed-reopen-hint.yml+++ b/.github/workflows/issue-closed-reopen-hint.yml@@ -28,6 +28,9 @@ jobs:
timeout-minutes: 5
if: github.event.issue.user.login != github.event.sender.login
steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1+ with:+ sparse-checkout: .github/scripts
- name: Comment
env:
GH_TOKEN: ${{ github.token }}
@@ -38,10 +41,18 @@ jobs:
REASON: ${{ github.event.issue.state_reason }}
run: |
set -euo pipefail
+ # The runtime's close narration already says "Reply /reopen"; when+ # the hive:status card carries it, this comment would duplicate it.+ if .github/scripts/hive-status-card.sh has "${REPO}" "${ISSUE}" issue-close; then+ echo "hive:status card already carries the close narration; skipping."+ exit 0+ fi
# Written to a file rather than inlined: a multi-line --body inside a
# YAML block scalar picks up the block's indentation and renders as a
# code block on GitHub.
+ body_file="$(mktemp)"
{
+ printf '<!-- issue-closed-reopen-hint -->\n'
printf '@%s this issue was closed by @%s' "${REPORTER}" "${CLOSER}"
case "${REASON}" in
not_planned) printf ' as not planned' ;;
@@ -51,5 +62,6 @@ jobs:
printf 'If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it — check your running version against the fix before concluding the fix failed.\n\n'
printf 'If you are still seeing the problem, comment `/reopen` and it will be reopened for you — you do not need write access. '
printf 'Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.\n'
- } > /tmp/closed-hint.md- gh issue comment "${ISSUE}" --repo "${REPO}" --body-file /tmp/closed-hint.md+ } > "${body_file}"+ # Edit the earlier hint on a reopen/close cycle instead of adding another.+ .github/scripts/hive-status-card.sh upsert "${REPO}" "${ISSUE}" '<!-- issue-closed-reopen-hint -->' "${body_file}"
🔒 Claimed by agent scanner (agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.
The hive App token cannot push .github/workflows/*, so a maintainer must apply this diff (git apply) with their own credentials. This supersedes the earlier patch comment on this issue (posted 2026-11-03T04:46Z); use this one. It was refreshed after the owner decision above. Apply it after #16451 merges: that PR makes .github/scripts/hive-status-card.sh report read/parse failures as exit 3 instead of absence, and it adds .github/scripts/test-hive-status-card.sh, which this patch wires into CI.
Workflow files changed:
.github/workflows/issue-closed-reopen-hint.yml: checks out .github/scripts from the default-branch ref of the issues event. The checkout uses pinned actions/checkout with persist-credentials: false, and permissions stay contents: read + issues: write. The workflow skips when the hive:status card carries issue-close (exit 0). It fails the job visibly with ::error:: when the helper exits 3 and does not post. Otherwise (exit 1) it upserts only github-actions[bot]'s own <!-- issue-closed-reopen-hint --> comment. It also drops the fixed /tmp/closed-hint.md path.
.github/workflows/v2-ci.yml (contract-tests): runs .github/scripts/test-hive-status-card.sh and src/scripts/test-comment-merged-refs.sh in canonical CI. Until this lands, nothing in CI runs either test.
.github/workflows/integration-candidate.yml, .github/workflows/integration-technical-v2-ci.yml: regenerated with python3 .github/scripts/generate-integration-ci.py. They only mirror the v2-ci.yml change.
refs-sweep.yml needs no edit. Its loop already reports a non-zero comment-merged-refs.sh exit as ::warning::sweep failed for PR #N, which is how the sweep's new card-read error surfaces.
diff --git a/.github/workflows/integration-candidate.yml b/.github/workflows/integration-candidate.yml
index 45c8465e8..c3fd93caa 100644
--- a/.github/workflows/integration-candidate.yml+++ b/.github/workflows/integration-candidate.yml@@ -343,6 +343,10 @@ jobs:
run: bash scripts/test-issue-coauthor.sh
- name: Issue confirm-fixed command (#9746)
run: bash scripts/test-issue-confirm-fixed.sh
+ - name: hive:status card helper (#16363)+ run: bash ../.github/scripts/test-hive-status-card.sh+ - name: Refs sweep defers to the hive:status card (#16363)+ run: bash scripts/test-comment-merged-refs.sh
- name: Release push retry/deferral state machine (#5142)
run: bash scripts/test-release-push-retry.sh
- name: release_sha ancestry guard (#6419)
diff --git a/.github/workflows/integration-technical-v2-ci.yml b/.github/workflows/integration-technical-v2-ci.yml
index 7c7ebd7a0..f8cba9553 100644
--- a/.github/workflows/integration-technical-v2-ci.yml+++ b/.github/workflows/integration-technical-v2-ci.yml@@ -203,6 +203,10 @@ jobs:
run: bash scripts/test-issue-coauthor.sh
- name: Issue confirm-fixed command (#9746)
run: bash scripts/test-issue-confirm-fixed.sh
+ - name: hive:status card helper (#16363)+ run: bash ../.github/scripts/test-hive-status-card.sh+ - name: Refs sweep defers to the hive:status card (#16363)+ run: bash scripts/test-comment-merged-refs.sh
- name: Release push retry/deferral state machine (#5142)
run: bash scripts/test-release-push-retry.sh
- name: release_sha ancestry guard (#6419)
diff --git a/.github/workflows/issue-closed-reopen-hint.yml b/.github/workflows/issue-closed-reopen-hint.yml
index d0eea0c7c..0d0b30328 100644
--- a/.github/workflows/issue-closed-reopen-hint.yml+++ b/.github/workflows/issue-closed-reopen-hint.yml@@ -12,6 +12,14 @@ name: Issue Closed Hint
#
# Skipped when the reporter closed the issue themselves (nothing to tell them)
# and for pull requests (the `issues` event never fires for those).
+#+# Defers to the runtime (#16363): when the issue's hive:status card already+# carries the `issue-close` section (which says "Reply /reopen"), this posts+# nothing. Otherwise it edits its own earlier hint (marker+# `<!-- issue-closed-reopen-hint -->`, authored by github-actions[bot]) instead+# of adding one per closure. A failure to read the card fails the job rather+# than posting a possible duplicate. The helper is checked out from the+# default branch (the `issues` event's ref), never from an issue or PR.
on:
issues:
@@ -28,6 +36,10 @@ jobs:
timeout-minutes: 5
if: github.event.issue.user.login != github.event.sender.login
steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1+ with:+ persist-credentials: false+ sparse-checkout: .github/scripts
- name: Comment
env:
GH_TOKEN: ${{ github.token }}
@@ -38,10 +50,19 @@ jobs:
REASON: ${{ github.event.issue.state_reason }}
run: |
set -euo pipefail
+ card_rc=0+ .github/scripts/hive-status-card.sh has "${REPO}" "${ISSUE}" issue-close || card_rc=$?+ case "${card_rc}" in+ 0) echo "hive:status card already carries issue-close; skipping."; exit 0 ;;+ 1) ;;+ *) echo "::error::could not read the hive:status card on #${ISSUE} (exit ${card_rc}); not posting a possible duplicate."; exit 1 ;;+ esac
# Written to a file rather than inlined: a multi-line --body inside a
# YAML block scalar picks up the block's indentation and renders as a
# code block on GitHub.
+ body_file="$(mktemp)"
{
+ printf '<!-- issue-closed-reopen-hint -->\n'
printf '@%s this issue was closed by @%s' "${REPORTER}" "${CLOSER}"
case "${REASON}" in
not_planned) printf ' as not planned' ;;
@@ -51,5 +72,6 @@ jobs:
printf 'If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it — check your running version against the fix before concluding the fix failed.\n\n'
printf 'If you are still seeing the problem, comment `/reopen` and it will be reopened for you — you do not need write access. '
printf 'Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.\n'
- } > /tmp/closed-hint.md- gh issue comment "${ISSUE}" --repo "${REPO}" --body-file /tmp/closed-hint.md+ } > "${body_file}"+ # Edits the earlier hint on a reopen/close cycle instead of adding another.+ .github/scripts/hive-status-card.sh upsert "${REPO}" "${ISSUE}" '<!-- issue-closed-reopen-hint -->' "${body_file}"diff --git a/.github/workflows/v2-ci.yml b/.github/workflows/v2-ci.yml
index deb415b91..d07b736c0 100644
--- a/.github/workflows/v2-ci.yml+++ b/.github/workflows/v2-ci.yml@@ -422,6 +422,18 @@ jobs:
- name: Issue confirm-fixed command (#9746)
run: bash scripts/test-issue-confirm-fixed.sh
+ # #16363: the hive:status card helper lets Actions workflows skip or edit+ # in place instead of duplicating the runtime's card. Pins exact section+ # matching, absence when there is no card, that an API/parse failure is an+ # error (exit 3) rather than absence, and that upsert edits only the+ # posting identity's own marker comment; the refs sweep's deferral and+ # its error handling ride on the same helper.+ - name: hive:status card helper (#16363)+ run: bash ../.github/scripts/test-hive-status-card.sh++ - name: Refs sweep defers to the hive:status card (#16363)+ run: bash scripts/test-comment-merged-refs.sh+
# #5142: v4.0.1 failed to publish twice in a row inside tagged-release.yml's
# final push — once on GH006 propagation lag (branch protection had not
# yet ingested the just-earned gate check), once on a non-fast-forward
Save the diff block above as 16363-workflows.patch, then apply it on top of v5 after #16451 has merged:
git fetch origin v5 && git switch -c fix-16363-workflows origin/v5
git apply --check 16363-workflows.patch && git apply 16363-workflows.patch
python3 .github/scripts/generate-integration-ci.py --check # generated candidates match v2-ci.yml
git commit -s -am "🌱 chore(actions): issue-closed hint defers to the hive:status card; run status-card/refs-sweep regressions in CI"
To verify:
In the maintainer PR's CI, the contract-tests steps hive:status card helper (#16363) and Refs sweep defers to the hive:status card (#16363) should pass. Locally, bash .github/scripts/test-hive-status-card.sh should end in test-hive-status-card OK and bash src/scripts/test-comment-merged-refs.sh in test-comment-merged-refs OK.
To dry-run the affected workflow after merge, close and reopen a test issue filed by another account, three times:
With no hive:status card, the first close posts one <!-- issue-closed-reopen-hint --> comment and the second close edits it. The comment count is unchanged.
On an issue whose card carries <!-- hive:status:section=issue-close -->, the run logs hive:status card already carries issue-close; skipping. and posts nothing.
A run where the comments API fails ends red with ::error::could not read the hive:status card and posts nothing.
The issue should stay open until these workflow edits are merged and verified.
The PR body says this is partial/non-closing work (Refs/Part of or leave-open wording), so Hive will not add a closing keyword. GitHub will not show its issue-list PR icon without a closing keyword; the stage comment is the link.
Activity
✨ feat(attention): /hive ack and /hive snooze with the attention acti…
hivecommons-hive commentedon Nov 3, 2026
🔒 Claimed by agent
scanner(agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply/unclaimto release, or/claimto take it over if you outrank the holder.hivecommons-hive commentedon Nov 3, 2026
The hive App token cannot push
.github/workflows/*, so a maintainer must apply this diff (git apply) on top of the companion PR, which adds.github/scripts/hive-status-card.shthat the workflow calls. Workflow touched:.github/workflows/issue-closed-reopen-hint.yml(skips when thehive:statuscard hasissue-close, otherwise edits its own marker comment in place). The refs sweep needs no workflow edit: its logic lives insrc/scripts/comment-merged-refs.sh, changed in the PR.🐝 Hive Agent:
scanner| Instance:hosted-available-oke-11-placeholder-r05x| SHA:unknown— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88
22 remaining items
hivecommons-hive commentedon Nov 3, 2026
🔒 Claimed by agent
scanner(agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply/unclaimto release, or/claimto take it over if you outrank the holder.hivecommons-hive commentedon Nov 3, 2026
The hive App token cannot push
.github/workflows/*, so a maintainer must apply this diff (git apply) with their own credentials. This supersedes the earlier patch comment on this issue (posted 2026-11-03T04:46Z); use this one. It was refreshed after the owner decision above. Apply it after #16451 merges: that PR makes.github/scripts/hive-status-card.shreport read/parse failures as exit 3 instead of absence, and it adds.github/scripts/test-hive-status-card.sh, which this patch wires into CI.Workflow files changed:
.github/workflows/issue-closed-reopen-hint.yml: checks out.github/scriptsfrom the default-branch ref of theissuesevent. The checkout uses pinnedactions/checkoutwithpersist-credentials: false, and permissions staycontents: read+issues: write. The workflow skips when thehive:statuscard carriesissue-close(exit 0). It fails the job visibly with::error::when the helper exits 3 and does not post. Otherwise (exit 1) it upserts only github-actions[bot]'s own<!-- issue-closed-reopen-hint -->comment. It also drops the fixed/tmp/closed-hint.mdpath..github/workflows/v2-ci.yml(contract-tests): runs.github/scripts/test-hive-status-card.shandsrc/scripts/test-comment-merged-refs.shin canonical CI. Until this lands, nothing in CI runs either test..github/workflows/integration-candidate.yml,.github/workflows/integration-technical-v2-ci.yml: regenerated withpython3 .github/scripts/generate-integration-ci.py. They only mirror thev2-ci.ymlchange.refs-sweep.ymlneeds no edit. Its loop already reports a non-zerocomment-merged-refs.shexit as::warning::sweep failed for PR #N, which is how the sweep's new card-read error surfaces.Save the diff block above as
16363-workflows.patch, then apply it on top ofv5after #16451 has merged:To verify:
contract-testsstepshive:status card helper (#16363)andRefs sweep defers to the hive:status card (#16363)should pass. Locally,bash .github/scripts/test-hive-status-card.shshould end intest-hive-status-card OKandbash src/scripts/test-comment-merged-refs.shintest-comment-merged-refs OK.hive:statuscard, the first close posts one<!-- issue-closed-reopen-hint -->comment and the second close edits it. The comment count is unchanged.<!-- hive:status:section=issue-close -->, the run logshive:status card already carries issue-close; skipping.and posts nothing.::error::could not read the hive:status cardand posts nothing.The issue should stay open until these workflow edits are merged and verified.
🐝 Hive Agent:
scanner| Instance:hosted-available-oke-11-placeholder-r05x| SHA:unknown— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88
hivecommons-hive commentedon Nov 3, 2026
PR #16451 covers this issue: #16451
The PR body says this is partial/non-closing work (
Refs/Part ofor leave-open wording), so Hive will not add a closing keyword. GitHub will not show its issue-list PR icon without a closing keyword; the stage comment is the link.hivecommons-hive commentedon Nov 3, 2026
Fixed by #16385 (merged 9c62646). Closing. Reply /reopen if the problem persists.
hivecommons-hive commentedon Nov 3, 2026
🔓 Claim by agent
scannerreleased (holding agent relaunched).Claim history
scanner(agent; holding agent relaunched)