feat: transport authoritative workload projections
Some checks failed
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / pytest-smoke (push) Failing after 2s

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a0230c-b06c-7641-808a-e191b6d1da49
This commit is contained in:
tegwick 2026-08-23 10:54:40 +02:00
parent a090903cfc
commit ab936a1e98
27 changed files with 1671 additions and 15 deletions

View file

@ -4,7 +4,7 @@ type: workplan
title: "Authoritative workload projection transport"
domain: infotech
repo: hub-core
status: active
status: finished
owner: codex
topic_slug: custodian
created: "2026-08-23"
@ -14,6 +14,7 @@ related:
- HUB-WP-0006
- RMGR-WP-0010-T04
- RMGR-CONTRACT-WORKLOAD-REFERENCE-0001
state_hub_workstream_id: "1f767e78-ab36-5e62-a23a-31af0f21a723"
---
# Authoritative workload projection transport
@ -30,6 +31,7 @@ semantics, exposing Repo Manager persistence, or inferring identities.
id: HUB-WP-0007-T01
status: done
priority: medium
state_hub_task_id: "99787c58-f0b2-5e67-9816-ff4ea0ad6057"
```
Disposition: **approved** on 2026-08-23 by operator instruction to implement.
@ -46,8 +48,9 @@ reconstructing Repo Manager work.
```task
id: HUB-WP-0007-T02
status: progress
status: done
priority: medium
state_hub_task_id: "24279a94-a23c-5468-8623-ecddcafaef3a"
```
Package a strict versioned input/output contract for records keyed by exact
@ -56,12 +59,19 @@ source repository, declaration path, source Git revision, and canonical UTC
observation time. Preserve Repo Manager diagnostics and reject unsupported
versions or inferred identity.
Completed 2026-08-23. Packaged `helixforge.workload-projection` 1.0.0 defines
strict Repo Manager input pages, normalized output and exact-resolution
schemas, a read-only OpenAPI fragment, authority/compatibility policy, and the
nine-declaration fixture. Canonical UTC is required at the schema boundary;
identity and path consistency are also checked semantically.
## Implement durable rebuildable ingestion
```task
id: HUB-WP-0007-T03
status: todo
status: done
priority: medium
state_hub_task_id: "cb0eb118-a968-51d4-84fc-0a9bf959a501"
```
Extend the injected `port.repo` boundary with workload pages. Deterministically
@ -69,12 +79,21 @@ replace the active generation in PostgreSQL, retain source/rebuild provenance
and a canonical content hash, and keep the previous generation on invalid or
unavailable input.
Completed 2026-08-23. `WorkloadProjectionService` consumes a separate injected
`port.repo` workload client, validates complete paged transfers, rejects error
diagnostics, duplicate identity/deployables, unsupported versions, noncanonical
paths, and stale/reused snapshots, then atomically replaces the generation.
Migration `0004_workload_projection` persists projection state and normalized
records without foreign keys or Repo Manager imports. Invalid input preserves
the prior generation as stale and readiness reports current/stale/unavailable.
## Expose exact read-only HTTP and MCP resolution
```task
id: HUB-WP-0007-T04
status: todo
status: done
priority: medium
state_hub_task_id: "722dfd4a-62d3-59b0-9494-08ec8f184571"
```
Expose list and exact-reference queries through `port.projection.query` and
@ -82,12 +101,20 @@ matching MCP tools. Exact resolution returns `resolved` or `unknown` without
repository-name, owner, alias, or path inference. No workload mutation route is
permitted.
Completed 2026-08-23. GET-only list and exact-resolution routes expose
normalized records with content/source provenance. Filters and cursors use
only explicit `rapp_id`, name, and deployable values. Resolution returns
`unknown/not_found` or `unknown/deployable_not_declared`; it never consults
owner, repository, path, or alias fallbacks. MCP tools `query_workloads` and
`resolve_workload_reference` call the same HTTP surface.
## Prove conformance and hand off
```task
id: HUB-WP-0007-T05
status: todo
status: done
priority: medium
state_hub_task_id: "04569701-6cb4-5762-ac9b-a9dec4e2bb52"
```
Ingest a nine-declaration Repo Manager fixture; prove deletion plus full rebuild
@ -96,10 +123,18 @@ reopen, provenance, deterministic hashes/order, read-only OpenAPI, and absence
of Repo Manager private-model or foreign-database coupling. Run `make test` and
`make conformance`, then reply with owner identifiers and evidence.
Completed 2026-08-23. Tests ingest and query all nine fixture declarations,
prove exact/unknown resolution, deletion plus equivalent full rebuild,
generation-bound cursors, UTC rejection, outage/stale behavior, durable reopen,
schema-valid HTTP responses, GET-only OpenAPI, and absence of private-model or
foreign-database coupling. `make test` passes 100 tests, live
`make conformance` passes 8/8, the wheel builds, and PostgreSQL migrations
render through `0004_workload_projection` (501 lines).
## Acceptance
- [x] Owner interface disposition and source revisions recorded
- [ ] Normalized transport contract is versioned and packaged
- [ ] Durable projection rebuild preserves authority and provenance
- [ ] HTTP/MCP exact reference queries never infer identity
- [ ] Nine-declaration and rebuild conformance evidence passes
- [x] Normalized transport contract is versioned and packaged
- [x] Durable projection rebuild preserves authority and provenance
- [x] HTTP/MCP exact reference queries never infer identity
- [x] Nine-declaration and rebuild conformance evidence passes