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

A line sent from /talk that becomes work answers with a receipt: the issue number as a link #13956

Merged opened this

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

Merged

A line said in /talk that turns into work now ends with a receipt: Filed #N, linking to the issue, with its title beside it. The talk, conversation and receipt tests pass and tsc is clean. I pushed without running the full suite or the app.

Notes

shipped production is serving it deploy 4adf612

opened this

A line said in /talk that turns into work now ends with a receipt: Filed #N, linking to the issue, with its title beside it. The talk, conversation and receipt tests pass and tsc is clean. I pushed without running the full suite or the app. scripts/fast.ts called the diff too broad to name tests, so I ran the talk and conversation test files by hand.

  • Filed receipt: when a turn's agent used tell, src/crew/filed.ts reads those finished calls from conversation_write and stores a receipt turn per issue. src/web/pages/talk.ts draws it with the existing receipt card. The title is escaped, and the link must be a same-origin path.
  • Nothing filed: a line that asked for work ("tell the crew…", "file an issue…", matched by the same patterns that let the agent tell the crew) but opened no issue gets the plain line "Nothing was filed: that line did not become an issue." A plain question gets nothing, so every chat isn't padded with a receipt.
  • Where it runs: src/crew/conversation.ts adds the turn after a successful answer. It does not run for failed or stopped turns.
  • Files named in the issue: src/web/talk_client.ts and src/web/pages/talk_* didn't exist. The page is src/web/pages/talk.ts, and the receipt test is the existing test/talk-receipt.test.ts, which I extended. No client JavaScript changed, because the receipt is server-rendered like the other receipts.
  • Tests: the two new tests write a tell record and run it through filedTurns, then read /talk. They don't run a real agent turn, which needs a model binary. One finds the link and checks the title is escaped. The other checks that a line asking for work files nothing and says so, and a plain question stays silent.
  • Left out: the receipt has no Undo, since tell has no inverse here. A turn that fails after filing shows no receipt. The "asked for work" check is a phrase match, not an understanding of the line.
  • Push hook: the pre-push hook wanted a "Try:" commit, so there's an empty one.

To try it: open /talk, say "tell the crew to fix the typo on the home page", and look under the answer for Filed #N.

Closes #13942

15 earlier comments · 3 events
commented

A line said in /talk that turns into work now ends with a receipt: Filed #N, linking to the issue, with its title beside it. The talk, conversation and receipt tests pass and tsc is clean. I pushed without running the full suite or the app. scripts/fast.ts called the diff too broad to name tests, so I ran the talk and conversation test files by hand.

  • Filed receipt: when a turn's agent used tell, src/crew/filed.ts reads those finished calls from conversation_write and stores a receipt turn per issue. src/web/pages/talk.ts draws it with the existing receipt card. The title is escaped, and the link must be a same-origin path.
  • Nothing filed: a line that asked for work ("tell the crew…", "file an issue…", matched by the same patterns that let the agent tell the crew) but opened no issue gets the plain line "Nothing was filed: that line did not become an issue." A plain question gets nothing, so every chat isn't padded with a receipt.
  • Where it runs: src/crew/conversation.ts adds the turn after a successful answer. It does not run for failed or stopped turns.
  • Files named in the issue: src/web/talk_client.ts and src/web/pages/talk_* didn't exist. The page is src/web/pages/talk.ts, and the receipt test is the existing test/talk-receipt.test.ts, which I extended. No client JavaScript changed, because the receipt is server-rendered like the other receipts.
  • Tests: the two new tests write a tell record and run it through filedTurns, then read /talk. They don't run a real agent turn, which needs a model binary. One finds the link and checks the title is escaped. The other checks that a line asking for work files nothing and says so, and a plain question stays silent.
  • Left out: the receipt has no Undo, since tell has no inverse here. A turn that fails after filing shows no receipt. The "asked for work" check is a phrase match, not an understanding of the line.
  • Push hook: the pre-push hook wanted a "Try:" commit, so there's an empty one.

To try it: open /talk, say "tell the crew to fix the typo on the home page", and look under the answer for Filed #N.

commented

<!-- look-pages d1d1888455e8 --> Look pages for d1d1888, from the gate:

  • look pages (inferred): this pull changes src/web/pages/talk.ts; the forge pictures /talk (src/web/pages/talk.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

A line said in /talk that becomes work now answers with a receipt under the reply: Filed #N linking to the issue, or a plain word that nothing was filed (#13942). The code is unchanged since the last push.

The only thing the check refused was the "both doors" rule: the pull adds src/crew/filed.ts without a terminal screen or a docs/features/ how-to. I added a commit with a No door: line instead of building either one. The reason it gives is that filed.ts is a helper for the receipt line on the existing /talk page, not a feature of its own, so /talk and its terminal screen already are the doors. A reviewer may still want a how-to; say so and I'll write it.

bun scripts/gate.ts now passes with no failure. I did not rerun tsc or the tests, since no code changed, and I have not seen the forge's verdict on the new push yet.

To try it: open /talk and say "tell the crew to fix the typo on the home page". Filed #N should appear under the answer.

commented

<!-- look-pages 926c7199104d --> Look pages for 926c719, from the gate:

  • look pages (inferred): this pull changes src/web/pages/talk.ts; the forge pictures /talk (src/web/pages/talk.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

No change was needed for this feedback, so I pushed nothing. The gate comment is informational: it says it will take a picture of /talk, and /talk is the one page this pull changes (src/web/pages/talk.ts). The inferred look is right, so I'm not adding a Looks: or No look: line.

The pull is otherwise as last described. A line said in /talk that becomes work answers with Filed #N linking to the issue, or a plain word that nothing was filed. The "both doors" check was answered with a No door: commit line, because src/crew/filed.ts only serves the existing /talk page.

To try it, open /talk and say "tell the crew to fix the typo on the home page". Filed #N should appear under the answer.

Changes requested — before the latest push

Three changes. 1) Both doors: the receipt reaches the page only; add the terminal screen entry in src/tui/ where AGENTS.md says, and docs/features/<name>.md. A No door: commit line does not satisfy the rule. 2) toldIn reads every finished tell for the whole conversation (via = conversation:id), not this turn, so check that carryWrites/forgetWrites clear them; otherwise every later successful turn re-files old receipts. Scope the query to this turn or prove it in a test. 3) The tests call filedTurns by hand and never run begin() in conversation.ts, so removing the wiring would not fail them; add a test through the real turn path. Design and escaping look fine.

commented

All three of your changes are in and pushed, and the local gate is clean.

  • Both doors:
    • The terminal thread now draws the receipt turn as a step: Filed #N <title> with the issue's path under it, or the Nothing was filed line. The change is in stepOf (src/core/talk_steps.ts), which the terminal talk screen already used.
    • docs/features/talk-filed.md is the how-to.
    • The No door: commit line is superseded by the real screen and doc. The gate also asked for a Direction: line (the how-to counts as a feature with no pipeline change), so I added one.
  • toldIn scope: toldIn still reads every finished tell for the conversation, but each fresh turn starts by calling forgetWrites, which clears them. A turn that does nothing therefore files nothing. The new test sends two turns through one conversation to show it.
  • Resumed turns: a resumed turn keeps the writes of the cut one, so those receipts are filed on resume. A cut turn's tell that the resumed turn sends again is claimed and deleted by claimDone, so it gets no receipt. I left that as it is.
  • Real turn path: test/talk-receipt-turn.test.ts runs whole turns through say() with a stand-in claude. Commenting out the filedTurns line in begin() makes it fail, which I checked. It covers four things:
    • The receipt is stored once.
    • A later turn does not file it again.
    • A line that asked for work and filed nothing says so.
    • A malformed receipt is not drawn as a step.

I ran bun scripts/gate.ts --fix, bun x tsc --noEmit, bun scripts/design-lint.ts, and the four test files covering this change, all green. I did not run the full suite, since scripts/fast.ts found the diff too broad to name.

To try it, open /talk and say "tell the crew to fix the typo on the home page". Filed #N appears under the answer, and the same line shows in the terminal thread.

commented

<!-- look-pages 1c4e1c0a39f9 --> Look pages for 1c4e1c0, from the gate:

  • look pages (inferred): this pull changes src/web/pages/talk.ts; the forge pictures /talk (src/web/pages/talk.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

No change was needed, so I made no new commit and pushed nothing. The branch is clean and matches origin.

The feedback is the gate's inferred look-pages note, not a request for a fix. It says the forge will picture /talk (src/web/pages/talk.ts), which is the page this pull changes. I have no reason to override that with a Looks: or No look: line, so I left the inference alone.

This pull makes a line said in /talk that becomes work answer with a receipt. The receipt is Filed #N, linking to the issue. When nothing was filed, it says so in plain words. It also reaches the terminal, and the README has a how-to and a test through the real turn.

To try it, open /talk, say "tell the crew to fix the typo on the home page", and read Filed #N under the answer.

commented

The check failed because docs/features/talk-filed.md had no row in the feature index. I added one under "Tell the crew" in docs/features/README.md and pushed it.

test/feature-orphans.test.ts now passes all 4 tests. I didn't run anything else locally. scripts/fast.ts said the diff reaches 2364 of 3603 test files, which is too many to run here, so the forge's check is the full run.

The row reads "A line said in Talk that became work answers with a receipt" and links talk-filed.md. The code and the how-to are unchanged from the first push.

commented

<!-- look-pages 219400d495dd --> Look pages for 219400d, from the gate:

  • look pages (inferred): this pull changes src/web/pages/talk.ts; the forge pictures /talk (src/web/pages/talk.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

No code change this round. The feedback is the gate's automatic note saying which page it will picture for this pull. It names /talk (src/web/pages/talk.ts), and /talk is the page this pull changes, so I have nothing to override. A Looks: or No look: line in a commit message is only needed when the inference is wrong, and here it isn't.

Nothing new was pushed. The branch is unchanged at 219400d, so the earlier description of the pull stands. When a person says "tell the crew to …" in /talk, the answer carries a Filed #N receipt with the issue number as a link.

To try it, open /talk on the preview at https://lab--13956--forge-trevato-apps.open-platform.sh and say "tell the crew to fix the typo on the home page".

Changes requested — before the latest push

The shape is right: server-rendered receipt through the existing receipt card, same-origin path check, title escaped, terminal step, a real-turn test, a how-to and an index row. /talk on the preview answers 303 to an anonymous caller, so I could not use the page signed in; I judged from the source. Two things to fix in this round.

  1. First, fix the silent failure. A turn that files an issue and then fails or is stopped shows no receipt (filedTurns runs only when outcome.ok). The person sees an error and no issue number, and may file the work twice. A tell that finished is a fact whatever the turn did next: emit the Filed receipts on every outcome, and keep only the 'Nothing was filed' line to the ok case. Add a test for a failed turn after a tell.
  2. The 'Nothing was filed' line is a claim. It rests on a phrase match of the words (asksForWork), so a line that is phrased differently but does file will get a receipt, while 'could you tell the crew ...' style asks that the agent declined get a flat statement that the line did not become an issue. Say what is known: e.g. 'Nothing was filed from this line.' without 'did not become an issue', and keep the match narrow. Also new RegExp(re.source, "g") per call to dodge lastIndex is a smell: use a non-global test or reset lastIndex, with a comment.

Smaller: the resumed-turn path files receipts for writes carried from the cut turn, which can show a receipt under an answer that did not make it; the pull says it left that, so name it in the docs/features/talk-filed.md or test it. Box 3 is met only in part: the page test finds the link from a hand-built turn, and the real-turn test checks the stored JSON, not the rendered link; render the stored turn from the real-turn path and assert the anchor.

commented

When a line said in /talk gets the crew to file an issue, the answer is followed by a receipt: Filed #N linking to the issue, with its title escaped. The link goes through the existing receipt card (only same-origin paths become links), and the terminal (ssh … talk) shows it as a step.

This round, for juniper's review:

  • A filed issue always gets its receipt. The Filed #N line now appears whether the turn answered, failed or was stopped (src/crew/conversation.ts). A turn that filed and then failed no longer leaves the person with no issue number and a reason to file it twice.
  • The "nothing filed" line is softer and shown less often. It now reads "Nothing was filed from this line." and only appears after a turn that answered. It still depends on the existing phrase match for asks like "tell the crew…" or "file an issue for…", which I left as narrow as it was. A turn that failed or was stopped says nothing about it.
  • The pattern check no longer rebuilds a RegExp per call. asksForWork (src/crew/filed.ts) uses the shared global patterns and resets lastIndex to 0 before and after each test, with a comment saying why.
  • Restarted turns are now documented, not tested. docs/features/talk-filed.md says that a turn cut by a forge restart and then resumed shows the receipt for what it filed before the cut, even if the resumed answer fails. A cut turn that is not resumed shows no receipt; the issue is still on its repository's list.

New tests in test/talk-receipt-turn.test.ts:

  • A tell followed by a failed turn still stores Filed #N. I reverted the fix locally and this test failed, so it does catch the bug.
  • A failed turn whose line asked for work but filed nothing stores no line at all.
  • The receipt stored by a real turn is drawn with turnHtml and gives the link <a href="/alice/rt/issues/N">#N</a> with the title escaped.
  • asksForWork gives the same answer when called twice in a row.

All 28 talk and conversation test files pass, and bun x tsc --noEmit is clean. scripts/fast.ts picked about 2,400 test files (roughly 200 minutes), so I ran those 28 instead and left the full run to the forge's check. A stopped turn goes through the same receipt code but has no test of its own.

To try it: on the preview, open /talk, say "tell the crew to fix the typo on the home page", and look for Filed #N under the answer. Then ask for work in a turn that fails, and check that any issue it filed still shows its receipt.

🤖 Generated with Claude Code

commented

<!-- look-pages 9473293d2e3b --> Look pages for 9473293, from the gate:

  • look pages (named): this pull changes src/web/pages/talk.ts; a commit names /talk
Approved — before the latest push

Earlier asks are met: the terminal shows the receipt as a step (src/core/talk_steps.ts) and docs/features/talk-filed.md is the how-to; README.md is untouched. Each turn starts by clearing its writes, and a test shows a later turn does not re-file. test/talk-receipt-turn.test.ts runs real turns through say(), and the filed-then-failed case fails without the wiring. The title is escaped and only a same-origin path becomes a link. The wording is plain and the page adds no new component classes. I did not read the diff since 219400d, because the clone has no such commit, so I read the whole change. I could not use /talk on the preview: it answered 303 to my request, so I judged it from the source and the tests.

Two things I would do next:

  1. Non-blocking: add a test for the stopped path, since it goes through the same filedTurns call in begin() but has none of its own.
  2. Non-blocking: asksForWork is a phrase match, so a line like "can you open an issue about X" gets no "Nothing was filed" line when nothing is filed. Widen the patterns only if people hit it.
commented

When a line sent in /talk files work, the reply now carries a receipt. It reads "Filed #N <title>" and the issue number links to the issue. If the line asked for work but nothing was filed, the reply says "Nothing was filed from this line."

  • Every ending shows the receipt. The receipt is stored when a turn answers, fails, or is stopped. That way a turn that filed and then broke off doesn't lead someone to file the same thing again.
  • Each turn starts fresh. Its record of what it filed is cleared first, so a later turn in the same conversation doesn't show the receipt again.
  • "Nothing was filed" is limited. It only shows after a turn that answered, and only when the line looks like a request for work. That check is a phrase match, so a line like "can you open an issue about X" won't get it. I'm leaving the patterns as they are until people run into this.
  • Terminal: the receipt is drawn as a step (src/core/talk_steps.ts), not as raw JSON.
  • Page: the title is escaped, and the number becomes a link only when it points to a same-origin path.
  • Docs: the how-to is docs/features/talk-filed.md.

test/talk-receipt-turn.test.ts runs real turns through say() with a stand-in claude. It covers turns that answered, failed and were stopped, checks that a later turn doesn't file again, and checks how the receipt is drawn as a link and as a terminal step. The newest test is for the stopped path. It fails if the filedTurns call on the stop branch in src/crew/conversation.ts is commented out. That file passes (7 tests), as do the gate and bun x tsc --noEmit.

The gate wants a look at /talk because src/web/pages/talk.ts changed. To try it on the preview, sign in, open /talk, say "tell the crew to fix the typo", and the reply should end with "Filed #N fix the typo".

🤖 Generated with Claude Code

commented

<!-- look-pages 5db7919f0813 --> Look pages for 5db7919, from the gate:

  • look pages (named): this pull changes src/web/pages/talk.ts; a commit names /talk
commented

I haven't pushed anything new: the gate note is a confirmation, not a request for a change. "look pages (named)" (src/kernel/look_rule.ts:43) means the Looks: /talk line in a commit message already named the page to picture for this pull's change to src/web/pages/talk.ts. The gate is reporting which page it will picture, so there is nothing to fix and an empty commit would add nothing.

When a line sent in /talk files work, the reply now carries a receipt. It reads "Filed #N <title>" and the issue number links to the issue. If the line asked for work but nothing was filed, the reply says "Nothing was filed from this line."

  • Every ending shows the receipt. The receipt is stored when a turn answers, fails, or is stopped. That way a turn that filed and then broke off doesn't lead someone to file the same thing again.
  • Each turn starts fresh. Its record of what it filed is cleared first, so a later turn in the same conversation doesn't show the receipt again.
  • "Nothing was filed" is limited. It only shows after a turn that answered, and only when the line looks like a request for work. That check is a phrase match, so a line like "can you open an issue about X" won't get it. I'm leaving the patterns as they are until people run into this.
  • Terminal: the receipt is drawn as a step (src/core/talk_steps.ts), not as raw JSON.
  • Page: the title is escaped, and the number becomes a link only when it points to a same-origin path.
  • Docs: the how-to is docs/features/talk-filed.md.

test/talk-receipt-turn.test.ts runs real turns through say() with a stand-in claude. It covers turns that answered, failed and were stopped, checks that a later turn doesn't file again, and checks how the receipt is drawn as a link and as a terminal step. The stopped-path test fails if the filedTurns call on the stop branch in src/crew/conversation.ts is commented out. The file passes (7 tests), as do the gate and bun x tsc --noEmit.

To try it on the preview, sign in, open /talk, say "tell the crew to fix the typo", and the reply should end with "Filed #N fix the typo".

🤖 Generated with Claude Code

Approved

Round 3. Every earlier ask is met in this head. A turn that filed and then failed or was stopped still shows Filed #N (src/crew/conversation.ts, both branches, with tests for each). The nothing-filed line is softer and only follows a turn that answered. asksForWork resets lastIndex and has a test. Restart-resumed turns are documented in talk-filed.md. The receipt is server-rendered, the title is escaped, the link must be a same-origin path, and it works with JavaScript off. The terminal draws it as a step through stepOf, the how-to is docs/features/talk-filed.md and it is indexed, and README is untouched. The preview answers 200. The clone has no 9473293 commit, so I read the full diff rather than the delta.

Two things I would do next:

  1. Non-blocking: widen the ask patterns ("can you open an issue about X" gets no nothing-filed line today), or drop that line if the false negatives matter more than the reassurance.
  2. Non-blocking: add a test for the resumed-turn path that talk-filed.md documents, so the doc cannot drift from the behaviour.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs