Skip to content

fix(host): settle claims about outside systems - #504

Draft
aicayzer wants to merge 5 commits into
mainfrom
fix/settle-outside-claims
Draft

aicayzer wants to merge 5 commits into
mainfrom
fix/settle-outside-claims

Conversation

@aicayzer

@aicayzer aicayzer commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The connector host no longer reads a start-sequence record that holds only a version, and the comments that rested on unchecked claims about outside systems now name what was read or measured on 2026-12-04. No connector behavior changes.

Closes #497
Closes #498
Closes #500

Changes

  • host/src/start-sequence.ts: removes the bare-version branch of readMintRecord. Such a record now reads as lost, like any record that cannot be parsed. host/test/supervisor.test.ts gains a case for it, and two tests that wrote a bare version as a valid record now write the JSON record.
  • kit/src/thumbnails.ts and its test: the CMYK/YCCK claim is checked and the heap of the jpeg-js fallback is measured (below). A new test pins that @jsquash/jpeg still refuses the four-ink fixtures, so a later version that can read them fails it and shows the fallback can go. maxInkJpegPixels stays at 16,000,000.
  • connectors/google-calendar/src/api.ts, write.ts: cite Google's errors guide and conditional-modification guide for the 409 and 412 answers; the 400 is marked as undocumented.
  • connectors/todoist/src/todoist.ts: cite the Command UUID and completed-tasks pages.
  • connectors/github/src/transfer.ts, read.ts and scripts/proof/github-stub.ts: cite what GitHub documents about a transfer and name what is assumed.

Testing

  • host/test/supervisor.test.ts (58 tests) and kit/test/thumbnails.test.ts (68 tests) pass. The new bare-version case fails on main's start-sequence.ts and passes with the change.
  • pnpm build, pnpm typecheck, eslint on every touched file, prettier --check . and scripts/check-comments.ts pass.
  • JPEG measurements (Node 26.13.1, jpeg-js 0.4.4, @jsquash/jpeg 1.6.0, CMYK/YCCK JPEGs made with ImageMagick, 4:4:4): mozjpeg refuses the repository's CMYK and YCCK fixtures with "Unsupported color conversion request". A jpeg-js decode peaks at about 13 bytes a pixel: 208 MB at 16 MP (4000 by 4000) and 323 MB at 25 MP, and the 16 MP decode fails under --max-old-space-size=192 and passes under 224. Under the host's 512 MB heap the 16 MP cap leaves about 2.4 times headroom, so it stays. The pinned Node 26.14.0 was not installed here, so the numbers come from 26.13.1.
  • Not tested: the Google Calendar, Todoist and GitHub answers against a live account, which this work was told never to use. The vendor claims were settled from documentation only.

Notes for reviewers

Verdicts for the issues that stay open:

  • Google Calendar: the errors guide and the conditional-modification guide document 409 (duplicate, "an instance with the given ID already exists") and 412 (conditionNotMet, for a stale If-Match, including delete). They do not say a deleted event's id answers 409, though events.get always returns a cancelled event, and they do not name events.move. They say nothing about a 400 for restoring a piece of a split series. That 400 needs a live check with a test calendar.
  • Todoist: documented. A command whose UUID a successful command already used is skipped and answers ok, UUIDs are kept at least 14 days, and the completed-tasks endpoint takes a range of up to 3 months. The 84-day window fits.
  • GitHub: documented are the 301 on the old issue address, comments being kept, the TransferredEvent and the issues.transferred delivery. REST lists only 404 for an old comment address, which matches what the code does (it asks the issue, not the comment). Not documented: that comment copies get new nodes and keep their old times, and how long the new issue lags before its TransferredEvent appears (transferWindow). Those need a live transfer between two test repositories.

Review depth: comments, one removed branch and one pinning test. Light review.

Checklist

  • The title is a scoped Conventional Commit.
  • New behavior has a test that was seen failing first, or no test was needed and the reason is above.
  • Docs, comments and the contract still say what is true after this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant