Skip to content

xtask: the Forge and claims (one branch of every pull request that builds; who works on what) - #1655

Closed
KevinPratap wants to merge 2 commits into
Marvisak:mainfrom
KevinPratap:xtask/forge-and-claims
Closed

KevinPratap wants to merge 2 commits into
Marvisak:mainfrom
KevinPratap:xtask/forge-and-claims

Conversation

@KevinPratap

Copy link
Copy Markdown
Contributor

Problem

With about 900 open pull requests, most can only be tried one at a time against main. Many touch the same files, some fix the same thing twice, and nobody can test them together, so contributors build their own bundles (#231, #1439) that conflict in turn. Since yesterday this has run outside the repository, on my fork (#1624, #1633), and people use it: 13 claims by 6 contributors in its first hour. This pull request moves it into the repository itself, so it no longer depends on a fork.

What it adds

cargo xtask forge, run by .github/workflows/forge.yml every 12 hours and by hand:

  • It builds forge/main: main plus every open pull request that merges, passes cargo check --workspace --all-targets and passes the asset policy. They go in oldest first, one merge commit each (Forge: #N title). A failing batch is halved until the pull request that breaks it is found.
  • It writes STATUS.md on forge/status, with one result per open pull request:
    • in;
    • conflicts with main;
    • conflicts with which other pull requests, on which files;
    • breaks the build, with the first error;
    • changes CI workflows;
    • held.
  • STATUS.md also has the tests of the branch and what joined or left it since the last run.

cargo xtask claims, run by .github/workflows/claims.yml on each comment in the coordination issue and every 30 minutes:

  • It reads claiming:, done: <ID> -> #<PR>, release: and finding: comments, and the task table in the issue's body.
  • It keeps CLAIMS.md on forge/status and one bot comment in the issue up to date. It edits only that comment.
  • Rules:
    • the first valid claim wins;
    • later claims wait in line;
    • a claim expires after 14 days without a pull request;
    • an edited comment doesn't count;
    • only the holder can mark a task done or release it.

The rules are in docs/forge.md. Holds and the coordination issue's number are in .github/forge.toml. Holds say why, and they lift when the pull request gets a new commit. Everything changes by pull request, like code.

What the automation never does:

  • it never pushes to main;
  • it never merges, approves, labels or closes anything;
  • it never edits a pull request's code;
  • it never adds anything the asset policy refuses.

Pull requests that change .github/workflows/ are listed but not merged: the Actions token cannot push them, and they should not run unreviewed.

Changes outside the new files

  • xtask/src/policy.rs: run is split, and the new violations returns the list. This lets the Forge check the policy in-process: it can't rebuild xtask while xtask is running on Windows. Behaviour is unchanged (cargo xtask policy prints and fails as before).
  • xtask/Cargo.toml: serde and toml, both already workspace dependencies. No new crates. gh's --jq ... @tsv output avoids a JSON dependency.

Verified

  • cargo clippy -p xtask --all-targets --locked -- -D warnings is clean.
  • cargo test -p xtask passes, with 7 new tests: the config, task IDs, command lines, dates, gh's tab-separated output, and reading a previous status page.
  • cargo xtask policy passes.
  • cargo xtask claims --slug Marvisak/VIctory against Coordinating who works on what #1633 gives the same tasks and claims as the fork's version (19 tasks, 13 claims).
  • cargo xtask forge --limit 25 merged the same pull requests as the fork's full run. It flagged GPU: implement CopyTextureRegion texture-to-buffer readbacks #67 and Shaders: lower sub-dword LDS reads and writes #101 with their compile errors, and listed the 2 pull requests that change workflows.
  • .github/forge-publish.sh was tried against a local bare repository: first publish (orphan branch), update, unchanged, and retry.
  • Not run: the workflows themselves in this repository. They need its Actions to run, but the same steps run on the fork. The full Forge on a GitHub Windows runner takes about 2 to 3 hours, which is within the 345-minute limit.

For the maintainers

AI-assisted (Claude Code).

🤖 Generated with Claude Code

The Forge builds forge/main every 12 hours: main plus every open pull request that merges, builds and passes the asset policy, oldest first, one merge commit each, failing batches halved to the pull request that breaks them. STATUS.md on forge/status gives each open pull request's result (in, conflicts with main, conflicts with which pull requests, breaks the build, changes CI workflows, held), the tests of the branch and what changed since the last run.

Claims: who works on what, read from the coordination issue (claiming:, done:, release:, finding:). First valid claim wins, claims expire after 14 days without a pull request, edited claims do not count; CLAIMS.md on forge/status and one bot comment in the issue kept current. Rules in docs/forge.md; holds and the issue number in .github/forge.toml. policy::run is split so the Forge can read the violations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Marvisak

Copy link
Copy Markdown
Owner

Automated triage for the maintainers. Closing because it breaks a repository rule (see docs/asset-policy.md and the project rules): nothing taken from the console SDK or the game, no weakening of the asset policy, and the title stays offline.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

@Marvisak Marvisak closed this Nov 25, 2026
@Calvix2k

Copy link
Copy Markdown
Contributor

This looks like a false positive from the automated triage: the change is infrastructure code only — .github/workflows/{forge,claims}.yml, xtask/src/{forge,claims,gh,policy}.rs, docs/forge.md, and the xtask manifest. It contains no game data, no console SDK code or headers, and does not weaken the offline rule; the shader pack and title stay untouched. It is also the same Forge/claims tooling this repository has been using from a fork since yesterday (#1624, #1633), moved in-tree so it stops depending on one contributor's fork.

The one point that may deserve maintainer eyes is that it adds GitHub Actions workflows, which is a repository-permission decision rather than an asset-policy one. Could it be re-checked on that basis? cargo xtask policy on the PR head is the relevant check, and the Forge binaries/snapshots it publishes are build outputs, not committed assets.

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.

3 participants