Public: anyone can read this; the crew can change it.
An app made in the tab forge can be published as a read-only link on the forge, with no login #18219
Merged 9h 48m ago, live in production
An app made in a browser tab can now be sent to the forge and opened from one read-only link, with no login. I ran the new tests, the migration, route-mark, lazy-list, reserved-name, door and unused-export tests, tsc --noEmit and design-lint; all passed. I did not run the full suite.
-
Reviews
Changes requested — before the latest pushThe feature works as the issue asks: a same-origin POST validated by decodeApp, a 16-character random id, a read-only escaped page with the floor's headers, one 404, and the words shared with the terminal. I opened the preview: /tab loads and an unknown /tabforge-link id answers the 404; I saw no picture of the link page, since it has none in app.looks. Two things to fix in one round.
- The caps can never free, so the link can die for good. A link has no delete and no expiry, but shareApp counts rows forever. One connection (or everyone behind one NAT) is locked out after 20 links, though the message says 'try again later'. Five thousand rows from a few scripts across addresses switch the feature off for everyone. That is a cap added where removing something would do (a Never), and a way for strangers to lock out a door. Fix: drop the per-connection and global row caps; keep the per-address minute from the
sharedoor. Bound storage by letting the oldest rows go (prune past a total, or after an age, in the insert), and say so in docs/features/tabforge.md. Add a test that fails without it. - tabLinkMake reads and decodes the body (up to 320 KB) before the rate limit is taken, so a flood costs the parse before it is refused. Take the door first, then read the form. Add a test that the 11th post in a minute from one address gets 429 and stores nothing; no test covers the new
sharedoor now.
No README change, docs are in docs/features, no new dependency, and the migration, pin and route lists are in order.
ApprovedBoth earlier asks are met at this head. (1) Caps that never free: the per-connection and total refusals are gone; storage is bounded by pruning to the newest KEPT links, so a new link is always made and no one can lock the door. (2) The share door is now taken before the body is read, and test/tab-share-door.test.ts shows the 11th post and a 300 KB body both get 429 and store nothing. Nothing else changed in the security floor: same-origin refused (403 test), body capped by bytes read, id from 12 random bytes, output escaped, no entries stored, one 404 for unknown or malformed ids.
Non-blocking: the migration comment still says the bucket column caps one connection's count, and the tab_shared_bucket index and bucket column are now unused, since that cap was removed. Drop them in a later migration, or fix the comment.
- The caps can never free, so the link can die for good. A link has no delete and no expiry, but shareApp counts rows forever. One connection (or everyone behind one NAT) is locked out after 20 links, though the message says 'try again later'. Five thousand rows from a few scripts across addresses switch the feature off for everyone. That is a cap added where removing something would do (a Never), and a way for strangers to lock out a door. Fix: drop the per-connection and global row caps; keep the per-address minute from the
-
Checks
shipped production is serving it deploy 3eab8eb
-
History
- Direction: tab forge links are bounded by dropping the oldest, not by caps that never free; the share door is taken before the body is read (#18215) d12d0fe
- Name /tabforge-link among the top-level routes with no picture in app.looks (#18215) bdc5b0e
- List /tabforge-link/:id among the pages the budget fixture cannot fill (#18215) 9a05d0e
- Name the new /tabforge-link/:id route in the two route walks that skip what the seed cannot fill (#18215) 818c3b4
- Tab forge links: regenerate the route marks; say the door, looks and try-it for #18215 0ead4ff
- Direction: an app made in the tab forge can be published as a read-only link with no login (#18215) 1cefcf7
- Games: installing the quality set ships Essential Commands' config with only /home, /spawn and /tpa on (#18199) 7b84b2c
- Connections on an account: verified identities the person controls, each with its own uses, and a lookup that answers only on opt-in (#18120) 314f4eb
- A granted app's two-page print comes out as one sheet, printed on both sides (#18194) e2e7eb4
- Traces 5c: the trace list and one trace read through MCP tools and a terminal screen compare (#18183) cc38920
- Access 5a: a visitor principal is minted only when a visitor creates something, signed, with a role in may() and per-visitor limits (#18174) e261ee9
- Games: the forge pins forge-velocity d0635dac1654 (cannot throw into a command) (#18203) 08c4b42
- Spend 2: plan a Stop or Delete from the cost row, refused on a read-only account, audited (#18170) fecfd88
- Mail from the owner's AWS account: the forge sets up SES, its DNS records and the mail key in one confirmed step (#18119) bd73c12
- Games: a mod-set install refuses a Modrinth slug that now points at a different project than the lock holds (#18200) fa82fd9
- Access 3b: MCP, pages, the terminal, games and infrastructure ask may(), one door per pull (#18186) 5a3de44
- Games: the forge-velocity pin's sha256 is the jar's whole digest (#18198) 7ede9b5
- Access 4b-2: an admin sees who can reach what, by person and by resource (#18179) a8d3bc8
- Full suite red: test/standards-sitemap.test.ts (#18193) 8072255
- Games: the forge pins forge-velocity bee2a65cf3f2 (/forge answers from a SQLite snapshot at once, one clean style) (#18163) b4fe556
6 earlier comments
An app made in a browser tab can now be sent to the forge and opened from one read-only link, with no login. I ran the new tests, the migration, route-mark, lazy-list, reserved-name, door and unused-export tests, tsc --noEmit and design-lint; all passed. I did not run the full suite. I did not try it in a browser on the preview.
What changed
- Get a link: the app's page in the tab forge has a "Get a link" button beside its source link. It is a plain form carrying the app's JSON in a hidden field, so it works with script off.
- Making the link:
POST /tabforge-linkchecks same-origin and caps the body at 80 KB. It validates the app withdecodeApp, soLIMITSapply, and a spec it refuses stores nothing. It keeps only the decoded app in a newtab_sharedtable and answers/tabforge-link/<16-char random id>. - Opening the link:
GET /tabforge-link/<id>draws the app with the sharedrenderAppin preview mode, so it has no forms and no entries, and the output is escaped. It carries its own CSP,nosniffand a referrer policy. An unknown or malformed id gets the forge's one 404. - Code: the logic is
src/tab/share.ts; the route issrc/web/pages/tabforge-link.ts. The route is registered indiscovery.ts,lazy_lists.ts,reserved.ts, a route mark, and a migration with its pin. - Terminal: the words are
TAB_LINKinsrc/tab/words.ts, said again by the palette entry'stabLine(). The terminal has no tab app to send, so the commit saysNo doorfor that. - Docs:
docs/features/tabforge.mdhas a new section. - Tests:
test/tab-share.test.tscovers the round trip with escaping and no entries, a refused spec storing nothing, a cross-origin POST giving 403, the 404, the per-connection cap, and the button's words matching the terminal's. - Reused:
decodeApp,renderApp/pageOf,ANSWER_HEADERS,readForm,takeDoorandclientBucket. I did not runscripts/similar.ts.
What I chose, and left out
- Route path: the path is
/tabforge-link, not under/tabforge/. That prefix is the tab forge's service-worker scope, and in a browser that had started a tab forge, its worker would answer the link instead of the forge. This departs from the issue's "under /tabforge". - Limits: 10 posts a minute per address through a new
sharedoor instrangers.ts, 20 links per connection and 5000 in all. There is no visitor principal, no grant table, and no way to edit or delete a link yet. - Where the button is: the file download is on the tab forge's home, not on the app page, so I put the button on the app page, beside its source link.
Try it
Open /tab on the preview, press Start, make an app, then press "Get a link" on its page. The link opens in a new tab and works logged out.
The two failing tests came from /tabforge-link/:id, a route the walk's seed can't fill, which neither test had been told about. I added that route, with a reason, to the skip lists in test/no-polling.test.ts and test/security-floor-routes.test.ts. The security-floor-routes entry was my guess from the test's shape; the check's output only named the no-polling test, so it wasn't confirmed as needed.
Both test files pass locally and the fix is pushed to the pull. They logged an SQLITE_IOERR from a background usage-count job while running, which I did not look into. I did not re-run the full check here, so the forge's run of it is the confirmation.
The check's last failure was test/pages-budget.test.ts, which wants every route the fixture can't fill listed in its own file. I added test/budgets/unfixtured/tabforge-link-id.json for /tabforge-link/:id. test/pages-budget.test.ts now passes locally, and the fix is pushed to the pull. I haven't re-run the full check, so the forge's run is the confirmation.
An app made in the tab forge can be published as a read-only link, with no login, and the earlier red check is fixed. The failing test was app.looks is the router's top-level pages minus the not-a-page list in test/forge-looks.test.ts. It failed because /tabforge-link was in no list. It is now in NOT_A_PAGE with its reason.
What the link does
POST /tabforge-linkis same-origin only and reads at most 80 KB. It validates the app withdecodeApp, stores only the app (never its entries) intab_shared, and answers/tabforge-link/<id>with a 16-character random id. A specdecodeApprefuses stores nothing.GET /tabforge-link/<id>draws the app read-only, escaped, with the floor's headers. An unknown or malformed id gets the forge's one 404.- The app's page in the tab offers "Get a link" beside the file download, as a plain form that works with script off. The terminal has it in the same words.
- Strangers are capped at 10 posts a minute per address, 20 links per connection and 5000 in all. It mints no visitor principal and adds no grant table.
- The code is in
src/tab/share.tsandsrc/web/pages/tabforge-link.ts.docs/features/tabforge.mddescribes the route.
Left out
- There is no way to edit or delete a link yet.
- The visitor principal is the next issue.
- The page has no picture in
app.looks, because its 32 slots are full.test/tab-share.test.tscovers it.
Checks run
bun scripts/gate.ts --fixandbun scripts/gate.tsboth ran clean.bun x tsc --noEmitwas clean.test/forge-looks.test.ts,test/tab-share.test.ts,test/security-floor-routes.test.tsandtest/no-polling.test.tspass (44 tests).test/dup-imports.test.tsandtest/unused-exports.test.tspass (10 tests). These are the duplicate-import and dead-code rules.- The forge runs the full check on this push.
Try it: open /tab, make an app, press "Get a link", and open the returned /tabforge-link/<id> in a private window.
An app made in the tab forge can now be published as a read-only link with no login; POST /tabforge-link keeps the app and GET /tabforge-link/:id draws it, escaped. The failing check is fixed and already on the branch, so I pushed nothing new this turn.
app.lookstest: it failed because the router now has a top-level/tabforge-linkthat the not-a-page list intest/forge-looks.test.tsdidn't name. An earlier turn of mine had already pushed that entry as bdc5b0ec3. This turn I wrote the same fix, saw the push was rejected as behind, and dropped my duplicate commit.bun test test/forge-looks.test.tspasses on the branch as it is.data browser coretest: I did not fix this one. The check log shows it red on main as well. It flagsconnection_lookup_audit.key_idas a column that could hold a secret and isn't in the audited-clear list. That column isn't from this pull, so I left it alone.
Not done
- No picture of
/tabforge-linkinapp.looks: all its slots are full, and the route is a POST plus a link that needs a stored app. - I have not re-run the full check; the forge runs it on the push.
Try it
- Open
/tabforge, make an app, and publish it to get a/tabforge-link/:idaddress. - Open that address in a signed-out browser: the app shows read-only, with nothing to edit.
Both of sentinel's points are fixed and pushed. The tab-share and share-door tests, tsc, the gate and the two repo checks (dead exports, duplicate imports) pass locally. I haven't re-run the whole suite; the forge runs that on the push.
What changed
- Caps (
src/tab/share.ts):- The 20-per-connection and 5000-total refusals are gone, and with them the 429 from
shareApp. A new link is always made. - Storage is bounded by pruning. Each insert keeps the newest 5000 links (
KEPT) and deletes the older ones. The delete is by rowid, so it stays cheap; a first version that sorted on every insert took about 22 s for 5000 inserts. - The per-address limit of 10 posts a minute (the
sharedoor) stays.
- The 20-per-connection and 5000-total refusals are gone, and with them the 429 from
- Order (
src/web/pages/tabforge-link.ts):tabLinkMakenow takes thesharedoor first, then reads the form, so a flood is refused before the body is read or parsed. - Docs:
docs/features/tabforge.mdsays the table is limited by rate and by pruning the oldest. It also says a link can stop opening once 5000 newer ones exist.
Tests
test/tab-share.test.ts: the old cap test is replaced. After 5001 inserts the table holds exactlyKEPT, the first link no longer opens, and the latest insert still succeeded.test/tab-share-door.test.ts(new): ten posts from one address get 201. The 11th, and then a 300 KB body, both get 429, and only 10 rows are stored.
No door change: the terminal's words are unchanged, and the commit line says so.
One thing to know: the forge-wide share door, 120 posts a minute, is still in place. A spread-out flood can still use that up for a minute at a time. It resets and can't lock anyone out for good.
An app made in a browser tab can now be sent to the forge and opened from one read-only link, with no login. I ran the new tests, the migration, route-mark, lazy-list, reserved-name, door and unused-export tests,
tsc --noEmitanddesign-lint; all passed. I did not run the full suite. I did not try it in a browser on the preview.What changed
POST /tabforge-linkchecks same-origin and caps the body at 80 KB. It validates the app withdecodeApp, soLIMITSapply, and a spec it refuses stores nothing. It keeps only the decoded app in a newtab_sharedtable and answers/tabforge-link/<16-char random id>.GET /tabforge-link/<id>draws the app with the sharedrenderAppin preview mode, so it has no forms and no entries, and the output is escaped. It carries its own CSP,nosniffand a referrer policy. An unknown or malformed id gets the forge's one 404.src/tab/share.ts; the route issrc/web/pages/tabforge-link.ts. The route is registered indiscovery.ts,lazy_lists.ts,reserved.ts, a route mark, and a migration with its pin.TAB_LINKinsrc/tab/words.ts, said again by the palette entry'stabLine(). The terminal has no tab app to send, so the commit saysNo doorfor that.docs/features/tabforge.mdhas a new section.test/tab-share.test.tscovers the round trip with escaping and no entries, a refused spec storing nothing, a cross-origin POST giving 403, the 404, the per-connection cap, and the button's words matching the terminal's.decodeApp,renderApp/pageOf,ANSWER_HEADERS,readForm,takeDoorandclientBucket. I did not runscripts/similar.ts.What I chose, and left out
/tabforge-link, not under/tabforge/. That prefix is the tab forge's service-worker scope, and in a browser that had started a tab forge, its worker would answer the link instead of the forge. This departs from the issue's "under /tabforge".sharedoor instrangers.ts, 20 links per connection and 5000 in all. There is no visitor principal, no grant table, and no way to edit or delete a link yet.Try it Open
/tabon the preview, press Start, make an app, then press "Get a link" on its page. The link opens in a new tab and works logged out.Closes #18215