Skip to content

feat: custom pipeline stages + pluggable handlers#5

Open
terraboops wants to merge 1 commit intomainfrom
feat/custom-stages
Open

feat: custom pipeline stages + pluggable handlers#5
terraboops wants to merge 1 commit intomainfrom
feat/custom-stages

Conversation

@terraboops
Copy link
Copy Markdown
Owner

Summary

Ships the custom-stages spec in full: user-defined stages → role_groups → roles pipelines, JSON-in/out handler contract (agent / script / webhook / human / k8s_job), atomic role execution via baseline+rollback, watcher scope with done-stage reactivation, and the UI surfaces to operate it all.

  • New data modelstages[] + role_groups[][] with done sentinel, backwards-compatible with today's agents/post_ready/parallel_groups via on-read migration.
  • HandlersHandler ABC with five concrete types; scheduler dispatches through next_roles_in_current_stage (role-group parallelism) and mirrors state into a role_state tree.
  • Retry + timeout — wraps any handler with the spec's exponential backoff ladder (30→60→120→240→300 cap) and terminal failure state.
  • AtomicityBlackboardSnapshot + crash recovery on startup, git used as a patch primitive (no .git dirs in idea folders).
  • Watchers — positive-list scope ("*" / role-names / done) and reactivate + add_stage payloads for re-opening done ideas.
  • UI — stage badge, nested progress bar, handler-type badges, failed-role retry panel, + Add stage affordance + rename endpoint.
  • API + CLIPOST /ideas/{id}/roles/{role}/retry, POST /ideas/{id}/stages, POST /ideas/{id}/stages/{name}/rename, trellis retry CLI.

See FEATURES.md for the exhaustive 176-behaviour catalogue.

Test plan

🤖 Generated with Claude Code

Ship the custom-stages spec: user-defined `stages → role_groups → roles`
pipelines, JSON-in/out handler contract (agent/script/webhook/human/k8s_job),
atomic role execution via baseline+rollback, watcher scope and reactivation
from the `done` sentinel, and the UI surfaces to operate it all.

Backwards-compatible: legacy `pipeline.agents`/`post_ready`/`parallel_groups`
migrates on read; scheduler dual-reads the legacy status fields while mirror
writing the new `role_state` tree. 453 pytest cases + 9 Playwright flows
cover the new behaviours end-to-end.

See FEATURES.md for the full behaviour catalogue.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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