Skip to content

ci: decisions one file each, and rewrite-only pull requests skip today's boots - #170

Merged
zacharyk812 merged 1 commit into
mainfrom
ci/faster-merges
Nov 25, 2026
Merged

zacharyk812 merged 1 commit into
mainfrom
ci/faster-merges

Conversation

@zacharyk812

Copy link
Copy Markdown
Contributor

What this changes

Nothing for server owners: this makes merging a run of PRs faster, in two ways. Why, in decisions/2026-11-24-decisions-one-file-each.md.

DECISIONS.md no longer conflicts with every open PR. Each of the 58 decisions is now a file in decisions/, <date>-<slug>.md, with its text unchanged (only its heading is now #, and its two relative links point from the new folder). DECISIONS.md is an index that node scripts/decisions.ts writes: one row per decision, by date then file name, each row carrying the anchor its old heading had, so every DECISIONS.md#... link still lands on its decision (checked: the same 58 anchors).

  • How a PR adds a decision now: add decisions/<date>-<slug>.md, with # <title> (<date>) as its first line, and leave DECISIONS.md alone. Two PRs that each add a decision never touch the same file.
  • node scripts/decisions.ts --check runs in a new decisions job in the Docs workflow, on every PR, and docs-ok waits on it. It fails on a misnamed file, a heading whose date doesn't match its name, or a row that's wrong, out of order or for a file that's gone. A decision with no row yet only gets a notice. Release PRs (scripts/release.ts) rewrite the index, as they do the plugin catalog.
  • The index stays committed, so DECISIONS.md still reads as the full list on GitHub and old anchors keep working. Not committing it would have broken those anchors, and merge=union doesn't help because GitHub's merge check doesn't run merge drivers. One cost: within a day, rows are sorted by file name rather than by the order they were decided in.
  • Updated: CONTRIBUTING.md (a new "Decisions" section, plus the release steps and the scripts row), the PR template, ROADMAP.md, README.md and xlimbo/README.md. Code comments that cite (DECISIONS.md, "<title>") are unchanged, because the index lists each decision by title. The site doesn't read DECISIONS.md.

PRs that touch only the rewrite no longer wait on today's plugins' Paper and Folia boots. scripts/affected.sh used to run everything for any change in build-logic/, gradle/ or scripts/. Now a list in the script (rewriteOnly) names the files only the rewrite uses:

  • its conventions and their classes in build-logic/
  • gradle/jar-budgets.txt, library-pins.txt and perf-budgets.txt
  • scripts/budgets/, scripts/boot-seeds/, boot-fabric.sh and new-rewrite-plugin.ts

A change to one of these builds and tests the rewrite's modules and boots the rewrite. It skips today's builds, the newest-API compile and the Paper and Folia boots. Anything not on the list still means everything.

scripts/affected-test.sh keeps that safe, and the Plugins workflow's changes job runs it first. It starts from the conventions today's build files apply (xena.plugin, xena.api, xena.java) and follows every name declared in build-logic/ that they use. It fails if any file reached that way is on the rewrite's list (tried: putting KotlinConventions into xena.java fails it). It also checks what each of these cases runs:

Change Files Builds and tests Boots today's plugins Boots the rewrite on
Rewrite core only core/core-common/src/commonMain/kotlin/co/xenastudios/core/common/text/Component.kt the rewrite's modules no bukkit fabric
Rewrite's Bukkit platform core/platform-bukkit/src/main/kotlin/co/xenastudios/core/bukkit/BukkitText.kt the rewrite's modules no bukkit
Rewrite's Fabric platform (its own build) core/platform-fabric/src/main/kotlin/co/xenastudios/core/fabric/FabricCommands.kt the rewrite's modules no fabric
Today's core (core/src) core/src/main/java/co/xenastudios/core/XenaPlugin.java everything yes bukkit fabric
Today's plugin xbans/src/main/java/co/xenastudios/xbans/XBans.java :build :xbans:build :xbans:api:build yes none
Rewrite's convention build-logic/src/main/kotlin/xena.r8.gradle.kts the rewrite's modules no bukkit fabric
Rewrite's build-logic class build-logic/src/main/kotlin/co/xenastudios/gradle/KotlinConventions.kt the rewrite's modules no bukkit fabric
Today's convention build-logic/src/main/kotlin/xena.plugin.gradle.kts everything yes bukkit fabric
build-logic's own build build-logic/build.gradle.kts everything yes bukkit fabric
Rewrite's jar budgets gradle/jar-budgets.txt the rewrite's modules no bukkit fabric
Version catalog gradle/libs.versions.toml everything yes bukkit fabric
Runtime budgets script scripts/budgets/check.sh nothing no bukkit
Paper and Folia boot script scripts/boot-test.sh everything yes bukkit fabric
Docs only docs/src/content/docs/index.mdx, README.md nothing no none
A decision decisions/2026-11-24-decisions-one-file-each.md, DECISIONS.md, scripts/decisions.ts nothing no none
Plugins workflow .github/workflows/plugins.yml everything yes bukkit fabric
Boot workflow .github/workflows/boot.yml nothing no bukkit fabric
Another workflow .github/workflows/docs.yml nothing no none
A new top-level file Makefile everything yes bukkit fabric

"Everything" is what a push to main runs. A rewrite-only change to core/ already skipped today's boots before this PR; build-logic, gradle/ and scripts/ were the gap.

Verified: node scripts/decisions.ts --check (59 of 59 listed); the check's failure and notice paths with a misnamed file, a mismatched date, an edited row and an unlisted decision; a rebuild of the original entries from the files, which differs only in blank lines and the two relative links; scripts/affected-test.sh; shellcheck; actionlint (only the ubuntu-26.04 label warning and four findings that were already there). pnpm build in docs/ wasn't needed, since the site doesn't touch DECISIONS.md.

For #167 and any other open PR with a DECISIONS entry: on rebase, take main's DECISIONS.md and move the entry into its own file in decisions/.

Checklist

  • ./gradlew build passes (no Gradle sources changed)
  • Tests cover it (scripts/affected-test.sh, scripts/decisions.ts --check)
  • Docs pages are updated (CONTRIBUTING.md; no site pages affected)
  • A line in the plugin's CHANGELOG.md under ## Unreleased (no plugin changed)
  • A new decision is a file in decisions/

…y's boots

DECISIONS.md becomes an index that scripts/decisions.ts writes from
decisions/<date>-<slug>.md, keeping every old anchor. Pull requests add a
file and leave the index alone, so two of them never conflict; the Docs
workflow checks it, letting it lag, and release pull requests bring it up
to date.

scripts/affected.sh treats the rewrite's conventions in build-logic/, its
budgets and pins in gradle/ and its boot scripts as the rewrite's alone:
they build the rewrite's modules and boot the rewrite, not today's plugins.
scripts/affected-test.sh, run by the Plugins workflow, fails if today's
conventions reach one of those files, and checks each kind of change.
@zacharyk812
zacharyk812 enabled auto-merge (squash) November 25, 2026 03:57
@github-actions github-actions Bot added documentation Improvements or additions to documentation core The shared core and build xlimbo xLimbo labels Nov 25, 2026
@zacharyk812
zacharyk812 merged commit 022cecd into main Nov 25, 2026
31 checks passed
@zacharyk812
zacharyk812 deleted the ci/faster-merges branch November 25, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core The shared core and build documentation Improvements or additions to documentation xlimbo xLimbo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant