Skip to content

Conversation

@SasSwart
Copy link
Contributor

@SasSwart SasSwart commented Nov 11, 2025

relates to: coder/internal#1094

This is number 1 of 5 pull requests in an effort to add agent script ordering. It adds a unit manager, which uses an underlying DAG and a list of subscribers to inform units when their dependencies have changed in status.

In follow-up PRs:

  • This unit manager will be plumbed into the workspace agent struct.
  • It will then be exposed to users via a new socket based drpc API
  • The agentsocket API will then become accessible via CLI commands that allow coder scripts to express their dependencies on one another.

This is an experimental feature. There may be ways to improve the efficiency of the manager struct, but it is more important to validate this feature with customers before we invest in such optimizations.

See the tests for examples of how units may communicate with one another. Actual CLI usage will be analogous.

I used an LLM to produce some of these changes, but I have conducted thorough self review and consider this contribution to be ready for an external reviewer.

@SasSwart SasSwart requested a review from mafredri November 13, 2025 10:35
@SasSwart SasSwart removed the request for review from johnstcn November 14, 2025 09:33
@SasSwart SasSwart marked this pull request as ready for review November 14, 2025 12:07
Remove generics. Provide a more sensible zero value status type.
Remove defunct code paths

Improve error handling
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. 👍🏻

@SasSwart SasSwart merged commit 500c17e into main Nov 19, 2025
30 checks passed
@SasSwart SasSwart deleted the jjs/internal-1095-branch1-unit-manager branch November 19, 2025 17:03
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants