feat/powerradar
needs attentionf34e4ce · incrementalPR #327reviewed 2026-07-23 00:32 UTC0H · 1M · 3L · 5I- Purpose
- Add a native API-based PowerRadar (Centrica/Panoramic Power) metrics integration replacing the manual-CSV path with headless OAuth2 auth + 5/15/60-min pull collection via the internal /eigw API.
- Goal
- powerradar-api integration worker: OAuth broker auth, chart-data pull, translation layer, CDK deploy, live e2e proven on Energía Real.
- Sub-goals
- SG-1: Auth + transport engine (eigw-client.ts) — complete
- SG-2: Manifest + catalog + provider registration — complete
- SG-3: Pure translation + unit tests — complete
- SG-4: Metrics handler + tests — complete
- SG-5: CDK stack + wiring — complete
- SG-6: Live worker e2e — complete
- SG-7: Framework fold-back — complete
- What
- Merge of origin/main: (1) preview-provision.yml timeout 45→75 min with corrected slug-length comment (new longest CDK resource name is metrics-helioscope-materialize-persist); (2) pnpm-lock.yaml patch bumps: aws-cdk 2.1132.0→2.1132.1, tinyglobby 0.2.15→0.2.17, picomatch 4.0.3→4.0.4.
- Why
- Branch merged main to pick up CDK CLI bump (#335) and CFE silent-success fix (#336) landed while PowerRadar integration was being built.
- Areas
- services/metrics/integrations/powerradar-api+1450−0infra/cdk/src/stacks/services/metrics/integrations/powerradar-api+157−0infra/cdk/src/app + lib + engine+39−9packages/integration-manifests+109−0packages/database+17−1.github/workflows/preview-provision.yml+57−0
- Blast
- 29 files, ~2318 insertions / ~360 deletions. New integration service, manifest, CDK stack, DB seed entries. No changes to existing integrations or public API surface.
Findings · 10
correctness2
Timeout 45→75 min: well-justified, measured on fix/cfe-silent-ok (2026-07-22)
.github/workflows/preview-provision.yml:46
Comment correctly distinguishes first-provision (slow) vs incremental pushes (fast). No correctness concern.
Slug-length math verified correct
.github/workflows/preview-provision.yml:729
'batu-{slug}-dev-metrics-helioscope-materialize-persist' = 48 fixed chars → max slug = 16 chars. naming.ts MAX_BRANCH_NAME_LEN=16 matches. Hash-bounding behavior for 17-char slugs accurately described.
security2
aws-cdk 2.1132.0→2.1132.1: patch bump, integrity hash updated, no known CVEs
pnpm-lock.yaml
Consistent update in packages and snapshots sections.
tinyglobby 0.2.15→0.2.17 + picomatch 4.0.3→4.0.4: routine transitive patch bumps
pnpm-lock.yaml
No known CVEs; transitive deps of typescript-eslint and rolldown-plugin-node-polyfills.
conventions3
Warning message 'exceeds 17 chars' is ambiguous — gate fires at ≥18
.github/workflows/preview-provision.yml:740
Gate is `-gt 17` (slugs ≥18 skip CDK); slugs of exactly 17 are hash-bounded and still deploy. Suggest: "Branch slug is 18+ chars — skipping CDK preview. Slugs ≤16 deploy verbatim; exactly 17 chars are hash-bounded and still deploy. Rename to ≤16 chars (per CLAUDE.md)."
Warning rename hint omits the 16-char budget from CLAUDE.md
.github/workflows/preview-provision.yml:740
The hint says 'something shorter (e.g. feat/short-name)' without stating the ≤16-char target. Operators hitting this should know the budget without consulting CLAUDE.md.
Dual thresholds (16 in naming.ts, 17 as gate) lack a one-line rationale
.github/workflows/preview-provision.yml:734
A reader may wonder why the gate is >17 rather than >16. One line: 'Gate is >17 (not >16) because naming.ts hash-bounds 17-char slugs to a valid 16-char resource name; >17 breaks the fixed-overhead budget even with hash-bounding.'
tests1
No test files in incremental diff
Changes are CI config + lockfile only. Core PowerRadar integration tests (13 translation + 18 handler) landed in prior reviewed commits.
improvement1
75-min timeout: add a note on `--concurrency 2` as the next lever if estate grows further
.github/workflows/preview-provision.yml:50
Evidence-based and appropriate now. If future stack count pushes past 75 min, `cdk deploy --concurrency 2` can parallelize unrelated stack groups. Worth noting so the next person knows the knob.
seo1
No apps/web/** files in incremental diff — auto-skip
SEO lens not applicable to this diff.
History · 15 commits
- f34e4ceneeds attentionincremental0H · 1M · 3L2026-07-23 00:32current
- 1bc8aedneeds attentionincremental0H · 2M · 3L2026-07-22 21:34
- 31e63bbneeds attentionincremental0H · 2M · 5L2026-07-22 20:53
- 482cb88safeincremental0H · 0M · 1L2026-07-22 17:56
- 9a73b79safeincremental0H · 0M · 0L2026-07-22 17:34
- 87f8298needs attentionincremental0H · 1M · 3L2026-07-22 16:59
- 1e80096safeincremental0H · 0M · 1L2026-07-22 16:42
- 6ed65b4safeincremental0H · 1M · 3L2026-07-22 00:00
- 74a1131needs attentionfull0H · 7M · 12L2026-07-21 19:06
- 563252bneeds attentionincremental4H · 9M · 8L2026-07-21 18:32
- beced58needs attentionincremental0H · 3M · 3L2026-07-21 01:13
- 7fa8684needs attentionincremental4H · 9M · 7L2026-07-20 22:56
- 230784fneeds attentionfull2H · 11M · 14L2026-07-10 00:15
- b876b54needs attentionincremental2H · 2M · 5L2026-07-08 04:44
- ec4847fneeds attentionfull2H · 11M · 8L2026-07-08 03:32