Skip to content

Conversation

@SamHatoum
Copy link
Collaborator

Description

Type of Change

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, etc)
  • refactor: Code changes that neither fix bugs nor add features
  • perf: Performance improvements
  • test: Adding or fixing tests
  • chore: Changes to build process or auxiliary tools
  • ci: Changes to CI configuration
  • revert: Reverting previous commits

Checklist

  • Code follows style guidelines
  • Documentation updated
  • No new warnings generated

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

  • Test A
  • Test B

Subscribe to events by exact correlationId match. Returns
an unsubscribe function. Ignores events without correlationId.
Subscribe to events where correlationId starts with a given prefix.
Used by job graph processor to receive all events for a graph
via prefix like 'graph:g1:'.
…o command handlers

Handler-adapter forwards optional PipelineContext as second argument
to plugin handlers. PipelineServer.createContext includes eventStore
and messageBus. Enables plugins like job-graph-processor to access
shared infrastructure.

plea: Files must be committed together for coherence
Validates job graphs for: unique IDs, dependency existence,
self-references, cycles (DFS), empty targets, and non-empty graphs.
Exports Job type used by the rest of the package.
… graph submission

Introduces evolve state machine and getReadyJobs query. After
GraphSubmitted, getReadyJobs returns jobs with no dependencies.
…succeeds

Adds JobDispatched and JobSucceeded event handling to evolve.
After a dependency succeeds, getReadyJobs returns its dependents.
…lve events

plea: three tests cover three branches of one pure function (null/failure/success)
…policy, completion

plea: four tests cover four branches of one orchestration function
…ests

plea: Command.data is Record<string,unknown> — single boundary cast in
toProcessGraphCommand is required to bridge to ProcessGraphCommand's typed
data. No way to narrow Record<string,unknown> to structural types without as.
…eady jobs

After registering the correlation listener, loop over dispatched jobs
and fire-and-forget sendCommand for each target. This ensures the bus
actually executes the work that the graph tracks.
… ready dependent jobs

When a predecessor job completes and new jobs become ready, fire-and-forget
sendCommand for each newly dispatched target. Completes the dispatch loop
so graphs actually execute end-to-end.
…messageBus.sendCommand

createGraphProcessor now takes an optional { dispatch } option. When
provided, commands are dispatched via the callback instead of the raw
messageBus.sendCommand. This allows the pipeline server to route
dispatched commands through processCommand for full tracking.
Add optional third parameter to PipelineContext.sendCommand so callers
can dispatch commands with a custom correlationId instead of inheriting
the parent context's. Needed by the graph processor to dispatch target
commands with per-job correlationIds through processCommand.
…d handler

When the pipeline context provides sendCommand, the handler wraps it as
the dispatch callback for createGraphProcessor. This routes dispatched
target commands through the pipeline server's processCommand path,
ensuring they appear in /messages and trigger full pipeline tracking.
Adds Array.isArray check before calling validateGraph to prevent
TypeError crash when ProcessJobGraph is re-invoked with event data
that lacks the jobs field.
@SamHatoum SamHatoum merged commit b8ecc40 into main Feb 9, 2026
0 of 2 checks passed
@SamHatoum SamHatoum deleted the feature/job-graph-processor branch February 9, 2026 21:18
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