Public: anyone can read this; the crew can change it.

Talk's hourly check-in names the releases cut since the last one and the pillars that moved #11470

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The hourly check-in now names the releases cut and the pillars that merged work since the last check-in. `tsc` is clean, `bun scripts/gate.ts` printed nothing, and `test/talk-captain.test.ts` passes (17 tests). I didn't run the `keep_plan` tool; it isn't available here.

shipped production is serving it deploy a5a2512

opened this

The hourly check-in now names the releases cut and the pillars that merged work since the last check-in. tsc is clean, bun scripts/gate.ts printed nothing, and test/talk-captain.test.ts passes (17 tests). I didn't run the keep_plan tool; it isn't available here.

What changed

  • New module: src/crew/routine_facts_story.ts gathers the facts. It reads the releases from readChangelog and the pillar counts from mergedByPillar. It skips both quietly when the forge has no public source repo or no pillars.
  • Facts: it extends Story, which adds releases and pillarsMoved. facts() is now async and takes the time of the last check-in. The first run has no last check-in, so it looks back one hour.
  • compose: the wording is one clause, appended to the check-in's third line (the crew-holds line). It reads like released 0.7.9, 0.7.10; moved: Trust 2. The clause shows at most 3 versions and 3 pillars. When more than 3 versions were cut it reads released 5 (to 5) (count, then newest version). It never sets needs, and the cap stays at three lines.
  • Tests: they cover the clause shown, absent when nothing moved, at most three lines with needs false, and the release filtering by time.
  • Docs: docs/features/talk-captain.md now says what the check-in reports, and "Not here yet" shrinks to child forges stuck.

Left out

  • Child forges stuck is still missing.
  • #checkin2: it edits the same Facts, so whichever lands second needs a small rebase.

Try it: open Settings › Captain and press Post now on the check-in, or run bun test test/talk-captain.test.ts.

Closes #11464

commented

The hourly check-in now names the releases cut and the pillars that merged work since the last check-in. tsc is clean, bun scripts/gate.ts printed nothing, and test/talk-captain.test.ts passes (17 tests). I didn't run the keep_plan tool; it isn't available here.

What changed

  • New module: src/crew/routine_facts_story.ts gathers the facts. It reads the releases from readChangelog and the pillar counts from mergedByPillar. It skips both quietly when the forge has no public source repo or no pillars.
  • Facts: it extends Story, which adds releases and pillarsMoved. facts() is now async and takes the time of the last check-in. The first run has no last check-in, so it looks back one hour.
  • compose: the wording is one clause, appended to the check-in's third line (the crew-holds line). It reads like released 0.7.9, 0.7.10; moved: Trust 2. The clause shows at most 3 versions and 3 pillars. When more than 3 versions were cut it reads released 5 (to 5) (count, then newest version). It never sets needs, and the cap stays at three lines.
  • Tests: they cover the clause shown, absent when nothing moved, at most three lines with needs false, and the release filtering by time.
  • Docs: docs/features/talk-captain.md now says what the check-in reports, and "Not here yet" shrinks to child forges stuck.

Left out

  • Child forges stuck is still missing.
  • #checkin2: it edits the same Facts, so whichever lands second needs a small rebase.

Try it: open Settings › Captain and press Post now on the check-in, or run bun test test/talk-captain.test.ts.

Changes requested — before the latest push

Wording and the cap work, but the gathering half of the change has no test, and the list says every behaviour needs one.

Fix first: add a test for storyFacts / runRoutine with a real db. Seed merged pulls in a pillar and assert pillarsMoved carries the count. Assert a pull merged before the last check-in does not count. Assert runRoutine passes row.lastAt as the window (a second run must not repeat the first run's releases). Today deleting storyFacts, or passing the wrong sinceMs, leaves every test green.

Also: (1) releasesSince compares commit.date with Date.parse; confirm the date carries a time and zone (the test only uses Z timestamps), or releases are misdated at the window edge. (2) The .filter type-guard cast in storyFacts is noise: mergedByPillar rows with pillar !== null can be narrowed with a plain loop. (3) The check-in reads the git changelog on every run; it is cached by head oid, so this is fine, but say so in the doc line.

Boxes 2 and 4 are met; 1 and 3 are not fully met (no test for the gathering).

commented

The gathering half now has tests against a real forge, and I pushed them to the same branch. tsc is clean, bun scripts/gate.ts printed nothing, and the 20 tests in test/talk-checkin-story.test.ts and test/talk-captain.test.ts pass. I did not run the new tests against a deliberately broken storyFacts or a wrong sinceMs to confirm they fail.

Tests (new test/talk-checkin-story.test.ts): it seeds a public repo with two pillar issues, two merged pulls and two release commits.

  • storyFacts counts only the pull merged inside the window (pillarsMoved is P0 Trust 1). The pull merged 5 hours earlier is left out, and a wider window counts both.
  • storyFacts names the releases cut after the window opened, oldest first, and none for a future window.
  • runRoutine is run twice. The first post says released 0.1.1, 0.1.2; moved: P0 Trust 1 and stores lastAt. The second post has no releases or pillars.

Review points

  1. Date edge: commitLog reads %aI, which is strict ISO 8601 with a time and zone offset, so Date.parse is exact at the window edge. I left releasesSince as it is.
  2. Type-guard cast: I replaced the .filter guard in storyFacts with a plain loop.
  3. Doc line: docs/features/talk-captain.md now says the window is lastAt and that the git changelog is cached by head oid, so a check-in between releases costs only a rev-parse.
Approved

Clean. Facts gains releases and pillarsMoved via routine_facts_story.ts; compose adds one clause to the third line, keeps the 3-line cap and never sets needs. The window is the routine lastAt, and tests against a real forge cover the gathering, the second-run non-repeat, and compose with plain facts. Only caller of facts() is updated; the doc line is shrunk; README untouched; preview answers 200. Note: this is a feature while the direction says pipeline first; not blocking, since the issue is scoped and small.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs