Skip to content

Split delivery and run state interfaces#66

Merged
darthfork merged 2 commits into
mainfrom
split-state-backends
May 25, 2026
Merged

Split delivery and run state interfaces#66
darthfork merged 2 commits into
mainfrom
split-state-backends

Conversation

@darthfork
Copy link
Copy Markdown
Owner

@darthfork darthfork commented May 25, 2026

Summary

  • split production state consumption into delivery, workflow-run, and workflow-job interfaces
  • wire webhook ingestion to delivery state only and run transitions to their specific run-state backends
  • keep Redis as the shared concrete persistence adapter while avoiding a combined production StateStore interface

TDD notes

  • RED: added interface-level coverage showing default webhook ingestion can use delivery state without run state
  • RED: added workflow run/job metric tests proving run transitions can use their own state interfaces without delivery state or the other run state
  • GREEN/REFACTOR: introduced narrow state backends, adapted run transitions, and updated integration helpers to pass state dependencies independently

Cardinality guardrails

  • no Prometheus collector definitions in src/metrics.go were changed
  • metric recorder cardinality guard tests remain in place

Verification

  • make test-all
  • make lint
  • make security

Author

  • Codex (gpt-5.5)

@darthfork darthfork marked this pull request as ready for review May 25, 2026 05:33
Copy link
Copy Markdown
Owner Author

@darthfork darthfork left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good design — ISP applied correctly here. The three narrow backends replace a fat interface cleanly, and the failingDeliveryStore simplification is a nice side-benefit (no more embedded inMemoryStateStore that can bleed state). A few things worth tightening before merge.

Comment thread src/webhook_ingestion_test.go Outdated
Comment thread src/metrics_test.go Outdated
Comment thread src/metrics_test.go
@darthfork darthfork enabled auto-merge (squash) May 25, 2026 05:43
@darthfork darthfork merged commit 367cfeb into main May 25, 2026
3 checks passed
@darthfork darthfork deleted the split-state-backends branch May 25, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant