claude-memory/graph/insights/esb-getter-boilerplate-120-140-lines-shared-across-getters-f-83e293.md
2026-02-26 12:58:15 -06:00

1.4 KiB

id type title tags importance confidence created updated relations
83e29321-7215-47a1-813e-a73187bda39f insight ESB getter boilerplate: ~120-140 lines shared across getters, future extraction candidate
esb-monorepo
getter-pattern
refactoring
technical-debt
insight
code-pattern
0.55 0.8 2026-02-26T18:57:36.520923+00:00 2026-02-26T18:58:15.151987+00:00
target type direction strength edge_id
46306580-2561-45f5-b479-d62fce505a04 RELATED_TO outgoing 0.75 777a44d6-96ba-4552-a743-f12dc3a31e1a

ESB Getter Boilerplate: Shared Code Pattern

Observation

Comparing poolbrain-customers getter (~250 lines) with the upcoming SF-CA getter, approximately 120-140 lines are near-identical boilerplate.

Shared Boilerplate Breakdown

Section ~Lines
GCP client init 15
createLogger() wrapper 40
getSecret() 15
Env var validation 20
Pub/Sub publishing loop 20
fromLastModifiedDate parsing 25
correlationId 3

Future Extraction Target

packages/getter-utils/ with proposed exports:

  • createLogger(logName)
  • getSecret(secretName, logger)
  • parsePollerMessage(cloudEvent)
  • publishRecords(records, opts)

Current Stance

Not abstracting yet — only 2 getters exist. Revisit when SF-CA getter is built and the pattern is confirmed across both implementations. Two data points is the minimum to validate the abstraction boundary.