Skip to content

ci: add a force input to the star history floor - #729

Merged
av1155 merged 2 commits into
mainfrom
ci/star-history-force-input
Aug 11, 2026
Merged

ci: add a force input to the star history floor#729
av1155 merged 2 commits into
mainfrom
ci/star-history-force-input

Conversation

@av1155

@av1155 av1155 commented Aug 11, 2026

Copy link
Copy Markdown
Owner

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. A
run that refuses never publishes, so the number it compares against never
moves, and every later run fails identically. workflow_dispatch took no
inputs, so the only way out was hand-editing the aria-label on the assets
branch.

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_dispatch gains a force boolean input, default false, passed to
    the step through env: rather than interpolated into the script.
  • force skips only the floor comparison. The zero-row refusal stays
    unconditional, 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.
  • The refusal message now says how to get past it.
  • A missing published chart fails with an ::error:: annotation. Previously
    sed exited non-zero under set -euo pipefail and the step died with a bare
    exit code that reads like an unrelated failure.

Testing

actionlint clean. I ran the guard logic as a standalone script across all six
paths, including the one that is easy to get wrong: on schedule and watch
there are no inputs, so FORCE expands to an empty string, and it has to stay
harmless under set -u.

FORCE count published result
empty (schedule/watch) 264 262 publish
empty 100 262 refuse, below floor
empty 0 262 refuse, zero rows
false 100 262 refuse, below floor
true 100 262 publish
true 0 262 refuse, zero rows

After merge this wants one plain dispatch to confirm the normal path still
publishes.

Type of Change

  • Bug fix (fix:)
  • New feature (feat:)
  • Refactoring (refactor:)
  • Documentation (docs:)
  • CI/CD (ci:)
  • Chore (chore:)

Checklist

  • Issue exists and is linked above with Closes #N
  • Linked issue has exactly one type:* and one priority:* label
  • Linked issue has at most one phase:* label (or none when not roadmap work)
  • Branch name matches issue scope (feat/<slug>, fix/<slug>, etc.)
  • Tests added/updated for all changes — N/A, workflow shell; verified as above
  • Type check passes (mypy src/) — N/A, no Python changed
  • Lint passes (ruff check .) — N/A, no Python changed
  • Format passes (ruff format --check .) — N/A, no Python changed
  • Documentation updated (if applicable) — N/A
  • No secrets or sensitive data committed
  • Scope check: This change helps search for missing or cutoff-unmet media in a controlled way — N/A, repo tooling

av1155 added 2 commits August 11, 2026 13:00
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
@av1155
av1155 merged commit 03da206 into main Aug 11, 2026
22 checks passed
@av1155
av1155 deleted the ci/star-history-force-input branch August 11, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: star history floor guard cannot recover once tripped

1 participant