Public: anyone can read this; the crew can change it.
Production answers every page again: a database made before the Profile line gets its missing column, and a test fails when a migration is inserted anywhere but the end #148
Merged 28d 2h ago, live in production
Databases made before #138 now get their missing profile.line column, so production pages should stop returning 500. I haven't booted the app against an old database or checked production /. bun test on src/migrations.test.ts, src/db.test.ts and src/profile.test.ts passes.
-
Reviews
ApprovedClean. One migration appended at the tail; duplicate-column tolerance in migrate() covers databases that already have the column. The pin file hashes every entry by position and the test fails on edit, removal, move or mid-list insert. The pre-Profile-line test reproduces the version skew (the filtered list is shorter, so migrate runs the last two entries) and reads the agent. Preview / answers 200. Production / after merge cannot be verified from here.
-
Checks
shipped production is serving it deploy d2eada7
-
History
- Reword a migration comment that read as a hex colour (#146) 96456e5
- A database made before the Profile line gets its missing column, and a test pins every migration by position so a pull can only append (#146) 8f4a8e9
- Each deal carries the agent's commission rate, like 2.5%, and its page shows the commission it pays at closing, kept off the client timeline (#145) 169dd25
- This week, on the clock and the printed Monday sheet, shows each closing's time and place, like "Closing · 2:00 pm at Lakeside Title", so the week's closings are planned from one page (#144) 706c5ac
- The client timeline says under each open date what the buyer or seller does for it, like "Book your inspector this week", so the handout answers "what do I do now?" (#140) b57bd67
- The agent adds one line of their own on the Profile page, like "Text me anytime, I answer within the hour", and every new reminder draft carries it above the sign-off (#138) 601f210
- The Activity page downloads as a spreadsheet of who approved, declined or changed what, so a broker can file the record that a person approved every message (#137) 7cf6df7
- The clock opens with the agent's book in one line: open deals, dollars under contract, closing this month, and closed this year with its sales volume (#134) 7234c8c
- A deal's closing carries a time and a place, like "2:00 pm at Lakeside Title, 400 Main St", on its page, the client timeline, the closing reminders and the calendar file (#126) 6825d28
- A date marked done says the day it was done and whether that was early, on time or late (#132) 0bb7700
- Each deal says which side the agent represents (buyer, seller or both), set when it is opened, shown on the clock, and the clock can be narrowed to one side (#127) 4edae99
- Adding a party to a deal offers the people already on the agent's other deals, so a lender or title officer used before is picked, not retyped (#128) 91e82f9
- A party keeps both a phone and an email, and Send on a reminder offers Open in Mail and Open in Messages so the agent picks how it reaches them (#123) f920885
- Each deal carries its sale price and earnest money amount, shown on its page and the client timeline, and the earnest money reminder says how much is due (#121) b035e47
- Each date carries a short working note the agent keeps current, like "Appraisal ordered, AMC says Thursday", seen wherever the agent looks at that date (#119) c5b5b9f
- A reminder to a party with no email or phone on file lets the agent add one right on the review page, so Send reaches them (#116) 8ffcd95
- The deal's page shows when Owed by was changed on a date: from whom, to whom, by whom and on what day (#112) 49144bd
- A reminder held until tomorrow can be brought back to today with one tap, from the deal's page or the review page (#111) 03d78a2
- A reminder held until tomorrow comes back with the words the agent edited, not the default draft (#110) 33187a6
- A deal that falls through is marked Fell through with a reason, leaves the clock for the Closed list labelled so, and can be reopened (#106) d1c375c
2 earlier comments
Databases made before #138 now get their missing profile.line column, so production pages should stop returning 500. I haven't booted the app against an old database or checked production /. bun test on src/migrations.test.ts, src/db.test.ts and src/profile.test.ts passes. I did not run the whole suite or bun x tsc --noEmit: the repository has no tsconfig.json, so tsc has nothing to check. The repository has no scripts/gate.ts, and docs/VISION.md doesn't exist.
What changed
- The fix:
src/db.tsgets one new migration at the very end:ALTER TABLE profile ADD COLUMN line …. No earlier entry is touched, so production's recorded version still lines up with the current positions. On a database that already has the column,migrate()skips the error as a duplicate. #142's commission-rate column already sits at the end, so #142 will need to append after this entry. - Append-only rule: The comment above
migrationsnow says the list is append-only. - Pinned list:
src/migrations.pin.jsonholds a SHA-256 for each migration by position. The first test insrc/migrations.test.tsfails if an entry is edited, removed, moved or inserted before the tail. A later pull adds its own hash at the end of that file. - Pre-#138 test: The second test builds a database from the list as it stood before #138, with a saved profile row. It then runs
migrateandagentOfand expects the column to exist and the agent to read back. With thesrc/db.tschange stashed, both tests fail.
Not done
- Pre-#138 list: The test rebuilds it by filtering the profile-line and commission-rate entries out of today's list, rather than keeping a frozen copy of the old SQL. It reproduces the same version skew.
- Old-build boot: I didn't boot
d1c375cand then HEAD as the issue describes.
To try it
- Run
bun test src/migrations.test.ts. - After the merge, check that
/on production returns 200.
🤖 Generated with Claude Code
The preview failure is fixed. The design lint read "#138" in my new migration comment as a raw hex colour, so the test "the app spells out no colour but in its tokens" failed. I reworded the comment in src/db.ts and pushed. src/design.test.ts and src/migrations.test.ts now pass (7 tests); I didn't re-run the full suite here, so the forge's check on this push is the real confirmation.
Comments aren't hashed, so src/migrations.pin.json is unchanged and still pins every migration by position.
What changed (whole pull)
- The fix:
src/db.tsgets one new migration at the end,ALTER TABLE profile ADD COLUMN line …. No earlier entry is touched. A database that already has the column skips it as a duplicate. The comment abovemigrationsnow says the list is append-only. - Pin and tests:
src/migrations.pin.jsonholds a SHA-256 per position, andsrc/migrations.test.tsfails if an entry is edited, removed, moved or inserted before the tail. A second test builds a database from the list as it stood before the Profile line, with a saved profile row, then runsmigrateandagentOf. It fails on main today.
Not done
- The pre-Profile-line list is rebuilt by filtering today's list, not kept as a frozen copy of the old SQL.
- I didn't boot
d1c375cand then HEAD against the same directory. - There is no
tsconfig.json, sotsc --noEmithas nothing to check. - Production
/returning 200 after the merge is unchecked.
To try it
- Run
bun test src/migrations.test.ts. - #142 (commission rate) must append after this entry and add its hash to the pin file.
🤖 Generated with Claude Code
Left #146 open: 2 unticked items remain (A test fails when an existing migration is edited, removed or moved, or a new one is inserted anywhere but the end. For example, the test pins each existing entry by index (a checksum per position kept in the repository), so a later pull can only add at the tail. The comment above migrations says the list is append-only.; Production / answers 200 after the merge.).
Databases made before #138 now get their missing
profile.linecolumn, so production pages should stop returning 500. I haven't booted the app against an old database or checked production/.bun testonsrc/migrations.test.ts,src/db.test.tsandsrc/profile.test.tspasses. I did not run the whole suite orbun x tsc --noEmit: the repository has notsconfig.json, sotschas nothing to check. The repository has noscripts/gate.ts, anddocs/VISION.mddoesn't exist.What changed
src/db.tsgets one new migration at the very end:ALTER TABLE profile ADD COLUMN line …. No earlier entry is touched, so production's recorded version still lines up with the current positions. On a database that already has the column,migrate()skips the error as a duplicate. #142's commission-rate column already sits at the end, so #142 will need to append after this entry.migrationsnow says the list is append-only.src/migrations.pin.jsonholds a SHA-256 for each migration by position. The first test insrc/migrations.test.tsfails if an entry is edited, removed, moved or inserted before the tail. A later pull adds its own hash at the end of that file.migrateandagentOfand expects the column to exist and the agent to read back. With thesrc/db.tschange stashed, both tests fail.Not done
d1c375cand then HEAD as the issue describes.To try it
bun test src/migrations.test.ts./on production returns 200.🤖 Generated with Claude Code
Closes #146