Repository navigation
feat(platform): name the serving release in workspace_status - #3972
Merged
Merged
Conversation
The device dialog kept the release shape `release.yml` checks (a bare X.Y.Z, optionally with a prerelease) as a private regex. Move it to lib/shared so the backend can apply the same rule to its own build stamp instead of growing a second copy. The dialog's pin is unchanged.
An agent in a sandbox reaches the authenticated workspace bridge but not the public /api/health, so it had no supported way to read which release serves it. POST /api/tools/status now adds `platform.version` beside the unchanged tool listing: the backend's own TALE_VERSION when it has the release shape (`0.5.64`), else null with a fixed note for an unset stamp, a dev build or any other label, which is never echoed. The door reads nothing from the request, and a refused token still gets the bare 401. The value names the backend that answered, not deployment health. The in-sandbox bridge already relays the answer verbatim; its workspace_status description now says what the field means. Covered by the door and bridge suites, the checkSandboxSpawner lane, the EN/DE/FR harness docs and the manual automation register. Refs #3969
The version workspace_status reports is whatever release number the backend's build stamp carries: any build can be stamped with one, and the environment can override the stamp. The docs, the bridge description and the code comments said a non-release build never matches a release and that a match confirms the build. Say instead that the value is a label to map to the published tag, not proof of what is deployed. Word the three notes as facts about the label, name the backend that answered the call rather than the session's, say an older platform omits the field, use "tag" in French and fix the German modal and pronoun. The door comment and the register row now say the bearer token is the one thing read from the request. The release-label tests compare whole answers, so a stray note beside a version fails them. Refs #3969
This was referenced Sep 30, 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.
An agent inside a sandbox can reach the authenticated workspace bridge but not the public
/api/health(TALE-370), so it had no supported way to read which Tale release the platform reports.workspace_statusnow answers that from the server's side.What changed
POST /api/tools/status, the door behind the in-sandboxworkspace_statusMCP tool, addsplatformbeside the tool listing, which stays as it was:{"tools":[{"name":"task_get","description":"…","readOnly":true}],"platform":{"version":"0.5.64"}} {"tools":[],"note":"No workspace tools are granted to this agent.","platform":{"version":"0.5.64"}} {"tools":[…],"platform":{"version":null,"note":"This backend's build is labelled as a development build, not with a release version."}}TALE_VERSION, the build stamp the web tier's/api/healthalso reports.release.ymlsets it to the tag's number without thev. The Build workflow setscandidate-sha-…,pr-…-sha-…orsha-…, a local build setsdev, and the environment can override it.versionis the trimmed stamp only when it has the release shaperelease.ymlvalidates (0.5.64,0.6.0-rc.1). Every other stamp answersversion: nullwith one fixed sentence about the label: none,dev, or not a release version. Nothing else is ever sent: no raw label, address, org data or Ops identifier.platform.device-command.ts, the CLI pin). It moved tolib/shared/release-version.tsand both the dialog and the backend now use it (commit 1, behaviour-identical). The workspace has one copy; two other identical copies live in other workspaces and are unchanged (see below).workspaceToolStatusImpl's return type went fromunknownto a concrete type so the door can spread it.workspace_statusdescription now says whatplatform.versionis: the label of the backend that answered the call,nullwhen its build has none, and absent on an older platform. It also says the value is not proof of what is deployed or of its health. The description ships with the sandbox-runtime image of the same release.platform/agents/harnesses.md, section "Understand files and connected tools", gets one paragraph. The manual registerservices/platform/tests/manual/reference/automation.mdgets one row.No DB/schema, REST v1/OpenAPI, error-code, i18n-catalog, grant, tool or endpoint change.
What it is not
compose.ymlbuilds locally by default withVERSION: ${VERSION:-dev}, andenv_filecan overrideTALE_VERSION.platform.versionwith the published tag's number. Treatnull, a missing field or a mismatch as unconfirmed, and rely on the deployment's own records for what is running.Review
An independent adversarial read of
529bdf25dfound no correctness or security defect: the door, the refusals, the shape, type safety, the shared stamp, the relay and the tests all held. It did find wording that claimed more than a label can show.29ee59275fixes that:git_tag); German uses "können … abfragen" and drops an ambiguous pronoun.Verification (exact head
29ee59275, local, synthetic fixtures only)backend/domains/sandbox/dispatch-routes.test.ts: the grants and no-grants answers equal the real listing plusplatform, and a spy asserts the token's grants. Four refusals get a byte-identical 401 with noplatform. A forged body, query or header, or a non-JSON body, changes nothing. Ten non-release stamps answernullwith their note. Trimmed and prerelease stamps compare as whole answersplatform, trust the body's version, trust the body's grants, a 401 carryingplatform, echo non-release labels, missing read asdev, no trim, a stray note beside a releaselib/shared/release-version.test.ts(shape),device-command.test.ts(pin unchanged)services/sandbox-runtime/daemon/src/tale-connectors-mcp.test.ts: the real bridge process against a fake platform. The status text (indented, with≤,…and an escaped\u2026) reaches the model byte for byte, the platform receives{}despite forged MCP arguments, and the description states the limitsplatformmutations are all caughtbackend:integrationlanecheckSandboxSpawneron scratch Postgres 16: the new check "workspace status names the serving release" with a real session token, a no-grants token, a forged body, an expired token and a candidate stamprelease=0.5.99 (200), noGrants=0 tools/0.5.99, forged answer identical=true, expired → 401 {"status":"error","message":"Unauthorized."}, candidate=null (label echoed=false)529bdf25d, whose inputs are unchanged)tests/guards/*, error codes, handler names, shims, OpenAPI spec, rate limit, invalid body, purity, conventions)tsc(changed files and importers, includingapp.tsandintegration-check.ts); daemontsc;oxlint --type-aware;oxfmt --check; opengrep on the changed files;lint:manual; docs structural suite (27 files, 139 tests)529bdf25dKnown and not changed here
b5ff70447. Itsproduct_findanswersrun_ended("The task run this session served has ended…") because the lane'sproject_agentsession has no live task run. The new check does not depend on it.backend:integrationis not a CI job.@tale/sandbox-runtime-daemon#testruns nine runtime scripts from outside its workspace, and no inputs entry covers them:entrypoint.sh,tale-connectors-mcp,tale-hermes-run,tale-openclaw-run,tale-playwright-mcp,tale-qwen-run,tale-steer-hook,tale-vision,tale-vision-read-hook. This PR edits the test too, so CI re-ran it here. An edit to a script alone replays a cached verdict. Suggested follow-up:services/sandbox-runtime/daemon/turbo.jsoninputs with$TURBO_EXTENDS$,$TURBO_DEFAULT$and those scripts, plus a guard likeservices/docs/tests/turbo-inputs.test.ts.tools/cli/src/lib/sandbox-device/config.tsandservices/sandbox/src/devices/messages.tseach keep an identicalisReleaseVersion. Consolidating the three into@tale/sharedwould be a small follow-up.release.ymlalso triggers on a bare0.5.64tag, andgh release create v<number>has no--target. After a bare-tag push, gh would createv0.5.64at the default branch's head, which could differ from the tagged source. The documented procedure pushesvX.Y.Z, so this only matters off that path.Overlap
#3961, #3948 and #3881 also touch
automation.mdorintegration-check.ts.git merge-treeshows that this branch adds no conflict with any of them; #3881's conflict set is the same against plain main.Source identities
origin/mainb5ff70447.ebf4546fb1455a236c1046f3d73ef78c2e1d0109is untouched and does not contain this change..github/workflows/release.yml: theVERSION_NUMBERcheck and the build argument.services/platform/Dockerfile: the runner and squashENV TALE_VERSION.compose.yml:backend-apiruns the platform image, which compose builds locally by default withVERSION: ${VERSION:-dev};env_filecan overrideTALE_VERSION.Closes #3969