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

Closed
github-bot wants to merge 2 commits from gh-pr/1655/head into gh-pr/1655/base
Owner

@⁠KevinPratap on GitHub · 2026-11-24 20:31 UTC · original
KevinPratap:xtask/forge-and-claims → main · +1794 −13 · 12 files · 2 commits · closed without merging

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 #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 #67 and #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

  • The coordination issue is #1633, which I opened. If you'd rather own it, open your own with the title "Coordinating who works on what" and change coordination_issue in .github/forge.toml. The workflow finds it by that title.
  • The schedules only run on the default branch, so nothing happens until this is merged. To try it once, use Actions → Forge → Run workflow.
  • Once this lands, I'll stop the fork's copy and point #1624 and #1633 here.

AI-assisted (Claude Code).

🤖 Generated with Claude Code

**@⁠KevinPratap** on GitHub · 2026-11-24 20:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/1655) `KevinPratap:xtask/forge-and-claims` → `main` · +1794 −13 · 12 files · 2 commits · closed without merging ## 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 #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 #67 and #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 - The coordination issue is #1633, which I opened. If you'd rather own it, open your own with the title "Coordinating who works on what" and change `coordination_issue` in `.github/forge.toml`. The workflow finds it by that title. - The schedules only run on the default branch, so nothing happens until this is merged. To try it once, use **Actions → Forge → Run workflow**. - Once this lands, I'll stop the fork's copy and point #1624 and #1633 here. AI-assisted (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/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 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:40:04 +00:00
github-bot closed this pull request 2026-11-26 04:40:04 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:23 UTC · original

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** on GitHub · 2026-11-25 01:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1655#issuecomment-7149500443) 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.
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-25 02:03 UTC · original

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.

**@⁠Calvix2k** on GitHub · 2026-11-25 02:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/1655#issuecomment-7150268291) 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.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1655
No description provided.