Skip to content

refactor: rename NotRun to Skipped - #3

Merged
RangelReale merged 1 commit into
masterfrom
rename-notrun-to-skipped
Oct 2, 2026
Merged

RangelReale merged 1 commit into
masterfrom
rename-notrun-to-skipped

Conversation

@RangelReale

Copy link
Copy Markdown
Contributor

TaskInfo.NotRun named a condition in the negative, unlike every sibling option, which names what it attaches: WithSetup, WithStart, WithParent, WithHandler. Skipped names the event instead, and the callback still says why via cause.

Renames

Old New
TaskInfo.NotRun TaskInfo.Skipped
WithNotRun WithSkipped
instancetask.WithNotRun[T] instancetask.WithSkipped[T]
ErrTaskNotRun ("task not run") ErrTaskSkipped ("task skipped")

Internal identifiers follow the same name: Manager.notifyTasksSkipped, the skippedNotified flag in runWithStopErrors, taskBuild.skipped, and the trace log message "notifying task skipped".

Compatibility

This is a breaking change. The old exported names are removed without deprecated aliases, so dependents fail to compile rather than silently lose the hook. Losing it silently would leave a Future unresolved and its waiters blocked, which is the bug the hook exists to prevent.

Verification

No behavior changes: the callback signature, call order and uniqueness guarantees are unchanged. go build ./... and go vet ./... are clean and the full go test ./... passes, including the futuretask tests that cover a future being resolved with ErrTaskSkipped through BuildTask(WithParent(...)) decoration.

🤖 Generated with Claude Code

TaskInfo.NotRun named a condition in the negative, unlike every sibling
option, which names what it attaches: WithSetup, WithParent, WithHandler.
Skipped names the event instead, and the callback still says why.

Renames TaskInfo.NotRun to TaskInfo.Skipped, WithNotRun to WithSkipped
in both svcinit and instancetask, and ErrTaskNotRun to ErrTaskSkipped.
Internal identifiers and the trace log message follow the same name.

No behavior changes: the callback signature, call order and uniqueness
guarantees are unchanged. The old exported names are removed without
deprecated aliases, so dependents fail to compile rather than silently
lose the hook.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@RangelReale
RangelReale merged commit 842401d into master Oct 2, 2026
1 check passed
@RangelReale
RangelReale deleted the rename-notrun-to-skipped branch October 2, 2026 10:34
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