Skip to content

Commit 6de8c7e

Browse files
authored
Merge pull request #2044 from Open-Source-Legal/docs/authority-console
Add Authority Console architecture doc (#2037 follow-up)
2 parents b46e85c + 2a05adc commit 6de8c7e

8 files changed

Lines changed: 323 additions & 23 deletions
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
- **Authority Console architecture doc.** Added
2+
`docs/architecture/authority-console.md` — an as-built reference for the unified
3+
Authority Console (PR #2037, issue #1997 management layer): the `/admin/authority`
4+
tabs and routes, the `AuthorityNamespace`-as-spine model (string-join `detail()`,
5+
the `source` baseline/manual ownership marker + loader skip, `created_by`),
6+
`AuthorityNamespaceService` / `AuthoritySourceProviderService` / the
7+
`AuthorityFrontierService` action verbs over the single `mark()` primitive, the
8+
one `is_authority_admin` gate, the GraphQL surface, migrations 0099/0100, and a
9+
Design notes section preserving the chosen architecture and five settled design
10+
decisions. Wired into the mkdocs `Architecture` nav after Reference-Web Enrichment.
11+
- **Refreshed sibling docs.** Updated `docs/architecture/reference-web-enrichment.md`
12+
and `docs/guides/ingesting-authorities.md` to name the merged-in tabs (the
13+
standalone "enrichment runner" → **Runs tab**; the "authority-sources monitor" →
14+
**Queue tab**) and point at the committed
15+
`authorities--console-queue--with-data.png` screenshot, replacing references to the
16+
deleted standalone panels.

docs/architecture/authority-console.md

Lines changed: 279 additions & 0 deletions
Large diffs are not rendered by default.

docs/architecture/reference-web-enrichment.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ authority's own outbound citations at `depth+1`.
164164

165165
Each frontier row carries a `discovery_state`:
166166

167-
`queued` · `in_progress` · `discovered` · `ingested` · `resolved` · `failed` ·
167+
`queued` · `in_progress` · `ingested` · `failed` ·
168168
`unsupported` · `blocked_license` · `unlocated` · `pending_approval` · `deferred_cap`
169169

170170
Two pieces worth calling out:
@@ -184,35 +184,39 @@ Two pieces worth calling out:
184184
## Operating it
185185

186186
> **Step-by-step how-to:** for runnable procedures — ingesting a supported
187-
> source (shell, crawl, or the runner UI) and adding a new provider to flip an
187+
> source (shell, crawl, or the Runs tab) and adding a new provider to flip an
188188
> authority from `unsupported` to supported — see
189189
> [Ingesting Authorities & Adding Providers](../guides/ingesting-authorities.md).
190+
> The admin surfaces named below are tabs of the
191+
> [Authority Console](authority-console.md) at `/admin/authority`.
190192
191-
### Trigger — the enrichment runner
193+
### Trigger — the Runs tab
192194

193-
`/admin/authority/runs` (and a per-corpus card) drives runs via the
195+
`/admin/authority/runs` (the Runs tab of the Authority Console, and a per-corpus
196+
card) drives runs via the
194197
`runCorpusEnrichment` mutation. Pick reference enrichment and/or authority crawl,
195198
optionally enable the LLM detection tier and the advanced crawl bounds (max depth,
196199
min demand, max authorities, per-jurisdiction cap, token budget), and Run. The
197200
mutation is gated on corpus **UPDATE** (see Permissions below).
198201

199202
![Enrichment runner with a live job list](../assets/images/screenshots/auto/enrichment--runner-and-jobs--with-data.png)
200203

201-
### Monitor — live job status & the authority-sources monitor
204+
### Monitor — live job status & the Queue tab
202205

203-
The runner's job list shows each `Analysis` live (`RUNNING` / `COMPLETED` /
206+
The Runs tab's job list shows each `Analysis` live (`RUNNING` / `COMPLETED` /
204207
`FAILED`, elapsed, result summary) via an `Analysis → Notification` signal over the
205208
notification WebSocket.
206209

207-
For the instance-wide picture, the read-only **authority-sources monitor** at
208-
`/admin/authority/queue` (superuser-only) is the ingestion backlog over the whole
210+
For the instance-wide picture, the **Queue tab** of the Authority Console
211+
at `/admin/authority/queue` (superuser-only) is the ingestion backlog over the whole
209212
`AuthorityFrontier`: per-state count chips, jurisdiction / type / provider filters,
210213
search, and a backlog-first table. It is powered by the `authorityFrontier` relay
211214
connection + `authorityFrontierStats` (both superuser-gated) and
212-
`AuthorityFrontierService.admin_state_counts`. It is observational — triggering
213-
stays in the runner.
215+
`AuthorityFrontierService.admin_state_counts`. Beyond observing, it exposes per-row
216+
**requeue / reset / reroute / approve / delete** verbs; triggering enrichment runs
217+
stays on the Runs tab.
214218

215-
![Global authority-sources monitor](../assets/images/screenshots/auto/authorities--sources-monitor--with-data.png)
219+
![Authority Console — Queue tab](../assets/images/screenshots/auto/authorities--console-queue--with-data.png)
216220

217221
### Explore — the governance graph
218222

@@ -241,7 +245,7 @@ exception: they may trigger enrichment/crawl on any corpus they can **READ**
241245
without holding `UPDATE` — a retained admin privilege documented in
242246
`docs/permissioning/consolidated_permissioning_guide.md`. The exemption widens the
243247
*write-trigger* only; a superuser still cannot see a corpus they lack READ on (no
244-
blanket bypass). The `/admin/authority/queue` monitor and the `authorityFrontier`
248+
blanket bypass). The `/admin/authority/queue` Queue tab and the `authorityFrontier`
245249
queries are superuser-gated at the node level.
246250

247251
---
@@ -263,8 +267,8 @@ queries are superuser-gated at the node level.
263267
the new section version — see `docs/architecture/reference-web-versioning.md`.
264268
- **Live per-document progress counter (deferred).** Progress during a run is
265269
conveyed today by the RUNNING job status, the incrementally-appearing refs, and
266-
the "In progress" badge. A live per-document counter on the enrichment runner
267-
(e.g. "12 / 75 documents · 31 references") would need a transient
270+
the "In progress" badge. A live per-document counter on the Authority Console
271+
Runs tab (e.g. "12 / 75 documents · 31 references") would need a transient
268272
`ENRICHMENT_PROGRESS` WebSocket message emitted from both `apply` paths and a
269273
new handler in `useNotificationWebSocket``useEnrichmentJobs`
270274
`EnrichmentJobList`. Deferred as its own change (the WS path is not
Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/guides/ingesting-authorities.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,10 @@ print(summary)
135135
task — a worker must be running, and it won't be reflected the instant the crawl
136136
reports `ingested`.
137137

138-
### Option C — the enrichment runner (no shell)
138+
### Option C — the Runs tab (no shell)
139139

140-
`/admin/authority/runs` (and the per-corpus enrichment card) drives the same path via
140+
`/admin/authority/runs` (the Authority Console Runs tab, and the per-corpus
141+
enrichment card) drives the same path via
141142
the `runCorpusEnrichment` mutation. It requires corpus **UPDATE** (superusers
142143
are exempt from UPDATE but still need READ).
143144

@@ -173,18 +174,16 @@ finalized references to seed from.
173174

174175
### Spotting what needs a provider
175176

176-
The read-only authority-sources monitor at `/admin/authority/queue`
177+
The read-only Queue tab of the Authority Console at `/admin/authority/queue`
177178
(superuser-only) is the instance-wide ingestion backlog over the whole
178179
`AuthorityFrontier`.
179180

180-
![Global authority-sources monitor](../assets/images/screenshots/auto/authorities--sources-monitor--with-data.png)
181+
![Authority Console — Queue tab](../assets/images/screenshots/auto/authorities--console-queue--with-data.png)
181182

182183
Click the **Unsupported** state chip to filter to the cited authorities no
183184
provider can handle. These — bodies of law with demand but no `.gov` source the
184185
system knows how to fetch — are exactly the candidates for a new provider (or a
185-
no-code alternative below):
186-
187-
![Authority-sources monitor filtered to the unsupported state](../assets/images/screenshots/auto/authorities--sources-monitor--unsupported.png)
186+
no-code alternative below).
188187

189188
### The provider contract
190189

@@ -329,5 +328,6 @@ the `Unsupported` chip count on `/admin/authority/queue` should drop.
329328
- The gate enforces **`public-domain` license + an allowlisted `.gov` source
330329
host + key verification** before any text is ingested; agentic results require
331330
human approval.
332-
- `/admin/authority/queue` is **read-only and superuser-gated** — it observes the
333-
frontier; triggering stays in the enrichment runner.
331+
- `/admin/authority/queue` (the Authority Console Queue tab) is **superuser-gated**
332+
— it observes the frontier and offers per-row requeue/reset/reroute/approve/delete
333+
verbs; triggering enrichment runs stays on the Runs tab (`/admin/authority/runs`).

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ nav:
9797
- Bulk Import: architecture/bulk-import.md
9898
- Document Analyzers: architecture/analyzers.md
9999
- Reference-Web Enrichment & Authority Discovery: architecture/reference-web-enrichment.md
100+
- Authority Console: architecture/authority-console.md
100101
- Discovery System (llms.txt, MCP, robots.txt): architecture/discovery_system.md
101102
- Corpus Actions: architecture/opencontract-corpus-actions.md
102103
- Agent Corpus Actions: architecture/agent_corpus_actions_design.md

0 commit comments

Comments
 (0)