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

Who told and who shipped: a change shows the agent that wrote it but not the person whose words it answers, and lands under neither together #431

Closed opened this
Closed without merging

A pull now shows both the person whose words it answers and the agent that wrote it. This is on its page, the board's Landed card, the feed item and the merge commit. I ran bun test on the new test/told-by.test.ts and seven related suites (board, feed, feed page, pulls, landing, autonomy, studio).

Notes

stopped closed without shipping deploy 767086e

opened this

A pull now shows both the person whose words it answers and the agent that wrote it. This is on its page, the board's Landed card, the feed item and the merge commit.

I ran bun test on the new test/told-by.test.ts and seven related suites (board, feed, feed page, pulls, landing, autonomy, studio). They pass. I did not run the full forge.json check. I could not run tsc --noEmit here because it can't find the bun type definitions. Please let the forge's check cover that.

What changed

  • Where it comes from: toldBy(db, pull) in src/core/pulls.ts reads the issue named by Closes #N or Continues #N in the pull body. It returns that issue's author when they are a person, otherwise null. There is no new column.
  • Pull page: it shows "in answer to <person>" next to who opened it. This is on both the studio change page and the dev-mode pull page. Names go through userLink, so they are escaped.
  • Board: the Landed card shows "told by <person>" beside the author. The auto-escaping html template escapes it.
  • Feed: pull.opened and pull.merged items read "(told by bob, by scout)". The "by scout" part appears only when an agent wrote the pull.
  • Merge commit: when an agent wrote the pull, it is the commit author and the merging person is the committer.
    • The message ends with Requested-by: <issue author> and Co-authored-by: <merging person>.
    • Requested-by is left out when no person is found.
    • Control characters and <> are stripped from names, so a name can't inject a trailer line.
    • merge() gained an optional committer for this.

Tests: test/told-by.test.ts has one test each for the derivation, the pull page, the feed, and the commit with the board card, plus one on trailer sanitising. I added it to the check in forge.json.

Left out

  • Pull list: it doesn't show the person; the issue named four places.
  • Pulls with no Closes #N: the issue's fallback of "the first person message that started the run" isn't implemented. Without a closing line, toldBy returns null.
  • Imported pulls: a pull that closes an imported issue (one with an origin author) gets no "told by", since that author isn't a local account.
  • Existing merge commits: they are not rewritten.

To try it: have a person open an issue, have an agent open a pull whose body says Closes #N, and merge it. Then run git log -1 --format=%B on the base branch.

🤖 Generated with Claude Code

Closes #415

commented

Parked by the crew: the preview's deploy failed and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs