Skip to content

docs(sdk): the tables skill stops naming a createdAt index that list's types refuse - #1418

Merged
allisonmahmood merged 1 commit into
mainfrom
docs/tables-created-at
Nov 12, 2026
Merged

allisonmahmood merged 1 commit into
mainfrom
docs/tables-created-at

Conversation

@allisonmahmood

Copy link
Copy Markdown
Owner

What changed

The tables skill told builders that a list comes back newest first "on the built-in createdAt index", and gave a createdAt range "on the built-in index". At runtime, index: "createdAt" works. But ListOptions only accepts a declared index or a ref column there, so a builder who passes it gets a type error. Both sentences now describe leaving index out, which is what the types allow and what the runtime does by default.

Found by the acceptance check on #1249.

Look at

packages/sdk/skills/patchy-tables/SKILL.md, the "Indexed pages" section, two sentences:

  • The range example: "With an index, equality must cover its leading columns; at most one trailing column can have a range. Without one, rows are listed by createdAt, which takes a range such as range: { column: "createdAt", gte: … }."
  • The list order: "Its default depends on the index: newest first without an index, ascending by the columns of a declared index or a ref."

This is what the types say about the three forms. I compiled each one against ListOptions with effect-tsgo and then deleted the scratch file:

omitted:  { range: { column: "createdAt", gte: "2026-01-01T00:00:00.000Z" } }   compiles
declared: { index: "byDone", eq: { done: false } }                            compiles
named:    { index: "createdAt" }
  error TS2322: Type '"createdAt"' is not assignable to type '"byDone"'.

How it was verified

  • Format, plus the SDK tests that read the skills (install, FrontDoor, SdkApi): 34 pass.
  • The type check above, on this branch.

Release impact

  • Breaking — requires action from anyone already running this

  • Not breaking — the text of one release-bound skill; no code changes.

  • What does a revert leave behind? Nothing. The skill goes back to its old wording when a repo next refreshes.

  • Does the release before it still work with that? Yes.

Claude Opus 5.5 in Claude Code, through T3 Code.

…s types refuse

The list-order paragraph said rows come newest first "on the built-in
`createdAt` index", and the range example said "on the built-in index".
The runtime accepts `index: "createdAt"`, but `ListOptions` admits only a
declared index or a ref there, so a builder who passes it gets TS2322.
Both now describe leaving `index` out, which is what the types allow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added area:server Touches the server area area:docs Touches the docs area size:s Under 100 changed lines labels Nov 12, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

Checked 89632d6d6012810fcd95d9fe6d6bb188299399af (base 3a43a842e75febd9e16b28ad879ae360bdaa8174) on fresh, isolated Postgres and PGlite indexed-page fixtures, by GPT-6.1-sol in the Codex harness through T3 Code.

Done means

  • Default order: passed. On both backends, omitting index returned new-b, new-a, boundary, old by descending creation time and id. A declared index with eq: { done: false } returned the oldest matches first; order: "desc" returned the newest. A compound index sorted by its columns, then id. Automatic ref indexes sorted ascending by the ref, then id; explicit descending reversed the equal-ref matches. The existing UUIDv7 contract also passed.
  • Range without an index: passed in types and runtime. Compiling against this head with effect-tsgo accepted { range: { column: "createdAt", gte: "2026-01-01T00:00:00.000Z" } }, declared indexes and automatic refs. Expected-error assertions confirmed that naming an undeclared index: "createdAt" and using a numeric timestamp bound are rejected. On both backends, the documented range excluded the pre-cutoff row, included the boundary, and continued correctly through a two-row page and cursor. Leading-column equality and a range on the next compound-index column worked; missing prefixes were refused.
  • Documentation agreement: passed. The paragraph agrees with the generated AGENTS.md template in packages/patchy/src/initProject.ts, the tables skill's own example, the descending byDone example in patchy-server, and the creation-time/id default in patchy-shared-tables. The implementation confirms the documented page defaults (100; maximum 1,000).

Golden journeys

  • Use a tool live / use a tier 2 tool, table-read portion: passed. Existing TableOperations, FrontDoor and SdkApi suites: 36 tests passed. Separate temporary acceptance checks covering the changed guidance: 2 tests passed, one per backend. These exercised real runtime handlers and disposable databases; browser interactions were outside this documentation-only diff.
  • Changed-file formatting and diff whitespace checks: passed. No tracked files changed during acceptance. Test fixtures cleaned up their databases.

Rollback answers: Match the diff. This changes only release-bound guidance; a revert restores the previous wording without leaving schema, data, infrastructure or wire changes. No one-way label is needed. CI's rollback-rehearsal check passed.

Not run

  • Full local verification and manual browser/authentication journeys: outside the scope of this two-sentence documentation correction; focused runtime, type and SDK checks cover its claims.

Notes

  • All requested claims passed. At the final CI snapshot, test (22), test (24), test (26) and browser were still running; no checks were failing. This acceptance verdict does not claim those unfinished jobs passed.

@allisonmahmood
allisonmahmood merged commit be36070 into main Nov 12, 2026
26 checks passed
@allisonmahmood
allisonmahmood deleted the docs/tables-created-at branch November 12, 2026 13:29
allisonmahmood added a commit that referenced this pull request Nov 12, 2026
…ey shortcuts (#1421)

## What changed

This adds release 42's What's new entry, written from `1cd6d12`. It
covers everything merged since release 41's `through` (`a25a9c5`), and
sets the `patchy` release to `0.42.0` in `packages/patchy/package.json`
and `CURRENT_RELEASE`.

| Change | PRs |
| --- | --- |
| New: Tell Patchy what it's missing | #1217, #1218, #1219, #1227, #1228
|
| New: Turn off single-key shortcuts | #1276, #1279, #1301 |
| Fixed: Typing reaches the patch again | #1407, #1412 |
| Fixed: Dialogs in patches keep your place | #1420, #1255 |
| Behind the scenes: plainer facts for agents building patches | #1249,
#1256, #1297, #1418 |
| Behind the scenes: Patchy stores teams and audiences ahead of teams |
#1416 |
| Patch changes: Mod+/ and `client.close()` in patchy/hotkeys;
single-key shortcuts can be off; Tab wraps in plain modal dialogs |
#1279, #1301, #1420 |

#1376 is release 41's own entry. #1400, #1406, #1414, #1415, #1302,
#1413 and #1419 are test, CI and dev tooling and need no line.

The teams bridge (#1416) ships alone in this release so teams (#1417)
can follow in the next one with a release to roll back to that reads its
data closed.

## Look at

- **The entry**, at the top of `releases` in
`packages/core/src/whatsNew.ts`.
- **Rollback safety, from the live commit `7f93b91` (release 41) to this
PR's merge.** No PR in the range is labelled `one-way`, and every
Release impact answer says release 41 still works:
- **#1217** adds migration `0037_feedback`, a schema release 41 never
reads. **#1227** and **#1228** write into it.
- **#1276** adds migration `0038_single_key_shortcuts`, a column with a
default that release 41 never selects.
- **#1416** adds migrations `0039_company_teams` to
`0041_connection_audiences`, which hold tables that stay empty until
teams ship, and widens one scope check. Its CI rehearsal ran `7f93b91 →
head → 7f93b91 → head` on one set of data, and all four steps passed.
- **#1279**, **#1301**, **#1255** and **#1420** change the SDK and the
shell. Patches built on this release carry a `shortcutSetting` manifest
field that release 41 reads without refusing, and its shell names no
frame, so every shortcut stays on.
- **#1218** and **#1219** add CLI commands and an optional
`feedbackHint` in `--json` failures. A CLI from this release refuses to
publish to an older instance before sending anything, as any mismatched
release does.
  - Everything else is skill text, docs, tests and CI.

If this release misbehaves, roll back to `7f93b91` (release 41).

Written by Claude Opus 5.5 in Claude Code, through T3 Code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Touches the docs area area:server Touches the server area size:s Under 100 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant