From 5d0cadda3bc2abf72adee7d23f843688c3cf43ec Mon Sep 17 00:00:00 2001 From: Ben Stull Date: Mon, 8 Jun 2026 21:19:36 -0700 Subject: [PATCH] =?UTF-8?q?Sync=20scoped-admin-ia=20entry=20to=20v0.1.2=20?= =?UTF-8?q?(=C2=A74.5=20collection=20discovery)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- specs/rfcs/2026-06-08-scoped-admin-ia.md | 30 ++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/specs/rfcs/2026-06-08-scoped-admin-ia.md b/specs/rfcs/2026-06-08-scoped-admin-ia.md index fd5386f..9eb8b31 100644 --- a/specs/rfcs/2026-06-08-scoped-admin-ia.md +++ b/specs/rfcs/2026-06-08-scoped-admin-ia.md @@ -22,7 +22,7 @@ tags: | **Author(s)** | Ben Stull | | **Reviewers / approvers** | Ben Stull | | **Status** | `draft` | -| **Version** | v0.1.1 | +| **Version** | v0.1.2 | | **Source artifacts** | Product user stories (session OHM-0090.0) · Binds onto [`2026-06-05-three-tier-projects-collections.md`](./2026-06-05-three-tier-projects-collections.md) (§22) now merged into `SPEC.md` §22 · Resolves decision **D8** of [`2026-06-06-configurable-collection-metadata.md`](./2026-06-06-configurable-collection-metadata.md) | **Change log** @@ -31,6 +31,7 @@ tags: | --- | --- | --- | --- | | 2026-06-08 | v0.1.0 | Initial draft from brainstorming session OHM-0090.0 | Ben Stull | | 2026-06-08 | v0.1.1 | G-3 resolved (warn+allow); admin surfaces kept type-agnostic (G-11); §9 LLM authoring-context **config** surfaces added (consumption split to a separate spec, G-12) | Ben Stull | +| 2026-06-08 | v0.1.2 | §4.5 prompt collection discovery (content-repo webhook → `refresh_registry`, parity with create-collection API; D-DISCOVER), surfaced by the dogfood; added to S1 | Ben Stull | --- @@ -391,6 +392,30 @@ a slug exists in two collections (the same defect class as the known slug-keyed `/projects/:pid/collections/:cid/` resolves it. Audit other slug-only entry routes for the same issue while in this area (gap G-5). +### 4.5 Prompt collection discovery on content-repo push (decision D-DISCOVER) + +A collection is *discovered* — registered in the `collections` table — only by +`refresh_registry` (→ `_mirror_named_collections`, which scans each content repo +for `.collection.yaml` subdirs, `registry.py:305`). The **create-collection API +already calls `refresh_registry`** (`api_collections.py:176`), so collections +created in-app appear immediately. But the **content-repo Gitea webhook does +not**: on a content-repo push it calls only `refresh_meta_repo` / +`refresh_meta_branches` / `refresh_meta_pulls` (`webhooks.py:97–100`), never +`refresh_registry`. So a `.collection.yaml` change made **directly in git** — a +new collection, or (in this design) a manifest edit that flips `visibility`, +`retired`, or `path` — is invisible until the next 300 s reconciler sweep +(`cache.Reconciler`, `cache.py:765/789`). + +This was observed first-hand seeding this very spec's review collection (a +git-native collection took a full sweep to appear, and the visibility flip took +another). The fix: **the content-repo webhook also triggers `refresh_registry`** +when the push touches a `.collection.yaml` (or unconditionally — the refresh is +idempotent and cheap), bringing the git-native path to parity with the +create-collection API. This makes every manifest-backed admin write in this spec +(visibility, retire, path, fields) take effect promptly rather than on the sweep. +The 300 s reconciler stays as the backstop; this is the fast path, not a +replacement. + --- ## 5. Decisions @@ -404,6 +429,7 @@ routes for the same issue while in this area (gap G-5). | D-IA | Admin IA shape | Per-scope routes + scope-switcher + gear (Approach C) | 2026-06-08 | | D-GRAD | Graduation/retired home | Canonical at collection scope; read-only rollup at project | 2026-06-08 | | D-AUDIT | Audit/permission-events scope | Left deployment-wide for now (future scoping) | 2026-06-08 | +| D-DISCOVER | Prompt collection discovery | Content-repo webhook also triggers `refresh_registry` on a `.collection.yaml` change (parity with the create-collection API); 300 s reconciler stays as backstop | 2026-06-08 | --- @@ -431,7 +457,7 @@ SPEC before code. | Slice | Scope | Delivers | | --- | --- | --- | | **S0** | SPEC amendments (§4.1): §22.5 gated→request-access; admin-IA section; `retired` collection state; collection `path` | Binding contract updated | -| **S1** | Scoped admin **routing shell + reachability** (routes, gear, scope switcher), re-home graduation/retired to collection-scoped endpoints + project rollup; slim Site admin | DEF-1/2/3/4 navigational fix; US-15 | +| **S1** | Scoped admin **routing shell + reachability** (routes, gear, scope switcher), re-home graduation/retired to collection-scoped endpoints + project rollup; slim Site admin; **content-repo webhook → `refresh_registry`** (§4.5) | DEF-1/2/3/4 navigational fix; US-15 | | **S2** | **Settings write paths** (git-writing `PUT` for project & collection: name, visibility, initial_state) + Settings panels | US-8, US-12 | | **S3** | **Private + request-access** (gated behavior change, request-access page) + private cascade default | US-13, US-14 | | **S4** | **Collection storage path** config + auto-provision | US-9, US-10 |