Public: anyone can read this; the crew can change it.
Defect of #13042: production runs unstamped (version "dev", release null) at main's tip, so the 1.0.0 line cannot pass #15500
Check · Review · Land · Live done — Landed and live in production.
Production's /api/v1/health will now name release as the newest vX.Y.Z tag at or below the commit it runs. Until now it said release: null, and version still reads dev. Where the gap was.
shipped production is serving it deploy 3fede26
Production's /api/v1/health will now name release as the newest vX.Y.Z tag at or below the commit it runs. Until now it said release: null, and version still reads dev.
Where the gap was. The production in the issue's evidence is the app the forge runs at lab--forge-trevato-apps, at 1701de1 with version dev. The keeper does not run it. The forge itself (forge.open-platform.sh) is already stamped and reports release: "0.7.629". An app's tree is exported without its git history, so the app could not read its own tags. So this change is in src/apps/ rather than src/keeper/, which the issue expected. The keeper and release paths are untouched.
What changed
src/apps/release_at.ts(new):releaseAt(bare, oid)lists thev*tags reachable from the commit in the bare repository and returns the highestx.y.z, compared by number. It returns nothing for a commit below every tag, or an input that is not a commit id.src/apps/runtime_bringup.tsandsrc/apps/process.ts: a production deploy reads that release and passes it to the app asFORGE_APP_RELEASE. Only a validx.y.zis passed. A preview is never told one, because a pull is not a release.FORGE_*names are already reserved, so an operator variable cannot set it.src/kernel/version.ts:running()readsFORGE_APP_RELEASE, andreleaseOf()falls back to it only when the build's own stamp is notx.y.z.versionstaysdev, soby_hand.tsand the keeper'slive()never mistake an unstamped tree for a release.docs/APPS.md:FORGE_APP_RELEASEis added to the app environment table.
Tests. test/app-release-15497.test.ts builds a real repository with tags:
- main's tip past
v0.7.2resolves to0.7.2; - a tag on another branch is not counted;
- a commit with no tag below it, or a bad id, resolves to nothing;
- production gets the release in its environment and a preview does not;
- a stamped build's own version still wins;
- an unstamped server with
FORGE_APP_RELEASE=0.7.629answers/api/v1/healthwithrelease: "0.7.629"andversion: "dev".
That file and the related version, app-env, MCP-version, probe, status and health suites pass (129 tests), as do tsc --noEmit and the gate.
Not done here
- The fix reaches production only after the hosting forge runs a release that contains it. Production then reports
0.7.629, which passes #10304. #13042 still fails until a person cuts v1.0.0 (scripts/cut-release.ts), so the issue should stay open until the production probe passes. - The
keep_planandestimatetools were not available in this session, so no plan or estimate was recorded.
To try it: after the hosting forge picks this up, run curl -s https://lab--forge-trevato-apps.open-platform.sh/api/v1/health and look for "release":"0.7.629". Then run bun scripts/v1-proven.ts https://lab--forge-trevato-apps.open-platform.sh: the #10304 line should pass.
🤖 Generated with Claude Code
Production's /api/v1/health will now name release as the newest vX.Y.Z tag at or below the commit it runs. Until now it said release: null, and version still reads dev.
Where the gap was. The production in the issue's evidence is the app the forge runs at lab--forge-trevato-apps, at 1701de1 with version dev. The keeper does not run it. The forge itself (forge.open-platform.sh) is already stamped and reports release: "0.7.629". An app's tree is exported without its git history, so the app could not read its own tags. So this change is in src/apps/ rather than src/keeper/, which the issue expected. The keeper and release paths are untouched.
What changed
src/apps/release_at.ts(new):releaseAt(bare, oid)lists thev*tags reachable from the commit in the bare repository and returns the highestx.y.z, compared by number. It returns nothing for a commit below every tag, or an input that is not a commit id.src/apps/runtime_bringup.tsandsrc/apps/process.ts: a production deploy reads that release and passes it to the app asFORGE_APP_RELEASE. Only a validx.y.zis passed. A preview is never told one, because a pull is not a release.FORGE_*names are already reserved, so an operator variable cannot set it.src/kernel/version.ts:running()readsFORGE_APP_RELEASE, andreleaseOf()falls back to it only when the build's own stamp is notx.y.z.versionstaysdev, soby_hand.tsand the keeper'slive()never mistake an unstamped tree for a release.docs/APPS.md:FORGE_APP_RELEASEis added to the app environment table.
The gate's "pipeline first" rule failed the first push: the pull adds a feature and changes no pipeline file. The second commit has no file changes and carries the Direction: line the rule asks for. It names #15497 and says it goes ahead of #6534, because the 1.0.0 line cannot be proven while production reports release: null. The gate is now green locally. It still prints two notes, neither blocking:
- one long line in
src/apps/process.tsthat--fixdid not rewrap; - the test's small
githelper looks like the one intest/packs-up.test.ts.
Tests. test/app-release-15497.test.ts builds a real repository with tags:
- main's tip past
v0.7.2resolves to0.7.2; - a tag on another branch is not counted;
- a commit with no tag below it, or a bad id, resolves to nothing;
- production gets the release in its environment and a preview does not;
- a stamped build's own version still wins;
- an unstamped server with
FORGE_APP_RELEASE=0.7.629answers/api/v1/healthwithrelease: "0.7.629"andversion: "dev".
That file passes after the fix. With the related version, app-env, MCP-version, probe, status and health suites, 129 tests passed on the first push; those were not re-run, since the new commit changes no file. tsc --noEmit passes.
Not done here
- The fix reaches production only after the hosting forge runs a release that contains it. Production then reports
0.7.629, which passes #10304. #13042 still fails until a person cuts v1.0.0 (scripts/cut-release.ts), so the issue should stay open until the production probe passes. - The
keep_planandestimatetools were not available in this session, so no plan or estimate was recorded.
To try it: after the hosting forge picks this up, run curl -s https://lab--forge-trevato-apps.open-platform.sh/api/v1/health and look for "release":"0.7.629". Then run bun scripts/v1-proven.ts https://lab--forge-trevato-apps.open-platform.sh: the #10304 line should pass.
🤖 Generated with Claude Code
Approved. The change is small and sits in the right place: src/apps/release_at.ts reads the tags from the bare repo, guards the oid with isSafeOid, and runs no shell on user text. Only production is told a release, and only a validated x.y.z is passed. version stays dev, so the keeper never mistakes an unstamped tree for a cut. The tests build a real tagged repo and cover the tip, a side-branch tag, a commit below every tag, a bad oid, production versus preview, and /api/v1/health. No README change and no new dependency. It is not pipeline work, but it unblocks proving the 1.0.0 line and the Direction line says so. The preview cannot show the release, because a preview is deliberately never told one, so I judged it from the code and tests.
Two things I would do next:
- Rewrap the long FORGE_APP_RELEASE line in src/apps/process.ts and align the new docs/APPS.md table row with its neighbours.
- Reuse the existing git test helper instead of the near-copy in test/app-release-15497.test.ts, then after the hosting forge rolls out, run bun scripts/v1-proven.ts against production to confirm release 0.7.629.
Production's
/api/v1/healthwill now namereleaseas the newestvX.Y.Ztag at or below the commit it runs. Until now it saidrelease: null, andversionstill readsdev.Where the gap was. The production in the issue's evidence is the app the forge runs at
lab--forge-trevato-apps, at1701de1with versiondev. The keeper does not run it. The forge itself (forge.open-platform.sh) is already stamped and reportsrelease: "0.7.629". An app's tree is exported without its git history, so the app could not read its own tags. So this change is insrc/apps/rather thansrc/keeper/, which the issue expected. The keeper and release paths are untouched.What changed
src/apps/release_at.ts(new):releaseAt(bare, oid)lists thev*tags reachable from the commit in the bare repository and returns the highestx.y.z, compared by number. It returns nothing for a commit below every tag, or an input that is not a commit id.src/apps/runtime_bringup.tsandsrc/apps/process.ts: a production deploy reads that release and passes it to the app asFORGE_APP_RELEASE. Only a validx.y.zis passed. A preview is never told one, because a pull is not a release.FORGE_*names are already reserved, so an operator variable cannot set it.src/kernel/version.ts:running()readsFORGE_APP_RELEASE, andreleaseOf()falls back to it only when the build's own stamp is notx.y.z.versionstaysdev, soby_hand.tsand the keeper'slive()never mistake an unstamped tree for a release.docs/APPS.md:FORGE_APP_RELEASEis added to the app environment table.Tests.
test/app-release-15497.test.tsbuilds a real repository with tags:v0.7.2resolves to0.7.2;FORGE_APP_RELEASE=0.7.629answers/api/v1/healthwithrelease: "0.7.629"andversion: "dev".That file and the related version, app-env, MCP-version, probe, status and health suites pass (129 tests), as do
tsc --noEmitand the gate.Not done here
0.7.629, which passes #10304. #13042 still fails until a person cuts v1.0.0 (scripts/cut-release.ts), so the issue should stay open until the production probe passes.keep_planandestimatetools were not available in this session, so no plan or estimate was recorded.To try it: after the hosting forge picks this up, run
curl -s https://lab--forge-trevato-apps.open-platform.sh/api/v1/healthand look for"release":"0.7.629". Then runbun scripts/v1-proven.ts https://lab--forge-trevato-apps.open-platform.sh: the #10304 line should pass.🤖 Generated with Claude Code
Closes #15497