Skip to content

docs(routine): add weekly action-SHA bump prompt#142

Merged
Luis85 merged 21 commits into
developfrom
docs/actions-bump-bot
Apr 26, 2026
Merged

docs(routine): add weekly action-SHA bump prompt#142
Luis85 merged 21 commits into
developfrom
docs/actions-bump-bot

Conversation

@Luis85
Copy link
Copy Markdown
Owner

@Luis85 Luis85 commented Apr 26, 2026

Tracks: #130
Tracks: #131

Adds the weekly action-SHA-bump cloud-routine prompt + README scaffold
under docs/actions-bump-bot/. The routine wraps the existing
scripts/bump-actions.mjs (which already peels annotated tags via
tagToCommitSha) into a weekly PR-opening workflow. Failure issues land
under the actions-bump-bot label per the umbrella's cloud-routine
output convention.

Ticks row 3 of the umbrella tracker.

@Luis85 Luis85 force-pushed the docs/actions-bump-bot branch from 61c5bfc to 4aeca01 Compare April 26, 2026 15:31
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4aeca01b31

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
EXISTING="$(gh pr list \
--base develop \
--state open \
--search "author:${ROUTINE_GH_LOGIN} chore/actions-bump in:title created:>=${WEEK_START}" \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Search existing bump PRs by head branch, not title text

The idempotency check searches for chore/actions-bump in:title, but this prompt creates PRs titled chore: bump pinned action SHAs (...), so the searched token is in the branch name, not the title. GitHub issue/PR search treats in:title as title-only (branch filters use head:), so weekly reruns can miss an already-open bump PR and open duplicates instead of exiting cleanly.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +104 to +105
- the script's own `tagToCommitSha` helper (load the module and
call it directly), or
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove impossible direct-call path for tagToCommitSha

This instruction says the routine can load scripts/bump-actions.mjs and call tagToCommitSha directly, but that file is a CLI script with no exports and a top-level process.exit(...). If the routine follows this path, importing/calling the helper is not actually possible and can terminate execution before bumps are applied. The prompt should only point to a callable helper path (or require exporting the function first).

Useful? React with 👍 / 👎.

…ort path

Codex P1: idempotency search used 'chore/actions-bump in:title' but PR
titles are 'chore: bump pinned action SHAs (...)'. Switch to
headRefName-startswith jq filter so the branch-prefix identifier is
matched, not the title text.

Codex P2: scripts/bump-actions.mjs is a CLI entry with no exports and a
top-level process.exit(...). Drop the 'load module and call
tagToCommitSha directly' bullet — that path would terminate execution
before any bump is applied. Point at the umbrella's resolve_action_sha
Bash helper as the single supported callable, with a note that scripted
access must shell out to the script and parse stdout.

Refs Codex review on #142.
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bec480c49b

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +156 to +160
6. **Push and open one PR per run** with every applied bump in a
single diff:

```bash
git push -u origin "chore/actions-bump-$(date -u +%F)"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Commit bump edits before pushing the branch

In docs/actions-bump-bot/PROMPT.md the run flow jumps from editing workflow files to git push without any git add/git commit step. Following this prompt literally can push a branch with no bump commit, which then makes gh pr create fail with no diff (or open an empty PR) instead of publishing the intended SHA updates.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +161 to +163
gh pr create --base develop \
--title "chore: bump pinned action SHAs ($(date -u +%F))" \
--body-file .actions-bump-cache/pr-body-$(date -u +%F).md
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Write PR body file before using --body-file

The command uses --body-file .actions-bump-cache/pr-body-$(date -u +%F).md, but no prior step instructs creating that file. On a clean run this path will not exist, so gh pr create fails before opening the weekly bump PR.

Useful? React with 👍 / 👎.

Codex P1 #1 (line 160): the run flow jumped from edit-workflow-files
(step 3) → actionlint (4) → verify (5) → push (was 6). No git add /
git commit between them. Following literally would push the bump
branch with no commit, and 'gh pr create' would fail with no diff.
Insert an explicit step 6 'commit every applied bump in a single
commit' between verify and push.

Codex P1 #2 (line 163): step 6 used '--body-file
.actions-bump-cache/pr-body-$(date).md' but no prior step wrote that
file. Add a step 7 that materialises the in-memory ${BODY} into
${BODY_FILE} via 'mkdir -p .actions-bump-cache && printf' before push.
The cache file doubles as the re-submit-by-hand artifact already
referenced in Failure handling.

Push + PR-open is now step 8 (renumbered).

Refs Codex re-review on #142.
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3ff22f8528

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +447 to +450
- **Title:** `Action SHA bumps YYYY-MM-DD — <sha7>`
where `<sha7>` is the seven-char prefix of the bump branch's
HEAD SHA (the commit that contained the bump edits, even though
it never reached `develop`).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Drop unattainable <sha7> requirement for failure issues

The failure-issue spec requires <sha7> from “the commit that contained the bump edits,” but this prompt runs actionlint/npm run verify before any bump commit is created, so on verify/actionlint failure there is no such commit to reference. That makes the required title/body field impossible to populate consistently and can break the failure-report path; either move commit creation before verification or define the identifier from an always-available value (for example branch date or pre-bump HEAD).

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +405 to +406
`Action SHA bumps YYYY-MM-DD — script error` with the script's
full stderr in the body, and exit 1. The owner triages the
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Capture bump script stdout for ERROR issue diagnostics

This section says to file script-error issues with the script’s stderr, but scripts/bump-actions.mjs reports per-action ERROR diagnostics in its stdout status table and can emit empty stderr for these cases. Following this instruction can produce near-empty failure issues that omit the actionable error messages; the prompt should require capturing stdout (or merged stdout/stderr) from the bump-script run.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +175 to +177
mkdir -p .actions-bump-cache
BODY_FILE=".actions-bump-cache/pr-body-$(date -u +%F).md"
printf '%s\n' "${BODY}" > "${BODY_FILE}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Skip cache-file writes when DRY_RUN is enabled

Step 7 unconditionally writes .actions-bump-cache/pr-body-<date>.md, but the Dry-run contract later requires zero filesystem side effects and explicitly forbids cache-file writes. If the routine follows the process steps as written, dry runs still modify the working tree, violating the documented behavior and making dry-run output non-idempotent.

Useful? React with 👍 / 👎.

…A for failure issues

Codex P1 (line 450): the failure-issue title required <sha7> from 'the
commit that contained the bump edits' but actionlint/verify run BEFORE
the bump commit (step 6 was committed after step 4 actionlint + step 5
verify). On verify failure no bump commit existed — making <sha7>
unattainable. Capture BASE_SHA at branch-cut (step 2) — the develop-tip
SHA when the branch was created. Always available, distinguishes runs.
Update failure-issue spec + body template to reference BASE_SHA.

Codex P2 (line 406): script-error issues were spec'd with the bump
script's stderr in the body, but scripts/bump-actions.mjs reports
per-action ERROR rows in its stdout status table; stderr can be
empty. Switch to merged stdout + stderr (capture via 2>&1) so the
actionable diagnostics aren't lost.

Codex P2 (line 177): step 7 unconditionally wrote
.actions-bump-cache/pr-body-<date>.md but the dry-run contract requires
zero filesystem side effects from cache writes. Gate step 7 behind
DRY_RUN — print '[DRY_RUN] would write ...' instead of actually writing.
Same gate added to step 8 (push + gh pr create) so dry runs never
trigger remote artifact creation. Both match the dep-triage-bot /
plan-recon-bot dry-run pattern.

Refs Codex round-2 review on #142.
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ffacb50cc3

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +167 to +168
git add .github/workflows/*.yml
git commit -m "chore: bump pinned action SHAs ($(date -u +%F))"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Guard commit step when no bumps were actually applied

The flow always executes git add .github/workflows/*.yml and git commit even when every PENDING row was skipped by policy (for example, all pending updates are majors that must be escalated via issue only). In that case there is no workflow diff, so this step fails (pathspec/nothing to commit) and the run errors instead of exiting cleanly after opening the required major-bump issue(s). Add an explicit "no applied bumps" branch before commit/push/PR creation.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
EXISTING="$(gh pr list \
--base develop \
--state open \
--search "author:${ROUTINE_GH_LOGIN} created:>=${WEEK_START}" \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove week-only filter from open bump PR dedupe check

The idempotency query restricts candidates to created:>=${WEEK_START}, so an older still-open chore/actions-bump-* PR is ignored and a new bump PR can be opened on top of it. That conflicts with the prompt’s own requirement to skip when a previous week’s bump PR is still open, and can create multiple concurrent bump PRs for the same backlog.

Useful? React with 👍 / 👎.

…ncy check

Codex P1 (#142 round 4 line 168): step 6 always ran 'git add ...workflows/*.yml && git commit' even when every PENDING row was
skipped by policy (e.g. all updates are majors that escalate via the
actions-bump-bot label). With no workflow diff the step errors out on
'pathspec'/'nothing to commit', polluting the run after major-bump
issues already opened. Add an explicit guard: 'git diff --quiet --
.github/workflows/' → exit 0 cleanly if nothing changed. Major-bump
issues become the run's only artifact in that case, which is correct.

Codex P2 (#142 round 4 line 332): the idempotency PR-search filter
included 'created:>=${WEEK_START}'. An older still-open
chore/actions-bump-* PR (e.g. owner hasn't merged last week's queue
yet) was IGNORED, so a new bump PR could land on top of it and stack
duplicates. Drop the week filter — the routine now blocks on ANY open
chore/actions-bump-* PR by ROUTINE_GH_LOGIN. The owner merges the
queued PR first; the next run picks up whatever's still pending.

Refs Codex round-4 review on #142.
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e1390b0010

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +495 to +496
re-create idempotently if missing — `gh label create` no-ops on
conflict).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add --force for idempotent label creation

This instruction says gh label create is a no-op on conflicts, but GitHub CLI only updates an existing label when --force is passed (otherwise it returns an error). In the normal steady state where actions-bump-bot already exists, following this guidance in the failure-issue path can cause the run to fail before creating the issue, which drops the intended failure artifact. Please either gate creation behind an existence check or include --force in the idempotent-create guidance.

Useful? React with 👍 / 👎.

Codex P2 (#142 round 5 line 496): the failure-issue spec said
'gh label create no-ops on conflict' but bare 'gh label create' returns
non-zero when the label already exists. --force would update (clobber
description/color), which is not what we want for an idempotent
'create-only-if-missing' guard. In the steady state where
actions-bump-bot already exists, following the prior guidance literally
would fail the run before opening the failure issue, dropping the
intended artifact.

Replace with an explicit existence check via gh label list + jq +
grep, run gh label create only if the label is absent. Same pattern
the dep-triage-bot prompt should follow.

Refs Codex round-5 review on #142.
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 83741dae96

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +98 to +99
Run weekly. For each `PENDING` row in scope (skipping `DIVERGENT` and
`ERROR` per [Hard rules](#hard-rules)):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Abort run when scripts/bump-actions reports ERROR rows

This step says to process each PENDING row while “skipping ... ERROR”, which conflicts with the later failure policy that any ERROR row must stop the run and open a failure issue. If the routine follows this section literally during a partial GitHub API/auth outage, it can open a PR with only a subset of bumps and hide the tooling failure signal that should block the run.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
echo "No bumps applied (all PENDING rows skipped by policy). Exiting cleanly."
exit 0
fi
git add .github/workflows/*.yml
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stage .yaml workflow edits in bump commit

The commit command only stages *.yml, but the bump scanner covers both *.yml and *.yaml workflow files. If any pending bump is in a .yaml workflow, the routine will edit it but not include it in the commit/PR, leaving an incomplete bump batch and a dirty worktree.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/README.md Outdated
Comment on lines +144 to +146
> 3. After opening the bump PR (or recognizing a no-op run with
> zero `PENDING` rows from `scripts/bump-actions.mjs` and
> exiting cleanly without opening anything), exit cleanly. Do
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat no-op as exit code 0, not “zero PENDING rows”

The wrapper text defines no-op as “zero PENDING rows,” but the script also exits non-zero for DIVERGENT and ERROR states even when PENDING is zero. Following this wording can cause the routine to exit quietly instead of filing the required issue for divergent pins or script/tooling errors.

Useful? React with 👍 / 👎.

…0 is no-op

Codex P1 (#142 round 5 line 99): step 'For each PENDING row in scope
(skipping DIVERGENT and ERROR per Hard rules)' conflicted with the
later failure policy that ERROR rows must abort the run. Following
literally during a partial GitHub API/auth outage would open a PR with
a subset of bumps and hide the tooling failure signal. Add an explicit
pre-flight: ERROR rows abort + open failure issue; DIVERGENT rows file
their own issue but processing of PENDING continues alongside.

Codex P2 (#142 round 5 line 181): commit staged only .github/workflows/*.yml
but the bump scanner covers both *.yml AND *.yaml. Any pending bump
in a .yaml workflow would be edited but excluded from the commit,
producing a partial bump PR + dirty worktree. Stage the whole
.github/workflows/ directory so both extensions land in the commit.

Codex P2 (#142 round 5 README line 146): wrapper described no-op as
'zero PENDING rows from the script', but the script also exits
non-zero for DIVERGENT and ERROR even when PENDING is zero. Reword
to 'when scripts/bump-actions.mjs exits 0' so DIVERGENT/ERROR still
trigger the failure-issue path. Also update the 'edit nothing
outside' clause to cover both *.yml and *.yaml.

Refs Codex round-5 review on #142.
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 748b317d12

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +139 to +142
git switch develop
git pull --ff-only origin develop
git switch -c "chore/actions-bump-$(date -u +%F)"
BASE_SHA="$(git rev-parse HEAD)"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate branch creation when DRY_RUN is enabled

These commands unconditionally create and switch to chore/actions-bump-<date>, but later in the same prompt the dry-run contract says runs must have zero filesystem side effects and that git switch -c should be printed instead of executed. In a shared or persistent runner, a dry run following this snippet verbatim will still mutate local git state (new branch + HEAD move), which can contaminate subsequent runs and violates the documented dry-run guarantee.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/README.md Outdated
Comment on lines +75 to +76
(The label was added in the same increment that landed this
routine; re-creating it is a safe no-op if it's already there.)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Remove the incorrect no-op claim for label creation

The parenthetical says rerunning gh label create is a safe no-op when the label already exists, but gh label create only updates existing labels when --force is supplied (per the GitHub CLI manual). This makes the checklist misleading: users rerunning setup can hit a non-zero failure even though the docs imply it is harmless.

Useful? React with 👍 / 👎.

Codex P2 (#142 round 6 line 142): step 2 unconditionally ran
'git switch -c chore/actions-bump-<date>'. The dry-run contract
requires zero filesystem side effects, but on a shared / persistent
runner this leaves a stray bump branch behind that contaminates
subsequent runs. Gate the 'git switch -c' invocation behind DRY_RUN —
print '[DRY_RUN] would call: git switch -c ...' instead. BASE_SHA
still resolves to develop tip in both modes (HEAD stays on develop
in dry-run; new branch was just cut from it in non-dry).

Codex P3 (#142 round 6 README line 76): setup checklist said
're-creating the label is a safe no-op if it's already there', but
bare 'gh label create' returns non-zero when the label exists (only
--force updates, which would clobber description/color). Replace with
the same existence-check pattern the prompt's failure-handling path
uses: 'gh label list --search ... --jq | grep -q . || gh label create
...'. Setup users no longer hit a misleading non-zero on rerun.

Refs Codex round-6 review on #142.
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60899b8b8d

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
# extensions; staging only *.yml would leave .yaml edits in the
# worktree and produce a partial bump PR + dirty tree.
git add .github/workflows/
git commit -m "chore: bump pinned action SHAs ($(date -u +%F))"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate commit behind DRY_RUN

The process still calls git commit unconditionally even though dry-run mode explicitly skips branch creation earlier and promises zero filesystem side effects. In a DRY_RUN=1 execution, this can commit bump edits directly onto develop in the local clone (because no topic branch was created), contaminating subsequent runs and violating the dry-run contract.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +318 to +319
- **Never** edit anything outside `.github/workflows/*.yml` in the
bump PR. No README updates, no plan flips, no version bumps. Just
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Permit .yaml workflow files in hard-rule scope

The hard rule restricts edits to .github/workflows/*.yml, but this prompt elsewhere says the scanner/staging logic handles both *.yml and *.yaml. If a workflow is stored as .yaml, the bot is simultaneously told to bump it and told that editing it is forbidden, which can cause skipped bumps and persistent PENDING rows.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +483 to +484
the body, and exit 0 (or proceed with the non-divergent `PENDING`
rows in the same run — the divergent issue is filed regardless).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve contradictory DIVERGENT control flow

This instruction says to open a divergent issue and then "exit 0 (or proceed with non-divergent PENDING rows)", which conflicts with the earlier process section that says DIVERGENT does not abort pending bumps. Because the routine is LLM-driven, this ambiguity can cause full-run exits that skip valid non-divergent updates whenever both states appear.

Useful? React with 👍 / 👎.

…ERGENT control flow

Codex P1 (#142 round 7 line 212): step 6 commit step ran 'git add' +
'git commit' unconditionally even though step 2 had skipped 'git
switch -c' under DRY_RUN. In dry-run mode HEAD is still on develop, so
the unconditional commit would land bump edits directly on the local
develop clone — contaminating subsequent runs and violating the
zero-side-effects contract. Gate the commit behind DRY_RUN — print
'[DRY_RUN] would call: git add ...' / 'git commit -m ...' instead.

Codex P2 (#142 round 7 line 319): hard rule restricted bump edits to
'.github/workflows/*.yml' but the bump scanner accepts both *.yml AND
*.yaml. A workflow stored as .yaml would be told to bump (by the
process) AND told that editing it is forbidden (by the hard rule),
producing skipped bumps + persistent PENDING rows. Broaden hard rule
to '.github/workflows/' covering both extensions. Same fix on the
'never weaken workflows' bullet.

Codex P2 (#142 round 7 line 484): failure-handling DIVERGENT path
said 'exit 0 (or proceed with non-divergent PENDING rows)'. The
'exit 0' OR conflicts with the new pre-flight in Process which says
only ERROR aborts; DIVERGENT continues alongside PENDING. Tighten the
language: DIVERGENT files its own issue, run continues processing
PENDING — no early exit. The divergent issue is filed regardless of
whether the run also opens a bump PR.

Refs Codex round-7 review on #142.
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61ad07079b

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +468 to +470
- Any `git commit` / `git switch -c` that mutates branch state — in
dry-run mode, prepare the diff in-tree but do NOT commit; print
the would-be commit message and the `git diff --stat` output
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Revert in-tree edits before exiting dry-run

The dry-run section says to "prepare the diff in-tree" while skipping branch creation/commit, but it never instructs a final cleanup. In DRY_RUN, step 2 keeps HEAD on develop, so applying bumps leaves tracked workflow files modified locally; exiting without git restore violates the stated zero-side-effects contract and can contaminate later runs on shared/persistent runners. Add an explicit restore/reset of .github/workflows/ before dry-run exit.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
bump PR.
- Open a PR for `DIVERGENT` rows. Divergent pins are a consistency
fixup, not a routine bump.
- Edit any file outside `.github/workflows/*.yml` in the bump PR.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow .yaml files in the final file-scope rule

This Do NOT bullet limits allowed edits to .github/workflows/*.yml, but the same prompt and scripts/bump-actions.mjs handle both *.yml and *.yaml. That contradiction can cause the routine to skip legitimate .yaml bump targets and leave pending updates unresolved. Update this rule to match the rest of the document’s scope (.github/workflows/ or both extensions).

Useful? React with 👍 / 👎.

- DRY_RUN restores .github/workflows/ after diff-stat dump so the
  zero-filesystem-side-effects contract holds when the dry-run
  branches through the commit step.
- Top-of-doc + Do NOT scope refs say *.{yml,yaml} to match the
  hard-rule scope and bump-actions.mjs which already handles both
  extensions.
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f25d238b1b

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +272 to +274
git push -u origin "chore/actions-bump-$(date -u +%F)"
gh pr create --base develop \
--title "chore: bump pinned action SHAs ($(date -u +%F))" \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reuse one run date for branch push and PR title

The branch name is captured once in step 2 (BRANCH="chore/actions-bump-$(date -u +%F)"), but step 8 recomputes $(date -u +%F) for git push and the PR title. If the run crosses UTC midnight (for example during npm ci && npm run verify), the push targets a different branch name than the one created, so git push can fail and the run aborts. Use a single captured run-date/branch variable throughout branch creation, push, and PR metadata.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/README.md Outdated
Comment on lines +41 to +42
**Failure issue, secondary sink (only on verify / actionlint
failure):** if applying the bumps surfaces a verify failure, the
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document all failure issue paths in README

This README section says failure issues are created only for verify/actionlint failures, but the same routine docs require issues for scripts/bump-actions.mjs ERROR rows and DIVERGENT rows as well. That mismatch can cause operators to treat non-verify failures as expected no-issue cases, which weakens the documented observability contract for the actions-bump-bot label.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f25d238b1b

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +76 to +79
4. **Exit code.** `0` if every pin is `up-to-date`. `1` if any
`PENDING` / `DIVERGENT` / `ERROR` row exists. The exit code is the
no-op signal: exit 0 from the script means there is nothing to do
this run.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat unresolved scan states as non-no-op

The prompt currently defines exit code 0 from scripts/bump-actions.mjs as “every pin is up-to-date” and uses that as the no-op gate, but the script exits 0 whenever there are no PENDING, DIVERGENT, or ERROR rows—even if rows are no-releases or unresolved (scripts/bump-actions.mjs computes status separately and only gates on those three). This means the routine can silently skip runs where some actions cannot be resolved to a latest SHA, leaving actionable drift/triage hidden behind a false no-op. Please explicitly handle no-releases/unresolved rows before exiting cleanly.

Useful? React with 👍 / 👎.

Round-13 Codex finding: `scripts/bump-actions.mjs` exits 0 whenever
no PENDING / DIVERGENT / ERROR rows exist — but the script also
emits two other statuses, `no-releases` (action repo has no GitHub
releases) and `unresolved` (latest tag couldn't be peeled to a
SHA), and neither gates the exit code. The prompt previously
trusted exit 0 alone as the no-op signal, so silent drift of those
two states could hide actionable triage state behind a false
quiet-run.

Verified against scripts/bump-actions.mjs:280-374:

- Status enum (line 286-289): up-to-date / PENDING / no-releases /
  unresolved (DIVERGENT and ERROR set elsewhere).
- Per-status stdout sections (line 338-365): only pending,
  divergent, errored — no-releases and unresolved get NO dedicated
  section, only the column-6 entry in the status table.
- Exit gate (line 374): zero unless PENDING / DIVERGENT / ERROR.

Updates to PROMPT.md:

1. Output shape — note that `no-releases` / `unresolved` lack a
   per-status section; the routine must scan the status table's
   6th column directly to detect them.
2. Exit code — clarify that exit 0 is *not* sufficient for no-op:
   `no-releases` / `unresolved` rows can coexist with exit 0.
3. No-op detection — replace the bare exit-code check with an
   awk-based scan of the status table; only treat the run as
   no-op when exit code is 0 AND no `no-releases` / `unresolved`
   row exists.
4. Failure handling — new bullet for the
   `Unresolved action pins YYYY-MM-DD` triage issue (same shape
   as the existing DIVERGENT bullet: file alongside any bump PR,
   do not abort the run).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0862526756

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +408 to +409
**No-op runs leave no trace.** If `scripts/bump-actions.mjs` exits 0,
exit cleanly without opening a PR or issue. An empty
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate no-op on unresolved statuses before exiting silently

This line makes scripts/bump-actions.mjs exit code 0 an unconditional no-op, but the script also returns 0 when rows are no-releases or unresolved (only PENDING/DIVERGENT/ERROR force non-zero). If the routine follows this instruction, it will skip the triage issue path and silently hide unresolved action pins (for example deleted/renamed repos or peel failures), which contradicts the earlier No-op detection/Failure handling rules and drops required backlog visibility.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0862526756

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +526 to +529
The local `npm ci && npm run verify` SHOULD still run in dry-run mode
so the run produces realistic verify-pass / verify-fail signals — but
under no circumstances trigger `git push`, `gh pr create`, or
`gh issue create` from that path.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop running npm ci in DRY_RUN mode

The dry-run contract here says runs must leave zero filesystem side effects, but this section still instructs running npm ci in dry runs; npm ci materially rewrites the workspace (for example node_modules/) on every run. On persistent runners this contaminates later jobs and violates the stated dry-run guarantee, so either gate npm ci behind non-dry mode or relax the contract wording.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +408 to +411
**No-op runs leave no trace.** If `scripts/bump-actions.mjs` exits 0,
exit cleanly without opening a PR or issue. An empty
`actions-bump-bot` label view AND no recent
`chore/actions-bump-<date>` PR mean nothing happened recently —
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align exit-0 no-op rule with unresolved-row handling

This rule says to exit cleanly without opening artifacts whenever scripts/bump-actions.mjs exits 0, but the same prompt now explicitly treats no-releases/unresolved rows (which also return exit 0) as triage-worthy and requires opening an issue. If the agent follows this section, unresolved drift can be silently skipped and never reach the actions-bump-bot backlog.

Useful? React with 👍 / 👎.

Round-14 Codex finding: the prompt's dry-run section asserted "zero
filesystem side effects" but also told the routine to run
`npm ci && npm run verify` for realistic verify signals. `npm ci`
rewrites `node_modules/` and `npm run verify` populates `dist/` and
`docs/api/` — gitignored build artifacts, but materially filesystem
side effects under the literal wording.

Resolution: keep `npm ci` + `npm run verify` (they are load-bearing
for the dry-run's "would the bumps actually verify?" signal) and
relax the contract wording to scope it to what actually matters:

1. No commits or branches left behind.
2. No remote-side writes (`git push`, `gh pr create`,
   `gh issue create`, `gh label create` all stay stubbed).
3. No `.actions-bump-cache/FAILED-*.md` cache files written.

Gitignored workspace artifacts (`node_modules/`, `dist/`,
`docs/api/`, vitest caches) are explicitly out of scope — any
subsequent run re-derives them idempotently, so they don't
contaminate later jobs the way a leftover branch or cache file
would.

The wrapped-writes list and the "Reads MAY still run" / "verify
SHOULD still run" paragraphs unchanged. Added a new "Dry-run
contract" subheading to spell out the exit invariants explicitly,
and updated the cross-reference at the `git commit` /
`git switch -c` bullet to point at it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bade72729

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +408 to +409
**No-op runs leave no trace.** If `scripts/bump-actions.mjs` exits 0,
exit cleanly without opening a PR or issue. An empty
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Align no-op rule with unresolved-status triage

This no-op instruction conflicts with the same prompt’s earlier No-op detection and Failure handling sections, which require filing a triage issue when scripts/bump-actions.mjs returns no-releases/unresolved rows (the script can still exit 0 in that case). If the agent follows this clause literally, it will suppress required issues and hide unresolved action pins as silent no-ops.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/README.md Outdated
Comment on lines +154 to +156
> `scripts/bump-actions.mjs` exits 0 and exiting cleanly without
> opening anything), exit cleanly. The script's exit code — NOT
> "zero `PENDING` rows" — is the no-op signal: the script also
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Require status parsing in wrapper no-op logic

The wrapper says the script exit code alone is the no-op signal, but scripts/bump-actions.mjs exits 0 even when rows are no-releases/unresolved; those states still require a triage issue per the prompt. Using this wrapper as written can cause runs to report clean no-op behavior while unresolved pins are never surfaced.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bade72729

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +592 to +593
locally (`git switch develop && git branch -D
chore/actions-bump-<date>`), open a failure issue per the spec
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard branch cleanup when dry-run skipped branch creation

In the PROMPT.md failure path for actionlint errors, this cleanup always runs git branch -D chore/actions-bump-<date>, but step 2 explicitly skips git switch -C when DRY_RUN is set. In a dry-run that hits actionlint/verify failure, the delete command can fail with "branch not found" and short-circuit the intended failure handling (issue/report path), so cleanup should be conditional on non-dry mode or on branch existence.

Useful? React with 👍 / 👎.

Symprowire and others added 2 commits April 26, 2026 21:31
# Conflicts:
#	docs/plans/2026-04-26-quality-automation-routines.md
Round-16 fixes after a fresh review surfaced architectural gaps the
prior 15 round-by-round Codex passes missed.

- Process pre-flight now scans column 6 for `no-releases`/`unresolved`
  rows and files a triage issue before processing PENDING. Without
  this, mixed runs (PENDING + unresolved) opened the bump PR but
  silently swallowed the unresolved drift — the No-op detection
  branch only fires when SCRIPT_EXIT==0.
- Output section enumerates the four distinct failure-issue title
  shapes (script-error, divergent, unresolved-triage, verify-fail)
  instead of the prior "secondary sink" prose that omitted the
  unresolved-triage path. README mirror updated.
- Awk pipeline scoped to data rows only — start after the header
  match, stop at the first blank line — so per-status detail blocks
  cannot leak status-shaped tokens into `\$NF`. Header regex uses
  `[[:space:]]+` to handle the script's variable column padding.
- "zero filesystem side effects" wording swept across PROMPT.md to
  "no commits, no remote-side writes, no cache files" — the
  Dry-run contract heading already used the new wording, but
  inline references kept the old phrasing and made the contract
  read like two different rules.
- Divergent failure-handling bullet now spells out the per-action
  cardinality: three divergent actions in one scan = three issues,
  not a single combined one.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Round 16 amendments landed in 39ae626 — fresh review surfaced an architectural gap that 15 rounds of incremental review missed. Five fixes:

  1. Process pre-flight scans for unresolved/no-releases. Mixed runs (PENDING + unresolved) used to silently swallow the unresolved drift because the No-op detection branch only fires on SCRIPT_EXIT==0. Now the routine files the triage issue before processing PENDING.
  2. Output section enumerates four distinct failure-issue title shapes (script-error / divergent / unresolved-triage / verify-fail) instead of the prior "secondary sink" prose that omitted unresolved-triage. README mirrors this.
  3. Awk pipeline scoped to data rows only — start after the header match, stop at the first blank line — so per-status detail blocks cannot leak status-shaped tokens into $NF. Header regex uses [[:space:]]+ for the script's variable column padding (the prior /^action pinned/ literal would never have matched the real padded header).
  4. "zero filesystem side effects" wording swept to match the ## Dry-run contract heading's "no commits, no remote-side writes, no cache files" — the inline references kept the old phrasing and made the contract read like two different rules.
  5. Divergent failure-handling bullet now spells out per-action cardinality (3 divergent actions = 3 issues, not 1 combined).

Verified the new awk against a real node scripts/bump-actions.mjs run — emits clean status values only, no leakage.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 39ae626ba0

ℹ️ 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".

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +216 to +218
3. **Apply each bump.** For every pending row, edit the matching
workflow file: replace the 40-char SHA with the freshly-resolved
one and update the trailing `# vX.Y.Z` comment to match the new
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Apply each pending bump across all matching workflow files

A PENDING row from scripts/bump-actions.mjs is keyed by action/version tuple, not by file, so the same row can represent multiple workflow files; however this step instructs editing a single "matching workflow file". In repos like this one where actions such as actions/checkout appear in many workflows, following this literally can update only one file, leave the rest stale, and create a self-inflicted DIVERGENT state on the next run that blocks normal bump flow.

Useful? React with 👍 / 👎.

Comment thread docs/actions-bump-bot/PROMPT.md Outdated
Comment on lines +442 to +443
**No-op runs leave no trace.** If `scripts/bump-actions.mjs` exits 0,
exit cleanly without opening a PR or issue. An empty
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Do not treat every script exit-0 run as no-op

This no-op rule conflicts with the prompt’s own output contract: scripts/bump-actions.mjs can exit 0 while still emitting no-releases/unresolved rows, which are supposed to trigger an Unresolved action pins YYYY-MM-DD issue. Keeping this unconditional exit 0 => no PR/issue guidance can cause unresolved drift to be silently dropped whenever there are no PENDING/DIVERGENT/ERROR rows.

Useful? React with 👍 / 👎.

Six P1/P2 findings from Codex review of 39ae626. Five real fixes,
one false positive (gh pr list --limit 200 already present from
round 11) noted in the PR comment thread.

- F1 (P1): Output section's "No-op runs leave no trace" paragraph
  unconditionally said "exit 0 = no PR/issue", contradicting the
  Process pre-flight unresolved-triage path added in round 16.
  Reworded to require BOTH `SCRIPT_EXIT == 0` AND zero
  `no-releases`/`unresolved` rows.
- F2 (P1): Step 3 said "edit the matching workflow file" (singular).
  The script aggregates same-action+SHA into one variant with
  `.sources = [file1, file2, …]` but its PENDING summary only prints
  `sources[0]` — following the printout literally would leave N-1
  files stale and self-inflict a `DIVERGENT` row on the next run.
  Added a grep one-liner to find every matching workflow file.
- F3 (P1): README wrapper said "exit code is the no-op signal" with
  the carve-out only for DIVERGENT/ERROR. Added the unresolved /
  no-releases case (script also exits 0 there but still requires a
  triage issue).
- F6 (P2): `$(date -u +%F)` was recomputed in steps 6, 7, and 8
  after step 2 captured `BRANCH`. A run crossing UTC midnight during
  `npm verify` would push to a different branch name than the one
  created. Capture `RUN_DATE` once at branch-cut and reuse for
  commit message, BODY_FILE, push, and PR title.
- F7 (P2): Failure-handling `git branch -D chore/actions-bump-<date>`
  cleanups in the actionlint and verify-fail bullets weren't gated
  on non-DRY_RUN. In dry-run, step 2 skips the branch creation, so
  this delete errors out and short-circuits the rest of the failure
  path. Added the gate + explanation.
- F4 (P2): Clarifying comment that the `git fetch / switch develop /
  pull --ff-only` preamble is intentionally NOT DRY_RUN-gated — none
  of those commands violate the dry-run contract (no commits, no
  remote-side writes, no cache files), they are idempotent setup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Round 17 — addressing the 10 findings from your review of 39ae626 in commit f6da3b9. Five real fixes, one false positive flagged:

Fixed (5):

  • F1 (P1, ×3 dupes at line 443) — Output section's "No-op runs leave no trace" now requires BOTH SCRIPT_EXIT == 0 AND zero no-releases/unresolved rows before exiting silently. The unresolved-triage path now reads consistently across No-op detection / Process pre-flight / Output / Failure handling.
  • F2 (P1, line 218) — Step 3 reworded to "Apply each bump across every workflow file that pins it" + a grep one-liner that finds all matching files. The script's PENDING summary only prints v.sources[0] even when .sources has multiple entries; following it literally would have left N-1 files stale.
  • F3 (P1, README:169) — Wrapper paragraph now lists the unresolved/no-releases case alongside DIVERGENT/ERROR as exit-code-doesn't-suffice scenarios.
  • F6 (P2, line 324)RUN_DATE captured once at branch-cut (step 2) and reused for the commit message, BODY_FILE, push, and PR title. Removes the UTC-midnight-during-verify desync.
  • F7 (P2, line 631)git branch -D cleanups in actionlint and verify-fail bullets now explicitly gated on non-DRY_RUN, with rationale (step 2 skipped the create in dry-run, so the delete would error out and short-circuit the failure path).

Clarified, no behavior change (1):

  • F4 (P2, line 209)git fetch / switch develop / pull --ff-only preamble is intentionally NOT DRY_RUN-gated. Added a comment explaining why: the dry-run contract is "no commits, no remote-side writes, no cache files" — none of those three commands violate any of those, they're idempotent workspace setup that any subsequent run re-derives. Gating them would mean dry-run verifies against stale local develop instead of the real upstream.

False positive — no change (1):

  • F5 (P2, line 477) — The finding says gh pr list lacks --limit, but line 474 already has --limit 200 (added in round 11). The anchor at line 477 is the --jq line just below the --limit 200 argument; the bash continuation reads as a single command. No change needed.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6da3b969c

ℹ️ 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".

Comment thread docs/actions-bump-bot/README.md Outdated
Comment on lines +73 to +75
If a run finds no `PENDING` rows (`scripts/bump-actions.mjs` exits
0), the routine does NOT open a PR or an issue. Quiet runs leave
no trace — same convention as the daily `review-bot` and the
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct no-op rule for unresolved statuses

This section says a run with no PENDING rows (scripts/bump-actions.mjs exit 0) should open neither PR nor issue, but the script also exits 0 when rows are no-releases/unresolved. The prompt now treats those statuses as triage-required and mandates opening Unresolved action pins YYYY-MM-DD; following this README text would suppress that issue path and hide unresolved drift.

Useful? React with 👍 / 👎.

Two real fixes from Codex review of f6da3b9. Third finding (G1) is
a misread — the branch creation IS dry-run-gated at lines 206-219;
Codex anchored on the post-gate `BASE_SHA` line. Will dismiss in
the PR comment.

- G3 (P2, README): Round-17 fixed PROMPT.md's "No-op runs leave no
  trace" paragraph but missed the parallel paragraph in README. Now
  the README also requires both `SCRIPT_EXIT == 0` AND zero
  `no-releases`/`unresolved` rows before claiming a true no-op,
  with the unresolved-triage carve-out spelled out.
- G2 (P2, PROMPT.md): Bumped `gh pr list --limit 200 → 1000` (gh's
  hard cap per page) plus a comment on why the limit is sufficient.
  The prior `200` was already enough in practice (the
  `--search "author:..."` clause scopes to one login's open PRs in
  this repo, in practice well below 200), but `1000` removes the
  defensive concern about high-volume accounts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Round 18 (82838c2) addressing the 3 findings on f6da3b9.

Fixed (2):

  • G3 (P2, README:75) — README's no-op paragraph wasn't carved out for the unresolved/no-releases case (round 17 only fixed PROMPT.md's parallel paragraph). Now reads consistently: a true no-op requires both SCRIPT_EXIT == 0 AND zero unresolved/no-releases rows.
  • G2 (P2, PROMPT.md:509)gh pr list --limit 200 → --limit 1000 (gh's hard cap per page). The --search "author:..." clause already scopes to one login's open PRs in this repo (in practice well below either limit), but bumping defensively removes the concern about high-volume accounts.

Misread — no change (1):

  • G1 (P2, PROMPT.md:220) — The finding text says "these commands unconditionally create and switch to chore/actions-bump-<date>", but the branch creation IS DRY_RUN-gated at lines 206-219:

    if [ -n "${DRY_RUN:-}" ]; then
      printf '[DRY_RUN] would call: git switch -C %q develop\n' "${BRANCH}"
    else
      git switch -C "${BRANCH}" develop
    fi

    Codex anchored on line 220 (BASE_SHA="$(git rev-parse HEAD)"), which is the line immediately AFTER the closing fi. git rev-parse HEAD is read-only and produces the develop tip in both modes (in dry-run HEAD never moved; in non-dry the new branch was just cut from develop). The git fetch / switch develop / pull --ff-only preamble at lines 197-199 runs unconditionally on purpose — round 17's comment block at lines 188-194 explains why (none of those three commands violate the dry-run contract of "no commits, no remote-side writes, no cache files").

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 82838c2222

ℹ️ 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".

Comment thread docs/actions-bump-bot/README.md Outdated
Comment on lines +210 to +211
The routine no-ops cleanly when `scripts/bump-actions.mjs` exits 0:
no PR is opened, no issue is opened, no branch is pushed. If every
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle exit-0 unresolved rows before declaring no-op

This statement says any scripts/bump-actions.mjs exit code 0 means “no PR, no issue,” but the script also exits 0 for no-releases/unresolved statuses, which still require filing an Unresolved action pins YYYY-MM-DD issue per the prompt. If an operator follows this cadence section literally (e.g., a run with only unresolved rows), the required triage issue will be skipped and drift will be silently hidden.

Useful? React with 👍 / 👎.

…ve-out

Three findings on 82838c2. One real fix, two structural rewrites
to defeat Codex's recurring misreads of the same code.

- H3 (P2, README:211): Real fix. The README's Cadence section had a
  third stale "exit 0 = no-op" paragraph (line 210-214) that
  rounds 16-18 missed. Now requires both `SCRIPT_EXIT == 0` AND
  zero `no-releases`/`unresolved` rows, with the triage-issue
  carve-out spelled out.
- H1 (P2, PROMPT.md:220): Restructure for visual clarity. Codex
  flagged the post-gate `BASE_SHA="$(git rev-parse HEAD)"` line as
  if branch creation were ungated (it's gated at lines 206-219).
  Moved BASE_SHA into both branches of the if/else: dry-run path
  uses `git rev-parse develop` (HEAD never moved), non-dry-run path
  uses `git rev-parse HEAD` (which equals develop's tip after the
  fresh `-C` from develop). Both yield the same SHA but the gating
  is now syntactically explicit per branch instead of relying on a
  read-after-fi.
- H2 (P2, PROMPT.md:509): Codex re-flagged "without --limit" despite
  `--limit 1000` being three lines above. The continuation-line
  layout was visually splitting the limit from the search filter.
  Collapsed `--base / --state` onto one line and `--limit / --search`
  onto the next so the limit is visually adjacent to the filter that
  defines the candidate set. Comment moved above the call so the
  rationale leads.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Round 19 (3c9c059) on the 3 findings from 82838c2.

Real fix (1):

  • H3 (P2, README:211) — Third stale "exit 0 = no-op" paragraph in the Cadence section, missed in rounds 16-18. Now requires both SCRIPT_EXIT == 0 AND zero unresolved/no-releases rows, with the triage-issue carve-out spelled out.

Structural rewrites to defeat recurring misreads (2):

  • H1 (P2, PROMPT.md:220) — Codex flagged this same line in rounds 17 and 18 despite the branch creation being DRY_RUN-gated at lines 206-219. Restructured: BASE_SHA now lives inside both branches of the if/else explicitly. Dry-run uses git rev-parse develop (HEAD never moved); non-dry-run uses git rev-parse HEAD (which equals develop's tip after the fresh -C from develop). Same observable result, but the dry-run path is now syntactically self-evident per branch instead of relying on a read-after-fi.

  • H2 (P2, PROMPT.md:509) — Codex re-flagged "without --limit" despite --limit 1000 being three lines above. The continuation-line layout (one arg per line) was visually splitting --limit from --search. Collapsed the multi-line invocation so --limit 1000 and --search "author:..." are on the same line, with the rationale comment moved above the call. Functionality unchanged.

If H1/H2 still flag in the next round, the underlying signal is your reviewer pattern-matching on visual structure rather than semantics — happy to discuss alternative layouts.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3c9c059bc2

ℹ️ 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".

Comment on lines +197 to +199
git fetch origin
git switch develop
git pull --ff-only origin develop
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require a clean worktree before starting bump flow

This preflight only refreshes refs (fetch/switch/pull) and does not clear tracked local edits from prior interrupted runs on a persistent runner. Later in step 6 the routine stages the entire workflows directory (git add .github/workflows/), so stale leftover edits can be silently committed into a new bump PR. Please add an explicit clean-tree check (and abort) or reset/clean before applying bumps to prevent cross-run contamination.

Useful? React with 👍 / 👎.

One P2 finding on 3c9c059. Real fix.

I1 (P2, PROMPT.md:199): On a persistent runner, a prior interrupted
run can leave tracked edits or untracked files under
.github/workflows/. Step 6's `git add .github/workflows/` would
silently stage those leftovers into the bump PR, polluting the
diff with unrelated changes. Added a three-part cleanliness check
right after `git pull --ff-only` — staged + unstaged tracked
edits + untracked files in the workflows dir. Aborts loudly with a
git-status pointer for the operator. Deliberately does NOT
auto-clean (`git restore` / `git clean -f`) because the leftover
edits might be intentional in-progress work the operator wants to
preserve.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented Apr 26, 2026

@codex review

Round 20 (94fb361) on the 1 finding from 3c9c059.

I1 (P2, PROMPT.md:199) — Real fix. Added a three-part worktree-cleanliness assertion immediately after git pull --ff-only:

  1. Unstaged tracked edits to .github/workflows/ (git diff --quiet)
  2. Staged tracked edits to .github/workflows/ (git diff --cached --quiet)
  3. Untracked files in .github/workflows/ (git ls-files --others --exclude-standard)

Any of the three present aborts the run with a git status pointer for the operator. Deliberately does NOT auto-clean — the leftover edits might be intentional in-progress work that an operator was experimenting with on the persistent runner.

@Luis85 Luis85 merged commit 16bf8f5 into develop Apr 26, 2026
18 checks passed
@Luis85 Luis85 deleted the docs/actions-bump-bot branch April 26, 2026 20:42
@Luis85 Luis85 added the roadmap:quality-baseline Quality automation: CodeQL, Stryker, determinism replay, demo smoke, review-finding fixes label May 5, 2026
@Luis85 Luis85 mentioned this pull request May 11, 2026
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

roadmap:quality-baseline Quality automation: CodeQL, Stryker, determinism replay, demo smoke, review-finding fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants