Skip to content

Engine license (1/2): the Worker stops recording a name - #468

Merged
teaspoonai merged 6 commits into
mainfrom
license-drop-name
Nov 24, 2026
Merged

teaspoonai merged 6 commits into
mainfrom
license-drop-name

Conversation

@teaspoonai

@teaspoonai teaspoonai commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Counsel advised dropping the name from the engine license acceptance. The name is typed and never verified, and the email, the use (personal, or a Teaspoon AI license ID) and the hash of the accepted text already show who accepted what.

This is step 1 of 2 (expand): the Worker side only. Step 2, #469 (the installer stops asking), merges only once this Worker is live. They were one PR until review found that the one-line installer (install-bootstrap.sh) clones main. Merging both together would put a no-name installer in front of the old Worker, which answers 400 without a name, and every fresh install would fail until the Worker was deployed by hand.

What changes

  • Worker (worker/src/index.js): an acceptance no longer requires a name. Whatever the installer sends, the Worker writes name = ''. Every installer works with it: install.sh on main (sends a name, now discarded) and Engine license (2/2): the installer stops asking for a name #469's (sends none). No release tag's installer has the acceptance flow at all.
  • Migration 0002_drop_acceptance_name.sql: UPDATE acceptances SET name = '' WHERE name <> '' blanks the names already recorded. The live teaport-gate DB holds test acceptances only, since no box has shipped to a customer. The blanked names stay recoverable through D1 Time Travel until its restore window passes (30 days on Workers Paid, 7 on Free). The column itself stays: packaging/RELEASING.md requires a migration to leave the schema usable by the Worker before it ("add, never rename or drop"), because wrangler rollback doesn't undo migrations, and the Worker before this one still inserts name. A later release drops the column.
  • docs/engine-license-data.md: the name row now reads "always empty", with a "No name" note saying the Worker discards any name an installer sends. The license page's citation of the Worker's insert moved one line down. Its claim is unchanged.

Deploy (by hand; needs the owner's OK)

Step 4 overwrites production data: it blanks every name in the live teaport-gate D1 database. Nobody runs it until the owner OKs it. It can be undone only by a D1 Time Travel restore to before it, within the restore window (and a restore would also roll back any acceptance recorded since). The schema doesn't change, so a Worker rollback stays safe.

Merging doesn't deploy anything. The worker-deploy environment has no CLOUDFLARE_API_TOKEN or required reviewer, and its only push-to-main run failed. So this is done with the owner's wrangler login, using the locked tool, from a clean worktree at this PR's merge commit, not a shared checkout:

git fetch origin && git worktree add /tmp/teaport-468 <merge-sha> && cd /tmp/teaport-468
(cd .github/wrangler && npm ci) && cd worker
W=../.github/wrangler/node_modules/.bin/wrangler

# 1. Before: the rollback target, and what is pending. Expect only 0002 pending; anything
#    else (#464's 0003_factory.sql, or 0001 if the gate was never migrated) means stop.
$W deployments status                                  # note the live version id
$W d1 migrations list teaport-gate --remote

# 2. Deploy the Worker that writes name = ''.
$W deploy

# 3. Check it, as packaging/RELEASING.md requires after any Worker deploy, plus the no-name accept:
G=$(curl -s https://get.teaspoon.tech/manifest/stable.json)
URL=$(echo "$G" | jq -r '.engine.assets | to_entries[0].value.url')
curl -sI "$URL" | head -1                              # 401: the gate still enforces
BODY=$(echo "$G" | jq -c '{channel:"stable", eula_version:.engine.eula.version, eula_sha256:.engine.eula.sha256,
       email:"gate-check@teaspoon.tech", use:"personal", method:"flag", installer:"runbook"}')   # no name
R=$(curl -s -X POST https://get.teaspoon.tech/api/accept -H 'content-type: application/json' -d "$BODY"); echo "$R"
ID=$(echo "$R" | jq -r .acceptance_id)                 # 200 with an acceptance_id: a no-name accept is taken
TOK=$(curl -s -X POST https://get.teaspoon.tech/api/token -H 'content-type: application/json' \
       -d "{\"acceptance_id\":\"$ID\"}" | jq -r .token)
curl -sI -r 0-0 -H "Authorization: Bearer $TOK" "$URL" | head -1   # 206: the token path every install takes
$W d1 execute teaport-gate --remote --command "SELECT name FROM acceptances WHERE id = '$ID'"   # ''
$W d1 execute teaport-gate --remote --command "DELETE FROM acceptances WHERE id = '$ID'"         # remove the check row
#    Then the CHECK_TOKEN check: Actions -> publish -> Run workflow (RELEASING.md).

# 4. Blank the names already stored (needs the owner's OK), then check it took.
$W d1 migrations apply teaport-gate --remote
$W d1 execute teaport-gate --remote --command "SELECT count(*) AS named FROM acceptances WHERE name <> ''"   # 0

cd / && git worktree remove /tmp/teaport-468

Deploying before migrating means nothing fails between the steps and no new name can be stored between them. Only after step 3 passes is #469 marked ready.

Rollback: $W rollback <id from step 1> is safe for the schema at any point until #469 merges. After that, every fresh install would fail with a 400 again, because #469's installer sends no name. The rolled-back Worker also stores names again, and D1 has 0002 recorded as applied, so after rolling forward, blank them by hand: $W d1 execute teaport-gate --remote --command "UPDATE acceptances SET name = '' WHERE name <> ''".

Merge order (coordinated across sessions): #467 and #466 are merged, and main is merged in here. This PR comes next. teagram-engine-5b's #464 stacks its additive 0003_factory.sql and Worker work on this PR.

Tested

  • node --test worker/test/index.test.mjs (Node 22): 24/24 pass. New tests check that a name sent by an installer is accepted and stored empty, and that migration 0002 blanks existing names and then still takes an insert the way the pre-Engine license (1/2): the Worker stops recording a name #468 Worker writes it (the rollback case).
  • brain/tests/test_install_eula_gate.py: 19/19, unchanged here.
  • docs/docs-work/lint.mjs: 0 errors. The 105 warnings were already on main.
  • Two independent reviews. The first, of the combined change, found the merge-order bug that led to this split. The second, of this Worker-only PR, found no code bugs. It found that the runbook verified nothing, didn't pin a commit, and overstated how final step 4 is (D1 Time Travel), and that the data note described the deployed state as already true. All of that is fixed above and in docs/engine-license-data.md. Not taken: its low-confidence suggestion to add "the name stays on the box" to reference/licenses.md, because the docs site deploys on merge, before the Worker does, so the sentence would be false in between; Engine license (2/2): the installer stops asking for a name #469 rewrites that paragraph anyway.

🤖 Generated with Claude Code

Counsel advised dropping the name: it is typed and unverified, and the email, the use
(personal, or a Teaspoon AI license's id) and the accepted text's hash already say who
accepted what. A name kept for seven years added personal data and no proof.

- install.sh no longer asks "Your full name" and sends no name; --name and TEAPORT_NAME
  are taken and ignored, so scripts written for the old installer keep working.
- The Worker ignores a name an older installer still sends, instead of refusing it.
- Migration 0002 drops acceptances.name, which also erases the names already recorded.
- docs/engine-license-data.md and the docs pages say what is asked now; source comments
  re-cited to the moved install.sh lines (docs lint: 0 errors).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teaspoonai and others added 4 commits November 23, 2026 16:55
packaging/RELEASING.md: a migration must leave the schema usable by the Worker before it
(add, never rename or drop), because a rollback does not undo migrations. DROP COLUMN name
broke that: rolled back, the old Worker's INSERT names `name` and every acceptance fails.

0002 now blanks the recorded names (UPDATE ... SET name = ''), and the Worker writes the
column empty. The old Worker keeps working against it, so a rollback is safe and the
migrate/deploy gap is gone. A later release drops the column, once nothing can roll back
to a Worker that writes it. A test applies 0002 and then inserts as the old Worker does.

Raised in review by teagram-engine-5b via the teaport coordinator session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…plied

installer_lock runs install.sh again with the same arguments, so the --name note printed
twice; the child (TEAPORT_INSTALL_LOCKED) now stays quiet. The comment shares a line, so
install.sh keeps its length and the docs' citations their ranges (four parser hashes
updated; the claims they back are unchanged).

0002's header said it is applied by the workflow before each deploy; it is applied like
any migration here, and is safe before or after the Worker that writes name = ''.

From an independent review of #468.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The installer change moves to its own PR, merged once this Worker is live. The one-line
installer clones main, so with both in one PR a merge would put a no-name installer in front
of the old Worker, which answers 400 without a name: every fresh install fails until the
Worker is deployed by hand.

This PR keeps: the Worker writes name = '' and no longer requires one (any installer works),
migration 0002 blanking the stored names, the Worker tests, and the data note's Worker side.
install.sh, its test and the docs pages are back to main's; the license page's citation of
the Worker's INSERT follows it one line down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teaspoonai teaspoonai changed the title Engine license: stop recording a name at acceptance Engine license (1/2): the Worker stops recording a name Nov 23, 2026
From the second independent review of #468: the note described the deployed state as
already true (nothing deploys on merge), said released installers send a name (no release
tag's does; only install.sh on main), and left out that blanked names stay recoverable
through D1 Time Travel for its window, and that a rollback past this Worker stores names
again, which 0002 will not blank a second time by itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teaspoonai
teaspoonai marked this pull request as ready for review November 24, 2026 04:40
@teaspoonai
teaspoonai merged commit 1363b64 into main Nov 24, 2026
10 checks passed
teaspoonai added a commit that referenced this pull request Nov 24, 2026
* Engine license: stop recording a name at acceptance

Counsel advised dropping the name: it is typed and unverified, and the email, the use
(personal, or a Teaspoon AI license's id) and the accepted text's hash already say who
accepted what. A name kept for seven years added personal data and no proof.

- install.sh no longer asks "Your full name" and sends no name; --name and TEAPORT_NAME
  are taken and ignored, so scripts written for the old installer keep working.
- The Worker ignores a name an older installer still sends, instead of refusing it.
- Migration 0002 drops acceptances.name, which also erases the names already recorded.
- docs/engine-license-data.md and the docs pages say what is asked now; source comments
  re-cited to the moved install.sh lines (docs lint: 0 errors).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Engine license: blank the names instead of dropping the column

packaging/RELEASING.md: a migration must leave the schema usable by the Worker before it
(add, never rename or drop), because a rollback does not undo migrations. DROP COLUMN name
broke that: rolled back, the old Worker's INSERT names `name` and every acceptance fails.

0002 now blanks the recorded names (UPDATE ... SET name = ''), and the Worker writes the
column empty. The old Worker keeps working against it, so a rollback is safe and the
migrate/deploy gap is gone. A later release drops the column, once nothing can roll back
to a Worker that writes it. A test applies 0002 and then inserts as the old Worker does.

Raised in review by teagram-engine-5b via the teaport coordinator session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Engine license: --name noted once; 0002's header matches how it is applied

installer_lock runs install.sh again with the same arguments, so the --name note printed
twice; the child (TEAPORT_INSTALL_LOCKED) now stays quiet. The comment shares a line, so
install.sh keeps its length and the docs' citations their ranges (four parser hashes
updated; the claims they back are unchanged).

0002's header said it is applied by the workflow before each deploy; it is applied like
any migration here, and is safe before or after the Worker that writes name = ''.

From an independent review of #468.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Engine license: split; this PR is the Worker side only (expand)

The installer change moves to its own PR, merged once this Worker is live. The one-line
installer clones main, so with both in one PR a merge would put a no-name installer in front
of the old Worker, which answers 400 without a name: every fresh install fails until the
Worker is deployed by hand.

This PR keeps: the Worker writes name = '' and no longer requires one (any installer works),
migration 0002 blanking the stored names, the Worker tests, and the data note's Worker side.
install.sh, its test and the docs pages are back to main's; the license page's citation of
the Worker's INSERT follows it one line down.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Engine license: the installer stops asking for a name (contract)

Counsel advised dropping the name. install.sh no longer asks "Your full name" and sends no
name; --name and TEAPORT_NAME are taken and ignored (the --name note printed once), so
scripts written for the old installer keep working. Merge only once the Worker from the
PR before this one is live: the Worker before it refuses an acceptance without a name.

The docs pages and docs/engine-license-data.md say what is asked now; source comments
re-cited to the moved install.sh lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Engine license data note: state after the deploy, Time Travel, rollback

From the second independent review of #468: the note described the deployed state as
already true (nothing deploys on merge), said released installers send a name (no release
tag's does; only install.sh on main), and left out that blanked names stay recoverable
through D1 Time Travel for its window, and that a rollback past this Worker stores names
again, which 0002 will not blank a second time by itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant