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

A refusal leads somewhere: a link to the exact control for the reader who can change it, one button that asks whoever can for the one who cannot #12953

opened this

Merged 17d 14h ago, live in production

A person or an agent who is refused is never left with "ask an admin" and nowhere to go, and never shown a path or a key name they cannot use. The owner's rule of 11-13: an error links the exact control when this reader can change it, or offers the action that asks whoever can.

Notes

opened this

What it protects

A person or an agent who is refused is never left with "ask an admin" and nowhere to go, and never shown a path or a key name they cannot use. The owner's rule of 11-13: an error links the exact control when this reader can change it, or offers the action that asks whoever can.

What a person now sees

  • One who can change it gets a link that lands on the field: /settings/accounts/bob#f-grant, /settings/crew#crew-key, /<owner>/<name>/settings/app#egress.
  • One who cannot gets one button, for example "Ask an admin for a model grant". Pressing it lands them back on the same page with "Asked".
  • The one who answers sees "bob asks for a model grant for bob (2 minutes ago)" on their home line, linked to that same field, with Not now beside it. A forge admin sees the forge's asks; a repository's admin sees that repository's. The ask is done by itself once the thing is there.
  • An agent gets the same next step as data on the API and MCP: fix { href, label } or ask { method, path, body }, and POST /api/v1/asks/admin is that call.
  • A run's summary and a park comment, read by anyone, say who can in words ("This forge has no model key. An admin of this forge can add one."); the run's page draws the link or the button for its reader.

How

One helper (src/kernel/blocked.ts, src/actions/blocked_words.ts), the one "ask the host" already used, now with the forge's own half of the ask (src/actions/ask_admin.ts, table admin_ask). Converted: model keys, grants, accounts, ceilings and budgets; a private destination; no mail and mail spent; a guest proposing a change; no agents; the telemetry grant; a repository's crew. How-to: docs/features/blocked-by.md.

What holds it

  • test/deadends.test.ts reads every sentence in src/ that sends its reader to someone else and fails on a new one that is not built by the helper. Twelve end where they are, each with its reason; four still wait, each with what it waits on; a plain role statement ("Only a forge admin sets a budget.") is allowed by rule.
  • test/ask-admin.test.ts opens every control as the one who can and finds the field the link names, and sends every ask as a guest, a member, a repository's admin, a forge admin and a hosted forge's owner.

To know before landing

  • It is one pull of about 70 files: the sentences, the tests that assert their exact words and the rule that reads them do not pass apart. Say if it should be cut differently.
  • Not changed here, found while checking that each control lifts its refusal: talking to the forge's agent refuses "no model account" from subscription grants alone, so a model grant in dollars does not lift it (the ask points at Subscriptions); the telemetry grant can be given to an agent only; no control restores a lost note; the host takes no ask for more lent credit.
  • Run locally on this commit: bun x tsc --noEmit and bun scripts/gate.ts exit 0; the always-run set with mcp-table, pages-budget, deadends and ask-admin is green but for the two Mac-only reds (release-boot, data-query-limits) and one cookie-flags case that answered 407 in the batch and passes by itself. The full suite was not run on the Mac.

🤖 Generated with Claude Code

commented

To the reviewer (sentinel), on "No terminal door for this action": the terminal door is in pull #12970, stacked on this one.

It is not here because the gate refuses it here: a pull that adds a terminal screen stays at twenty files (rule "small and single-purpose"), and this pull is about seventy. No waiver was asked for. The two land in order: this one, then #12970.

#12970 adds the palette command "What stands in the way" (src/tui/screens/asks_admin.ts): a sends the ask, o opens the control, n is Not now, through the same action as the page.

Also new in this push: the sentence rule moved to test/refusals-lead-somewhere.test.ts and is tagged as a tree scan, so every pull's fast tier runs it. Before, no fast tier did.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs