--- id: CORE-WP-0009 type: workplan title: "Hub-core adoption and ecosystem integration" domain: infotech repo: core-hub status: finished owner: codex topic_slug: infotech created: "2026-07-09" updated: "2026-07-11" state_hub_workstream_id: "7e93e16d-8057-5ae9-a0bd-d54fda9e089b" --- # Hub-core adoption and ecosystem integration Parent: `~/the-custodian/workplans/CUST-WP-0057-hub-ecosystem-consolidation.md` ## Goal Adopt `hub-core` as an editable dependency and eliminate duplicate shared utilities while keeping framework models in `core_hub`. ## Add hub-core dependency ```task id: CORE-WP-0009-T01 status: done priority: high state_hub_task_id: "590f4fc6-e4ef-5b9d-a004-99bbe67936b8" ``` Add `hub-core` to `pyproject.toml` with `[tool.uv.sources]` path dependency. Done 2026-07-09: dependency and uv source added. ## Replace local slugify ```task id: CORE-WP-0009-T02 status: done priority: high state_hub_task_id: "521fb6d4-777e-5aaa-bcd5-92e4739e8ab6" ``` Import `slugify_or_default` from `hub_core.utils.slugs` in `api/v2.py`; remove local `slugify()` and `re` import used only for slugs. Done 2026-07-09: `api/v2.py` uses hub-core util. ## Contract test for hub-core pin ```task id: CORE-WP-0009-T03 status: done priority: high state_hub_task_id: "3f285b65-141c-50db-9675-e50548a58dfa" ``` Add `tests/test_hub_core_imports.py` proving hub-core utils import and version pin. Done 2026-07-09: test added. ## Document metadata isolation ```task id: CORE-WP-0009-T04 status: done priority: medium state_hub_task_id: "c218d96b-7f70-59ba-8636-2ce306b8480c" ``` Link `docs/specs/core-hub-architecture.md` boundary section to `hub-core/docs/metadata-isolation.md`. Done 2026-07-09: architecture spec updated. ## Evaluate pagination utility adoption ```task id: CORE-WP-0009-T05 status: done priority: low state_hub_task_id: "bb373c54-19d9-504a-ab3c-0bca551bf013" ``` Assess `hub_core.utils.pagination` for `/api/v2` list endpoints that grow beyond in-memory `page()` helper. Defer if no paginated DB queries yet. Done 2026-07-09: `docs/specs/pagination-adoption.md` records deferral until list endpoints need server-side limit/offset or compatibility spec adds query params. Sync pagination in hub-core targets async SQLAlchemy when triggered. ## CI pin gate ```task id: CORE-WP-0009-T06 status: done priority: medium state_hub_task_id: "b4a90aee-7ace-58a5-ad9b-5bb4c54997b4" ``` Ensure Forgejo CI installs hub-core from build context or path dep before `pytest`. Document in `Makefile` alongside `the-custodian/scripts/hub-ecosystem-regression.sh`. Done 2026-07-09: `.forgejo/workflows/ci-smoke.yaml` pytest job vendors hub-core sibling checkout; `image.yaml` and `Dockerfile` vendor hub-core for container builds; `Makefile` adds `hub-core-pin`, `ecosystem-regression`, and `container-build` hub-core context.