310 Commits
Author SHA1 Message Date
Gabriel Brown fa8b14e05e Fix: Adopt a Terra the machine already trusts
The repository audit made any Terra that is not Panama's own pinned form a
trust-root failure, and status 78 then stopped every stage before it ran. A
machine that installed Terra the way Terra documents it -- terra-release's own
repo file, a metalink, the key at its stock path -- was classified hostile and
had no way back, because install_terra_repository refused to touch a machine
terra-release had already reached. A gate with no door.

The trust root is the signing key, and that key is byte-for-byte the
fingerprint this repository reviewed and pinned, with every signature check
already on. So verify the fingerprint and adopt the configuration into the
pinned form instead of refusing it. Adoption needs no network and no DNF, it
runs before any other transaction in the stage, and it is repeatable, which it
has to be: terra-release owns that file and restores it on update.

Adoption stays narrow. The pinned fingerprint must match both the reviewed key
and the key the machine actually verifies against, the gpgkey must be a local
file under the system trust directory, and the endpoint must be one Terra
itself serves -- so the reviewed baseurl or the reviewed metalink host, now
pinned as TERRA_METALINK_BASEURL. An unknown key, a redirected baseurl, a
second enabled Terra, or a disabled signature check is still a hard refusal.

A refusal also stops less than it did. It suppresses the stages that open DNF
and the migrations, which may run a transaction of their own, and the run still
exits 78. It no longer stops link-dotfiles, link-skills or link-user, which
read no repository and install no package. Exiting before them is what left
this laptop with a stale ~/.claude/skills and no shipped skill reachable.

Also stub ensure_flathub_remote in the extras contract, which has been failing
since that call was added to install_extra_category without one.

Claude-Session: https://claude.ai/code/session_01PeTrG9dGY89UWuhGm4Pr1s
2026-08-28 14:53:48 -04:00
Gabriel Brown b5832fc94a Fix installer state and launcher freshness checks 2026-08-27 17:31:46 -04:00
Gabriel Brown 99156442b5 Merge branch 'main' into codex/repo-audit-remediation-package-2
# Conflicts:
#	README.md
#	setup/scripts/install-packages
2026-08-27 16:51:53 -04:00
Gabriel Brown c71d6c8799 Publish skills through the agent-neutral skill home 2026-08-27 16:39:16 -04:00
Gabriel Brown cb305f6662 Install ChatGPT Desktop from a repository this checkout can verify
OpenAI ships an official Linux RPM now, so the community wrapper goes away:
`panama app chatgpt-desktop` built codex-desktop from the upstream macOS disk
image and ran a local rebuild daemon to keep it current, and the official
package comes from a repository that upgrades with everything else. The app
file, the help example and the dock's pinned id all move over, and a migration
replaces the build on machines that already have it -- official package on
before the community one comes off, so a failure part-way still leaves an app.

The install itself does not follow upstream's instructions. Those are "download
this RPM and install it", and the RPM's own root scriptlet is what writes the
repository file and drops the signing key into /etc/pki/rpm-gpg -- so root runs
an unverified download and then learns from it what to trust. That is the shape
the repository audit forbids: no network response is executed as root without a
verified digest or signature first.

OpenAI publishes no key and no fingerprint anywhere an install could fetch and
check them, so the key is pinned here instead. setup/keys/ carries it and says
where it came from, including the honest part -- this is trust established on
first use and then held, not trust verified against the publisher. setup/lib/
chatgpt-package verifies that copy's fingerprint, installs it, and writes the
repository with gpgcheck and repo_gpgcheck on before anything is installed, so
dnf checks the metadata signature and the package signature itself. It is byte
for byte the repository the scriptlet would have written, so nothing churns
afterwards, and every later upgrade goes through the same key. Both callers use
it; a verification failure skips ChatGPT rather than installing it anyway.

The contract proves the pinned key is the key the library names, that a
missing, unreadable or mismatched key writes nothing at all, that what is
written actually turns the checks on, and that neither caller hands root a
downloaded RPM.

Claude-Session: https://claude.ai/code/session_017zzbtfnMLoYrB8WesqANFY
2026-08-27 14:48:20 -04:00
Gabriel Brown 1ee42f2cb6 Fix: Sort the contract manifest in byte order, not the machine's
The manifest is written in byte order, but both the runner and the manifest
contract discovered contracts with a bare `sort` and compared them with bash's
`<` -- and both of those follow LC_COLLATE. Under en_US.UTF-8 the collation
folds punctuation away, so `calendar_agenda_bridge_test.py` sorts before
`calendar-agenda-helper-contract` instead of after it, and eight pairs that
differ only by `-` against `_` come back out of order.

The effect was that `tests/setup/contract-manifest-contract` failed on this
machine, and `panama test` refused to run at all, with eight identical "paths
are not lexicographically sorted" findings and nothing naming which paths. A
gate whose answer depends on the machine's LANG is not a gate, so the sort and
the comparison are both pinned to byte order. LC_ALL rather than LC_COLLATE,
because an exported LC_ALL outranks it and would have put the bug back.

Claude-Session: https://claude.ai/code/session_017zzbtfnMLoYrB8WesqANFY
2026-08-27 14:47:47 -04:00
Gabriel Brown 1f65e09865 Test: Prove verified bootstrap boundaries 2026-08-27 10:44:14 -04:00
Gabriel Brown dce00e45d1 Docs: Pin the verified Panama bootstrap 2026-08-27 10:14:55 -04:00
Gabriel Brown 0d1841cf86 Fix: Verify the initial Panama revision 2026-08-27 10:06:13 -04:00
Gabriel Brown ba4e5e6677 Fix: Lock installer input state 2026-08-27 09:48:28 -04:00
Gabriel Brown 1ffd05f0e1 Fix: Re-run verified installer inputs 2026-08-27 09:34:20 -04:00
Gabriel Brown 92c60c3ecd Fix: Close runtime provenance residuals 2026-08-27 09:22:17 -04:00
Gabriel Brown 31fc1d3eaa Fix: Harden pinned runtime activation 2026-08-27 08:32:44 -04:00
Gabriel Brown 8264ca6320 Fix: Pin runtime and agent artifacts 2026-08-27 07:49:12 -04:00
Gabriel Brown eab4280969 Fix: Parse complete Terra repository state 2026-08-27 07:25:25 -04:00
Gabriel Brown 1c3cd7ac72 Fix: Enforce effective repository trust preflight 2026-08-27 07:10:11 -04:00
Gabriel Brown 8652f92aae Fix: Validate existing package repositories 2026-08-27 06:46:36 -04:00
Gabriel Brown 4abf3f8acd Fix: Verify third-party package repositories 2026-08-27 06:27:35 -04:00
Gabriel Brown 3f8539176a Test: Strengthen ambient GPG isolation contract 2026-08-27 06:10:32 -04:00
Gabriel Brown 18ecc2244f Fix: Isolate installer GPG inspection 2026-08-27 06:05:42 -04:00
Gabriel Brown 94a4314730 Fix: Harden installer provenance boundary 2026-08-27 05:56:46 -04:00
Gabriel Brown 27acbe7a95 Test: Add installer provenance boundary 2026-08-27 05:43:26 -04:00
Gabriel Brown fc8f226747 Fix: Complete SSH bootstrap hardening 2026-08-27 05:19:58 -04:00
Gabriel Brown 98e29eb8f3 Test: Strengthen SSH bootstrap documentation contract 2026-08-27 04:35:45 -04:00
Gabriel Brown 00e11e0b8d Docs: Explain transactional SSH hardening 2026-08-27 04:25:05 -04:00
Gabriel Brown ac25fd776c Fix: Clean interrupted SSH candidates 2026-08-27 04:12:45 -04:00
Gabriel Brown 51e2c8418a Fix: Complete SSH hardening recovery 2026-08-27 04:06:54 -04:00
Gabriel Brown d267da58ad Fix: Roll back failed SSH hardening 2026-08-27 03:44:57 -04:00
Gabriel Brown 20b41c3976 Fix: Gate SSH hardening on a verified key 2026-08-27 03:28:42 -04:00
Gabriel Brown 12b858371e Fix: Close verification gate review findings 2026-08-27 00:21:45 -04:00
Gabriel Brown e19fb00276 Test: Harden dock fixture cleanup 2026-08-26 23:22:26 -04:00
Gabriel Brown 37688f702a Test: Isolate dock geometry fixtures 2026-08-26 23:12:14 -04:00
Gabriel Brown 71f4f0d24b Test: Guard settings docs contract cleanup 2026-08-26 23:05:14 -04:00
Gabriel Brown 3839183401 Test: Isolate generated docs and settings fixtures 2026-08-26 22:59:28 -04:00
Gabriel Brown 68b6664111 Test: Propagate update fixture failures 2026-08-26 22:53:39 -04:00
Gabriel Brown 803362ebad Test: Exercise updates through the real command 2026-08-26 22:46:46 -04:00
Gabriel Brown 6a7bdcb835 Test: Harden compose secret fixtures 2026-08-26 22:38:00 -04:00
Gabriel Brown 37fd5e890e Test: Scan compose secrets by data shape 2026-08-26 22:31:22 -04:00
Gabriel Brown a19c6dc3ef Test: Make agent usage fixtures date independent 2026-08-26 22:26:19 -04:00
Gabriel Brown 6d71a77798 Test: Cover contract runner consent 2026-08-26 22:22:57 -04:00
Gabriel Brown d8144a66c1 Fix: Make contract execution safe and diagnostic 2026-08-26 22:11:56 -04:00
Gabriel Brown 43d1e15858 Test: Harden manifest validation 2026-08-26 22:00:52 -04:00
Gabriel Brown 1192ad64dc Test: Classify every contract capability 2026-08-26 21:52:16 -04:00
Gabriel Brown f33da41cc6 Panama learns what a server is: from a root login to running containers
A machine's role is now the interview's first question and the one answer
Panama records. Servers get the same shell minus the screen: core packages,
nvm, Bun, Claude Code and Codex (desktops get Codex too), linger, rootless
ports from 80, firewalld, the nginx-bridge network, and a nightly image
updater that replaced watchtower for cause.

server/containers/ carries junior's 23 compose services -- secrets moved to
per-machine .env files that never enter this public repo, every transformed
compose proven to render byte-identical to what is live. 'panama server'
enables, disables and relinks them; nothing here restarts a running service.
'boot --server' walks a fresh VPS from its root login to a normal install.

Five new contracts pin the secrets rule, the catalog's shape, panama-server's
behavior, the role plumbing, and the dotfile classification.

Claude-Session: https://claude.ai/code/session_01NU5JGiN3JfzqrLQB6wmJ1E
2026-08-25 23:11:49 -04:00
Gabriel Brown cc7d91d09c No error is a dead end: crash, click, and your agent is already looking
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
2026-08-25 12:50:09 -04:00
Gabriel Brown 045a774847 The machine now carries its own manual for AI hands
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
2026-08-25 10:09:38 -04:00
Gabriel Brown beed44dd87 panama update: one command, no questions, and no gap it cannot see
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
2026-08-25 07:22:12 -04:00
Gabriel Brown 8105849151 The last two stale needles the great respelling left behind
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
2026-08-25 02:31:59 -04:00
Gabriel Brown bd2fd12de2 Coherence: one component per idea, one spelling per word, one truth per claim
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
2026-08-25 02:21:45 -04:00
Gabriel Brown 06c53d6c21 Shortcuts you invent, rules you write, gestures you own - all still just data
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
2026-08-25 01:51:59 -04:00