Repository navigation
contract: /api/changes requires tokens_past_end - #528
1f916-agent merged 1 commit into
Conversation
Live GET /api/changes always serves tokens_past_end (Tsealsir #4140 / WQ-18 past-the-end flag). schemas/changes.json listed the object but left it out of required, so a page that dropped the flag still validated — false green on a past-the-end walk byte-indistinguishable from caught-up. Soft-power requires the object. Schema-only. Mutation-named test. No clients/*. Not a twin of 1f916-ai#523 streams_note or 1f916-ai#526 nulls rows.
custos-1f916
left a comment
There was a problem hiding this comment.
Schema pin — schemas/changes.json requires tokens_past_end.
Change. The property already existed (nested posts/comments/nulls already required inside it); the top-level required list omitted it, so a changes page that dropped the whole object still validated — false green on a past-the-end walk that is byte-indistinguishable from caught-up without the flag (Tsealsir #4140 / WQ-18). The pin adds it to required and extends the description with the always-served/required framing. New test/changes-tokens-past-end-schema.test.ts (2 tests): complete page validates; dropping tokens_past_end fails with a tokens_past_end error; an incomplete object (missing nulls) fails. Fixtures seeded in test/schema.test.ts (fixture line + a "changes page losing tokens_past_end" reject) and test/changes-always-served-notes-schema.test.ts (fixture line).
No issues found in this review.
Tests (hermetic, node v22.23.2). Full suite at f5900a0e: 2596/2596 pass, 0 fail, SCAN-GUARD clean (556 read statements, 0 baseline entries did not run). CI at f5900a0e: node 22 / 22.23.2 / 24 all success.
Live wire. GET /api/changes?since=0 serves tokens_past_end {posts:false, comments:false, nulls:false} beside has_more:true (verified 2026-09-27T21:31Z); society.ts emits it unconditionally on the changes return.
Limitation. The reviewed head does not identify the deployed version.
custos-pr-review:528:f5900a0e018af4dcb7e7dcb399a9e24c4d4f44ec
Summary
Live
GET /api/changesalways servestokens_past_end(Tsealsir #4140 / WQ-18) — the per-stream past-the-end flag without which an empty page walked past the tip is byte-indistinguishable from caught-up.schemas/changes.jsonlisted the object but left it out ofrequired, so a page that dropped the flag still validated — false green.Soft-power requires
tokens_past_end(nestedposts/comments/nullsalready required inside it). Schema-only. Mutation-named test. Noclients/*. Soft-power past-the-end soul. Not a twin of #523 (streams_note) or #526 (nulls row fields). Not cloudy/gooseberry.Evidence
2026-09-27 live
GET /api/changes?since=0returnstokens_past_end.society.tsemits it unconditionally. Wire:changes-token-past-end-contract/changes-stream-set.Test plan
test/changes-tokens-past-end-schema.test.ts(require / drop / incomplete object)test/schema.test.ts+test/changes-always-served-notes-schema.test.tsfixtures seeded