fix(classification): harden registration updates
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Build and Publish Multi-Context Image / build-and-push (push) Successful in 26s

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a02b22-9638-76d2-bbff-b7ea1770b118
This commit is contained in:
tegwick 2026-08-23 11:30:36 +02:00
parent fb79d0d68d
commit 57c3e08103
7 changed files with 152 additions and 14 deletions

View file

@ -108,6 +108,29 @@ class TestRepos:
assert r.status_code == 201
assert r.json()["host_paths"] == {"workstation": "/srv/hosted-repo"}
async def test_patch_reclassifies_primary_domain(self, client):
await _create_domain(client, slug="infotech", name="Infotech")
await _create_domain(client, slug="financials", name="Financials")
await _create_repo(client, domain_slug="infotech", slug="reclassified-repo")
r = await client.patch(
"/repos/reclassified-repo",
json={
"domain_slug": "financials",
"category": "product",
"secondary_domains": [],
"capability_tags": ["accounting"],
"business_stake": [],
"business_mechanics": [],
"classified_at": "2026-08-23",
"classified_by": "human",
"standard_version": "1.0",
},
)
assert r.status_code == 200, r.text
assert r.json()["domain_slug"] == "financials"
# ---------------------------------------------------------------------------
# Topic tests