Sync scoped-admin-ia entry to v0.1.2 (§4.5 collection discovery)
regenerate-readme-index / noop (push) Has been cancelled
regenerate-readme-index / noop (push) Has been cancelled
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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 |
|
||||
|
||||
Reference in New Issue
Block a user