Repository navigation
build(regulations): run the editor's whole stack locally - #115
Draft
lorenzocorallo wants to merge 2 commits into
Draft
lorenzocorallo wants to merge 2 commits into
lorenzocorallo wants to merge 2 commits into
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
docker compose for Postgres and the sandboxed LaTeX worker; a launcher for the backend, the collab service and a development stand-in for PoliNetwork Auth (JWKS, token endpoint, access snapshot, directory) that mints access tokens for seeded accounts; and a seed that imports the RRI from a legal checkout and creates drafts with a merge conflict, through the real API.
lorenzocorallo
force-pushed
the
feat/regulations-router
branch
from
November 2, 2026 23:02
4ece422 to
e549a9c
Compare
lorenzocorallo
force-pushed
the
feat/regulations-dev
branch
from
November 2, 2026 23:02
dfde509 to
8cab11c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #114. A local stack for the regulations editor, for the admin thread and the orchestrator's end-to-end test.
See
docs/regulations-dev.md.docker/regulations-dev.compose.yaml: Postgres 18 and the latex-worker, builtFROMlegal's TeX Live image(
TEXLIVE_IMAGE, a locally built:localuntil legal publishes it). The worker runs with the cluster'ssandbox: uid 1000, read-only root, tmpfs,
cap_drop: ALL,no-new-privileges, 1.5 GiB / 2 CPUs.bun run regulations:dev: the dev IdP (4300), backend (3000,--watch) and collab (4100/4101) with one sharedenv.
scripts/regulations/dev-idp.ts: a development-only stand-in for PoliNetwork Auth. It serves what auth-kitreads (JWKS, token endpoint, access snapshot) and the account directory for
dev-accounts.json, and mintsat+jwtaccess tokens withnameandemail(CLI andGET /dev/token?sub=). It refusesNODE_ENV=production. Pointing a backend at the real IdP needs a dev client registration and the backendclient's key, which only Lorenzo can provide.
bun run regulations:seed: through the real API, importslegal.jsonand the RRI and creates three drafts withassignments. A and B change the same comma (a merge conflict). It then waits for the first PDF.
Verified (this machine, against legal's RRI migration branch)
rriimported. The merge B → A reports exactly one conflict, on "Articolo 2.2.1 (Descrizione generale),comma 2". The first compile of A is
ok.me.accessandregulations.me.getfor an account with only assignments (3 drafts, no permissions).regulations.collabTicketfor editor, direttivo and commenter, threeHocuspocusProviders onws://localhost:4100: the editor's edit reaches the direttivo, and the commenter's edit is rejected.queued → running → ok.compile.pdfreturns a PDF containing both the live edit and theseeded change.
drafts.getcapabilities for the editor:edit: true,assign: false, no transitions.