feat(#868): grant first_clear on a completed map-node replay - #916
Merged
Conversation
The replay pipeline verifies a run's completed terminal but never granted first_clear, leaving the completion frontier permanently empty for node selection, reveal authorization, and offline reconcile to consume.
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Description
Closes #868
applyMatchin the replay worker now grants afirst_clearwhen a verified segment's lastreplayed checkpoint is a
completedterminal on aworld_map_nodescope, spread into theexisting
applyVerifiedSegmentcall alongsideitems/chain.isForwardExited: a fail, stop, or cap forward-exits the chain withoutclearing a node, documented with a
//comment.typefield against the string literal'completed'rather than theActivityCheckpointTypeenum — oxlint's type-awareno-unsafe-enum-comparisonrejects the enumform here, matching
is-forward-exited.ts's existing style.avatarGrants's upsert semantics make re-verifying an already-granted node a no-op.Testing
bun run typecheckpassesbun run testpassesbun run lintpassesFive new tests in
run-frontier.test.tscover: a completed map-node run grantsfirst_clearkeyed by
scopeID; a failed terminal grants nothing; a mid-runstoppedforward-exit grantsnothing; a completed terminal on a non-map-node scope grants nothing; re-verifying an
already-granted node lands no duplicate row.