Skip to content

Manifest signing: new boxes install and update only from a signed release - #475

Draft
teaspoonai wants to merge 4 commits into
mainfrom
feat/manifest-signing
Draft

teaspoonai wants to merge 4 commits into
mainfrom
feat/manifest-signing

Conversation

@teaspoonai

@teaspoonai teaspoonai commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Draft. Do not merge yet. The release keys in this PR are placeholders. Turn-on waits for two things, so there is only one key ceremony:

Until then the steps in packaging/RELEASING.md "Turning signing on (once)" are on hold: the GitHub settings, the keys on the signing laptop and the turn-on day.

What this does

From this change, new boxes install and update only from a release manifest signed with an offline key. Existing boxes aren't covered: they are on unsigned code and pick this up with their next update.

  • Signed manifests and a signed bootstrap.
    • install.sh, teaport update and the brain's daily check verify <channel>.json.sig with ssh-keygen -Y verify, before reading anything from the manifest. The keys are in /usr/lib/teaport/allowed_signers, which the brain package installs. A first install uses the checkout's manifest/allowed_signers.
    • There are two keys, release-main and release-backup. Namespaces: teaport-manifest, teaport-bootstrap.
    • install-bootstrap.sh carries the keys and is signed too.
    • The manifest names its channel, pins brain.commit, and has a sha256 for every artifact.
  • Release candidates only on beta. A tag brain-vX.Y.Z-rcN must ship teaport-brain_X.Y.Z~rcN_arm64.deb with that control Version. A manifest that names a commit under a tag that isn't a release tag is refused and not offered.
  • manifest/check.py, the publish tripwire.
    • It measures each run against the commit the last publish run uploaded and read back (manifest/last_upload.py, from the Actions API).
    • It reads the .deb strictly, with byte-equal cross-checks against dpkg-deb.
    • It checks ownership, modes, symlinks, the control fields, Depends against nfpm.yaml, and the conffiles.
    • The same reader is in the factory signing helper, and a factory test keeps the two identical.
  • release-deb.yml builds the release .deb only from a tag. It has no permissions by default, and three jobs: build, sha256 and check. build-deb.sh pins setuptools by hash and uses only hash-checked uv and nfpm.
  • License gate (Engine downloads gated behind a recorded license acceptance #439) under the signature.
    • A signed manifest carries access, and its installer must declare ACCESS_PROTOCOL=1.
    • access.api and access.gated must be https on the download host. check.py, the signing helper and an install.sh backstop all check this.
    • DL_CHECK_TOKEN moves from the repository to a gate-check environment, main only.
  • packaging/RELEASING.md covers signing, the release keys, what signing doesn't cover, and the turn-on runbook. The settings this relies on are in its "GitHub settings" section (CODEOWNERS, and the download gate Worker deployed from main by CI #461).

The laptop helper and its skill are in Teaspoon-AI/teaport-factory#26.

Before this can merge

  • Engine License Key: signed, device-bound key checked at Engine start (blocks EULA v2.0) #474's key design is settled, and the .237 bench passes.
  • The real keys:
    • manifest/allowed_signers;
    • the trusted_signers block in install-bootstrap.sh;
    • the two lines in the installation guide;
    • the fingerprints page's address.
  • A signed install-bootstrap.sh.sig, and the engine and model baseline written on paper (RELEASING.md step 1).
  • GitHub settings: r2-publish reviewer, gate-check, and fork PR approval.

Tests

These were run locally on the branch rebased onto main 0cb5574 (a6d3384):

CI's worker tests run on Node 24 and pass.

The publish check fails until turn-on, by design. Its artifacts job stops on three things this draft can't have yet:

  • manifest/stable.json.sig is missing;
  • the brain .deb the manifest names installs no /usr/lib/teaport/allowed_signers;
  • the manifest's brain entry is a placeholder.

The key ceremony and the first signed release (RELEASING.md) supply all three.

Follow-ups: #423 (CI-built packages), #424 (replay).

🤖 Generated with Claude Code

@teaspoonai
teaspoonai force-pushed the feat/manifest-signing branch from ce80d6f to e4ed6c6 Compare November 29, 2026 06:19
teaspoonai added a commit that referenced this pull request Nov 30, 2026
…nto the installer license branch

install.sh keeps both sides: I1's license-key paragraph, TEAPORT_LICENSE_FILE
/ TEAPORT_LICENSE_MODE and their checks beside #480's agent paragraph,
TEAPORT_INSTALL_AGENT / --install-agent and its checks (--install-agent is
refused with any --only, --only license included). ci.yml keeps #475's
signed-manifest dry run and composite-action layout, with #480's
--install-agent dry-run step reading the checkout's manifest the same way,
and one more refusal checked: --only license --install-agent. Docs: the
flags paragraph names both sides' usage errors; elsewhere I1's text with
both sides' citations to be moved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teaspoonai
teaspoonai force-pushed the feat/manifest-signing branch from d72460c to a64dd4a Compare December 1, 2026 04:26
teaspoonai and others added 4 commits November 30, 2026 22:29
…ease

Release manifests (stable.json, beta.json) and the bootstrap are signed offline
with ssh-keygen -Y (keys release-main and release-backup; namespaces
teaport-manifest and teaport-bootstrap). install.sh, teaport update and the
brain's daily check verify the .sig before reading anything from the manifest,
against /usr/lib/teaport/allowed_signers from the brain package (the
checkout's manifest/allowed_signers on a first install).

- The manifest names its channel, pins brain.commit, and has a sha256 for
  every artifact. Release candidates (brain-vX.Y.Z-rcN, .deb X.Y.Z~rcN) are
  allowed on beta only. A commit under a tag that isn't a release tag is
  refused and not offered.
- manifest/check.py: measured against the last uploaded commit
  (manifest/last_upload.py). A strict .deb reader cross-checked byte for byte
  against dpkg-deb, with entry, control, Depends and conffiles rules. The
  factory signing helper carries the same reader.
- release-deb.yml builds the release .deb from a tag only. build-deb.sh pins
  setuptools by hash and uses only hash-checked uv and nfpm.
- The license gate's access block is under the signature: ACCESS_PROTOCOL=1,
  and https on the download host. DL_CHECK_TOKEN moves to the gate-check
  environment.
- packaging/RELEASING.md: signing, the release keys, what it does not cover,
  the turn-on runbook. The settings are in "GitHub settings".

The keys are placeholders until the turn-on (a draft until then).

Squashed from feat/manifest-signing (42 commits and two merges of main),
rebased onto main 5d3ccea.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eys (#474)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GITHUB_TOKEN is now ghs_ plus a JWT, about 520 characters and variable
(GitHub's stateless installation tokens, rolled out by October 2026), so the
255-character cap refused it and every publish run's base step failed with
"GITHUB_TOKEN is not a token". Keep the character check, raise the cap.

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

The install-agent (#480) and brain-port (#490) changes moved install.sh's lines;
every cited block is the same text at its new lines (hashes unchanged). The
installer reference's environment-variable item cites TEAPORT_INSTALL_AGENT too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teaspoonai
teaspoonai force-pushed the feat/manifest-signing branch from a64dd4a to a6d3384 Compare December 1, 2026 07:04
teaspoonai added a commit that referenced this pull request Dec 1, 2026
#475 was rebased onto main bd7a766. This branch already held its content (old head
e4ed6c6 plus bd7a766), and the token fix be2c065 was cherry-picked just before.
The rebase's ci.yml --install-agent resolution is equivalent to this branch's (it
exports TEAPORT_MANIFEST_UNSIGNED before the first dry-run). The docs re-cite is
redone by the lint after main is merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teaspoonai added a commit that referenced this pull request Dec 1, 2026
Same content as a64dd4a (merged before): range-diff shows the RELEASING and token-fix
commits unchanged and the signing commit differing only in its docs citations. A
trial merge's conflicts hold no #475 line missing here except the ones this branch
replaced on purpose (the helper list, RELEASING's watch list, the --install-agent
step's export form). The re-cite a6d3384 is for #475's tree; this branch's citations
lint clean.

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

This branch has not been deployed

No deployments
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