Repository navigation
feat: offer Update in the project menu to move its runs onto the current tool code - #112
Merged
Merged
Conversation
A project's coordinator and specialists keep the tool code frozen at their creation. The hub replaces a stale coordinator only on its own pass, never a coder, and offers the person nothing. updateProject cancels the specialists behind the installed packages, and the coordinator with every parked specialist when it is the one behind, so a fresh coordinator starts as an upgrade does; a run mid-turn or a pending approval is named instead of cut off.
Update… says what it gives up, asks the hub to move the project's runs onto the current tool code, and reports whether it did or why it waits.
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.
Closes #111
What
Adds Update… to the project menu, which moves a project's runs onto the current tool code: the specialists running on packages older than the installed ones are replaced, and the coordinator too when it is the one behind.
Why
A project's coordinator and specialists keep the tool code frozen when their run is created (#67). After a hub rebuild with a fix, a live coder kept failing the same way, and the only remedy was cancelling runs by hand in the database. The hub already replaces a stale coordinator on its own pass, but only when the coordinator's own pin is stale and never while a coder is live, and it offers the person nothing to ask for. Details in #111.
Changes
packages/schemas/src/project.ts:ProjectUpdateReceipt, whether runs were replaced and, when not, why: every run is current, no coordinator is live, the coordinator or a specialist is mid-turn, or an approval is pending.apps/hub/src/projects/coordinator-upgrade.ts:staleRunscompares each run's frozen pin with the pins installed for its role (a coder may be on either coder package).updaterefuses while the coordinator is mid-turn or has an unsettled delivery, an approval is pending, or a specialist is mid-turn. Otherwise it cancels the stale specialists, and when the coordinator is stale, every parked specialist and the coordinator, then starts a fresh one as the upgrade pass does; the person's next message carries the held resume context. A parked coder is replaced too, which is what the dialog says the person gives up. Updates share the per-project in-flight gate with the pass and with opens. The shared pieces of the pass (latestCoordinator,liveSpecialists,coordinatorIdle,approvalPending) are factored out of it unchanged.apps/hub/src/projects/service.ts:managereads a project with manage authority, for an action on its runs.apps/hub/src/projects/routes.ts,apps/hub/src/app.ts:POST /projects/:projectId/update, refused for an archived project.packages/client:updateProject.apps/web/src/pages/project-menu.tsx,config.ts: the menu item for an active project, a dialog that says what the update gives up and what to do after, and a notice with the outcome or the reason it waits.coordinator-upgrade.test.tscoversstaleRuns;project-menu.test.tsthe outcome wording.