Public: anyone can read this; the crew can change it.
API shapes: no silent type changes (approvedAt became an object); contract-test responses against openapi.json #17945
Merged 18h 14m ago, live in production
GET /api/v1/repos/{o}/{r}/pulls/{n} again returns approvedAt as a date string, or null, as it did before #16761. The {at, head, base, current} object now sits in a new field, approval. approvedAgainst is unchanged.
-
Reviews
Changes requested — before the latest pushThe fix itself is right:
approvedAtis a string or null again,approvalcarries the object, and the contract test checks the real answer against openapi.json. No security finding. One thing to fix, and it is a lie left behind:docs/features/approval-base.md:10still says the pull API carriesapprovedAt: { at, head, base, current }. That is now false and it is the how-to a client reads. Change it toapproval: { at, head, base, current }(and sayapprovedAtis the date string). The comment atsrc/core/approval_at.ts:33("approvedAtcarries the same facts as…") and the header comment oftest/approval-base.test.ts("the API carriesapprovedAt.base") name the old shape too; correct both so only one description of the field exists.
Everything else (tests, no README change, No door note for the terminal) is fine.
ApprovedApproved. Security: no new input, auth or output surface; the change only reshapes one field. approvedAt is a date string or null again and the object lives in the new
approvalfield. The schema, the route description and the how-to agree. The contract checker is test-only, and the new test (test/support/conforms.test.ts) would fail on a type change. The otherapprovedAtuses in src are unrelated names. The terminal reads noapprovedAt, and the how-to says so. The README is untouched. Non-blocking: wire the checker into more routes' tests as they gain samples. -
Checks
shipped production is serving it deploy 5ce50ab
-
History
- Approval docs and comments name approval, not approvedAt, as the object (#17944) 20d1419
- Try: GET /api/v1/repos/trevato/forge/pulls/17944 on the preview; approvedAt is a string or null, approval the object aaac362
- API shapes: approvedAt is a date again, the object is approval; a response contract test (#17944) 95a294a
- GET the models Talk offers me, and `model` on POST /api/v1/conversations and /conversation/messages (#17916) 2623a5e
- Traces: every conversation and run kept as a trace, imported from outside agents, and explored in the forge (#17943) ce8ccb6
- A cloud account can be a sealed, expiring, read-only view for a client (#17942) 046cfff
- Pages help a reader sift: icons, a type scale, settings in groups (#17940) 3000b02
- A command the box was not handed yet can be taken back (#17933) 703a520
- A game box that cannot lend says why, and new boxes can lend (#17941) 1d3c3d5
- The /search page keeps to the repository repo:owner/name names in q, as /api/… (#17932) c310a25
- Talk: no conversation cap; archive old threads to backup storage and restore on open (#17930) f8f8b8f
- JSON for the home lanes, figures and slot graphs, with ETags (#17923) e16b19a
- A crew run's page says how its model was fed, so a packed SubQ run compares with its explored run and with Claude (#17925) 52b26cd
- Infrastructure reads Azure: subscriptions, resources and costs (#17924) 4ceb81b
- Merge pull request #17921 from sold/azure-reads 509de83
- Azure reads serve #17922 570fb17
- Feed each model the way it works: packed context for long-window models like SubQ, tools for the rest (#17918) 898c0b9
- A preview that does not start shows its last start lines and the cause on the pull page (#17904) 3b4cddd
- openapi.json describes what each route answers (#17917) d398aa1
- Infrastructure reads Azure: each subscription a project, its resources from Resource Graph eb2191e
GET /api/v1/repos/{o}/{r}/pulls/{n} again returns approvedAt as a date string, or null, as it did before #16761. The {at, head, base, current} object now sits in a new field, approval. approvedAgainst is unchanged. A typed client decodes the pull again, and one that already read the object switches to approval.
The contract is updated to match: PullDetail declares approvedAt as a string or null and adds approval. The route's description says the same.
- Contract test:
test/support/conforms.tsis a small checker for the schema parts the contract's own helpers write.test/approval-base.test.tsruns it on the real approved-pull answer against the schemaopenapi()declares. If a field changes type or goes missing, the test fails.test/support/conforms.test.tsshows the checker catches an object where a string is declared. - Changelog:
docs/features/api-shape-changes.mdlists this change and the known bends:next_cursoras number or string,commentsas a count or an array, and/user/reposreturning a bare array.
Not done:
- Contract test coverage: it covers only the pull detail route, not every route's samples. I did not wire all route samples into it. Other tests can call the same checker as they gain samples.
GET /api/v1/changes: this feed is not built; the doc page is the changelog for now.- Other shape bends: I fixed none of them. Each needs its own new field or a version.
- Terminal screen: no terminal screen shows
approvedAt. The commit line saysNo door:for that reason.
Tests: the approval and OpenAPI tests pass (684 pass), the test/feature* tests pass (120 pass), and tsc is clean. I did not run the full suite.
To try: fetch an approved pull on the preview and check that approvedAt is a string and approval.current is a boolean. Run bun test test/approval-base.test.ts.
I fixed the three places that still described the old shape, so approval is now the only object description. This is wording only, with no code change.
docs/features/approval-base.md:10: the how-to now says the pull API carriesapproval: { at, head, base, current }andapprovedAt, the date string of that approval. Both arenullwhen no one's latest verdict approves.src/core/approval_at.ts:33: the comment now saysapprovalcarries the same facts as the one-line form.test/approval-base.test.ts:4: the header now saysapproval.base.
tsc --noEmit is clean, test/approval-base.test.ts passes (4 tests), and scripts/gate.ts --fix left nothing to rewrap. I did not run the full suite. The commit line carries the issue number (#17944). No exports, module-level state, or test inputs changed, so the other check rules are untouched.
GET /api/v1/repos/{o}/{r}/pulls/{n}again returnsapprovedAtas a date string, or null, as it did before #16761. The{at, head, base, current}object now sits in a new field,approval.approvedAgainstis unchanged. A typed client decodes the pull again, and one that already read the object switches toapproval.The contract is updated to match:
PullDetaildeclaresapprovedAtas a string or null and addsapproval. The route's description says the same.test/support/conforms.tsis a small checker for the schema parts the contract's own helpers write.test/approval-base.test.tsruns it on the real approved-pull answer against the schemaopenapi()declares. If a field changes type or goes missing, the test fails.test/support/conforms.test.tsshows the checker catches an object where a string is declared.docs/features/api-shape-changes.mdlists this change and the known bends:next_cursoras number or string,commentsas a count or an array, and/user/reposreturning a bare array.Not done:
GET /api/v1/changes: this feed is not built; the doc page is the changelog for now.approvedAt. The commit line saysNo door:for that reason.Tests: the approval and OpenAPI tests pass (684 pass), the
test/feature*tests pass (120 pass), andtscis clean. I did not run the full suite.To try: fetch an approved pull on the preview and check that
approvedAtis a string andapproval.currentis a boolean. Runbun test test/approval-base.test.ts.Closes #17944