STATE-WP-0062 T5: docs, first-party↔repo test, mark workplan finished

- Add /docs/services reference (two-dimension model, persistence, API) and a
  pointer note from /docs/tpsc; add it to the Reference nav.
- Add a test asserting first_party.repo_slug resolves to a managed_repos FK
  (8 services tests green).
- Mark STATE-WP-0062 tasks done / status finished.

Known classes seeded in the live catalog via the API (Gitea, Postgres as
self-hosted/third-party; State Hub as self-hosted/first-party at Level 2).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 21:16:37 +02:00
parent f14c225dd9
commit ce82ada0fa
5 changed files with 100 additions and 19 deletions

View File

@@ -91,3 +91,18 @@ async def test_first_party_unknown_repo_slug_404(client):
async def test_get_unknown_service_404(client):
r = await client.get("/services/nope")
assert r.status_code == 404
async def test_first_party_repo_slug_links_to_repo(client):
await client.post("/domains/", json={"slug": "custodian", "name": "Custodian"})
repo = (await client.post("/repos/", json={
"domain_slug": "custodian", "slug": "state-hub", "name": "State Hub",
})).json()
r = await client.post("/services/catalog", json=_svc(
"state-hub-api", "self_hosted", "first_party",
maturity_level=2,
first_party={"repo_slug": "state-hub", "owning_domain": "custodian"},
))
assert r.status_code == 201, r.text
assert r.json()["first_party"]["repo_id"] == repo["id"]