Skip to content

feat(op): Op composite + Temporal workflow code generation#14

Merged
lex00 merged 2 commits intomainfrom
feat/op-composite
Apr 13, 2026
Merged

feat(op): Op composite + Temporal workflow code generation#14
lex00 merged 2 commits intomainfrom
feat/op-composite

Conversation

@lex00
Copy link
Copy Markdown
Contributor

@lex00 lex00 commented Apr 13, 2026

Summary

  • Adds Op() declarable builder in packages/core/src/op/ — a named, phased Temporal workflow declared as infra code; *.op.ts files are discovered automatically by the existing pipeline (no discovery changes needed)
  • Adds 8 pre-built activity implementations in lexicons/temporal/src/op/activities/ (build, kubectl, helm, wait, gitlab, shell, state, teardown) with proper heartbeating for long-running ops
  • Adds Op serializer (lexicons/temporal/src/op/serializer.ts) that generates dist/ops/<name>/workflow.ts, activities.ts, and worker.ts per Op; handles parallel phases (Promise.all), sequential phases, and gate steps (defineSignal + condition)
  • Wires serializeOps into the temporal serializer; re-exports Op builders from @intentius/chant-lexicon-temporal for single-import convenience
  • 59 new tests (27 core Op, 24 Op serializer, 8 serializer integration); full suite: 5514 tests, 468 files, all green

Closes #7

Test plan

  • npx vitest run packages/core/src/op/op.test.ts — 27 tests
  • npx vitest run lexicons/temporal/src/op/op-serializer.test.ts — 24 tests
  • npx vitest run lexicons/temporal/src/serializer.test.ts — 31 tests (includes 8 new Op cases)
  • npx tsc --noEmit -p packages/core/tsconfig.json — clean
  • npx vitest run — 5514 tests, 468 files, all passing

🤖 Generated with Claude Code

lex00 added 2 commits April 12, 2026 23:21
Closes #7.

- `packages/core/src/op/` — Op(), phase(), activity(), gate() builders plus
  pre-built shortcuts (build, kubectlApply, helmInstall, waitForStack,
  gitlabPipeline, stateSnapshot, shell, teardown); Op is a Temporal::Op
  Declarable so existing discovery picks up *.op.ts files automatically
- `lexicons/temporal/src/op/activities/` — 8 real TypeScript activity
  implementations with heartbeating (helm, kubectl, wait, gitlab)
- `lexicons/temporal/src/op/serializer.ts` — generates workflow.ts,
  activities.ts, worker.ts under dist/ops/<name>/ for each Op entity;
  groups proxyActivities calls by profile, handles parallel phases via
  Promise.all, emits defineSignal + condition for gate steps
- Wire serializeOps into the temporal serializer; add ./op/activities
  export to temporal package.json; re-export Op builders from temporal index
- Add ./op export to core package.json
- 27 new core tests + 24 Op serializer tests + 8 new serializer.test.ts cases;
  full suite: 5514 tests, 468 files, all passing
- Example: examples/gitlab-aws-alb-op/ops/alb-deploy.op.ts
@lex00 lex00 merged commit 09aa43a into main Apr 13, 2026
9 checks passed
@lex00 lex00 deleted the feat/op-composite branch April 13, 2026 06:33
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.

Op composite + build pipeline integration

1 participant