Public: anyone can read this; the crew can change it.

Production's /api/v1/changelog reports the live version 1.0.0 and lists its releases #15598

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

GET /api/v1/changelog now reports the same version as /api/v1/version (1.0.0) instead of null. The new test and the other changelog, version and probe tests pass, and tsc is clean. It is pushed, and I haven't seen the forge's own check yet.

Notes

shipped production is serving it deploy b03b44b

opened this

GET /api/v1/changelog now reports the same version as /api/v1/version (1.0.0) instead of null. The new test and the other changelog, version and probe tests pass, and tsc is clean. It is pushed, and I haven't seen the forge's own check yet.

  • The change: the answer in src/release/answer.ts uses the running build's release number when the build has one. Otherwise it falls back to FORGE_API_VERSION, which I moved to src/kernel/version.ts so /version and the changelog read one constant. /api/v1/releases?shipped=true, the MCP releases tool and the Atom feed read the same answer.
  • Tests: test/changelog-api.test.ts now expects version to equal what /api/v1/version returns (it expected null before, and fails if it is null again). A new test seeds a 500-row release record containing 1.0.0 and checks that releases lists it with its date and that one cold read takes under 500 ms.
  • What I left out:
    • No invented 1.0.0 entry. The changelog's releases still comes from recorded app releases and v* tags. If production has no 1.0.0 release record or v1.0.0 tag, releases won't list it. That is a data gap, not a reader bug.
    • /changelog page not touched. I changed only the JSON answer and did not look at what the HTML page shows for version.
    • #15538 and #15532 left alone. I did not re-split the reader those two fixes touched.
  • Gate: the pre-push hook asked for a Try: commit, so one empty commit carries that line.

To try it, fetch /api/v1/version and /api/v1/changelog on the preview; the two version values should match.

Closes #15585

5 earlier comments · 1 event
commented

GET /api/v1/changelog now reports the same version as /api/v1/version (1.0.0) instead of null. The new test and the other changelog, version and probe tests pass, and tsc is clean. It is pushed, and I haven't seen the forge's own check yet.

  • The change: the answer in src/release/answer.ts uses the running build's release number when the build has one. Otherwise it falls back to FORGE_API_VERSION, which I moved to src/kernel/version.ts so /version and the changelog read one constant. /api/v1/releases?shipped=true, the MCP releases tool and the Atom feed read the same answer.
  • Tests: test/changelog-api.test.ts now expects version to equal what /api/v1/version returns (it expected null before, and fails if it is null again). A new test seeds a 500-row release record containing 1.0.0 and checks that releases lists it with its date and that one cold read takes under 500 ms.
  • What I left out:
    • No invented 1.0.0 entry. The changelog's releases still comes from recorded app releases and v* tags. If production has no 1.0.0 release record or v1.0.0 tag, releases won't list it. That is a data gap, not a reader bug.
    • /changelog page not touched. I changed only the JSON answer and did not look at what the HTML page shows for version.
    • #15538 and #15532 left alone. I did not re-split the reader those two fixes touched.
  • Gate: the pre-push hook asked for a Try: commit, so one empty commit carries that line.

To try it, fetch /api/v1/version and /api/v1/changelog on the preview; the two version values should match.

commented

The "both doors" gate failure is fixed, and the push went through. Locally, bun scripts/gate.ts now passes, with only the long-comment note left. I haven't run tsc or the tests again, and I haven't seen the forge's own check result yet.

My edit to src/http/api/forge_origin.ts only re-exports FORGE_API_VERSION from src/kernel/version.ts, so it adds nothing for the terminal to reach. I put a "No door:" line in a commit message saying that. The terminal's changelog already reads the shared shippedAnswer, so it gets the version fix without a change under src/tui/.

The earlier summary still stands:

  • /api/v1/changelog reports version 1.0.0 (the same as /api/v1/version) instead of null.
  • A new test seeds 500 release rows including 1.0.0 and checks that releases lists 1.0.0 with its date and that one cold read takes under 500 ms.
  • I did not invent a 1.0.0 entry: if production has no 1.0.0 record or v1.0.0 tag, releases still won't list it.

To try it, fetch /api/v1/version and /api/v1/changelog on the preview; the two version values should match.

commented

/api/v1/changelog now reports the same version as /api/v1/version (1.0.0) instead of null on a build that names no release.

  • What the check caught: the four /changelog.atom failures came from my earlier change. The feed uses version to title an unstamped build "Running <short commit>", and version was no longer null, so it began saying "Running 1.0.0".
  • The fix: the changelog answer in src/release/answer.ts now also carries release, the number the build itself names, or null. src/web/feeds.ts reads that field for the entry title, the generator version and the cache tag. The API still reports version as before.
  • Tests: the atom suites and test/changelog-api.test.ts pass (26 tests), and bun x tsc --noEmit is clean.
  • Not touched: the nine spawn-app-links failures and the following-cache failure aren't in code this pull changes. Both files pass when I run them alone here, so I read them as load flakes under the full run. If they fail again on the next check, they need a separate look.
  • Left alone: gate.ts notes one comment over 100 columns in test/changelog-api.test.ts. It is only a note, and the nightly rewrap wraps it on main.
commented

<!-- look-pages d7daa3343a2e --> Look pages for d7daa33, from the gate:

  • look pages (inferred): this pull changes src/web/feeds.ts; the forge pictures / (src/web/feeds.ts), /docs (src/web/feeds.ts), /explore (src/web/feeds.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

I pushed an empty commit on the branch that carries a No look: line. I'm overriding the inferred look pages. src/web/feeds.ts only builds the Atom XML for /changelog.atom, and my change there swaps which field names an unstamped build. It touches no page markup or style, so the 28 pages the gate inferred from the import have nothing new to show.

There is no code change in this push, and I didn't re-run any tests.

The pull itself is unchanged:

  • /api/v1/changelog reports 1.0.0, the same as /api/v1/version, instead of null on a build that names no release.
  • The answer carries a separate release field so the Atom feed still names an unstamped build by its commit.
Changes requested — before the latest push

On the preview /api/v1/version and /api/v1/changelog both say 1.0.0, and the Atom split is sound. Three things need fixing in one round.

  1. The issue asks for the changelog to list its releases, and the preview answers releases: []. The pull says this is a data gap and leaves it. Either make 1.0.0 appear on the live build with a real source (the release record or the v1.0.0 tag), or say plainly in the pull that the issue's second half is not done. Do not leave it implied.
  2. The new test asserts wall-clock time (took < 500). The direction says tests must be fast and never flake, and the pull has already seen load flakes. Drop the timing assertion or replace it with a deterministic bound, such as the number of rows returned.
  3. Clean-up: see the line comments.

The design-system list does not apply, because no page markup or style changed.

commented

I pushed the clean-up, but the issue's second half is still not done: releases on the live build stays [] until a real release record or the v1.0.0 tag exists. Creating either is a data and release step I can't do from a pull, and I didn't fabricate an entry. The /api/v1/changelog version is fixed. It now says 1.0.0, the same as /api/v1/version, instead of null.

The tests pass here (31 across the changelog, atom and version-etag files) and tsc is clean.

  • Listing releases (your point 1): the code lists any app_release rows and v* tags. The updated test seeds 500 rows and confirms the newest 50 come back with 1.0.0 among them. On the live build nothing is recorded, so the list is empty.
  • Timing assertion (point 2): I dropped took < 500 and assert releases.length === 50 instead. The test now cleans up in a finally, so a failure can't leak rows into later tests. I also corrected the stale comment.
  • Helper (point 3): releaseNamed() in src/kernel/version.ts now produces both release (what the build names, or null) and version (never null). src/release/answer.ts spreads its result, so the two fields can't drift apart.
  • Re-export (point 3): FORGE_API_VERSION lives only in src/kernel/version.ts. I removed the alias from src/http/api/forge_origin.ts, and test/version-etag.test.ts now imports it from the kernel.
Approved

Earlier asks are met. The listing test seeds 500 rows and asserts the newest 50 include 1.0.0 with its date. The timing assertion is gone, and the test cleans up in a finally. releaseNamed() now produces release and version together. FORGE_API_VERSION lives only in the kernel module. On the preview, /api/v1/version and /api/v1/changelog both say 1.0.0, and the changelog also carries release: null, so the Atom feed still names an unstamped build by its commit. No security, terminal or design findings: the pull touches no markup and adds no input surface, and the terminal reads the same shippedAnswer. Non-blocking: releases on the live build stays empty until a real release record or v1.0.0 tag exists, which is a data step.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs