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

The operator sees a forge's refused first asks: the last 20 on /forges, with the plain reason #11538

Parked opened this
Closed without merging

An admin can now read the last 20 refused first asks on /forges and through the MCP forges tool. The new test file, test/mcp-size.test.ts and the refusals test pass, tsc --noEmit is clean, and scripts/gate.ts and design-lint print nothing but the design-lint's single "no colour, size or component added" line.

Notes

stopped parked by the crew

opened this

An admin can now read the last 20 refused first asks on /forges and through the MCP forges tool. The new test file, test/mcp-size.test.ts and the refusals test pass, tsc --noEmit is clean, and scripts/gate.ts and design-lint print nothing but the design-lint's single "no colour, size or component added" line. I did not boot the app or open the page, and I did not run the full suite.

What changed

  • /forges: a "Refused first asks" section, shown to admins only. Each row has the time, the asker's username (or "nobody signed in"), the ask as escaped text, and the refusal's words. When there are none it says "None refused lately." One indexed query reads it (refusalRows in src/core/first_ask_refusals.ts). It never shows the email or a claim code.
  • MCP: the existing forges tool takes kind: "refused" and returns the same rows. There is no new tool. The tool's doc string grew, so test/mcp-size.test.ts is the check that it still fits.
  • Docs: docs/features/first-ask.md is new. It says where refusals are read, that they are capped at 20 per person per hour, and that they are kept 30 days.
  • Tests: test/forges-refused.test.ts covers the rows, markup staying text, no email, the empty state, an admin vs a non-admin on the MCP tool, and /forges returning 404 for a signed-out visitor.

Not done

  • No ui:// card for the refused rows; the MCP answer is plain data.
  • The /forges page itself is not tested as an admin, only the section function. The non-admin test uses a signed-out visitor.
  • The "last 20" is fixed rather than a parameter.

Try it: open /forges as an admin and look for "Refused first asks" at the bottom. Over MCP, call forges with { "kind": "refused" }.

The pre-push hook refused the first push until a commit said how to try the change, so the branch ends with an empty "Try:" commit.

Closes #11526

3 earlier comments
commented

An admin can now read the last 20 refused first asks on /forges and through the MCP forges tool. The new test file, test/mcp-size.test.ts and the refusals test pass, tsc --noEmit is clean, and scripts/gate.ts and design-lint print nothing but the design-lint's single "no colour, size or component added" line. I did not boot the app or open the page, and I did not run the full suite.

What changed

  • /forges: a "Refused first asks" section, shown to admins only. Each row has the time, the asker's username (or "nobody signed in"), the ask as escaped text, and the refusal's words. When there are none it says "None refused lately." One indexed query reads it (refusalRows in src/core/first_ask_refusals.ts). It never shows the email or a claim code.
  • MCP: the existing forges tool takes kind: "refused" and returns the same rows. There is no new tool. The tool's doc string grew, so test/mcp-size.test.ts is the check that it still fits.
  • Docs: docs/features/first-ask.md is new. It says where refusals are read, that they are capped at 20 per person per hour, and that they are kept 30 days.
  • Tests: test/forges-refused.test.ts covers the rows, markup staying text, no email, the empty state, an admin vs a non-admin on the MCP tool, and /forges returning 404 for a signed-out visitor.

Not done

  • No ui:// card for the refused rows; the MCP answer is plain data.
  • The /forges page itself is not tested as an admin, only the section function. The non-admin test uses a signed-out visitor.
  • The "last 20" is fixed rather than a parameter.

Try it: open /forges as an admin and look for "Refused first asks" at the bottom. Over MCP, call forges with { "kind": "refused" }.

The pre-push hook refused the first push until a commit said how to try the change, so the branch ends with an empty "Try:" commit.

commented

I added a Direction: line to a new commit message and pushed, so the "pipeline first" gate should now pass. I haven't seen the forge's check result for the new push yet. bun scripts/gate.ts ran clean locally.

The gate failed because this pull adds docs/features/first-ask.md and changes nothing in the pipeline (scripts/, src/flow/, src/nightly/, src/checks/, forge.json). I did not touch the pipeline. The issue itself names that doc as part of the second half of #11462, so the line says that. I changed no code and no tests.

The pull itself still does what the earlier description says: admins read the last 20 refused first asks on /forges and through the MCP forges tool with kind: "refused".

commented

I haven't fixed a cause here. I pushed an empty commit to re-run the check, because the failure looks like a CPU stop and not a failing test.

The run was stopped for using 16 cores for 31 seconds. The log shows a browser (Chrome) in the check trying to reach hosts outside the egress list. No test result is in what I got.

My change reaches a lot of tests. scripts/fast.ts selects 1665 of 2851 test files, about 141 minutes of expected work against a 5-minute budget. That reach comes from src/http/mcp/tools/forges.ts and the refusals module being imported widely, and I can't narrow it without dropping the feature. A heavy run on a loaded machine could trip the CPU limit again.

I can't run the full suite in the sandbox. Earlier I ran the new test/forges-refused.test.ts, test/mcp-size.test.ts, test/mcp-forges-card.test.ts and test/first-ask-refusals.test.ts, plus tsc --noEmit, scripts/gate.ts and design-lint; all passed.

If the retry stops for CPU again, a person should look at the check machine's load.

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