Skip to content

feat(011): delete custom execution plumbing + integration tests (WP03+WP04)#33

Open
AlexU-A wants to merge 5 commits intomainfrom
feat/011-inngest-migration-wp03-wp04
Open

feat(011): delete custom execution plumbing + integration tests (WP03+WP04)#33
AlexU-A wants to merge 5 commits intomainfrom
feat/011-inngest-migration-wp03-wp04

Conversation

@AlexU-A
Copy link
Copy Markdown
Contributor

@AlexU-A AlexU-A commented Mar 19, 2026

Closes #29

Summary

This PR completes Feature 011 (Inngest Migration) — WP03 and WP04. WP01 (ported pipelines) and WP02 (replaced EventBus dispatch) are already on main.

WP03 — Delete custom execution plumbing (~5,013 LOC removed)

  • Deleted: engine/, event-bus/, triggers/ directories, init.ts, benchmarks/step-latency.ts
  • Deleted tests: tests/pipelines/engine/, event-bus/, triggers/
  • Relocated types: ExecutionContext, PipelineStepHandler, StepHandlerRegistry moved from engine/step-runner.ts to pipelines/types.ts; 17 import sites updated
  • src/index.ts: direct initialization replacing initializePipelineModule()
  • pipeline-executor.ts: eventBus.publish() replaced with inngest.send()

WP04 — Integration tests (19 tests across 4 suites)

  • corpus-update-pipeline: happy path, stub path, step output chaining, unique executionIds
  • content-audit-pipeline: approval/rejection/timeout, 72h timeout assertion, concurrency config
  • regulatory-change-monitor-pipeline: approval/rejection/timeout, 48h timeout (not 72h), source_query config
  • concurrency: all event pipelines use event.data.tenantId; schedule-tick uses the CEL string literal

No live Inngest server required — tests invoke the function internal fn handler with mocked step objects.

Acceptance gate (T018)

  • tsc --noEmit: 0 errors
  • vitest run: 280/280 passing
  • Net deletion: 5,013 LOC removed
  • No engine/, event-bus/, triggers/ in src/pipelines/
  • Zero dangling imports to deleted modules

Reviewer checklist

  • src/pipelines/ no longer contains engine/, event-bus/, or triggers/
  • src/pipelines/types.ts exports ExecutionContext, PipelineStepHandler, StepHandlerRegistry
  • src/index.ts initializes directly (no initializePipelineModule)
  • pipeline-executor.ts uses inngest.send() not eventBus.publish()
  • Integration tests cover reject AND timeout branches (not just approval)
  • content-audit timeout is 72h, regulatory-change-monitor timeout is 48h
  • schedule-tick concurrency key includes inner quotes: '"schedule-tick-global"'

Generated with Claude Code

AlexU-A and others added 3 commits March 19, 2026 14:26
…ines/types.ts

- Add ExecutionContext, PipelineStepHandler, StepHandlerRegistry to pipelines/types.ts
- Delete src/pipelines/engine/, event-bus/, triggers/, init.ts
- Delete src/benchmarks/step-latency.ts (benchmarked the deleted StepRunner)
- Delete tests for all deleted modules (engine, triggers, event-bus, integration)
- Fix all 17 import sites: redirect engine/step-runner.js -> pipelines/types.js
- Replace EventBus in pipeline-executor.ts and executor.ts with inngest.send()
- Replace initializePipelineModule in src/index.ts with direct StepRegistry/DecisionRecorder init
- Remove eventBus from PipelineExecutorContext interface and all callers
- Mock inngest client in tools.test.ts to fix pipeline_trigger test
- tsc: 0 errors, vitest: 261/261 passing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- corpus-update-pipeline: happy path, stub path, step output chaining, unique executionIds
- content-audit-pipeline: approval/rejection/timeout paths, 72h timeout assertion, concurrency config
- regulatory-change-monitor-pipeline: approval/rejection/timeout paths, 48h timeout (not 72h), source_query config
- concurrency: all event-triggered pipelines use event.data.tenantId key; schedule-tick uses static CEL string literal

280 tests passing, tsc 0 errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@AlexU-A AlexU-A force-pushed the feat/011-inngest-migration-wp03-wp04 branch from 6aa0289 to dd66174 Compare March 19, 2026 18:26
Add gitignore exceptions and WP01-WP04 task stub files for
kitty-specs/011-inngest-migration so the governance REF-001 check
passes. Follows the same pattern as specs 005, 006, 007, 008, 009.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: fd7d2e1083a4
@grndlvl
Copy link
Copy Markdown
Member

grndlvl commented Mar 20, 2026

Review note: pipeline/manual.triggered has no Inngest handler

While reviewing the pipeline framework findings from PR #28 (grndlvl's review), I audited this PR and found that the manual trigger route sends inngest.send({ name: 'pipeline/manual.triggered', ... }) and the test verifies the send — but no Inngest function is registered to handle this event. It's a dead letter.

Either:

  • Add a function in src/inngest/functions/ that listens for { event: 'pipeline/manual.triggered' } and executes the pipeline, or
  • Revert the route to use a different dispatch mechanism

grndlvl added a commit that referenced this pull request Mar 21, 2026
…tenant finding

- Document that exports module is the only place supporting multi-tenant per user
- Record PR #38 fixes (auth middleware, x-tenant-id header removal)
- Add tracking references to issue #37 and PR #33

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The manual trigger route sent inngest.send but no function was registered
to handle it. Adds handler with per-tenant concurrency, two-step execution
(source-query, content-generation), and stub fallback.

Addresses grndlvl review comment on PR #33.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: a3fe5c9f5e37
@AlexU-A
Copy link
Copy Markdown
Contributor Author

AlexU-A commented Mar 21, 2026

Fixed in 69eb3b5 — added createManualTriggerPipeline Inngest function that handles pipeline/manual.triggered events. Follows the same factory pattern as corpus-update and content-audit pipelines: per-tenant concurrency, two-step execution (source-query, content-generation), stub fallback for unregistered handlers. Registered in allFunctions array. Typecheck passes.

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.

Spike: Evaluate Inngest as pipeline execution layer

2 participants