--- id: STATE-WP-ADHOC-2026-09-04 type: workplan title: "Ad hoc fixes — 2026-09-04" domain: infotech repo: state-hub status: finished owner: codex topic_slug: state-hub created: "2026-09-04" updated: "2026-09-04" --- ## Add explicit topic selection to statehub register ```task id: STATE-WP-ADHOC-2026-09-04-T01 status: done priority: high ``` Add a `--topic` option that selects an existing active topic by slug within the chosen domain. Refuse missing, cross-domain, or ambiguous topic selection rather than silently assigning the first active topic in the domain. Preserve the single-topic fallback and exact inferred-topic selection for compatibility. Completed 2026-09-04. `statehub register --domain --topic ` now selects the exact active topic and propagates its UUID to generated files, the repository registration/update, and the progress receipt. An explicit missing or cross-domain slug fails with a targeted error. Without `--topic`, an exact inference match wins, a sole domain topic remains backward-compatible, and an ambiguous domain now requires an explicit choice. Focused registration tests pass (`26 passed`); the full suite passes (`835 passed`, one pre-existing SQLAlchemy warning). Source distribution and wheel builds succeed.