The three artifacts that make this module installable and checkable, closing
phase 3's extraction. Nothing about what the module serves changes: the same 72
URLs, the same behaviour.
**The OpenAPI fragment (MODULE_API.md §2.8, §6.1a) was never built, on either
side.** The 417 `#swagger` annotations came across in slice 1 and went nowhere,
and core's /api/docs.json merged nothing — so every route this module serves was
in no spec at all, which is core's standing rule ("never ship a route that isn't
in the spec") being broken by the extraction rather than by a route.
`server/scripts/swaggerFragment.js` generates it. The prefixes are DERIVED: the
script runs the module's own `register()` against a recording api and asks
`require.cache` which file each router came from, so a mount prefix exists in one
place — `server/index.js` — and not in a table beside it. The 31 schemas moved
here from core's swagger.js, namespaced `Uo…` because core wins every key
collision in the merge; `Error` and `ValidationError` stay referenced by core's
names, since they resolve in the merged document.
**The frozen route manifest (§5.3)** is derived too, and by subtraction: CI
clones core at the ref pinned in ci/core-ref.json, generates its manifest without
this module and then with it, and the difference is what this module serves. That
buys the half of §5.3 that matters most for free — a module that shadowed or
displaced one of core's routes shows up as a REMOVAL, not merely as an addition
elsewhere. The same job checks the fragment against ground truth: every route
must have an operation and every operation must be a route.
**The release workflow** publishes `module-uo-<version>.tar.gz` plus a manifest
carrying its sha256. The version is declared in module.json rather than computed
from commit subjects, and the workflow never writes to a branch — it tags and
publishes — so `main` needs no push exception. The bundle is assembled from an
include list, because an exclude list ships whatever it forgot.
Four annotation defects, inherited from core and never visible until something
generated a spec from these files: two `requestBody` literals a brace short (the
route documented with an empty body), and two descriptions whose inner quoting
swagger-autogen cannot survive — it re-quotes `"` and a backtick to `'` before
evaluating, so either inside a single-quoted description ends the string early
and the annotation is dropped. It reports each one and then prints Success in
green, so the generator now captures its diagnostics and makes them fatal.
Also fixed while writing it: passing one shared `doc` to swagger-autogen six
times. It renders components.schemas from an EXAMPLE object and writes the result
back into what it was handed, so each pass re-wrapped the last and the fragment
came out at 484 MB.
- 409 server tests (+21), 40 client tests unchanged
- swagger-fragment.json: 69 paths covering all 72 routes
- routes.manifest.json: 72 routes; core's own surface unchanged, 0 removals
- verified end to end by assembling the bundle exactly as CI will, unpacking it
into a real core and regenerating the manifest
Refs: docs/website/MODULE_SYSTEM.md §2.7.1, MODULE_API.md §2.8, §5.3, §6.1a
Co-Authored-By: Claude <noreply@anthropic.com>
44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
# dependencies
|
|
node_modules/
|
|
server/node_modules/
|
|
client/node_modules/
|
|
|
|
# Built client half. This is a RELEASE artifact, not a source artifact: CI builds
|
|
# it with Vite in library mode and publishes it inside module-uo-<version>.tar.gz,
|
|
# because an operator must never have to build anything. Committing it would let a
|
|
# stale chunk ship alongside fresh server code.
|
|
client/dist/
|
|
|
|
# test coverage
|
|
coverage/
|
|
server/coverage/
|
|
client/coverage/
|
|
|
|
# env / secrets
|
|
.env
|
|
*.env
|
|
!.env.example
|
|
|
|
# Release staging. `.gitea/workflows/release.yml` assembles the bundle under
|
|
# /dist and packs it from there. Note this is the ROOT dist only — the module's
|
|
# two committed generated artifacts, swagger-fragment.json and
|
|
# routes.manifest.json, are deliberately NOT ignored: core merges the first
|
|
# verbatim and the second is the frozen URL surface, so both have to be
|
|
# reviewable in a diff (MODULE_API.md §2.8, §5.3).
|
|
/dist/
|
|
*.tar.gz
|
|
|
|
# logs / os
|
|
*.log
|
|
npm-debug.log*
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# editor / tooling local settings
|
|
.claude/settings.local.json
|
|
.vscode/
|
|
.idea/
|
|
|
|
# local planning docs (not part of the tracked codebase)
|
|
.plans/
|