Skip to content

Update dogma to v0.24.0 and enginekit to v0.26.0#461

Merged
jmalloc merged 4 commits intomainfrom
update-dogma-enginekit
May 6, 2026
Merged

Update dogma to v0.24.0 and enginekit to v0.26.0#461
jmalloc merged 4 commits intomainfrom
update-dogma-enginekit

Conversation

@jmalloc
Copy link
Copy Markdown
Member

@jmalloc jmalloc commented May 5, 2026

Bumps dogma to v0.24.0 and enginekit to v0.26.0.

Breaking changes addressed

dogma v0.24.0

  • Rename all Timeout symbols to Deadline throughout (types, methods, facts, log strings, error messages, doc comments)
  • Add Mutate() method to the process scope implementation (new dogma.ProcessScope[R] interface requirement)

enginekit v0.26.0

  • Remove TestEngine / enginetest.RunTests() usage — the enginetest parent package was removed; the enginetest/stubs sub-package is still present and used

- Rename Timeout -> Deadline throughout (types, methods, facts, log strings)
- Add Mutate() method to process scope (new dogma.ProcessScope requirement)
- Remove TestEngine / enginetest.RunTests() usage (enginetest package removed)
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the module to dogma v0.24.0 and enginekit v0.26.0, aligning the testkit engine and related helpers with upstream breaking changes (notably the TimeoutDeadline rename and updated process-scope requirements).

Changes:

  • Renamed Timeout concepts to Deadline across public helpers, envelope APIs, facts/logging, engine routing, and tests.
  • Implemented the new Mutate() method on the process scope to satisfy updated dogma.ProcessScope[...] requirements.
  • Removed usage of the removed enginekit/enginetest parent package and updated tests accordingly.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
validation.go Renames Timeout validation scope helper to Deadline.
validation_test.go Updates validation scope creation test to use Deadline helper.
internal/validation/validation.go Renames internal Timeout validation scope to Deadline.
internal/inflect/inflect.go Updates inflection substitutions/corrections for Deadline kind.
internal/inflect/inflect_test.go Updates inflection tests for Deadline terminology.
go.mod Bumps dogma/enginekit versions to the requested releases.
go.sum Updates dependency checksums for the new dependency graph.
fact/process.go Renames process facts from Timeout* to Deadline* and updates fields/comments.
fact/logger.go Updates fact logger routing and log messages for Deadline facts.
fact/logger_test.go Updates logger tests to use Deadline envelopes/messages and expected strings.
expectation.messagetype.command_test.go Updates expectations to use deadline scheduling APIs/types.
expectation.messagematch.command_test.go Updates expectations to use deadline scheduling APIs/types.
expectation.messagecommon.go Updates produced-message tracking for DeadlineScheduledByProcess facts.
expectation.message.command_test.go Updates expectations to use deadline scheduling APIs/types.
envelope/envelope.go Renames NewTimeout() to NewDeadline() and updates ScheduledFor docs.
envelope/envelope_test.go Updates envelope tests for NewDeadline().
engine/internal/process/scope.go Implements Mutate() and renames scheduling from timeout to deadline.
engine/internal/process/scope_test.go Updates process scope tests for deadline scheduling/handling.
engine/internal/process/controller.go Renames controller state/routing/handling from timeouts to deadlines.
engine/internal/process/controller_test.go Updates controller tests for deadline semantics and names.
engine/engine.go Updates dispatch logic to treat DeadlineKind as origin-routed.
engine/engine_test.go Removes enginetest.RunTests() usage; keeps remaining engine tests.
action.advancetime.go Updates doc comment wording from timeout to deadline.
Comments suppressed due to low confidence (1)

engine/engine.go:281

  • There is no test coverage confirming that deadline envelopes are always dispatched back to their origin handler (and not routed via e.routes), nor that Engine.Dispatch() panics when called with a deadline message. Adding targeted tests in engine/engine_test.go would help prevent regressions in this deadline-specific dispatch path.
		if mt.Kind() == message.DeadlineKind {
			// always dispatch deadline messages back to their origin handler
			controllers = []controller{
				e.controllers[env.Origin.Handler.Identity().GetName()],
			}
		} else {
			controllers = e.routes[mt]
		}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread engine/internal/process/scope.go
jmalloc added 3 commits May 5, 2026 22:02
- Add location.OfCallSkip(n) for callers that need to skip dogma's typed
  adapter frame (untypedProcessEventScope/DeadlineScope.Mutate)
- Use OfCallSkip(1) in scope.Mutate so the panic location points at the
  handler code rather than dogma internals
- Add TestScope/Mutate sub-tests: normal mutation and panic-on-ended
…tion

OfCallSkip(1) assumed exactly one dogma adapter frame, which breaks if
the adapter is removed or gains extra layers. OfCallOutsidePackage skips
frames by package prefix instead, so the location is always the first
frame outside github.com/dogmatiq/dogma regardless of adapter depth.
All callers of OfCall() go through dogma typed adapters anyway, and the
three action.*.go sites have no dogma frames on the stack so skipping is
a no-op there. Removing OfCallOutsidePackage simplifies the API to a
single function that always does the right thing.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread location/location.go
@jmalloc jmalloc merged commit 0c532c4 into main May 6, 2026
13 of 15 checks passed
@jmalloc jmalloc deleted the update-dogma-enginekit branch May 6, 2026 01:58
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.

2 participants