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

The pageless-doors list shrinks: the first eighteen tool-only or Talk-only doors in scripts/pageless-allow.json get a control on a page #18544

opened this

Merged 2h 34m ago, live in production

Two of the eighteen doors are done: archive and decisionsby. The other sixteen are still on scripts/pageless-allow.json, so this pull does not close the issue and a second pass should take the rest. I did not run the full suite.

Notes

opened this

Two of the eighteen doors are done: archive and decisions_by. The other sixteen are still on scripts/pageless-allow.json, so this pull does not close the issue and a second pass should take the rest.

I did not run the full suite. The pageless-doors, MCP-size and archive/autonomy tests pass, as do tsc and design-lint. The gate's --explain run shows one failure, test/schema-migrations.test.ts ("migrations boot from production data"). I did not look into it or run it by itself. This pull doesn't touch migrations, so I expect it fails on this sandbox, but that is unconfirmed.

  • Archive: the Unarchive button and its Undo on /archive now call setArchived, the function the archive tool calls. The tool and the page now enforce the same rule, repository admin only and never an agent.
  • Decisions rule: the "Decisions" choice on a repository's autonomy settings now calls setDecisionsBy, the function the decisions_by tool calls. It is sent only when the choice changed, as before. The change is that an agent admin can no longer change this rule from the page. The tool already refused agents.
  • List and tests: scripts/pageless-allow.json is down from 36 to 34 entries, and I lowered CEILING in test/pageless-doors.test.ts to match. A new test checks that each page and its tool call the same function.
  • No new surface: no new route, grant or page, so there is no review block. No tool changed, so the MCP words are unchanged. No tool schema changed either.

The other doors need more than a swap of the function behind an existing control.

  • No page control yet: app_data_import, bring, attach_look, estimate, board_write and keep_plan.
  • Tool imports no action function: feed_like, feed_dismiss, flag_set, maintenance, notify and the others that don't import one. The scan cannot match these until they do, so each needs a small refactor of the tool as well as a page control.
  • Brief miscount: the brief says eighteen entries run from app_data_import to notify, but that range holds twenty-one, and release_now, rollback and land_past_gate (the owner-only ones) are not all inside it.

Try it: open /archive, press Unarchive on a row, then Undo. On a repository's settings, change the Decisions choice and save.

🤖 Generated with Claude Code

Closes #18524

Show 1 earlier items

7 earlier comments
commented

<!-- look-pages 4ec568b613b1 --> Look pages for 4ec568b, from the gate:

  • look pages (none): this pull changes src/web/pages/archive.ts, src/web/pages/settings.ts but the forge could not trace the route of /, /admin/telemetry, /explore and 28 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
commented

I added an empty commit with Looks: /archive and Looks: /trevato/forge/settings lines and pushed it. The look-pages gate said it couldn't trace which page this pull changes. Those lines name the two pages touched, src/web/pages/archive.ts and src/web/pages/settings.ts. The code is unchanged.

I haven't re-run anything this turn. The four recurring check failures you listed (duplicate imports, first-view budget, user-column cascade, release budget) weren't in this feedback as failures on this pull. This push adds no code, so I left them. If the forge's check reports one against this pull, I'll fix it.

What the pull does: Archive and Unarchive, and the standing decisions rule, now post through the same actions their MCP tools call. That takes two doors off the pageless list, and both pages already had terminal and how-to doors.

What I left out: the other doors on scripts/pageless-allow.json. This pull covers only these two.

How to try it:

  • Open /archive, press Unarchive on a row, then press Undo.
  • On a repository's settings, save the Decisions choice.
commented

<!-- look-pages 539298d4d772 --> Look pages for 539298d, from the gate:

  • look pages (none): "Looks: /archive" is not a page of app.looks in forge.json; this pull changes src/web/pages/archive.ts, src/web/pages/settings.ts but the forge could not trace the route of /, /admin/telemetry, /explore and 28 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
commented

The gate refused my last Looks: line because /archive isn't in app.looks in forge.json, and neither is a repository's settings page. I added an empty commit with a No look: line giving that reason and pushed it. I changed no code.

I didn't add either page to app.looks. That would put two new pages in the look set for a control that posts through an existing action. If you want them there, say so.

I didn't re-run any tests this turn, since nothing in the code changed. The four recurring check failures you listed weren't reported against this pull, so I did nothing about them.

What the pull does: Archive and Unarchive, and the standing decisions rule, now post through the actions their MCP tools call. That takes two doors off scripts/pageless-allow.json. Both pages already had terminal and how-to doors.

What I left out: the other doors on the pageless list.

How to try it:

  • Open /archive, press Unarchive on a row, then press Undo.
  • On a repository's settings, save the Decisions choice.
commented

Seven of the eighteen named doors now have a page control, plus outsiders, which is outside that range. Fourteen of the eighteen are still listed in scripts/pageless-allow.json, so boxes 1 and 2 are not met.

The allow list went from 36 to 28 entries and its ceiling test now says 28. I ran the tests for the changed areas and they pass: the two pageless suites, the feed, flags, notify, maintenance and outsiders suites, and the settings tests. I did not run the whole suite. tsc, the gate and the design lint are clean.

What changed

  • Five doors: feed_like, feed_dismiss, flag_set, maintenance and notify. Each tool and its page now call one new function under src/actions/: feed_act.ts, flag_set.ts, notify_set.ts (both the notify URL and focus) and maintenance.ts. The maintenance module only re-exports the existing functions.
  • outsiders: the repository settings form now saves it through setCrewOutsiders, the function the tool calls. An agent is told "Nothing was saved" and why.
  • Decisions save: the change goes first through setDecisionsBy. If an agent is refused, nothing is saved, and the message says so. If the other settings then fail, it says the Decisions choice was saved. The form's hint says agents can't change this choice, and the /archive error now says an agent can't archive.
  • Tests: the source-grep test is gone. test/pageless-doors-pages.test.ts posts to /archive/unarchive, /archive/again, /<owner>/<repo>/settings/autonomy and the settings form. It posts as a person and as an agent that owns the repository, and checks the stored result and the words shown. It also tests setFlag and actOnFeedItem.

Disagreement: an agent can't be made admin through a team (invariant 10), so the "agent admin" case only arises where the agent owns the repository. The tests use that case, which is also the only way an agent reaches the settings forms.

Not done: the other 14 doors from the list are now one issue each, #18585 to #18598. Each issue carries its own done-when boxes, so each can land alone. They are app_data_import, app_registry, atlas, attach_look, board_write, bring, changes, claim_link, cloud_accounts, decider_shadow, estimate, invite, keep_plan and land_past_gate. I did not link #18524 to wait on them, so it should not close on this pull.

Look pages: neither page is in app.looks, so no pictures show them. The commit carries No look: and leaves it to the reviewer.

[
  {"go": "/archive (signed in as an admin, with an archived repository listed)", "look": "press Unarchive on a row, then Undo in the message", "expect": "the message says it is back on home and its lists; Undo archives it again and the row returns"},
  {"go": "/<owner>/<repo>/settings, the On its own card", "look": "change Decisions here and press Save", "expect": "the card says the autonomy mode was saved, and Decisions shows the new value after the redirect; the hint says an agent can't change this choice"},
  {"go": "the same card, as an agent that owns the repository", "look": "change Decisions and press Save", "expect": "a red message says nothing was saved and that only a person who administers the repository can change it"},
  {"go": "/<owner>/<repo>/settings, the gates card", "look": "tick Outsiders may trigger the crew and save", "expect": "'Settings saved.', and the box stays ticked; an agent doing the same is told nothing was saved"}
]
commented

Two tests had failed because the crew page was over its first-view word budget (792 words against 766). The sentence I added to the "Decisions here" hint earlier on this branch pushed it over.

I shortened the rest of that hint and kept the new sentence, which a test checks for. Here is what I dropped:

  • "and context" from the ledger sentence.
  • The "unsure ones on your board" clause.
  • The explanation of the shelved-repository rule, now one short sentence.

The crew page now counts exactly 766 words at both widths, so it passes. test/attention.test.ts, test/attention-stamped.test.ts and test/pageless-doors-pages.test.ts pass locally (13 tests), and bun x tsc --noEmit is clean. I merged the current main into the branch before running them, and pushed as 2e50d3f53.

I did not run bun scripts/gate.ts this time: my first attempt used the wrong directory and I didn't rerun it. I also didn't run the full suite, which the forge's check does on push.

Because the page is exactly at its budget, any further words on it will fail again.

commented

Eight of the eighteen doors in #18524 now have a page control and leave scripts/pageless-allow.json: archive, decisions_by, feed_dismiss, feed_like, flag_set, maintenance, notify and outsiders. Each page now posts through the same function its MCP tool calls, so the page and the tool check who may and save the same way.

The other fourteen are still listed: app_data_import, app_registry, atlas, attach_look, board_write, bring, changes, claim_link, cloud_accounts, decider_shadow, estimate, invite, keep_plan and land_past_gate. One run cannot do all fourteen well, so they stay split into #18585–#18598. This pull does not meet #18524's boxes 1 and 2 as written. Someone needs to rewrite those boxes to the eight done here, with the rest tracked on the new issues.

Changes since the last review

  • Agent limit said once: the Decisions hint now says it in one line ("Only a person who administers it can change this, never an agent."). The refusals on the Decisions form, the Outsiders toggle and /archive are each one short line.
  • Decisions saves in one write: a changed rule is first checked with a dry run of setDecisionsBy, which saves nothing. Then the rule and the rest of the autonomy form go through one updateRepoSettings call, so the form saves everything or nothing.
  • No pass-through modules:
    • actions/maintenance.ts now holds switchDuty itself, moved from maintain/pause.ts and used by the page, API, MCP tool and terminal.
    • prepare and resumeNow are called from maintenance/service.ts, where they live.
    • saveFocus is gone; the page and the tool call setFocus.
  • Flag test: the flag_set test now posts the Flags form and checks the page shows the same words setFlag returns.
  • Crew page word budget: 752 of 766 words, so it now has room to spare.

Tests that cover the change pass (161, including the word-budget, duplicate-import, account-purge, maintenance, archive and flag suites), and so do tsc, scripts/gate.ts and design-lint.

Try it

  • On a repository's Settings, sign in as an agent that administers it, change Decisions and save. The page says "Nothing saved: Decisions is not yours to change." and nothing changes. As a person admin, change Decisions and the direction together, then save; both are stored.
  • On /archive, press Unarchive on a row, then Undo.
[
  {"go": "/<owner>/<repo>/settings#autonomy", "look": "the Decisions here field's hint", "expect": "one sentence at the end: Only a person who administers it can change this, never an agent."},
  {"go": "/<owner>/<repo>/settings#autonomy", "look": "change Decisions and the direction, then save, as a person admin", "expect": "one flash; both the rule and the direction are saved"},
  {"go": "/archive", "look": "press Unarchive on a repository row, then Undo", "expect": "the row leaves the list, then comes back", "ask": "Does the Undo receipt name the repository?"},
  {"go": "/settings/flags", "look": "save a flag with a bad percent", "expect": "a one-line refusal that says why, the same words the flag_set tool answers"},
  {"go": "/maintenance", "look": "pause a duty, then resume it", "expect": "flash says '<duty> is paused.' then '<duty> is on again.'"}
]

🤖 Generated with Claude Code

commented

Left #18524 open: 2 unticked items remain (The eighteen entries from app_data_import to notify in scripts/pageless-allow.json each have a control on a page (put it on the page of the noun it acts on: a repository, app, person or machine), reached through the same action function the tool calls, not a copy.; Those entries are removed from the list and test/pageless-doors.test.ts passes.).

Sign in to join this conversation.

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

Keyboard shortcuts

Docs