ci: add a force input to the star history floor - #729
Merged
Conversation
The floor reads back from the published chart, which a refusing run never updates, so a genuine halving wedges every later run with no way out but hand-editing the assets branch. Force skips only the floor; a zero-row fetch is still refused, since publishing the placeholder over a good chart is what the guard is for. Also fail with an annotation when the published chart is missing, instead of letting sed die with a bare exit code. Closes #726
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The truncation guard in the star history workflow cannot recover once it trips.
It refuses to publish when the fresh count is under half the published count,
and it reads that published count back out of the chart's own
aria-label. Arun that refuses never publishes, so the number it compares against never
moves, and every later run fails identically.
workflow_dispatchtook noinputs, so the only way out was hand-editing the
aria-labelon theassetsbranch.
The guard itself is right: a truncated API response should not overwrite a good
chart with a near-empty one. But a legitimate halving, from a mass unstar or a
repo transfer, is indistinguishable from truncation at that point and needs a
way through.
Closes #726
Changes
workflow_dispatchgains aforceboolean input, default false, passed tothe step through
env:rather than interpolated into the script.forceskips only the floor comparison. The zero-row refusal staysunconditional, because publishing the "No stars yet" placeholder over a good
chart is the exact accident the guard exists to prevent and no legitimate
force case wants it.
::error::annotation. Previouslysedexited non-zero underset -euo pipefailand the step died with a bareexit code that reads like an unrelated failure.
Testing
actionlintclean. I ran the guard logic as a standalone script across all sixpaths, including the one that is easy to get wrong: on
scheduleandwatchthere are no inputs, so
FORCEexpands to an empty string, and it has to stayharmless under
set -u.After merge this wants one plain dispatch to confirm the normal path still
publishes.
Type of Change
fix:)feat:)refactor:)docs:)ci:)chore:)Checklist
Closes #Ntype:*and onepriority:*labelphase:*label (or none when not roadmap work)feat/<slug>,fix/<slug>, etc.)mypy src/) — N/A, no Python changedruff check .) — N/A, no Python changedruff format --check .) — N/A, no Python changed