Repository navigation
feat(platform): answer version and deployment history in the app - #4790
Merged
Merged
Conversation
- GET /:name/versions reads the version history: who saved each version,
through which door and client, what it was based on or restored from,
what it changed, its tests, whether it is live and when it last went
live. `limit` and `before` ask for a page; without them it answers every
version, as the version picker reads it.
- GET /:name/deployments (new) answers what is live with its runs still
going, and when each version went live, a page at a time.
- POST /:name/restore (new) brings an older version back as the newest:
its document passes the save's own checks and tests, then saves
restored from it — or nothing, when it is the latest already (200).
- POST /:name/deploy takes expectedDeployedVersion and answers the store's
whole deploy: what was live before, the kind, the deployment's id and
the trigger that starts the version now. The answer had been cut down
to the name and version, so the editor's notice that a trigger is off
after a deploy never showed.
- POST /:name/save records basedOnVersion ("save anyway" after a stale
refusal) and answers what the version changed.
- GET /:name says the shown version's door, lineage and changes, and
which version is the latest.
One mapping per wire row (versionHistoryWire, deploymentEventWire), for
the REST and MCP doors to share.
The app's data layer for the versions screens to come (their hooks come with the screens that read them): - listVersionHistory and listDeployments read a page of each history, parsed at the boundary with the shared wire schemas, so a field the server leaves out reads as unknown rather than absent and a shape it does not know is refused, never cast. - restoreAutomationVersion brings an older version back as the newest. - The deploy mutation carries the live version it expects (null for nothing live) and reads the kind, the previous version and the deployment's id; the save carries basedOnVersion and reads what the version changed; an automation's read says the shown version's door, lineage and changes.
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.
What
The app's door for the version history, the deployment history and restoring a version. It's the data the versions screens will read, and it fixes the deploy notice. No REST, MCP or contract change; the machine doors follow separately.
/:name/versionsreads the version history: who saved each version, through which door and client, what it was based on or restored from, what it changed, its tests, whether it is live and when it last went live.limitandbeforeask for a page; without them it answers every version, as the version picker reads it, and a missing message or test verdict is still left out./:name/deployments(new) answers what is live with its runs still going, and when each version went live, a page at a time (before=<at>:<id>)./:name/restore(new) brings an older version back as the newest. Its document passes the save's own checks and tests through the sharedsave_automationpath, then saves restored from it. When its content is the latest already, nothing is saved (200,unchanged). Refusals are the save's./:name/deploytakesexpectedDeployedVersionand answers the store's whole deploy: the previous version, the kind (deploy,rollback,unchanged), the deployment's id, and the trigger that starts the version now.{name, version}, so the editor's notice that the trigger is off after a deploy never appeared./:name/saverecordsbasedOnVersion("save anyway" after a stale refusal) and answers what the version changed./:namesays the shown version's door, lineage and changes, and which version is the latest.versionHistoryWire,deploymentEventWire,liveDeploymentWire), for REST and MCP to reuse.Verification (local)
tsc, oxlint, oxfmt,knip.travels.test.ts) timed out under the full run's load and passes alone (31/31), as it has before.routes.versions.test.ts, 13): restore (created, unchanged, refused for problems, unknown version, member refused); the deploy passingexpectedDeployedVersion, null included, and answering the store's whole deploy with its trigger; save lineage and changes; paged and complete version lists; the deployment history with its position parsed; the detail answer.