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

A refused first ask leaves a receipt: the person's words, the plain reason, nothing made #11523

Parked opened this
Closed without merging

A refused first ask now leaves one firstask.refused event, and still makes no app. I ran test/first-ask-new-app.test.ts (10 pass), tsc --noEmit and test/mcp-size.test.ts, all green. bun scripts/gate.ts printed nothing and I didn't check its exit code.

Notes

stopped parked by the crew deploy 927fea6

opened this

A refused first ask now leaves one first_ask.refused event, and still makes no app. I ran test/first-ask-new-app.test.ts (10 pass), tsc --noEmit and test/mcp-size.test.ts, all green. bun scripts/gate.ts printed nothing and I didn't check its exit code.

What changed

  • Receipt contents: the event holds the actor, the first 200 characters of the ask, the refusal's words and made: false. It never holds a secret or a claim code.
  • Which refusals: all of them are covered: empty, too long, not a person, not verified, bad from, the forge's own repository, and any reason newAppFromSentence gives for making no app.
  • Receipt id: firstAsk now returns error.receipt, the event id. The page flash shows the same words as before.
  • Cap: 20 receipts per actor per hour. Past that, a refusal still refuses, writes nothing and receipt is null.
  • Where they are read: docs/features/first-ask.md explains it. Query the event table for kind = 'first_ask.refused', or call listEvents(db, { kind: "first_ask.refused" }).
  • Tests: test/first-ask-new-app.test.ts checks that the empty, over-long and forge-repo refusals each leave exactly one receipt, and that the over-long cut is 200 characters. A second test covers the not-a-person and no-name refusals, the cap, and that a success leaves none.

What I left out

  • MCP and API: firstAsk is only called by the page today, so there is no MCP or API error path to wire. When one calls it, it gets error.receipt as it stands.
  • No screen yet: the receipts have no page or feed view, because they carry no repository and the activity feed skips such events.
  • Taken names: a taken name does not refuse; the app gets a suffixed name. The test uses an unnameable sentence (!!! ???) for the "no app could be made" refusal instead.

Try it: on a forge's first screen, press Tell the crew on an empty box, then run SELECT payload FROM event WHERE kind = 'first_ask.refused'.

I added an empty "Try:" commit because the pre-push hook refused the first push without one.

Closes #11462

3 earlier comments
commented

A refused first ask now leaves one first_ask.refused event, and still makes no app. I ran test/first-ask-new-app.test.ts (10 pass), tsc --noEmit and test/mcp-size.test.ts, all green. bun scripts/gate.ts printed nothing and I didn't check its exit code.

What changed

  • Receipt contents: the event holds the actor, the first 200 characters of the ask, the refusal's words and made: false. It never holds a secret or a claim code.
  • Which refusals: all of them are covered: empty, too long, not a person, not verified, bad from, the forge's own repository, and any reason newAppFromSentence gives for making no app.
  • Receipt id: firstAsk now returns error.receipt, the event id. The page flash shows the same words as before.
  • Cap: 20 receipts per actor per hour. Past that, a refusal still refuses, writes nothing and receipt is null.
  • Where they are read: docs/features/first-ask.md explains it. Query the event table for kind = 'first_ask.refused', or call listEvents(db, { kind: "first_ask.refused" }).
  • Tests: test/first-ask-new-app.test.ts checks that the empty, over-long and forge-repo refusals each leave exactly one receipt, and that the over-long cut is 200 characters. A second test covers the not-a-person and no-name refusals, the cap, and that a success leaves none.

What I left out

  • MCP and API: firstAsk is only called by the page today, so there is no MCP or API error path to wire. When one calls it, it gets error.receipt as it stands.
  • No screen yet: the receipts have no page or feed view, because they carry no repository and the activity feed skips such events.
  • Taken names: a taken name does not refuse; the app gets a suffixed name. The test uses an unnameable sentence (!!! ???) for the "no app could be made" refusal instead.

Try it: on a forge's first screen, press Tell the crew on an empty box, then run SELECT payload FROM event WHERE kind = 'first_ask.refused'.

I added an empty "Try:" commit because the pre-push hook refused the first push without one.

commented

The preview log you pasted shows the app booting and serving, and "no tests declared" is a note about the preview, not an error. The real failure was the gate. bun scripts/gate.ts exited 2 because the pull adds docs/features/first-ask.md with no pipeline change. I should have checked the gate's exit code before the first push.

I pushed an empty commit carrying a Direction: line saying this closes the leftover box of #11417. The gate now exits 0 and tsc --noEmit is clean. The code and tests are unchanged from the first push, and I did not re-run them.

A refused first ask leaves a receipt: the person's words, the plain reason, nothing made

firstAsk writes one first_ask.refused event for every refusal: empty, too long, not a person, not verified, bad from, the forge's own repository, or no app could be made. It holds the actor, the first 200 characters of the ask, the refusal's words and made: false. No secret or claim code goes in it. No app is made, and a success leaves none.

  • Same words on the page: the page flash shows the same words as before. A caller of firstAsk gets the event id as error.receipt.
  • Cap: 20 receipts per actor per hour. Past that, the refusal still happens, nothing is written, and receipt is null.
  • Where to read them: docs/features/first-ask.md says how: query the event table for kind = 'first_ask.refused', or call listEvents(db, { kind: "first_ask.refused" }).
  • Tests: test/first-ask-new-app.test.ts covers the empty, over-long, forge-repo, not-a-person and no-name refusals, the cap, and that a success leaves none.

Left out

  • MCP and API: nothing outside the page calls firstAsk today, so there is no MCP or API error path to wire. Any new caller gets error.receipt.
  • No screen: there is no page or feed view of the receipts, because they carry no repository and the activity feed skips such events.
  • Taken names: a taken name does not refuse; the app gets a suffixed name. The test uses !!! ??? for the no-name refusal.

Try it: press Tell the crew on an empty box on a new forge's first screen, then run SELECT payload FROM event WHERE kind = 'first_ask.refused'.

commented

A refused first ask now leaves a receipt in the event table, and I pushed an empty commit to re-run the check. The CPU failure was not caused by this change.

The check was stopped for using 17.5 cores against a limit of 16. The busiest process was a sh with 451 s of CPU. The log is full of egress refusals for Chrome-style hosts (update.googleapis.com, redirector.gvt1.com, start.duckduckgo.com). That points to a browser process running in the check environment. The diff touches only src/actions/first_ask.ts, its test and docs/features/first-ask.md, and none of them spawn a process or a browser.

Locally, bun x tsc --noEmit is clean and test/first-ask-new-app.test.ts passes, 10 of 10. If the check stops on CPU again, the browser process is what needs a person to look at.

What changed

  • A refused first ask records an event of kind first_ask.refused. The payload holds the actor, the first 200 characters of the ask, the plain reason and made: false.
  • This covers every refusal path: empty ask, too long, not an actor who may direct, unverified email, a bad from, the forge's own repository, and a failure to make the app.
  • Receipts are capped at 20 per actor per hour. A refusal past the cap still refuses and leaves no receipt.
  • A successful ask leaves no receipt.
  • FirstAskError gains a receipt field with the event id, or null once the cap is spent.

What I left out

  • No page to read the receipts. They are read with SELECT payload FROM event WHERE kind = 'first_ask.refused'.

How to try it Press "Tell the crew" on an empty first-ask box, then run the query above.

🤖 Generated with Claude Code

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs