chore: remove the instance-wide content, fix curator access to the tenant routes #68

Merged
crapougnax merged 1 commit from chore/38-remove-instance-content into develop 2026-11-20 11:35:20 +00:00
Owner

Refs #38 (step 4d). Telemetry deferred to #67.

⚠️ Fix: curators were refused on every route added since #61

src/rbac/roles.ts did not list the new tenant routes. Administrators passed through their /** rule; curators were refused on the document and À revoir pages and on /api/tenant/documents…, /themes, /ingestion, /extraction. Entries added, with tests per route and method (PUT maps to UPDATE). AGENTS.md now says every new tenant route needs its entry.

Removed: the instance-wide content

  • Routes: /api/curate, /upload, /extract, /taxonomies, /telemetry, /queue/status, /git/status, /git/commit (and their RBAC entries).
  • Code they ran on: lib/git-sync, lib/queue, lib/backend, lib/models/ContentItem, lib/models/ThematicItem, lib/concept-autolink, lib/document-metadata, components/DocumentMetadataForm, components/ExtractionDialog, and the unused composition.ts.
  • Configuration: soa/DEFAULT_SOA, GIT_*, STORAGE_TYPE, S3_*, DOCUMENT_STORAGE_PATH, axes, facets (and from the templates).

Kept, changed

  • The instance model is optional: without AI_PROVIDER the instance lends none and starts without any AI key; once named, <PROVIDER>_MODEL, _API_KEY (and _BASE_URL except Gemini) are required.
  • Réglages (System): read-only view of the instance model (key: set or missing, never shown) and of authentication. The former page edited process.env and wrote src/config/admin_settings.json at runtime; that is gone.
  • Container: /app/data/tenants instead of /app/data/okf and the queue directory.
  • Docs: README, AGENTS.md, docs/MULTI-TENANCY.md (EN, FR).

Checks: yarn test 260/260. yarn build passes. tsc --noEmit: 5 errors, down from 11 (left: astro:middleware types and the example in docs/tickets).

Not in this PR: dependencies now unused (@quatrain/ingestion*, @quatrain/searchengine*, @quatrain/backend, @quatrain/storage-local…), to check and drop separately.

🤖 Generated with Claude Code

Refs #38 (step 4d). Telemetry deferred to #67. ## ⚠️ Fix: curators were refused on every route added since #61 `src/rbac/roles.ts` did not list the new tenant routes. Administrators passed through their `/**` rule; **curators were refused** on the document and *À revoir* pages and on `/api/tenant/documents…`, `/themes`, `/ingestion`, `/extraction`. Entries added, with tests per route and method (`PUT` maps to `UPDATE`). AGENTS.md now says every new tenant route needs its entry. ## Removed: the instance-wide content - Routes: `/api/curate`, `/upload`, `/extract`, `/taxonomies`, `/telemetry`, `/queue/status`, `/git/status`, `/git/commit` (and their RBAC entries). - Code they ran on: `lib/git-sync`, `lib/queue`, `lib/backend`, `lib/models/ContentItem`, `lib/models/ThematicItem`, `lib/concept-autolink`, `lib/document-metadata`, `components/DocumentMetadataForm`, `components/ExtractionDialog`, and the unused `composition.ts`. - Configuration: `soa`/`DEFAULT_SOA`, `GIT_*`, `STORAGE_TYPE`, `S3_*`, `DOCUMENT_STORAGE_PATH`, `axes`, `facets` (and from the templates). ## Kept, changed - The instance model is **optional**: without `AI_PROVIDER` the instance lends none and starts without any AI key; once named, `<PROVIDER>_MODEL`, `_API_KEY` (and `_BASE_URL` except Gemini) are required. - *Réglages* (System): read-only view of the instance model (key: set or missing, never shown) and of authentication. **The former page edited `process.env` and wrote `src/config/admin_settings.json` at runtime; that is gone.** - Container: `/app/data/tenants` instead of `/app/data/okf` and the queue directory. - Docs: README, AGENTS.md, `docs/MULTI-TENANCY.md` (EN, FR). Checks: `yarn test` 260/260. `yarn build` passes. `tsc --noEmit`: **5 errors, down from 11** (left: `astro:middleware` types and the example in `docs/tickets`). Not in this PR: dependencies now unused (`@quatrain/ingestion*`, `@quatrain/searchengine*`, `@quatrain/backend`, `@quatrain/storage-local`…), to check and drop separately. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chore: remove the instance-wide content, fix curator access to the tenant routes (#38)
All checks were successful
Build and Publish OCI Image / Build & Push ARM64 OCI Image (pull_request) Successful in 54s
874fc8be19
The instance holds no content any more. Removed: the instance-wide
routes (curate, upload, extract, taxonomies, telemetry, queue/status,
git/status, git/commit), the instance repository, queue and backend
they ran on, the former content models, concept auto-linking, the
former metadata form and extraction dialog, and the unused composition.

The configuration of the instance keeps authentication and an optional
language model lent to tenants; repository, storage, source of
authority, axes and facets are gone from it. The Settings page shows
both, read from the environment, without editing.

Fix: the RBAC policy did not list the tenant routes added since the
curation API, so curators were refused on the document and review
pages and on the document, theme, ingestion and extraction routes;
administrators passed through their catch-all rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
crapougnax merged commit d6870f5d60 into develop 2026-11-20 11:35:20 +00:00
crapougnax deleted branch chore/38-remove-instance-content 2026-11-20 11:35:20 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
modaka/studio!68
No description provided.