repo-manager/tests
tegwick 10bdb683cb fix(registrar): make --confirm-primary assert authority, not liveness
_check_primary accepted any instance reporting status=ok and db=connected.
A local cache and the central hub both satisfied that for seven weeks while
every registration went to the cache — a liveness check wearing an authority
check's name.

It now requires the hub to declare instance_role=primary. An instance that
declares nothing is refused with a message naming what to set; proceeding
anyway requires an explicit --allow-unverified-primary rather than a silent
default.

Four tests cover the logic directly; the existing suite stubbed _check_primary
and never exercised it.

Refs CUST-WP-0067-T03

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 2583210@bnt-lap001
Assistant-Session: f2bff2d5-e9b2-4338-92ca-10282a927006
2026-08-25 10:32:51 +02:00
..
test_authority.py feat: finish register receiving and authority routing 2026-08-21 23:15:48 +02:00
test_cache.py feat(cache): add rebuild and provenance safeguards 2026-08-21 23:23:03 +02:00
test_classification.py feat: advance repository records and provenance 2026-08-21 22:07:48 +02:00
test_dual_run.py feat: finish register receiving and authority routing 2026-08-21 23:15:48 +02:00
test_e2e_vertical_slice.py feat: finish register receiving and authority routing 2026-08-21 23:15:48 +02:00
test_hub_record_authority.py feat: advance conformance and deterministic ID migration 2026-08-21 22:43:37 +02:00
test_identifiers.py fix(identifiers): reject unproven assignments 2026-08-22 23:54:24 +02:00
test_owner_interfaces.py feat(handoffs): publish owner task interfaces 2026-08-22 14:15:48 +02:00
test_provenance.py feat: advance repository records and provenance 2026-08-21 22:07:48 +02:00
test_rapp_scaffold.py feat: greenfield rapp wrap path and rail-sequence rules 2026-08-18 13:03:16 +02:00
test_record_command.py feat: advance repository records and provenance 2026-08-21 22:07:48 +02:00
test_record_identity.py fix(identity): enforce qualified ad-hoc identifiers 2026-08-23 14:45:26 +02:00
test_register_command.py feat(RMGR-WP-0008): add workplan and register receiving surfaces 2026-08-21 17:15:21 +02:00
test_registrar.py feat: interim identifier registrar (RMGR-WP-0005-T01) 2026-08-18 21:49:08 +02:00
test_registrar_reconcile.py fix(registrar): make --confirm-primary assert authority, not liveness 2026-08-25 10:32:51 +02:00
test_repo_onboard.py feat(onboard): add rmgr repo-onboard, the missing managed_repos write path 2026-08-24 23:33:22 +02:00
test_sbom.py feat(sbom): add authoritative Nexus client 2026-08-22 23:26:45 +02:00
test_scaffold.py feat: advance repository records and provenance 2026-08-21 22:07:48 +02:00
test_source_ref.py feat(sbom): project immutable Forgejo source refs 2026-08-22 23:34:01 +02:00
test_standards.py feat: model repo standards and detect prefix collisions 2026-08-18 13:28:40 +02:00
test_time.py feat: finish register receiving and authority routing 2026-08-21 23:15:48 +02:00
test_version.py docs(RMGR-WP-0001): complete T04 implementation foundation 2026-08-09 22:41:26 +02:00
test_workloads.py feat(workloads): define authoritative reference contract 2026-08-22 14:03:07 +02:00
test_workplan_command.py feat(RMGR-WP-0008): add workplan and register receiving surfaces 2026-08-21 17:15:21 +02:00