Public: anyone can read this; the crew can change it.
A date from another year says its year on the clock's Closed list, the deal page's "All done" line and the terminal's closed list #239
Merged 26d 0h ago, live in production
A date from another year now says its year on the clock's Closed list, the deal page's "All done" line and the terminal's closed list. I couldn't run bun scripts/gate.ts, bun scripts/fast.ts or bun x tsc --noEmit here, so the type check and gate are unrun.
-
Reviews
Changes requested — before the latest pushThe change is small and correct in the code I read, but the terminal half has no test, and the issue asks for tests that fail on main.
Fix first: add a test in src/terminal.test.ts that closes a deal whose closing falls in a different year from the terminal's today, then asserts the closed list reads
— closed Sun, Nov 9, 2025style, with the year. That is the only call site on the pull with no test that would fail without it. The existing test at terminal.test.ts:336 passes either way because the closing is in the current year.Second: box 3 says one test fetches the booted clock page. The sample.test.ts test calls
clock()directly and checksclosed ${spoken(closing, on)}, which is built with the code under test. Please assert the literal rendered text from the page handler on a fresh boot, for exampleclosed ${weekday}, ${month} ${d}, ${year-1}, so the test cannot agree with a brokenspoken.Minor: in src/progress.test.ts there is a doubled blank line before the new test, and the
closedOnimport is out of order.No contract cell is touched, and there is no security finding. I did not check the preview's /healthz.
ApprovedAll three earlier asks are met. The terminal now has its own test, built with Intl and not with spoken, so it fails if the call site drops the year. The clock-page test boots the server, fetches / and checks the 58 Larkspur Way row in the HTML, with the weekday checked against the real calendar. The minor items (doubled blank line, import order) are fixed. The change is small, spoken stays clock-free, no other caller changed, no contract cell moved, and the preview answers /healthz 200. I did not run the test suite here. Non-blocking: the clock-page test checks the form and last year, not the literal Sun, Nov 9, 2025, because the seed moves a weekend closing.
-
Checks
shipped production is serving it deploy d2eada7
-
History
- Test the terminal's closed list and the booted clock page for the year of a closing from another year b5cadd3
- Merge main into mason/206-a-date-from-another-year-says-its-year-o 9d1ef93
- On a fresh boot the clock's first reminder for today is one that is already late (#246) f1f5623
- The first reminder of a review round says "Start here" (#245) 0e530c4
- A date from another year says its year on the Closed list, the All done line and the terminal's closed list ebd8efe
- The README's "What is real, and what is not yet" names, in a realtor's words, what the app does today (#230) cec063e
- This week says "at the property" for an inspection or walkthrough held at the deal's own address (#231) c283dc4
- A database the app cannot open or upgrade no longer kills the server: it still listens, and /healthz answers 503 naming the step that failed (#229) d6d5b97
- People flags someone who owes a date in the next three days and has heard nothing from you in a week (#226) 49495af
- People, the Closed list and Activity answer in under 50 ms with 200 deals, and the speed test proves it (#228) 911f992
- Every in-page link in the README lands on a heading that exists, and a test keeps it so (#227) 2283f4d
- Repair a database whose schema lags its recorded version (#221) f939909
- An overdue date on This week says when it was due and how late it is, so the agent knows what to chase first (#217) 847260e
- A boot on a database the first paint cannot read says which health check fails, and why, in the app's log (#213) 7e02c5c
- The clock's marker for a listing agreement that expires before closing says so in its own words, not "falls on or after closing" (#204) 3bd16dd
- An inspection or walkthrough less than two hours from another of the agent's appointments or closings on the same day is flagged, so the agent never double-books the day (#199) 46c08b5
- The sample deals carry inspection and walkthrough times and places, so the sales-meeting tour shows where the buyer has to be (#194) 6140d93
- This week shows each inspection and walkthrough's time and place, and orders a day's dates by time, so the agent sees where to be hour by hour (#193) a0b9465
- A listing deal carries the date the listing agreement expires, and the clock and the deal page flag a closing that would fall after it (#188) 06ec35c
- /healthz answers 503 naming the failed check when the database is missing a column the first paint reads, so a broken upgrade never looks healthy (#186) 8d3ee4f
3 earlier comments
A date from another year now says its year on the clock's Closed list, the deal page's "All done" line and the terminal's closed list. I couldn't run bun scripts/gate.ts, bun scripts/fast.ts or bun x tsc --noEmit here, so the type check and gate are unrun. The scripts aren't in this clone, and tsc printed its help text instead of checking.
I wrote the change fresh because commit 404f1f7 (pull #198) isn't in this clone. I didn't run the preview's /healthz, and the full bun test wasn't run.
What changed
spoken(date, on?)insrc/dates.tsappends the year ("Sun, Nov 9, 2025") when the date's year differs fromon. Withouton, or in the same year, the output is unchanged, anddates.tsstill never reads the clock.- Three callers now pass today in:
- The clock's Closed list in
src/pages/clock.ts. progressTextinsrc/pages/progress.ts, which is the "All done · closed …" line.- The terminal's closed list in
src/terminal.ts.
- The clock's Closed list in
- Every other
spokencaller is untouched. That covers reminder drafts, calendar text and the other pages. No contract cell changes.
Tests added
src/dates.test.tspins both forms. It also covers Dec 31 to Jan 1 across the agent's time zone: 05:00Z on Jan 1 is still Dec 31 in Los Angeles but already 2027 in UTC.src/progress.test.tscovers the "All done" line.src/sample.test.tsboots a fresh database and finds "closed <weekday>, <month> <day>, <year>" for 58 Larkspur Way on the rendered clock page. It takes the date from the seeded deal and the zone from the database, because the seed anchors to the agent's today. It checks the form, not the literal "Sun, Nov 9, 2025", since that depends on the day it boots.- I did not add a terminal test; that change is covered only by the shared
spokentests.
Test results
- The tests I touched pass: dates, sample and progress, 28 in all.
- In a wider run (terminal, clock and reminders tests) one terminal test, "the deal view says which other closing the same day is less than two hours away", failed. It took 6.5 s under load and passed on its own with my change, so I read it as a timeout.
bun scripts/lint-design.tsran with no output.
To try it Open the clock page on a fresh boot and look at 58 Larkspur Way under Closed. It should read "closed … , <last year>".
I changed nothing and pushed nothing; the six failures are not caused by this pull's diff.
The failing tests are all timing budgets. Five are 50 ms budgets in src/speed.test.ts: the reminder review, People and the clock, with 200 deals or right after a deal changes. The sixth is a 5 s timeout in src/terminal.test.ts on the two-closings-within-two-hours test. They are the same ones the deploy log lists, and the one I could rerun in isolation passes.
To check, I ran src/speed.test.ts here on this branch and on cec063e, the main commit this pull is based on:
| Run | Passed | Failed | Slowest response |
|---|---|---|---|
| This branch | 15 | 6 | about 70 ms, against the 50 ms budget |
cec063e | 15 | 6 | not measured |
The same six speed tests failed on both. cec063e is still the tip of origin/main. The spoken(date, on?) change adds one string comparison per call.
I did not loosen the budgets or edit the speed tests. They exist to enforce the under-50 ms principle, and changing them would hide a real regression. The failures look like the sandbox and preview machines running slower than the budget assumes, or something on main that already runs close to the limit. A person who knows how loaded the preview machine is should decide which it is.
The deploy log's last line says it served the preview anyway, so the preview is up. I haven't checked its /healthz, because I couldn't reach it from this shell.
The change itself is on the branch at ebd8efe, and the tests I wrote for it pass.
I merged main into this branch and pushed. The only conflict was in src/sample.test.ts, and I kept both tests there:
- The test from this pull checks that the Closed list on a fresh boot gives the year of the closing date.
- The test from
mainchecks that the first reminder for today is already late or due today.
bun test src/sample.test.ts passes (13 tests). tsc printed only its help text, so the type check didn't run. scripts/gate.ts doesn't exist in this clone, so I skipped it. I didn't run the rest of the suite; the forge's check will.
The merge adds no behaviour change beyond what this pull already had.
I've pushed fixes for all three of Sentinel's points. The three affected test files pass (67 tests) and the pull's source files are unchanged. I couldn't run tsc because the repo has no tsconfig.json, and I skipped scripts/gate.ts because it doesn't exist here.
- Terminal test: the new test in
src/terminal.test.tscloses a deal today and opens the terminal withonset 400 days later. It expects the literal91 Year Rd — closed <weekday>, <month> <d>, <year>, built withIntlrather thanspoken. I checked that it fails when the call site insrc/terminal.tsgoes back to omitting the year. - Clock page test: the test in
src/sample.test.tsnow boots the server and fetches/as a signed-in user. It reads the "58 Larkspur Way" row from the rendered HTML and checks that it ends in last year's year and that the weekday is the real weekday for that date. It no longer callsspoken. - Weekend shift: I did not assert the exact day and month. The sample moves a closing that lands on a weekend to the next business day, so the page shows Mon, Nov 10, 2025 rather than the Saturday 366 days back. The test reads the day from the page instead.
- Minor items: I removed the doubled blank line in
src/progress.test.tsand put theclosedOnimport in alphabetical order.
A date from another year now says its year on the clock's Closed list, the deal page's "All done" line and the terminal's closed list. I couldn't run
bun scripts/gate.ts,bun scripts/fast.tsorbun x tsc --noEmithere, so the type check and gate are unrun. The scripts aren't in this clone, andtscprinted its help text instead of checking.I wrote the change fresh because commit 404f1f7 (pull #198) isn't in this clone. I didn't run the preview's
/healthz, and the fullbun testwasn't run.What changed
spoken(date, on?)insrc/dates.tsappends the year ("Sun, Nov 9, 2025") when the date's year differs fromon. Withouton, or in the same year, the output is unchanged, anddates.tsstill never reads the clock.src/pages/clock.ts.progressTextinsrc/pages/progress.ts, which is the "All done · closed …" line.src/terminal.ts.spokencaller is untouched. That covers reminder drafts, calendar text and the other pages. No contract cell changes.Tests added
src/dates.test.tspins both forms. It also covers Dec 31 to Jan 1 across the agent's time zone: 05:00Z on Jan 1 is still Dec 31 in Los Angeles but already 2027 in UTC.src/progress.test.tscovers the "All done" line.src/sample.test.tsboots a fresh database and finds "closed <weekday>, <month> <day>, <year>" for 58 Larkspur Way on the rendered clock page. It takes the date from the seeded deal and the zone from the database, because the seed anchors to the agent's today. It checks the form, not the literal "Sun, Nov 9, 2025", since that depends on the day it boots.spokentests.Test results
bun scripts/lint-design.tsran with no output.To try it Open the clock page on a fresh boot and look at 58 Larkspur Way under Closed. It should read "closed … , <last year>".
Closes #206