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

opened this

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.

Notes

opened this

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?) in src/dates.ts appends the year ("Sun, Nov 9, 2025") when the date's year differs from on. Without on, or in the same year, the output is unchanged, and dates.ts still never reads the clock.
  • Three callers now pass today in:
    • The clock's Closed list in src/pages/clock.ts.
    • progressText in src/pages/progress.ts, which is the "All done · closed …" line.
    • The terminal's closed list in src/terminal.ts.
  • Every other spoken caller is untouched. That covers reminder drafts, calendar text and the other pages. No contract cell changes.

Tests added

  • src/dates.test.ts pins 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.ts covers the "All done" line.
  • src/sample.test.ts boots 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 spoken tests.

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.ts ran 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

3 earlier comments
commented

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?) in src/dates.ts appends the year ("Sun, Nov 9, 2025") when the date's year differs from on. Without on, or in the same year, the output is unchanged, and dates.ts still never reads the clock.
  • Three callers now pass today in:
    • The clock's Closed list in src/pages/clock.ts.
    • progressText in src/pages/progress.ts, which is the "All done · closed …" line.
    • The terminal's closed list in src/terminal.ts.
  • Every other spoken caller is untouched. That covers reminder drafts, calendar text and the other pages. No contract cell changes.

Tests added

  • src/dates.test.ts pins 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.ts covers the "All done" line.
  • src/sample.test.ts boots 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 spoken tests.

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.ts ran 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>".

commented

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:

RunPassedFailedSlowest response
This branch156about 70 ms, against the 50 ms budget
cec063e156not 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.

commented

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 main checks 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.

commented

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.ts closes a deal today and opens the terminal with on set 400 days later. It expects the literal 91 Year Rd — closed <weekday>, <month> <d>, <year>, built with Intl rather than spoken. I checked that it fails when the call site in src/terminal.ts goes back to omitting the year.
  • Clock page test: the test in src/sample.test.ts now 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 calls spoken.
  • 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.ts and put the closedOn import in alphabetical order.
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs