From fbc2da34557229774fee983afb5177bf25319dec Mon Sep 17 00:00:00 2001 From: Erik Hjelm Fjeldheim Date: Wed, 4 Nov 2026 13:44:50 -0600 Subject: [PATCH] docs: record the M4 quality work in the AI usage log Four rows for #21, #22, #30 and #76, each naming what the tool got wrong or what a person overruled: the PATH assumption in the first CI run, the inconvenient paging result that a composite index experiment explained, the fixture operation that would have shipped in the bundle, and the Date/string mismatch the crate paging test caught. --- docs/AI-USAGE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/AI-USAGE.md b/docs/AI-USAGE.md index 7cb270d..bcc93bf 100644 --- a/docs/AI-USAGE.md +++ b/docs/AI-USAGE.md @@ -75,6 +75,10 @@ the part that matters most. | 2026-10-28 | evenkkl | Claude | #12, review fixes on #66. Robert asked for an up-to-date branch, a correct README and green CI. Claude merged main, renumbered our migration to `0003` after #63's `0002`, kept both sides of the other conflicts, fixed a duplicate import from the merge, updated the README status sections and added the sort control to the Load more keyboard test. I checked the diff against main contains only our sorting work and these fixes. | | 2026-10-28 | evenkkl | Claude | #13 review fixes on PR #65: merged main (infinite scroll), resolved conflicts, added a Filters button for small screens and reconciled the README. Even settled the open review questions and updated the issue text. | | 2026-10-29 | evenkkl | Claude | #13 second review round on PR #65: merged main (sorting), selected filters stay in the facets, Filters dropdown on all screens, PostgreSQL tests for AND/OR and facet counts, doc wording. Even chose the dropdown layout. | +| 2026-11-04 | erikhfj | opencode | #21, the PostgreSQL tests in CI. The first attempt failed in 12 seconds with `initdb: command not found`: the VM has PostgreSQL 18, but Debian keeps the server binaries in `/usr/lib/postgresql//bin` and only the client on `PATH`. Fixed by discovering the newest installed major version instead of hardcoding a path. Also wrote `assert-postgres-tests.mjs` after realising a temporary cluster alone only moves the failure from "suite skipped" to "suite silently empty", and checked it against a deliberately broken run: it reports the three skipped suites and exits 1 | +| 2026-11-04 | erikhfj | opencode | #22, scalability measurements at 100,000 and 1,000,000 albums. The tool produced tidy numbers that hid an inconvenient result: cursor paging was only ~3x faster than `OFFSET`, because no index supports the sort key and both approaches scan and sort. I ran the extra experiment with a composite `(lower(title), id)` index, saw the page drop from 295 ms to 0.09 ms, and documented the missing index as a follow-up rather than quietly claiming cursor paging is constant time. Also corrected an earlier claim in the README that every prefix query uses the GIN index: at 1M a broad prefix is planned as a sequential scan, and it should be | +| 2026-11-04 | erikhfj | opencode | #30, GraphQL codegen. Caught two things the first draft got wrong: a fixture operation in `CrateButton.test.tsx` was being plucked into the document map and would have shipped in the bundle, and `DateTime` had no scalar mapping so `createdAt` became `unknown`. Verified the acceptance criterion by renaming `averageRating` in the schema and watching `pnpm build` fail with the suggested field name, then restoring it. Measured the bundle (418 kB raw) instead of assuming the generated document map was free | +| 2026-11-04 | erikhfj | opencode | #76, `myCrate` and the crate page. The paging test caught a type mismatch I would have missed by reading: `crate_item.added_at` is a `Date` column while `review.created_at` is in string mode, so the cursor had to rebuild a `Date`. The axe run caught a heading-order violation (page h1 straight to the card h3) that the markup looked fine without. I chose the empty-connection behaviour for anonymous requests myself and wrote it into decision 5 rather than leaving it implicit | ## Notes