Build images / build-ml (push) Successful in 4s
CI / lint (push) Successful in 4s
Build images / build-agent (push) Successful in 5s
CI / extension-version (push) Successful in 4s
CI / frontend-build (push) Successful in 22s
extension / lint (push) Successful in 22s
CI / backend-lint-and-test (push) Failing after 33s
Build images / sign-extension (push) Successful in 2m24s
Build images / build-web (push) Successful in 2m38s
CI / integration (push) Successful in 5m15s
`1.0.<minutes since 2020>` -> `YYYY.M.D.HHMM` UTC, from the commit time of
the newest change to a packaged extension file. Same clock and same commit as
before; readable instead of opaque, and the same value the rest of the family
derives.
The hold on this step was two questions about AMO, and Mozilla's own docs
answer both:
^(0|[1-9][0-9]{0,8})([.](0|[1-9][0-9]{0,8})){0,3}$
1. four all-numeric segments -> ACCEPTED ({0,3} more after the first).
2. leading zeros -> REJECTED. A segment is the single digit
`0` or starts 1-9, so `08` and `0201` are refused. MDN says it in prose
too: "Non-zero numbers must not include a leading zero."
So the documented fallback applies, extension only: the same numbers rendered
without the family's zero-padding. `2026.08.29.0201` and `2026.8.29.201` are
one value in two renderings — rule 148 defines comparison as numeric per
segment, under which they are equal — so nothing already published is
reordered, and left-padding each segment recovers the family string exactly.
HHMM stays one segment because AMO allows at most four.
The transition is safe in the other direction too: 2026 > 1, so every CalVer
outranks every published 1.0.x. build.yml's downgrade guard confirms it.
Also in scope:
* MAJOR.MINOR is gone. `cmd_major_minor`, `cmd_patch` and VERSION_EPOCH go
with it, the committed version in manifest.json / package.json is now
wholly inert, and ci.yml's MAJOR.MINOR-agreement check is retired rather
than left running beside a fact that stopped existing (rule 22).
* ci.yml's `extension-version` lane now asserts Mozilla's regex verbatim
instead of a loose `^[0-9]+(\.[0-9]+)*$` — which would have passed the
padded shape. It also asserts YYYY.M.D.HHMM, because AMO would accept a
regression to `1.0.<minutes>` while that orders below everything signed
since. Checking here is the point: AMO 409s on re-signing, so a version it
rejects is burned and cannot be reused.
* `artifacts.sh version extension` delegates to packaging.sh, so the two
cannot answer differently. The direction matches the existing one —
artifacts.sh already asks packaging.sh for the extension's path set.
#3156 is what makes this commit safe to make: packaging.sh is in web's path
set, so the web revision moves with the extension version and build-web
rebuilds instead of republishing an image bundling the previous XPI.
Scribe #3138.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
10 KiB
10 KiB
CI Requirements — FabledCurator
Spec: https://git.fabledsword.com/bvandeusen/CI-runner/src/branch/main/docs/process.md
Runtime image
git.fabledsword.com/bvandeusen/ci-python:3.14
Image deps used
- python 3.14
- ruff (analyzer for
backend/,tests/,alembic/,agent/,scripts/) - node (frontend job:
npm install+ vitest + vite build) - docker CLI + buildx (
.forgejo/workflows/build.yml: build-web, build-ml, build-agent — Fabled-Git registry push, andimagetools inspect/createfor the reuse path)
Secondary runtime image
node:24-bookworm-slim — .forgejo/workflows/extension.yml only.
.forgejo/workflows/release.yml runs on ci-python:3.14 like everything else
and installs nothing: it needs git and stdlib python, and builds no image.
The extension lane is the one job that does NOT run on ci-python:3.14: it
needs a current Node for web-ext and vitest and nothing Python at all. Kept
on the upstream slim image rather than adding a Node toolchain to ci-python,
per docs/process.md's "add deps to the image when used by >1 project".
Per-job tool installs
pip install -r requirements.txt pytest pytest-asyncio— inbackend-lint-and-testandintegrationjobsnpm install --no-audit --no-fund— infrontend-buildjobnpm install --no-audit --no-fund— inextension.yml'slintjob (web-ext + vitest)unzip— inextension.yml's "Verify XPI contents" step, installed via apt only when absent (node:24-bookworm-slimmay or may not carry it). Debian package, ~2s. Not worth baking into a shared image for a single consumer, perdocs/process.md's ">1 project" rule.
Notes
- Integration wall time ~3 min, dominated by pgvector container start + the
pip installstep (~30-45s on cold cache) + alembic + 300+ integration tests. - The
pip installin two jobs is intentional and perdocs/process.md's "add deps to image when used by >1 project" rule: FC alone is one Python project, so the deps live inrequirements.txtand install per-job. Reconsider when a second Fabled-family Python backend lands. - Integration uses Fabled-Git Actions
services:+ socket-discovered bridge IPs becauseact_runner(swarm-runner v0.6+) puts services on the default bridge with no embedded DNS. The pattern is documented in the rulebook'sfabled-git.md"CI philosophy" section and FC'sci.ymlis the canonical example. - No
package-lock.jsonis tracked yet (FC'sfeedback_no_local_runsmemory bansnpm installlocally). Usingnpm installrather thannpm ciuntil a lockfile lands. - No
imagemagick/pandocper-job installs needed. extension/'s vitest specs loadlib/*.jsby evaluating the real file as a classic script (test/helpers/loadLib.js) rather than addingmodule.exportsshims to production code — the libs ship asbackground.scripts, not ES modules, so the specs exercise exactly the bytes packaged into the XPI.extension/scripts/packaging.shis the single definition of what ships inside the XPI. Three consumers read from it rather than keeping their own copy: web-ext's--ignore-files(extension/package.json), thegit logpathspec inside the script's own version derivation, andscripts/artifacts.sh, which appends the extension's set to web's because the web image bundles the signed XPI. Hand-kept copies of that one fact is what allowed issue #2397, soextension/test/version.spec.jsasserts no workflow has reintroduced a literal:(exclude)extension/….- Packaged and version-relevant are two different sets (#3156).
scripts/is excluded from the XPI and is NOT excluded from the version derivation, becausepackaging.shdecides the version string stamped into the packagedmanifest.json. The membership test is "can changing this file change the published bytes?", not "is this file copied in?" — which is why the script keeps two lists rather than one. - The shipped extension version is derived, not committed. It is the commit
TIME of the newest packaged-extension change, rendered
YYYY.M.D.HHMMUTC (family rules 148/149 — never a commit count, which orders by branch rather than by recency).build.yml'ssign-extensioncomputes it and stamps it intoextension/manifest.json+package.jsonin the working tree before signing; the stamp is never committed. The version in the repo is wholly inert — since milestone 318 step 8 there is no hand-set MAJOR.MINOR either. - The extension is the one artifact that does not zero-pad, and that is not a
drift (#3138). Mozilla's grammar for AMO is
^(0|[1-9][0-9]{0,8})([.](0|[1-9][0-9]{0,8})){0,3}$— a segment is the single digit0or starts 1-9, and there are at most four.2026.08.29.0201is rejected;2026.8.29.201is the same value one character narrower per segment, and rule 148 defines comparison as numeric per segment, so nothing is reordered.ci.yml'sextension-versionlane asserts the derived string against that exact regex, plus aYYYY.M.D.HHMMshape check that would catch a regression to the pre-3181.0.<minutes>— which AMO would accept and which orders below everything already signed. Checking here is the whole point: AMO 409s on re-signing, so a version it rejects is burned and cannot be reused.scripts/artifacts.sh version extensiondelegates topackaging.shso the two cannot answer differently. - Every job that derives anything checks out with
fetch-depth: 0— all fourbuild.ymljobs,ci.yml'sextension-versionandbackend-lint-and-test(fortests/test_artifact_paths.pyandtest_artifact_identity.py), andrelease.yml, which additionally walks the tag graph. A depth-1 clone sees one commit and derives a wrong, too-low value rather than failing, so the full-history checkout is load-bearing rather than incidental. scripts/artifacts.shis the same shape one level up: one definition per artifact of what it is built from, and the two values derived from it.revision(12 hex of the newest commit touching that set) andversion(YYYY.MM.DD.HHMMUTC, rule 148). Four artifacts, four independent answers, so a push touching onlyagent/leaves web and ml alone.tests/test_artifact_paths.pyreads each Dockerfile and asserts every COPY source is covered, so adding a COPY without updating the script fails CI.- A file that DECIDES an artifact's identity belongs in its set even though it
is copied into nothing —
packaging.shfor the extension and web (#3156), andartifacts.shitself for web (#3202), which decides theFC_VERSIONbaked into that image. Only web needs the second entry: every artifact stamps a revision, but a revision has a backstop (a changed derivation stops matching the published label and forces a rebuild) and a version has none, because nothing compares it to anything.tests/test_artifact_paths.py'sDERIVERStable is the guard. - Builds are skipped when the content is already published. Each image
carries its revision as an
fc.revisionLABEL, andbuild.ymlreads that label back off the moving channel tag (imagetools inspect --format). Equal to the derived revision means the bytes are already published, so the job repoints the remaining tags at the existing manifest instead of rebuilding. Two things this depends on: an inspect that errors for ANY reason reads as a MISS so no needed build is ever skipped, and the repoint must EXCLUDE the source tag —imagetools createwraps its source in a manifest index, and config labels do not resolve through an index, so writing the channel tag from itself destroys the label the next run reads (#3183). - The build pushes exactly ONE tag — the channel's — and every other tag is
written registry-side afterwards (#3190). buildx on this runner pushes the
first tag to the registry and then re-pushes the rest through the docker
driver, out of a local image store that a registry-direct build never fills;
it fails intermittently with
tag does not exist. Ondevthat only reddens a job, but onmainit silently skips:c-<sha>while:latestpublishes fine — a missing rollback tag has no consumer that fails, so nothing but the red job would notice until somebody needs to roll back.imagetools createhas no local store to be absent from, and it is the code the reuse path already ran, so both paths now share one proven route. The cost::c-<sha>is an index rather than a plain image, sofc.revisiondoes not resolve through it — nothing reads it there, and the index names the same manifest. FC_CHANNELandFC_VERSIONare build args, not runtime settings.build.ymlpasses them to the web image only — the ml and agent images have nothing to report them to./api/healthreturns both, the foot of Settings renders them, and/api/extension/manifestreports the channel beside the extension version so an install can be traced to a channel. With no version image tags, that self-report is the ONLY answer to "which build is this?" — which is why a missing version rendersunknownrather than a blank: an empty footer reads as "no version", a different and false claim. Both are declared LAST in the Dockerfile on purpose: an ARG invalidates every layer below it, and these are the values that differ between the dev and main builds of identical source, so placing them earlier would stop the two channels ever sharing a cachedpip install. Empty by default — a local build then reports nothing rather than claiming a channel it is not on.- The channel is never folded into the version. A
-devsuffix makes the extension's per-segmentparseIntcomparator read that segment as 0, so every dev build compares equal to every other — issue #2993 exactly (rule 149).frontend/test/systemBuild.spec.jspins the rendered version to the bare number. - Callers MUST
set -fbefore substituting the script's output. Without it the shell expandstest/**against the working tree and silently narrows the pattern to whatever files exist at that moment — a failure that looks like nothing until dev files start appearing in the XPI.test/version.spec.jsasserts every--ignore-filesconsumer sets it, and that no consumer has quietly reinstated a hardcoded list.