Skip to content

fix(ci): add missing SPDX headers to workflow files - #435

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/workflow-spdx-headers
Jul 21, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
fix/workflow-spdx-headers

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

The Governance workflow fails on every push here. Its Workflow security linter job requires every .github/workflows/*.yml to carry an SPDX-License-Identifier comment on line 1:

ERROR: .github/workflows/<file> missing SPDX header
Add SPDX header + permissions:

This is a real gate catching a real gap — the files below never had the header. Each failure is another red workflow feeding the ci_activity notification flood.

Licence identifier

MPL-2.0 — taken from this repo's own existing workflow headers, which agree unanimously. It is not assumed or copied from a template. Repos with mixed or absent identifiers were deliberately skipped for a manual decision rather than guessed, because an earlier estate sweep flattened co-developed AGPL repos to MPL-2.0.

Files

pages.yml

Pure one-line prepend — no other content is touched.

🤖 Generated with Claude Code

hyperpolymath and others added 2 commits July 21, 2026 07:32
The Governance reusable's "Workflow security linter" job requires every
.github/workflows/*.yml to carry an SPDX-License-Identifier on line 1. These
files were missing it, so the Governance workflow failed on every push — one
more red workflow feeding the ci_activity notification flood.

Identifier (MPL-2.0) is taken from this repo's own existing workflow headers,
which agree unanimously — not assumed. Files: pages.yml

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hyperpolymath
hyperpolymath merged commit 2af8f20 into main Jul 21, 2026
@hyperpolymath
hyperpolymath deleted the fix/workflow-spdx-headers branch July 21, 2026 17:05
hyperpolymath added a commit that referenced this pull request Nov 17, 2026
#693)

## What

finishingbot now reports whether each pull request is ready for the
owner to review and merge, and the verdict reaches the fleet
report-back. The grid row "finishingbot (release readiness)" then states
it on every PR without spending Claude credit. **Advisory only:** it
never changes finishing-bot's exit status and gates nothing.

`finishing-bot audit --pr N --pr-repo owner/name [--exclude-run-id ID]`
adds one analyzer, `pr_readiness`. Each unmet condition is one finding:

| Rule | Condition | Severity |
|---|---|---|
| PRR-001 | unresolved review conversations (count, a link to each
thread) | error if the base requires resolution, else warning |
| PRR-002 | a reviewer whose latest review is CHANGES_REQUESTED | error
if approvals are required, else warning |
| PRR-003 | head behind base | error if the base requires an up-to-date
head, else warning |
| PRR-004 | merge conflict | error |
| PRR-005 | check runs or statuses failing, timed out, cancelled,
action_required or startup_failure | error |
| PRR-006 | checks still pending (the evaluating run's own checks
excluded) | info |
| PRR-007 | a required status context (rulesets plus classic protection)
that no check run or commit status on the head provides | warning "not
yet" while any check is unfinished (a `needs:` job has no check run
until it starts; seen on this PR itself); error once every check has
finished |
| PRR-008 | draft | info |

The verdict is one of `ready`, `not ready` with reasons, or `readiness
unknown`, which names any source that could not be read. It also states
draft and auto-merge, and it becomes the envelope `reason`. A PR with an
unread source is never reported `ready`. There is also a standalone
command, `finishing-bot pr-readiness --repo o/r --pr N` (or `--snapshot
FILE`).

## Why finishingbot's row read "no report-back was received"

The adapter was not the cause. finishingbot already produces an envelope
wherever it is enrolled: gitbot-fleet main run 44109280783 shows
`finishingbot -> ran (802 finding(s))`, and rsr-template-repo
fork-governance run 44124672727 shows `ran (150 finding(s))`. The orange
row comes from the consumer side, in rsr-template-repo `Publish verdict
grid`. That workflow fires when *any* of Fork governance, Hypatia or
Static Analysis completes. It looks for a *completed* Fork governance
run on the SHA, and when there is none it renders without fleet
evidence. On rsr-template-repo#436 (publisher run 44127710882), Fork
governance run 44127169826 was still `queued` when the publisher ran. So
**all three** fleet rows (rhodibot, glambot, finishingbot) read
"not_run: enrolled, but no report-back was received". The fix belongs in
that publisher, not here (see Next).

## Wiring

- `scripts/fleet-report-back.sh` gains `--pr` and `--pr-repo`, validated
as both-or-neither. The token arrives as `FLEET_PR_TOKEN`. The driver
unsets it before any adapter runs and exports it only into
finishing-bot's subshell, as `GH_TOKEN`, never on a command line. PRR
findings are exempt from the no-path warning because they are about the
change as a whole.
- `fleet-report-back-reusable.yml` passes
`github.event.pull_request.number`, `GITHUB_REPOSITORY` and the job's
token. Permissions are unchanged (`contents: read`). No `uses:` changed,
so `actions.lock` is untouched; `scripts/check-lock-sync.sh` passes,
with output identical to main.
- No Cargo.toml or Cargo.lock change: the crate's existing `reqwest`
(rustls) and `tokio` are used. This avoids the files #689 edits.

## Evidence (run locally)

- `cargo test --locked` (bots/finishingbot): 84 passed (lib), 84 passed
(bin), 37 passed (analyzer_tests), 0 failed. Baseline before this
change: 65/65/37.
- `cargo clippy --locked --all-targets -- -D warnings`: clean. `cargo
fmt --check`: clean. `cargo build --release --locked`: ok.
- `bash tests/fleet-report-back-test.sh`: 228 passed, 0 failed (baseline
214); build helper: 69 passed, 0 failed. The new section 12 covers
argument passing, token isolation (another adapter sees no token), the
token never reaching the log, the verdict as the reason, and refusal of
bad `--pr` values.
- `shellcheck -S warning`: only the SC2140 warning that main already
has.
- Fixtures were recorded 2026-11-17. rsr-template-repo#435 → exactly
PRR-007 for `` `CI/gate` `` (none of its 54 check runs or statuses
provides it). standards#1619 → one PRR-001 with 20 conversations, plus
PRR-003 (14 behind). Negative controls: a clean PR yields no finding and
is `ready`; exactly one unresolved thread yields exactly one finding.
- Live REST run of the real binary through the real driver against
rsr-template-repo#435: `finishingbot -> ran (151 finding(s)) [PR #435
not ready: required context(s) not provided: CI/gate; ...]`.

## Not verified

- GraphQL `reviewThreads` was not run live: GraphQL is blocked from the
authoring session, which read it as "could not read". The standards#1619
thread fixture is **reconstructed** from REST review comments to
reproduce the prototype's count of 20, and its `_source` says so.
- That a `contents: read` `GITHUB_TOKEN` can read pulls, reviews, check
runs, rules and GraphQL threads for public repos has not been observed
in Actions yet. This PR's own Fleet report-backs run is the first test.
- The fleet job runs while the PR's other checks are still running, so
PRR-006 (pending) will be common. It is `info`.

## Next (outside this repo)

- rsr-template-repo and standards run the fleet inline in
`fork-governance.yml`. To get the readiness they must pass
`--pr`/`--pr-repo` and `FLEET_PR_TOKEN` and bump the gitbot-fleet pin.
- Fix the publisher race in rsr-template-repo
`verdict-grid-publish.yml`. It should either wait for or re-trigger on
the Fork governance completion, or render "fleet evidence pending (run N
queued)" instead of "no report-back".

https://claude.ai/code/session_01J4QvDj7XpKyxE4WbsgTsTh

---
_Generated by [Claude Code](https://claude.ai/code)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
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