Skip to content

ci: the release guard drafts when it cannot see, and waits for late checks - #157

Merged
rodrigoteamx merged 1 commit into
mainfrom
ci/release-guard-fails-closed
Nov 5, 2026
Merged

rodrigoteamx merged 1 commit into
mainfrom
ci/release-guard-fails-closed

Conversation

@rodrigoteamx

Copy link
Copy Markdown
Contributor

Follow-up to the release guard that waits for its checks (#31 in milpa/agent, propagated 2026-11-04). The independent review of that propagation passed with two low findings; this closes both.

A read that fails no longer leaves the release public. Actions runs the step under bash -e. When one API read failed during the wait, the step died before drafting or opening an issue, and the release stayed public with only a red job as trace. Now:

  • every read sits inside a condition;
  • a read that fails, returns garbage, or does not hold every check counts as one more wait;
  • if the last read was incomplete when the wait runs out, the release is drafted.

Late checks are awaited. The guard decided as soon as the checks that already existed were done, so a job that runs after another created its check too late to be judged. Now:

  • it waits while any workflow run on the tagged commit is still going (runs started by a release, such as other guards, are left out);
  • it reads 100 check runs per page instead of 30, and an incomplete page counts as not seeing;
  • it declares actions: read and checks: read, which private repositories need.

If a workflow is still running after ten minutes while every relevant check is green, the release stays published with a warning. Drafting there would turn any long workflow that does not test the tree into a false positive.

Measured by execution: controlled inputs under bash -e, injected API failures, the live API with writes stubbed, and mutants of each mechanism, with the current guard as the control. The current guard aborts without drafting in every failure case and passes a late red check; the new one drafts. Evidence: getmilpa/greenhouse .milpa/evidence/0171.

The same file goes to milpa/agent and the 39 repos that carry the guard. Each was replaced only after checking it held the current copy byte for byte.

…hecks

Actions runs the guard under bash -e. When one API read failed during the
wait, the step died before drafting or opening an issue, and the release
stayed public with only a red job as trace. Every read now sits inside a
condition: a read that fails, returns garbage, or does not hold every check
counts as one more wait, and if the last read was incomplete when the wait
runs out, the release is drafted.

The guard also decided as soon as the checks that already existed were done,
so a job that runs after another created its check too late to be judged.
It now waits while any workflow run on the tagged commit is still going,
except runs started by a release, and reads 100 check runs per page instead
of 30. It declares actions: read and checks: read, which the two private
repositories in the family need.

Measured by execution against controlled inputs, the live API and mutants,
with agent's current guard as the control (greenhouse evidence/0171).
@rodrigoteamx
rodrigoteamx merged commit 3eab702 into main Nov 5, 2026
2 checks passed
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.

1 participant