← all branches

fix/cfe-silent-ok

safe
d7bc0c1 · incrementalpre-PRreviewed 2026-07-22 23:35 UTC0H · 1M · 1L · 1I
The branch
Purpose
BAT-272: CFE collector silently returned success:true with zero bills on transient Mi Espacio registration failures, preventing SFN retry
Goal
Transient Mi Espacio registration failure throws RecoverableCollectionFailure (SFN retry) or grades failed/partial_success via run-level failure entry; genuinely-empty accounts still grade completed
Sub-goals
  • SG-1: Repair recoverable gate + decideMiEspacioFailureAction pure helper
  • SG-2: Pin decideFinalizeJob grading with regression tests + document lever in cfe-pipeline.md
  • SG-3: Add gobierno_fallback strategy label (failed Mi Espacio ≠ gobierno_only)
  • SG-4: Preview e2e on manually-deployed cfe-silent estate (ALL PASS)
  • SG-N: Framework fold-back — MAX_BRANCH_NAME_LEN 17→16 + 5 doc/skill/setup fixes
The changes (whole branch)
What
This incremental commit (SG-N final piece) corrects infra/cdk/CLAUDE.md to reflect that HelioScope's Lambda is now the longest CDK resource name (48-char fixed part), reducing the readable branch slug budget from 17 to 16 chars. Consistent with naming.ts update from earlier commits on this branch.
Why
The CLAUDE.md doc still referenced the old CFE resource as the longest name and budgeted 17 chars, which had silently become wrong after HelioScope landed — causing every preview-provision run on this branch to fail (17-char slug + 48-char fixed = 65 > 64).
Areas
infra/cdk+22services/utility/bills/cfe+33314domains/utility/src/cfe-job+740packages/api/src/schemas+130.claude/rules+572.github/workflows+147CLAUDE.md+11
Blast
7 areas, ~820 lines changed total; production change confined to services/utility/bills/cfe (Lambda collector). infra/cdk and framework/doc changes are non-production.
BAT-272 cfe-collector mi-espacio incremental-review doc-only-commit
typecheck· doc-only change, no TS files touchedtests· doc-only changeci· no PR — pre-PR branch

Findings · 3

correctness1

info

Math verified correct: 48 + 16 = 64

infra/cdk/CLAUDE.md

Fixed part `batu-…-dev-metrics-helioscope-materialize-persist` = 48 chars. 48 + 16 = 64 exactly matches the IAM/Lambda/EventBridge cap. naming.ts MAX_BRANCH_NAME_LEN = 16 is consistent. Historical note is accurate: slug `fix-cfe-silent-ok` = 17 chars → 17 + 48 = 65 → synth crash confirmed.

conventions1

medium

Historical bug narrative is descriptive, not prescriptive

infra/cdk/CLAUDE.md:48

The parenthetical '(The constant sat stale at 17 after HelioScope landed; every 17-char-slug preview deploy crashed synth with a 65-char function name until BAT-272 SG-N fixed it.)' explains a past bug rather than defining how things should be built. CLAUDE.md Tier 3 rule: 'CLAUDE.md is prescriptive, not descriptive.' The equivalent history already lives in naming.ts JSDoc where it belongs.

improvement1

low

Re-derive instruction duplicates root CLAUDE.md

infra/cdk/CLAUDE.md:48

The 're-derive MAX_BRANCH_NAME_LEN when adding a resource with a longer fixed part' instruction already appears verbatim in the root CLAUDE.md. The local ref is useful context adjacent to the number but creates two places to keep in sync.

History · 4 commits

  1. d7bc0c1safeincremental0H · 1M · 1L2026-07-22 23:35current
  2. 87450fbneeds attentionincremental0H · 7M · 5L2026-07-22 16:34
  3. 74161b3needs attentionincremental0H · 3M · 5L2026-07-17 01:18
  4. 662c8d1safefull0H · 0M · 0L2026-07-17 01:01