feat: derive unit readiness intervals and add sync timeline CLI#27150
Draft
SasSwart wants to merge 1 commit into
Draft
feat: derive unit readiness intervals and add sync timeline CLI#27150SasSwart wants to merge 1 commit into
SasSwart wants to merge 1 commit into
Conversation
This was referenced Jul 10, 2026
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.
Adds the consumer half of the Script Coordination timing RFC (PR 2 of 2, stacked on #27149): readiness-interval derivation from the unit event log, a history section in
coder exp sync status, and a newcoder exp sync timelinecommand.Summary
agent/unit: newDeriveIntervalspure function that replays the event log and returns per-unit lifecycle intervals (blocked | ready | running | done). Readiness is derived, not stored: the fold mirrorsrecalculateReadinessUnsafeand handles the latedependency_addededge case where a ready unit flips back to blocked with no status change.coder exp sync status: table output gains a "History" section (time, elapsed, event) after the dependencies table. JSON output is unchanged from feat: record and expose timestamped unit events over the agent socket #27149.coder exp sync timeline(new): renders the full cross-unit event log as a git-log-style ASCII graph. Each unit gets a lane; every event prints a*row with an elapsed-time label; dependency-satisfaction points draw an inter-lane connector plus a derived "ready" row; lanes disappear when a unit completes.--output jsonemits the raw event list. Older agents without theSyncTimelineRPC get a clear "agent does not support timeline" error.Example graph output:
Test-support change:
agentsocket.NewServergains aWithUnitManageroption so CLI tests inject a mock-clock unit manager, keeping history timestamps in table goldens deterministic.Testing
agent/unit:DeriveIntervalscovered for single-unit lifecycle, blocked-until-satisfied, the late-edge ready-to-blocked flip, multiple dependencies, status-specific requirements, and unregistered dependencies.cli: renderer unit tests with varied timestamps (lanes, connectors, no-false-ready), plus golden tests forsync timeline(empty, graph, JSON) and the updatedsync statusgoldens. Reviewers should read the goldens; they are the primary review artifact for the rendering changes.Generated by Coder Agents on behalf of @SasSwart.