Skip to content

feat(report)!: schema 6 with branch, pull request and image states of their own - #208

Merged
sweepies merged 4 commits into
mainfrom
fix/report-v6
Nov 9, 2026
Merged

sweepies merged 4 commits into
mainfrom
fix/report-v6

Conversation

@sweepies

@sweepies sweepies commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

Last PR in the implicit-state-machine series. It is stacked on #207, so merge that first; GitHub will then retarget this one to main.

Changes

  • BranchStatus and PullRequestStatus replace the shared 11-variant ActionStatus. A branch can no longer be closed, and a pull request can no longer be rebased, deleted or stale, so validate() no longer has to reject those combinations. It now also counts a merged branch as a write in dry-run checks. The CLI colours each kind of status separately.
  • stale is a new branch status for a write refused because the default branch changed or moved since extraction, so nothing was written. Internally write.rs uses a typed Refusal (Stale or Failed). needs_requeue is now status == Stale, where it used to match the reason text against two string constants, so rewording a reason can no longer silently stop the requeue. The reason text is unchanged.
  • ImageState is an enum declared worst to best, so Ord gives the "worst platform wins" rule. It replaces the STATES array, the rank function and the string matches in lookup, the engine, the dashboard and PR bodies. The JSON spelling is unchanged.

Breaking: schemaVersion is now 6, and readers reject 5. docs/reference/report.md lists the new statuses, and the server guide describes stale.

Tests

A new test checks that statuses from the other type are rejected. The version tests now treat 5 as old and 7 as future, and the fixtures use the new statuses. The full workspace suite passes (75 suites, 0 failures), and Clippy is clean.

View guided diff Turn on auto-fix

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
count-patchula bfb787d Commit Preview URL

Branch Preview URL
Nov 09 2026, 12:19 AM

sweepies added a commit that referenced this pull request Nov 8, 2026
…bject

Review findings on #208:
- The CLI read a remote run's report with plain serde, so a report of
  another schema version, or one that fails validation, was accepted. It
  now goes through Report::from_json, and a version mismatch says to use
  the same release on both ends.
- The actions object kept schemaVersion 1 although its statuses changed;
  it is now ACTIONS_SCHEMA_VERSION 2.
sweepies added a commit that referenced this pull request Nov 8, 2026
…bject

Review findings on #208:
- The CLI read a remote run's report with plain serde, so a report of
  another schema version, or one that fails validation, was accepted. It
  now goes through Report::from_json, and a version mismatch says to use
  the same release on both ends.
- The actions object kept schemaVersion 1 although its statuses changed;
  it is now ACTIONS_SCHEMA_VERSION 2.
sweepies added a commit that referenced this pull request Nov 8, 2026
…bject

Review findings on #208:
- The CLI read a remote run's report with plain serde, so a report of
  another schema version, or one that fails validation, was accepted. It
  now goes through Report::from_json, and a version mismatch says to use
  the same release on both ends.
- The actions object kept schemaVersion 1 although its statuses changed;
  it is now ACTIONS_SCHEMA_VERSION 2.
@sweepies
sweepies deleted the branch fix/update-lifecycle November 9, 2026 00:17
@sweepies sweepies closed this Nov 9, 2026
… their own

- ActionStatus is split into BranchStatus and PullRequestStatus, so a
  branch can't be `closed` and a pull request can't be `rebased`,
  `deleted` or `stale`; the types now say what validate() could not.
- A branch whose base went stale before anything was written reports the
  new `stale` status. The server requeues on that status instead of
  matching the text of its reason.
- An image check's state is an ImageState enum, ordered worst to best, in
  place of eight string literals.

BREAKING CHANGE: reports are schemaVersion 6; readers reject version 5.
…bject

Review findings on #208:
- The CLI read a remote run's report with plain serde, so a report of
  another schema version, or one that fails validation, was accepted. It
  now goes through Report::from_json, and a version mismatch says to use
  the same release on both ends.
- The actions object kept schemaVersion 1 although its statuses changed;
  it is now ACTIONS_SCHEMA_VERSION 2.
@sweepies sweepies reopened this Nov 9, 2026
@sweepies
sweepies changed the base branch from fix/update-lifecycle to main November 9, 2026 00:18
@sweepies
sweepies merged commit 140ed75 into main Nov 9, 2026
13 checks passed
@sweepies
sweepies deleted the fix/report-v6 branch November 9, 2026 00:41
@sweepies-ops sweepies-ops Bot mentioned this pull request Nov 9, 2026
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