Manual dashboard regenerate via msg.topic #41

Open
opened 2026-05-26 15:13:01 +00:00 by vps1_gitea_admin · 1 comment

Type: slice

Depends on: #36

Estimate: S (½ day)

Slice — layers touched

dashboardAPI commands registry → adapter (input handler) → log → integration test.

Context

Implements PRD F-12.

Scope

  • Add regenerate-dashboard to dashboardAPI's src/commands/index.js.
  • Handler bypasses the diff check and calls the same composition path.
  • Log line distinguishes trigger: "manual" vs trigger: "deploy".

Out of scope

  • Operator UI affordance for triggering it — out of scope per PRD §4.

Acceptance criteria

  • Inject {{topic: "regenerate-dashboard"}} → dashboardAPI logs a manual-trigger line and POSTs to Grafana.
  • CONTRACT.md updated with the new topic.
**Type:** slice **Depends on:** #36 **Estimate:** S (½ day) ## Slice — layers touched dashboardAPI commands registry → adapter (input handler) → log → integration test. ## Context Implements PRD F-12. ## Scope - Add `regenerate-dashboard` to dashboardAPI's `src/commands/index.js`. - Handler bypasses the diff check and calls the same composition path. - Log line distinguishes `trigger: "manual"` vs `trigger: "deploy"`. ## Out of scope - Operator UI affordance for triggering it — out of scope per PRD §4. ## Acceptance criteria - [ ] Inject `{{topic: "regenerate-dashboard"}}` → dashboardAPI logs a manual-trigger line and POSTs to Grafana. - [ ] CONTRACT.md updated with the new topic.
Author
Owner

Slice #41 shipped on branch slice/41-manual-regen

Branches: dashboardAPI · EVOLV

What landed

  • Light state cache on the dashboardAPI domain (recordChild / cachedChildSources) — used to remember registrations for later manual regen. By design, no persistence across restarts; cache rebuilds naturally as children re-register on next deploy.
  • Shared emit path (emitDashboardsFor) reused by both child.register and regenerate-dashboard. Meta carries trigger: 'child.register' | 'manual' for downstream filtering / dashboard tagging.
  • regenerate-dashboard topic (alias regen) in the command registry.
  • CONTRACT.md updated.
  • 5 unit tests: cache replace-by-id, no-op-on-empty-cache, bypass-predicate, trigger-stamp on both paths, registry exposure.

Acceptance criteria (status)

  • Inject {topic: "regenerate-dashboard"} → dashboardAPI emits Grafana upsert messages for every cached child (no diff check). Verified by regenerate-dashboard re-emits for each cached child, bypassing diff.
  • CONTRACT.md updated.
  • Manual trigger distinguishable in logs and emitted msg meta (trigger: "manual" vs trigger: "child.register").

Closes #41.

## Slice #41 shipped on branch `slice/41-manual-regen` Branches: [`dashboardAPI`](https://gitea.wbd-rd.nl/RnD/dashboardAPI/src/branch/slice/41-manual-regen) · [`EVOLV`](https://gitea.wbd-rd.nl/RnD/EVOLV/src/branch/slice/41-manual-regen) ### What landed - Light state cache on the dashboardAPI domain (`recordChild` / `cachedChildSources`) — used to remember registrations for later manual regen. By design, no persistence across restarts; cache rebuilds naturally as children re-register on next deploy. - Shared emit path (`emitDashboardsFor`) reused by both `child.register` and `regenerate-dashboard`. Meta carries `trigger: 'child.register' | 'manual'` for downstream filtering / dashboard tagging. - `regenerate-dashboard` topic (alias `regen`) in the command registry. - `CONTRACT.md` updated. - 5 unit tests: cache replace-by-id, no-op-on-empty-cache, bypass-predicate, trigger-stamp on both paths, registry exposure. ### Acceptance criteria (status) - [x] Inject `{topic: "regenerate-dashboard"}` → dashboardAPI emits Grafana upsert messages for every cached child (no diff check). Verified by `regenerate-dashboard re-emits for each cached child, bypassing diff`. - [x] CONTRACT.md updated. - [x] Manual trigger distinguishable in logs and emitted msg meta (`trigger: "manual"` vs `trigger: "child.register"`). Closes #41.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RnD/EVOLV#41