engine-adapters: compose-aggregation-loop — the composition root goes whole; the loop starts #181

Closed
opened 2026-07-29 05:10:29 +00:00 by ben · 1 comment
Owner

Parent

Engine-adapters child spec: #161 (ADRs 0102–0107; scoped on wayfinder #160 — Ben ruled live: per-family clan-lab smokes gate each family, the arc closes on a real-hardware end-to-end, tickets arm the swarm). Everything else agent-decided, post-hoc review pending.

What to build

The arc's fan-in (ADR 0107): the member orchestrator's full real port set wired, the provisioning deploy engine live (errProvisionEngineUnwired retired), and the monitor aggregation loop STARTED — only now, with the real fleet read, real heartbeats and real coverage (DDR 0071 forbids classifying silence against a resting projection). After this slice no resting stub remains in main.go except the out-of-arc release source.

Acceptance criteria

  • Given the whole composition, When the control plane boots, Then the aggregation loop runs and Status()/AlertCount() project the real fleet
  • Given an unexpected silence on the lab fleet, When classified, Then it is judged against the node's own pattern and raises critical
  • Given main.go, When this slice lands, Then the only remaining resting stub is restingReleaseSource (out of arc)

Blocked by

  • engine-adapters:compose-heartbeat-stream
  • engine-adapters:compose-cross-orchestrator
  • engine-adapters:store-fleet-projection
  • engine-adapters:store-runtime-ledgers
  • engine-adapters:idp-adapter
  • engine-adapters:member-orbit-adapters
  • engine-adapters:notifier-smtp

Task manifest

task: engine-adapters:compose-aggregation-loop
implements_seam: "the confirmed seams + ADRs 0102-0107 are the design contract (no flow/wireframe — spec #161)"
interface: "the whole composition root — every port contract unchanged"
seam: "a boot-to-loop integration test over the full real wiring; every feature seam suite stays green"
acceptance:
  - given: the whole root; when: boot; then: loop live, projections real, no premature start (ADR 0107)
depends_on: [engine-adapters:compose-heartbeat-stream, engine-adapters:compose-cross-orchestrator, engine-adapters:store-fleet-projection, engine-adapters:store-runtime-ledgers, engine-adapters:idp-adapter, engine-adapters:member-orbit-adapters, engine-adapters:notifier-smtp]
out_of_scope: [screen changes (no UI surface in this arc), the release source / rollout mechanics (out of arc, wayfinder #160)]
needs_human_decision: []
## Parent Engine-adapters child spec: #161 (ADRs 0102–0107; scoped on wayfinder #160 — Ben ruled live: per-family clan-lab smokes gate each family, the arc closes on a real-hardware end-to-end, tickets arm the swarm). Everything else agent-decided, post-hoc review pending. ## What to build The arc's fan-in (ADR 0107): the member orchestrator's full real port set wired, the provisioning deploy engine live (errProvisionEngineUnwired retired), and the monitor aggregation loop STARTED — only now, with the real fleet read, real heartbeats and real coverage (DDR 0071 forbids classifying silence against a resting projection). After this slice no resting stub remains in main.go except the out-of-arc release source. ## Acceptance criteria - [ ] Given the whole composition, When the control plane boots, Then the aggregation loop runs and Status()/AlertCount() project the real fleet - [ ] Given an unexpected silence on the lab fleet, When classified, Then it is judged against the node's own pattern and raises critical - [ ] Given main.go, When this slice lands, Then the only remaining resting stub is restingReleaseSource (out of arc) ## Blocked by - engine-adapters:compose-heartbeat-stream - engine-adapters:compose-cross-orchestrator - engine-adapters:store-fleet-projection - engine-adapters:store-runtime-ledgers - engine-adapters:idp-adapter - engine-adapters:member-orbit-adapters - engine-adapters:notifier-smtp ## Task manifest ```yaml task: engine-adapters:compose-aggregation-loop implements_seam: "the confirmed seams + ADRs 0102-0107 are the design contract (no flow/wireframe — spec #161)" interface: "the whole composition root — every port contract unchanged" seam: "a boot-to-loop integration test over the full real wiring; every feature seam suite stays green" acceptance: - given: the whole root; when: boot; then: loop live, projections real, no premature start (ADR 0107) depends_on: [engine-adapters:compose-heartbeat-stream, engine-adapters:compose-cross-orchestrator, engine-adapters:store-fleet-projection, engine-adapters:store-runtime-ledgers, engine-adapters:idp-adapter, engine-adapters:member-orbit-adapters, engine-adapters:notifier-smtp] out_of_scope: [screen changes (no UI surface in this arc), the release source / rollout mechanics (out of arc, wayfinder #160)] needs_human_decision: [] ```
Author
Owner

Landed in 6875c9b on origin/main (engine-adapters:compose-aggregation-loop).

The arc's fan-in close (ADR 0107). compose() is now a dispatcher: with the whole external set present — the config repo (OURCLOUD_CONFIG_REPO), the state directory (OURCLOUD_STATE_DIR) and the kanidm IdP (OURCLOUD_KANIDM_URL) — it goes whole (composeWhole, whole_composition.go) and main() starts the monitor aggregation loop (go mon.Run); any external absent keeps the honest resting composition (composeResting, resting_composition.go) and the loop stays stopped — no premature start against a resting projection (DDR 0071). A family lands whole or not at all (ADR 0107): the resting branch is all-resting, never half a real family.

Whole composition wired: the ONE real fleetstate.Projection shared by monitor/backups/provision/rescue — a live read over a NEW config-repo inventory reader (configRepoInventory, the reader fleetstate reserved for #181), the persisted enroll ledger, and provisioning's coverage bit bridged through a deferredHealth holder; the real monitor.HeartbeatStream (#174); the full real member family (File member/invite/reset ledgers + a NEW File audit sink, the kanidm IdP, config-repo access matrix + a NEW config-repo brand reader, memberorbit gate/catalogue); and the provisioning deploy engine live on the real clan adapter (errProvisionEngineUnwired retired from main.go).

Acceptance:

  • AC1 — on boot the loop runs and Status()/AlertCount() project the real fleet (the placed+enrolled node reads back; a fresh heartbeat keeps it watched, nothing raised).
  • AC2 — an always-on lab node gone dark is judged against its own pattern and raises critical (silence/<node>), driven by the running loop, not a hand-driven tick.
  • AC3 — main.go carries only restingReleaseSource; every other resting placeholder moved to resting_composition.go. A structural guard test enforces it.

Seam: a boot-to-loop integration test over the full real wiring (aggregation_integration_test.go), fakes only at the true externals (clan CLI, kanidm directory). Every prior feature seam suite stays green; go build ./.../vet/gofmt clean, full Go suite green, race-clean.

Agent-decided, post-hoc review pending (parent spec #161): member AuditSink and Brand had no real adapter (docs mark them later slices), so this slice adds a minimal File audit sink (member.NewFileAuditSink, the ADR 0103 §1 runtime-ledger discipline) and a config-repo brand reader over the applied brand-kit doc; the inventory reader reads placed nodes only (richer placement — roles, service assignments, datasets — rides the catalogue slices). monitor's per-service Ports/Revisions stay honest nils (no real adapter yet); the rescue family's own engine adapters keep resting (a separate arc).

Next: enroll (#163) is the last engine-adapters child; the arc's real-hardware close-out (wayfinder #160) follows.

Landed in `6875c9b` on `origin/main` (engine-adapters:compose-aggregation-loop). **The arc's fan-in close (ADR 0107).** `compose()` is now a dispatcher: with the whole external set present — the config repo (`OURCLOUD_CONFIG_REPO`), the state directory (`OURCLOUD_STATE_DIR`) and the kanidm IdP (`OURCLOUD_KANIDM_URL`) — it goes whole (`composeWhole`, `whole_composition.go`) and `main()` starts the monitor aggregation loop (`go mon.Run`); any external absent keeps the honest resting composition (`composeResting`, `resting_composition.go`) and the loop stays stopped — no premature start against a resting projection (DDR 0071). A family lands whole or not at all (ADR 0107): the resting branch is all-resting, never half a real family. **Whole composition wired:** the ONE real `fleetstate.Projection` shared by monitor/backups/provision/rescue — a live read over a NEW config-repo inventory reader (`configRepoInventory`, the reader `fleetstate` reserved for #181), the persisted enroll ledger, and provisioning's coverage bit bridged through a `deferredHealth` holder; the real `monitor.HeartbeatStream` (#174); the full real member family (File member/invite/reset ledgers + a NEW File audit sink, the kanidm IdP, config-repo access matrix + a NEW config-repo brand reader, memberorbit gate/catalogue); and the provisioning deploy engine live on the real clan adapter (`errProvisionEngineUnwired` retired from `main.go`). **Acceptance:** - **AC1** — on boot the loop runs and `Status()`/`AlertCount()` project the real fleet (the placed+enrolled node reads back; a fresh heartbeat keeps it watched, nothing raised). - **AC2** — an always-on lab node gone dark is judged against its own pattern and raises **critical** (`silence/<node>`), driven by the running loop, not a hand-driven tick. - **AC3** — `main.go` carries only `restingReleaseSource`; every other resting placeholder moved to `resting_composition.go`. A structural guard test enforces it. **Seam:** a boot-to-loop integration test over the full real wiring (`aggregation_integration_test.go`), fakes only at the true externals (clan CLI, kanidm directory). Every prior feature seam suite stays green; `go build ./...`/`vet`/gofmt clean, full Go suite green, race-clean. **Agent-decided, post-hoc review pending** (parent spec #161): member `AuditSink` and `Brand` had no real adapter (docs mark them later slices), so this slice adds a minimal File audit sink (`member.NewFileAuditSink`, the ADR 0103 §1 runtime-ledger discipline) and a config-repo brand reader over the applied brand-kit doc; the inventory reader reads placed nodes only (richer placement — roles, service assignments, datasets — rides the catalogue slices). monitor's per-service `Ports`/`Revisions` stay honest nils (no real adapter yet); the rescue family's own engine adapters keep resting (a separate arc). **Next:** `enroll` (#163) is the last engine-adapters child; the arc's real-hardware close-out (wayfinder #160) follows.
ben closed this issue 2026-07-30 00:36:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#181
No description provided.