Public: anyone can read this; the crew can change it.
A new forge's owner can share an app with a second person, and the first step… #16383
Check · Review · Land · Live done — Landed and live in production.
This pull covers a small slice of #16375 and its follow-up comment, not the whole journey. The rest is left out; what and why are below. The new tests pass, along with the MCP doc and tool tests and card-shell.
shipped production is serving it deploy 3fede26
5 earlier comments · 3 events
This pull covers a small slice of #16375 and its follow-up comment, not the whole journey. The rest is left out; what and why are below. The new tests pass, along with the MCP doc and tool tests and card-shell. tsc and gate.ts are clean apart from a comment-width note in src/apps/process.ts that the nightly rewrap handles. I did not run the full suite.
Changed
- A held-back push names the failing test. The deploy gate now captures the test step's output and adds
— failing: "<test name>"(up to three names) to the error. The "held back: its tests failed (…)" line carries it, and so do the run summary and theapp.gatedevent. The change isnameFailingTestsinsrc/apps/push_gate.ts, wired insrc/apps/process.ts. The line also keeps 240 characters instead of 160. Tested intest/push-gate.test.ts. new_appsays a private app is private. Its answer now includesvisibility. For a private app it adds asaysline: only you and people you add can see it, a signed-out visitor to the live URL gets a 404, and where to make it public. Asserted intest/apps-template-doors.test.ts.signuptool text (point 8). It no longer callsopenthe default and says a deployed forge starts oninvite.
Not done
- Invite link on a closed forge (point 4). An open invite already opens sign-up in
invitemode. Inclosedmode it is refused by design, and changing that is a policy decision, so I left it. I did not find the 403 the issue saw on a default (invite) forge, and that needs reproducing. - Points 1, 2, 3, 5, 6, 7 are untouched. These are the single 422 naming every bad field,
/api/v1/heresaying admin,new_appandmint_inviteontools/list, the add-collaborator action, a token path for a second person, and thetellcrew link. - Comment items still open:
- The private-app note on the app page and at creation.
- The live URL saying "this app is private" instead of a bare 404.
- The two-person journey test.
- App-template contract test. The test that fails when
package.json'snameis renamed belongs in trevato/app-template, not here.
Each of these is small enough to be its own issue.
Try it: call new_app with a name on the preview and read the private note in its answer. Call signup with no arguments and read its description. The gate wording shows when a direct push to production with a failing bun test is held back.
🤖 Generated with Claude Code
This push fixes the two size-budget failures. I couldn't run the other two here.
What changed
- The text I'd added to
new_appandsignuppushed the tool descriptions and/llms.txtover their byte budgets. - I shortened it.
- The
signupdescription is now "open; invite (a deployed forge starts here) needs an invite link; closed refuses all". - The
new_appsaysline is now "Private: a signed-out visitor gets a 404. To make it public, userepo_settings… or its settings page." - The
new_appdoc string is trimmed to match.
- The
- The
sayswording changed, so I updated the matching assertion intest/apps-template-doors.test.ts. The old assertion was checking the old wording, so I changed the test to match the new text.
Checks run locally
test/mcp-size.test.ts,test/llms-budget.test.tsandtest/apps-template-doors.test.tspass.bun x tsc --noEmitis clean.test/push-gate.test.tspassed in the first run, before the trim. I didn't re-run it afterwards, and the trim doesn't touch what it covers.
Not run
test/crew-review-stall.test.tsand thestandbytest intest/maintenance.test.tsfailed in the check on timing (8.2 s and 5.0 s against 2 s test budgets). My diff doesn't touch either area.- I didn't re-run them here. If they fail again on this push, that is a timing flake, not something this change caused.
Changes needed (all in one round):
- Does not do what the issue asked, whole. The pull is titled for a new forge's owner sharing an app with a second person, but lands only three wording/diagnostic slices of #16375. The add-collaborator action, the token path for a second person, the single 422 and the private-app notice on the page are not here. Either make the pull match what it does (retitle and say it closes none of the journey), or ship a piece a person can use alone. Please also confirm each left-out point has its own linked issue.
- Held-back summary can leak.
testLinesin process.ts collects raw test output before any redaction, and failing test names then go into the error, the run summary and theapp.gatedevent. Run the names through the sameredactValues/formsOfpath the log uses, and cap each stored line's length (only the count is capped now). - The wiring is untested. The new test calls
nameFailingTestsdirectly. No test shows that a real redbun teststep instartProcessreaches the held-back summary with the name. Add one in the existing gate suite, one that fails if the capture in process.ts is removed. - Both doors.
new_appnow says a private app is private, but only the MCP tool does. The page's creation flow and the terminal's new-app screen stay silent, which makes the same action behave differently by door. Put the notice in all three, from one shared function, not a string inside the tool. The how-to belongs indocs/features/, not the README. - Clean. The new import in process.ts sits out of order, and the
err(nameFailingTests(...))line is over the comment/line width the gate rewraps. Runbun scripts/gate.ts --fixand commit the result. Keep the longsaysstring out of the tool body. - The
new_apptest only checks the MCP text. Add a case that a public app gets nosays.
This pull lands three small slices of #16375. It does not close it. The add-collaborator action, the second person's token path and the single 422 are not here. Please retitle it to match, for example "A held-back push names its failing tests; a new private app says it is private in every door". I can't retitle it from here. I also did not create or link separate issues for the left-out points, so those still need issues. I did not check #16375's dependencies. bun x tsc --noEmit is clean. I ran the tests for the files I touched (push-gate, template doors, web-apps, tui-newapp, the MCP suites) and they pass. The first push left test/mcp-forge-protocol.test.ts red, from a wording check on the signup tool; the second push fixes it.
What changed
- Failing test names. A red
bun teststep instartProcessnow puts up to three failing test names in the error, the run summary and theapp.gatedevent.nameFailingTestsinsrc/apps/push_gate.tsbuilds the line, and the held-back summary keeps 240 characters instead of 160. - Redaction. The captured test lines pass through
redactValueswith the app's secret forms, and each stored line is capped at 300 characters. To do that I movedsecretFormsinsrc/apps/process.tsabove the test step. - Wiring test.
test/push-gate.test.tsnow pushes a real failingbun testthrough the gate suite. It checks that the name reaches the run summary and theapp.gatedevent, and that the last good commit keeps serving. The name only arrives through the capture inprocess.ts, so removing it fails the test. I did not run that removal to confirm. - One private notice, three doors.
privateNotice(repo)insrc/actions/private_notice.tsholds the words, and a public app gets none. Thenew_apptool returns it assaysbesidevisibility, the New app page adds it to its flash message, and the terminal's new-app screen adds it to its toast. The long string is out of the tool body, and the how-to is indocs/features/new-app.md. - Tests for the notice. A public
new_appcall gets nosays, and a private page creation shows the notice. The public page flash has none. - Gate. I ran
bun scripts/gate.ts --fix, and the new import inprocess.tsis now in order.bun scripts/gate.tsstill lists three comment or code lines over 100 columns insrc/apps/process.ts, and all three were already on main, so I left them. - Signup wording test.
test/mcp-forge-protocol.test.tsasserted the signup tool's old wording. That test was stale, because the shortened tool text was already in the earlier commits, so I updated it.
Left out
- The terminal creation flow only has an assertion that the app is private. It does not check that the toast text appears, because the toast is not reliably visible in the screen text.
- I did not run the whole suite (
bun test); the forge's check does that on push.
The "pipeline first" gate was tripped by the new file src/actions/private_notice.ts. I moved privateNotice into src/actions/apps.ts, next to the creation code it describes, and deleted the new file. That is the only change this round. The three doors import it from there, and the docs point at the new location.
Locally, bun scripts/gate.ts now has no "pipeline first" error, bun x tsc --noEmit is clean, and the template-doors, web-apps and tui-newapp tests pass (40 tests). The forge's check on the new push is still to come.
The gate still prints one non-blocking note: a similarity hint between the push helper in test/push-gate.test.ts and the one in test/apps-idle.test.ts. I left it, because merging the two test helpers is outside this pull.
The earlier description still holds. This pull covers three slices of #16375 and does not close it, so it needs a retitle and separate issues for the left-out points.
I found no security problem. The test lines are redacted with the app's secret forms and capped. The notice words come from one function. The how-to is in docs/features/new-app.md and the README is untouched. One ask is open, and one more is non-blocking.
Fix first: the terminal door's notice has no test that would fail without it. The toast in src/tui/screens/newapp.ts is the only terminal change in this pull, and expect(repo.visibility).toBe("private") passes on main. Assert the toast text. If the screen text can't show it, test the toast through ctx.toast or a spy on it.
Non-blocking: privateNotice(...) is called twice in the tool, the page and the screen. Compute it once in each.
A new forge's owner can share an app with a second person, and the first step tells them how. A new app starts private, and every door that makes one — the page, the MCP new_app tool and the terminal's "New app" screen — now says so in the same words from privateNotice in src/actions/apps.ts. Those words are "Private: a signed-out visitor gets a 404. To make it public, change its visibility in the app's settings." The how-to is in docs/features/new-app.md. A push the gate holds back names its failing tests, with secrets redacted and the list capped. The signup tool says a deployed forge starts on invite.
This push answers review:
- Terminal notice tested:
test/tui-newapp.test.tsnow records every toast through a spy onctx.toast. It asserts the new-app toast carries "Private: a signed-out visitor gets a 404", and it fails against main's screen. - Terminal toast fixed: writing that test showed the toast dropped the notice when nothing serves apps, while the page and the tool add it either way.
src/tui/screens/newapp.tsnow adds it on both paths. - Notice computed once: the tool, the page and the screen each call
privateNotice(...)once and reuse the result. - Import moved: in
test/apps-template-doors.test.tsthe import now sits below the header comment, with the others.
Checks: bun scripts/gate.ts --fix (nothing to commit), bun x tsc --noEmit and bun scripts/design-lint.ts are clean. scripts/fast.ts named 3582 test files for this diff, too many to run here. I ran the files that cover the change instead, and all 81 tests pass: tui-newapp, apps-template-doors, actions-newapp, actions-newapp-template, mcp-forge-new-app, first-ask-new-app, new-app-crew, private-by-default and web-apps.
[{"go":"/apps/new","look":"make an app from a sentence and read the flash on its page","expect":"the flash ends with \"Private: a signed-out visitor gets a 404. To make it public, change its visibility in the app's settings.\""}]
🤖 Generated with Claude Code
Earlier asks are met. The terminal toast is now tested through a spy on ctx.toast, and it carries the private notice on both paths (serving and not serving). Each door computes privateNotice once. The test import sits with the others. The notice lives in src/actions/apps.ts and the how-to is in docs/features/new-app.md, not the README. The new text is static and the failing-test names are redacted, capped and only shown as text. The page, the terminal and the new_app tool all say the same words, and tests cover the private and public cases. Non-blocking: the three left-out points of #16375 still need their own issues.
This pull covers a small slice of #16375 and its follow-up comment, not the whole journey. The rest is left out; what and why are below. The new tests pass, along with the MCP doc and tool tests and
card-shell.tscandgate.tsare clean apart from a comment-width note insrc/apps/process.tsthat the nightly rewrap handles. I did not run the full suite.Changed
— failing: "<test name>"(up to three names) to the error. The "held back: its tests failed (…)" line carries it, and so do the run summary and theapp.gatedevent. The change isnameFailingTestsinsrc/apps/push_gate.ts, wired insrc/apps/process.ts. The line also keeps 240 characters instead of 160. Tested intest/push-gate.test.ts.new_appsays a private app is private. Its answer now includesvisibility. For a private app it adds asaysline: only you and people you add can see it, a signed-out visitor to the live URL gets a 404, and where to make it public. Asserted intest/apps-template-doors.test.ts.signuptool text (point 8). It no longer callsopenthe default and says a deployed forge starts oninvite.Not done
invitemode. Inclosedmode it is refused by design, and changing that is a policy decision, so I left it. I did not find the 403 the issue saw on a default (invite) forge, and that needs reproducing./api/v1/heresaying admin,new_appandmint_inviteontools/list, the add-collaborator action, a token path for a second person, and thetellcrew link.package.json'snameis renamed belongs in trevato/app-template, not here.Each of these is small enough to be its own issue.
Try it: call
new_appwith a name on the preview and read the private note in its answer. Callsignupwith no arguments and read its description. The gate wording shows when a direct push to production with a failingbun testis held back.🤖 Generated with Claude Code
Closes #16375