[don't merge] Time-skipping POC for CHASM with SAA#10799
Open
feiyang3cat wants to merge 13 commits into
Open
Conversation
d7a4c7d to
feec4da
Compare
feiyang3cat
commented
Jun 22, 2026
472df9c to
4ed50b4
Compare
simiplify the time skipping protocol between framework and component users
4ed50b4 to
390149c
Compare
feiyang3cat
commented
Jul 1, 2026
| // TODO(time-skipping/chasm): emit the fast-forward wake as a ChasmTaskPure on the root component and | ||
| // anchor its staleness check on the VersionedTransition (as ChasmTaskInfo does) rather than an | ||
| // event ID. | ||
| const chasmNoEventID int64 = -1 |
Contributor
Author
There was a problem hiding this comment.
this is just for the PoC to work, another PR is removing the dependence of eventID in time skipping
feiyang3cat
commented
Jul 1, 2026
| return ms | ||
| } | ||
|
|
||
| // TestTimeSkipping_StartDelayAndRetryBackoff verifies that a standalone activity, which opts into |
Contributor
Author
There was a problem hiding this comment.
need to add more functional test cases in real code PR (like ff timer fired correctly
feiyang3cat
commented
Jul 1, 2026
|
|
||
| for _, pureTask := range componentAttr.GetPureTasks() { | ||
| pureTask.PhysicalTaskStatus = physicalTaskStatusNone | ||
| if firstPureTask == nil || comparePureTasks(pureTask, firstPureTask) < 0 { |
Contributor
Author
There was a problem hiding this comment.
pure task is backed by one physical task, so here find the earliest one
feiyang3cat
commented
Jul 1, 2026
|
|
||
| // TimeSkippingTransition is a time-skipping decision and is shared between the CHASM framework and | ||
| // the history substrate. | ||
| type TimeSkippingTransition struct { |
Contributor
Author
There was a problem hiding this comment.
temporary redundancy to avoid moving the same data structure from service/history to this folder
390149c to
9674980
Compare
feiyang3cat
commented
Jul 1, 2026
a59298d to
6cf4bc3
Compare
6cf4bc3 to
6e5972a
Compare
feiyang3cat
commented
Jul 1, 2026
| IsExecutionSkippable(ctx Context) bool | ||
| } | ||
|
|
||
| // TimeSkippingRuntimeTargetProvider is the optional, by default the framework scans the tree's |
Contributor
Author
There was a problem hiding this comment.
save this for later, just delete it
feiyang3cat
commented
Jul 1, 2026
| // one (e.g. bare test mocks). | ||
| // | ||
| // TODO: Now() could be different for components after we support Pause for CHASM components. | ||
| if np, ok := n.backend.(nowProvider); ok { |
Contributor
Author
There was a problem hiding this comment.
always be backend
feiyang3cat
commented
Jul 7, 2026
| // todo@time-skipping: chasm close transaction logic is after isStateDirty, | ||
| // need to check if this impacts chasm time skipping logic | ||
| if isStateDirty { | ||
| if err := ms.closeTransactionUpdateTransitionHistory( |
Contributor
Author
There was a problem hiding this comment.
this is workflow only; no impacts
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.
for discussion only
feature API branch: temporalio/api#802