Skip to content

test: self-test refresh-lockfiles.yml (do not merge) - #100

Closed
thomas-lg wants to merge 6 commits into
mainfrom
test/lockfile-workflow-selftest
Closed

thomas-lg wants to merge 6 commits into
mainfrom
test/lockfile-workflow-selftest

Conversation

@thomas-lg

Copy link
Copy Markdown
Owner

Throwaway PR to verify the commit/push/re-trigger path of refresh-lockfiles.yml, which my earlier run never reached (it hit 'already consistent'). Will be closed and the branch deleted.

Downgrades Serilog.AspNetCore in Api.csproj without touching any
packages.lock.json, reproducing the exact NU1004 Dependabot produces. Used to
verify the commit/push/re-trigger path of refresh-lockfiles.yml. Not for merge.
@github-actions github-actions Bot added the chore label Aug 31, 2026
Dependabot updates only the lock file of the project it edited; Api and Tests reference Application/Infrastructure transitively and go stale, which fails ci.yml's restore --locked-mode with NU1004.
thomas-lg and others added 2 commits August 31, 2026 22:07
Dependabot updates only the lock file of the project it edited; Api and Tests reference Application/Infrastructure transitively and go stale, which fails ci.yml's restore --locked-mode with NU1004.
@github-actions github-actions Bot closed this Aug 31, 2026
@github-actions github-actions Bot reopened this Aug 31, 2026
thomas-lg added a commit that referenced this pull request Aug 31, 2026
Close/reopen from inside the workflow doesn't help: the runs' triggering actor
is still github-actions[bot], so they stay parked as action_required. Verified
on PR #100 -- a bot close/reopen left CI parked, while the identical close/reopen
from a user token started it at once. GITHUB_TOKEN can't approve its own runs
either.

So stop pretending. The workflow still does the valuable part (restore, guard,
commit, push, update-branch), then detects whether the checks are parked and
prints the single command that finishes it, in both the job summary and a
warning annotation. Needs actions: read to list run states.

README no longer claims the workflow completes the loop unattended, and says
what closes it.
thomas-lg and others added 2 commits August 31, 2026 22:13
Dependabot updates only the lock file of the project it edited; Api and Tests reference Application/Infrastructure transitively and go stale, which fails ci.yml's restore --locked-mode with NU1004.
@thomas-lg thomas-lg closed this Aug 31, 2026
@thomas-lg thomas-lg reopened this Aug 31, 2026
@github-actions github-actions Bot added chore and removed chore labels Aug 31, 2026
thomas-lg added a commit that referenced this pull request Aug 31, 2026
…101)

* fix(ci): make refresh-lockfiles re-trigger checks that actually run

The re-trigger step was wrong in two ways, both found by self-testing the
workflow against a deliberately stale branch (PR #100):

1. A GITHUB_TOKEN push doesn't leave runnable checks. GitHub creates the
   pull_request runs but parks them as 'action_required', awaiting manual
   approval, so the required checks keep reporting their pre-fix state.
2. gh pr update-branch was the only mitigation, and it no-ops with
   'PR branch already up-to-date' whenever the PR isn't behind main -- which
   left the PR with no runnable checks at all, and unmergeable.

Closing and reopening the PR raises a fresh pull_request event that runs
without approval; verified by hand on #100, where it moved the parked runs to
in_progress and backend then passed. update-branch is kept first, for main's
strict up-to-date rule, and made non-fatal since no-op is a valid outcome.

The refresh itself was correct throughout: it committed exactly the two stale
lock files (Api directly, Tests transitively) and turned the red NU1004 PR
green.

* fix(ci): report the approval gate instead of trying to defeat it

Close/reopen from inside the workflow doesn't help: the runs' triggering actor
is still github-actions[bot], so they stay parked as action_required. Verified
on PR #100 -- a bot close/reopen left CI parked, while the identical close/reopen
from a user token started it at once. GITHUB_TOKEN can't approve its own runs
either.

So stop pretending. The workflow still does the valuable part (restore, guard,
commit, push, update-branch), then detects whether the checks are parked and
prints the single command that finishes it, in both the job summary and a
warning annotation. Needs actions: read to list run states.

README no longer claims the workflow completes the loop unattended, and says
what closes it.
@thomas-lg

Copy link
Copy Markdown
Owner Author

Closing — throwaway self-test PR. It did its job: it exposed that the commit/push/re-trigger half of refresh-lockfiles.yml had never actually executed (my first verification run hit the 'already consistent' path), and then that the re-trigger could not work at all with GITHUB_TOKEN. Fixed in #101.

@thomas-lg thomas-lg closed this Aug 31, 2026
@thomas-lg
thomas-lg deleted the test/lockfile-workflow-selftest branch August 31, 2026 20:16
thomas-lg added a commit that referenced this pull request Sep 13, 2026
…101)

* fix(ci): make refresh-lockfiles re-trigger checks that actually run

The re-trigger step was wrong in two ways, both found by self-testing the
workflow against a deliberately stale branch (PR #100):

1. A GITHUB_TOKEN push doesn't leave runnable checks. GitHub creates the
   pull_request runs but parks them as 'action_required', awaiting manual
   approval, so the required checks keep reporting their pre-fix state.
2. gh pr update-branch was the only mitigation, and it no-ops with
   'PR branch already up-to-date' whenever the PR isn't behind main -- which
   left the PR with no runnable checks at all, and unmergeable.

Closing and reopening the PR raises a fresh pull_request event that runs
without approval; verified by hand on #100, where it moved the parked runs to
in_progress and backend then passed. update-branch is kept first, for main's
strict up-to-date rule, and made non-fatal since no-op is a valid outcome.

The refresh itself was correct throughout: it committed exactly the two stale
lock files (Api directly, Tests transitively) and turned the red NU1004 PR
green.

* fix(ci): report the approval gate instead of trying to defeat it

Close/reopen from inside the workflow doesn't help: the runs' triggering actor
is still github-actions[bot], so they stay parked as action_required. Verified
on PR #100 -- a bot close/reopen left CI parked, while the identical close/reopen
from a user token started it at once. GITHUB_TOKEN can't approve its own runs
either.

So stop pretending. The workflow still does the valuable part (restore, guard,
commit, push, update-branch), then detects whether the checks are parked and
prints the single command that finishes it, in both the job summary and a
warning annotation. Needs actions: read to list run states.

README no longer claims the workflow completes the loop unattended, and says
what closes it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant