Skip to content

Move application build tooling into scripts/build/ - #2106

Merged
Kevinjohn merged 35 commits into
issue/1974-scripts-devfrom
issue/1975-scripts-build
Nov 16, 2026
Merged

Kevinjohn merged 35 commits into
issue/1974-scripts-devfrom
issue/1975-scripts-build

Conversation

@Kevinjohn

@Kevinjohn Kevinjohn commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

What and why

Application build tooling moves into scripts/build/: the bundle budget, SPA route-document check, Paraglide plugin parity, static SPA routes and the sync to the backend's public folder. Each file moves with git mv; package scripts keep their command names, and every caller, import, ESLint allowance, workflow paths: filter and run: step, test and documentation link now uses the new path. Scripts that resolve the repository root go up one more folder.

  • Checked: pnpm run build passes, including the bundle and route checks and the public-folder sync; the Paraglide parity check passes.

Decisions made without the owner

  • .dockerignore re-includes scripts/build/ (126901e9e). Its **/build rule, meant for build output, also matched the new folder, so the image's pnpm run build would have lost the build tooling it runs. A .dockerignore matcher run over every tracked file under scripts/ reported 8 of the moved files excluded before the fix and none after; the set of scripts in the Docker context now matches main, and apps/*/build output stays excluded. No image was built. AGENTS.md restricts Dockerfiles, Compose, Docker workflows and Docker tests; this ignore-file line keeps the existing image build working after the move.

Closes #1975

Gate evidence

  • pnpm run check:changed <predecessor branch>: passed.
  • Pre-push check:push (format, type-check, lint): passed.
  • Validation workflow on this head: run 43945378084
  • Stack tip gate on issue/1980-scripts-shared (59ee4999b), which contains this branch: gate:all and e2e (309 tests) passed.

Merge order

#2070 → #2071 → #2072 → #2073 → #2074 → #2075 → #2076 → #2077 → #2078 → #2079 → #2080 → #2081 → #2082 → #2083 → #2084 → #2085 → #2086 → #2087 → #2088 → #2089 → #2090 → #2091 → #2092 → #2093 → #2094 → #2095 → #2096 → #2097 → #2098 → #2099 → #2100 → #2101 → #2102 → #2103 → #2104 → #2105 → #2106 → #2107 → #2108 → #2109 → #2110 → #2111 → #2112

Merge predecessor for this PR: #2105.

One linear stack; each PR targets the previous PR's branch. Every PR head from #2104 to #2112 merges into its base branch without conflict, and no pair of open PRs conflicts.

Closes #1975.

The bundle budget, SPA route checks, Paraglide parity check, static route
list and the Adonis public sync now live together in scripts/build/.
The sync script and parity check resolve the repository root one level
higher; the budget and route checks keep reading dist/ from the working
directory. Package scripts, workflow build steps, frontend imports,
ESLint allowances and the tests that read or copy these files follow
the new paths. Command names and behaviour are unchanged.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #1976.

The Playwright run mode, worker runtime and guardian, preset and browser
runners, the production rehearsal server and their tests now live
together in scripts/e2e/; browser scenarios stay in e2e/. Playwright
config, the end-to-end type-check project, frontend and backend tests,
ESLint allowances, the port guard's file list and package scripts follow
the new paths. The changed-file selector's end-to-end input pattern now
matches scripts/e2e/playwright*, and the preset path test copies its
files into the same folder layout. Command names and behaviour are
unchanged.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #1977.

The changed-file selector, gate runner and command list, pre-push hook,
Node 26 check and workflow outcome report now live together in
scripts/ci/, and the gate command fixture moves to scripts/ci/fixtures/.
The Git hook, package scripts, workflow run steps (including the
tooling and static scope selection in gate.yml and static-analysis.yml)
and CONTRIBUTING.md follow the new paths, and repository-root lookups
gain one level.

The selector now matches script files in any scripts/ subfolder and
finds the test files that import a script by their relative path, so a
change to a moved script still selects its tests. Its fixtures name the
moved paths. Command names are unchanged.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #1978.

Release packaging, deployment, the packaged-server and dialog smoke tests,
the loopback proxy and the release validation gate now live together in
scripts/release/; the container runtime preparation, published image
check and Compose smoke test sit under scripts/release/docker/.
render-client-nginx was already removed by #1964, so it is not moved.

Package scripts, the gate, docker, validation and release provenance
workflow paths and run steps, the Dockerfile's runtime preparation step
and the tests that read these files follow the new paths. Repository-root
lookups gain one or two levels.

Release provenance rebuilds archives from the release tag's own tree, so
its guard now accepts the packaged-server smoke test at either the new
or the old path; tags cut before this move still rebuild. Command names
and publication triggers are unchanged.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #1979.

The DCO, Dependabot, Gitleaks and UI primitive checks, the shadcn
registry wrapper, the major dependency report and the Sonner CSP test
now live together in scripts/maintenance/, with the DCO ratifications
beside their check and the Sonner import probe in fixtures/. Package
scripts, the gate workflow's sign-off step, the Gitleaks configuration
comment and the selector test fixtures follow the new paths;
repository-root lookups and the UI check's parse of the registry
working directory gain one level. Command names and behaviour are
unchanged.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #1980.

The pnpm spawn helper, its declarations and its test now live in
scripts/shared/. Every importer follows the new path: the preset and
browser runners, the selector, gate runner and pre-push hook, the
Paraglide parity check, the maintenance and end-to-end scripts, the
frontend test and the end-to-end global setup. The preset path test
copies the helper into the same folder layout. Command names and
behaviour are unchanged.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>

# Conflicts:
#	scripts/e2e/e2eReset.test.mjs
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ntenance

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…-shared

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Closes #2028. docs/ is removed from the index and ignored. The Pages
workflow builds the site in its own run before uploading it; the docs
workflow keeps the build and navigation check and runs the image
lightbox test against the built site through a new docs:test script,
since that test reads docs/. The frontend suite skips that file unless
docs:test runs it. check:changed builds and checks the site instead of
comparing a committed copy. AGENTS.md, CONTRIBUTING.md, README.md, the
PR template, the CodeQL path filter and the OpenSSF answer no longer
describe a committed site; `pnpm run docs:build` still produces the
offline copy in docs/.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ntenance

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…-shared

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ing-docs

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
@Kevinjohn Kevinjohn added the polish-in-progress Polish review running label Nov 16, 2026
The open-source page still told contributors to rebuild the committed site
before opening a pull request. docs/ is no longer committed, so the page now
asks for a passing docs:build and sources only, and a documentation policy
test keeps contributor guidance from asking for a committed site again.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
The default frontend suite excludes the lightbox test because it reads the
built site. check:changed still passed a changed copy of it to vitest as a
frontend test file: --static then failed with no test files found, and the
full check ran vitest related, which matched nothing and passed without
running it. A change to that test now selects the docs build and docs:test
steps instead.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
@Kevinjohn

Copy link
Copy Markdown
Owner Author

Polish review

Unfixed P1: the Docker image build loses scripts/build/.

  • Repository fact (.dockerignore at this head): the pattern **/build excludes every directory named build at any depth from the Docker build context, so scripts/build/ no longer reaches the image build after this move.
  • Repository fact (Dockerfile, web-build stage): the image build runs pnpm run build, which runs node scripts/build/sync-adonis-public.mjs and pnpm run bundle:check (scripts/build/check-bundle-budget.mjs), and the frontend build loads apps/frontend/vite.config.ts, which imports ../../scripts/build/staticSpaRoutes.mjs and ../../scripts/build/bundleBudget.mjs.
  • Inference (Docker ignore-file matching; Docker was not built or run, as the repository rules require): the image build fails at the frontend build with a missing module. Who it hurts: the Docker workflow's smoke on the next push to main after this lands, release image publication from a tag, and anyone building the images with Compose.
  • Smallest fix: re-include the folder in .dockerignore (a !scripts/build/ line after **/build). It is not applied here because the repository rules do not allow changing Docker files without explicit authorisation, and this task's Docker authorisation covers only the Move release packaging and smoke tests into scripts/release/ #1978 path changes. It needs the owner's decision.
  • Every PR stacked on this one (Move browser-test infrastructure into scripts/e2e/ #2107 to Stop committing the generated documentation site #2112) contains this change, so the defect stays until the fix lands.

Verified for this move (repository facts at 962b17089):

  • sync-adonis-public.mjs shows as a delete and an add only because it is five lines long: the two ../ lookups gained one level and nothing else changed.
  • The bundle-budget and route-document checks resolve dist/ from the working directory, so they need no root change; paraglidePluginParity.mjs gained its ...
  • Workflow run: steps, the root build and bundle:check scripts, the Vite config imports, ESLint allowances and the frontend tests use scripts/build/.

Mechanical proof of the move (repository facts at the PR head, range against the predecessor's head):

  • Every moved file is a git rename; files below 100% similarity differ only in path lines (relative imports, import.meta.url root lookups and path literals), checked line by line in the rename diffs.
  • No tracked file outside CHANGELOG-ARCHIVE.md names an old path: a word-bounded search of the tree for each old path found only scripts/bundleBudget.mjs as example inputs in scripts/check-changed.test.mjs, which the pure selector tests never read from disk; Move CI selection, gates and reporting into scripts/ci/ #2108 renames them to the real folders.
  • Every relative import, import() and new URL(..., import.meta.url) specifier in tracked JavaScript and TypeScript resolves, with the same five pre-existing unresolved build-output or runtime targets as the predecessor head.
  • Every Markdown link and every scripts/... path in tracked Markdown, workflow, TOML and JSON files resolves, the same as on the predecessor head.
  • Each relative-root lookup in a moved file gained exactly one .. per added folder level.

Checks

Merge predecessor: #2105.

@Kevinjohn Kevinjohn added polish-failed Polish review failed and removed polish-in-progress Polish review running labels Nov 16, 2026
Part of #1975. The .dockerignore rule **/build also matched the new
scripts/build/ folder, so the image's pnpm run build would not find
the build tooling it runs. Re-include that folder; other build output
stays excluded.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ntenance

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…-shared

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ing-docs

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
@Kevinjohn Kevinjohn added polish-done Polish review complete and removed polish-failed Polish review failed labels Nov 16, 2026
Stop committing the generated documentation site
Move the shared pnpm process helper into scripts/shared/
Move repository maintenance checks into scripts/maintenance/
Move release packaging and smoke tests into scripts/release/
Move CI selection, gates and reporting into scripts/ci/
Move browser-test infrastructure into scripts/e2e/
@Kevinjohn
Kevinjohn merged commit 3ae5632 into issue/1974-scripts-dev Nov 16, 2026
@Kevinjohn
Kevinjohn deleted the issue/1975-scripts-build branch November 16, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

polish-done Polish review complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant