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

An Instagram prompt keeps its first line: test/prompts.test.ts passes #11064

Merged opened this

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

Merged

When a top Instagram comment becomes an issue, the issue body now holds the whole comment, first line included. Before, `tell` (`src/actions/tell.ts`) used the first line as the title and dropped it from the body, so the issue in `test/prompts.test.ts:604` got only "It feels empty right now."

shipped production is serving it deploy a985b29

opened this

When a top Instagram comment becomes an issue, the issue body now holds the whole comment, first line included. Before, tell (src/actions/tell.ts) used the first line as the title and dropped it from the body, so the issue in test/prompts.test.ts:604 got only "It feels empty right now."

The fix is in tellText (src/crew/prompts.ts), which builds the text Instagram hands to tell. It now puts the comment's first line above the full comment. tell takes that copy as the title, and the body gets the comment exactly as written, then where it came from. If the first line is too long for a title, it isn't repeated: tell then shortens the title and keeps the full text in the body anyway, so nothing would be duplicated. tell itself still behaves the same for every other caller. Its only change is that the title limit (80 characters) is now exported as TELL_TITLE_MAX, so both places read the same number.

The failing case never read the wall clock: every run gets its time passed in, so it passes at any hour and no clock injection was needed. Two new tellText tests cover the normal comment and the too-long first line. scripts/gate.ts was not changed.

Checks run: bun test test/prompts.test.ts (23 pass), bun x tsc --noEmit and bun scripts/gate.ts both clean, and the nine test/tell*.test.ts files (46 pass). Because tell.ts changed, scripts/fast.ts named 1,514 test files, too many to run here, so I ran the tell tests above and left the full suite to the forge's check on this push.

Try it: bun test test/prompts.test.ts.

🤖 Generated with Claude Code

Closes #11052

commented

When a top Instagram comment becomes an issue, the issue body now holds the whole comment, first line included. Before, tell (src/actions/tell.ts) used the first line as the title and dropped it from the body, so the issue in test/prompts.test.ts:604 got only "It feels empty right now."

The fix is in tellText (src/crew/prompts.ts), which builds the text Instagram hands to tell. It now puts the comment's first line above the full comment. tell takes that copy as the title, and the body gets the comment exactly as written, then where it came from. If the first line is too long for a title, it isn't repeated: tell then shortens the title and keeps the full text in the body anyway, so nothing would be duplicated. tell itself still behaves the same for every other caller. Its only change is that the title limit (80 characters) is now exported as TELL_TITLE_MAX, so both places read the same number.

The failing case never read the wall clock: every run gets its time passed in, so it passes at any hour and no clock injection was needed. Two new tellText tests cover the normal comment and the too-long first line. scripts/gate.ts was not changed.

Checks run: bun test test/prompts.test.ts (23 pass), bun x tsc --noEmit and bun scripts/gate.ts both clean, and the nine test/tell*.test.ts files (46 pass). Because tell.ts changed, scripts/fast.ts named 1,514 test files, too many to run here, so I ran the tell tests above and left the full suite to the forge's check on this push.

Try it: bun test test/prompts.test.ts.

🤖 Generated with Claude Code

Approved

Traced tell: for "Add a boss\nAdd a boss\nIt feels empty." the title is the first line and the body is everything after the first occurrence, so the full comment reaches the issue. A first line over 80 chars is not repeated and tell keeps the whole text. The fix is in tellText, tell is unchanged apart from exporting the limit, and both cases are tested. Two things I would do next: (1) tellText now depends on how tell strips the title, so a tell test that pins this contract (title line repeated is kept once in the body) would stop the two drifting; (2) wrap the long lines in tell.ts and the new tests the way the formatter would.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs