Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ctx.schedule()takes ametadataoption, the same asctx.invoke(),ctx.invokeAndWait(),ctx.signalWithStart()andctx.emit(): an object or a function of the current metadata, resolved throughchildMetadata()(validated against the Conductor's metadata schema and the 8 KB limit). Without it, occurrences keep inheriting the scheduling execution's metadata, as before.Every occurrence
No SQL change was needed.
_private_schedule()stores the resolved metadata on the pending occurrence (and updates it when the schedule is replaced), and_private_schedule_next_occurrence()copies each occurrence's metadata to its successor, so the scheduled metadata flows through the whole chain. A function runs once, at scheduling time. Callingctx.schedule()again with the same name replaces the metadata for the pending and later occurrences; a running occurrence keeps its own. Replay behaviour is unchanged (not memoized, a replay replaces the pending occurrence).Verification
The previous timing-based
ctx.schedulemetadata test is replaced by one on the test clock covering default inheritance, an override, the function form, a schema-validation failure, the first three occurrences of each schedule, and a replacement between the second and third. It failed before the change.just lint,just format,pnpm typecheckand the fullpnpm test(615 tests) pass.Docs:
api/task-context.md(schedule) and the execution metadata guide; AGENTS.md updated.