§ 05 · OFFLINE INSTALL · INTERNAL
Our automation
Wiring the offline kit into the onboarding chain is a release task before it is a tooling task.
Everything before this page is written for whoever installs at a customer site. This one is for us: what the kit changes about our own skill chain, and the one fact that decides the order of work.
The migrator cannot target release 2026.9.7
The tempting conclusion is that the offline install slots in ahead of hivecfm-migrate and the rest of the chain is unchanged. It does not, for two independent reasons.
Reason one: the shipped schema has no migrator columns
docs/RELEASE-PROVENANCE.json pins the images to specific commits:
"coreBranch": "development",
"coreCommit": "e02ce2864906adc39a837efc4ba198c15de9b1e8",
"hubBranch": "development",
"hubCommit": "c07b9333ab9618d369f6cb41bcbe61d86f65ef35"At that Core commit, the PrismaPrismaThe TypeScript ORM HiveCFM uses to talk to Postgres. The schema lives at packages/database/schema.prisma. schema contains zero occurrences of legacy_id, legacyId, legacy_extras or _MigrationCheckpoint. The columns @hivecfm/migrator writes into simply do not exist in the shipped image. (These are migration-owned columns: present only while a migration program is open on a database, dropped at retirement — the offline image never opens one, so this control finding zero is the expected, permanent state, not a point-in-time snapshot. An environment that DID run a migration program keeps its exported provenance in the migrate export-provenance artifact, not in these columns, once retired.)
Run the control before you trust that, because a grep returning zero proves nothing on its own:
cd hivecfm-core
for ref in e02ce2864 origin/development \
origin/feat/6096-migrator-development-merge \
origin/AG-hiveCoreMigrtorTool; do
printf '%-45s %s\n' "$ref" \
"$(git show $ref:packages/database/schema.prisma | grep -ci 'legacy_id\|legacyId\|_MigrationCheckpoint')"
donee02ce2864 (the kit's image) 0
origin/development 0
origin/feat/6096-migrator-development-merge 8
origin/AG-hiveCoreMigrtorTool 26The discriminator works, so the zero is meaningful. Note the second line: rebuilding the kit from the current tip of development would not fix this either, because migration-only schema is kept out of development by standing directive. It has to be the migrator branch, which makes this a new kit release, not a configuration change.
Reason two: nothing on the host can run the migrator
prepare-env delivers the migrator by git archive | ssh followed by pnpm --filter @hivecfm/migrator build. On an offline target there is no node and no pnpm — the 191-deb closure contains neither — and apt, npm and pip are all forbidden as repair routes. The kit also ships no migrator image. So there is no delivery mechanism at all today.
A correction worth carrying, because the wrong version of it is intuitive. This is not a network problem, and it is not “a breach of the air gap”.
internal: true stops containers reaching outward. It does not stop the host, which owns the bridge gateway. The kit proves this itself: nginx runs on the host and proxy_passes straight to container addresses at subnet offsets 10, 11 and 12. So the host can see the LAN source database and the internal Postgres at the same time.
What is missing is somewhere to run the migrator, which is a hivecfm-offline/migrator image in the next release. Do not propose opening a second bridge to solve a packaging problem.
Two probes worth running on a live stack before assuming a new image is required, since the Core image already carries node and the PrismaPrismaThe TypeScript ORM HiveCFM uses to talk to Postgres. The schema lives at packages/database/schema.prisma. client:
ssh <box> 'sudo docker exec hivecfm-offline-core-1 ls /home/nextjs/packages/migrator/dist/cli.js'
ssh <box> 'sudo docker exec hivecfm-offline-core-1 node -e "require.resolve(\"tsx\")"'Both present means a podman exec path is viable once the schema is fixed. Either missing means a dedicated migrator image becomes a preparation-phase deliverable: exported through preparation/export-images.py, recorded in images/images.json, shipped as a new release version.
Where an offline install sits in our chain
Our chain is onboard-client → prepare-env → hivecfm-migrate → hivecfm-migration-verify. An offline install replaces the front of it and leaves the back intact.
| Our stage | Offline relationship |
|---|---|
onboard-client Stage 1 (Access) | Inapplicable. No cloud, no operator-IP concept, no security-group or NSG rule. Firewalling is the customer site’s, not ours |
prepare-env Stage 0 (data stack on non-default ports) | Replaced by stages 02–05. The “never 5432” rule is moot: no host port is published at all |
prepare-env Stage 1 (signup + dev licence, capture environmentId) | Replaced by bootstrap-core-uat.py. Licensing differs: the release records "license": "Not supplied; authorized local license required" |
prepare-env Stage 2 (git archive + pnpm build) | Broken. No host node, no pnpmpnpmThe package manager HiveCFM uses instead of npm or yarn. Faster, uses a single on-disk content store., no feed, no migrator image. This is the real gap |
prepare-env Stage 3 (identity gate, db:migrate:deploy) | Partly replaced by stage 06 and verify-core-migrations.py. The migrator-specific column proof is not performed |
hivecfm-migrate | Blocked on a new kit release. See above |
hivecfm-migration-verify, verify-side-effects | Both hardcode a two-deployment world. An offline site is a third class, and it already writes machine-readable proofs these skills should consume rather than re-derive |
hivecfm-core-env | Strongest match in the kit. Its empty-secrets 500 cannot occur here, and its signup-chain section is bypassed by a direct PrismaPrismaThe TypeScript ORM HiveCFM uses to talk to Postgres. The schema lives at packages/database/schema.prisma. write |
The two artifacts to extract
prepare-env owes the rest of the chain a confirmed target identity and an environment id. Both are already on the box after stage 06:
# CLIENT_ENV — the production environment id created by the bootstrap
ssh <box> 'sudo jq -r ".environments[]|select(.type==\"production\")|.id" \
/opt/hivecfm-offline/evidence/uat-bootstrap.json'
# targetIdentity — confirmed from inside, since no port is published
ssh <box> 'sudo docker exec -i hivecfm-offline-postgres-1 \
psql -U hivecfm_core -d hivecfm -Atc "select current_database(), current_user"'
# hivecfm|hivecfm_core -> hivecfm-offline-postgres-1:5432:hivecfmState plainly what that second command proves and what it does not. Postgres is initialised with --auth-local=trust, so a docker exec psql session is unauthenticated. It proves the database and role exist. It does not prove the migrator’s TCP credential works, and that remains the identity gate’s job.
The RLS tripwire
docs/RELEASE-PROVENANCE.json records "rls": "No persistent policies applied; pending source/schema decisions". The acceptance suite then hard-asserts it:
assert sql('hivecfm', "SELECT count(*) FROM pg_policies WHERE schemaname='public'") == '0'The day anyone remediates the multi-tenant isolation gap, stage 08 fails and the corresponding acceptance checkbox can no longer be ticked. Meanwhile the DMZ proposal makes tenant isolation a precondition for exposing customer traffic — so as it stands, that design puts an Internet listener in front of a stack with no row-level isolation.
Consequence for hivecfm-migration-verify: run its read-only sections against an offline site, and do not run the policy-creating sections. No agent decides this transition.
Automate in this order
Ranked by payoff, not by ease.
- The read-only target probe, before the media moves. Every stage-01 or stage-02 refusal it catches saves a full 5 GB round trip to a customer site, and the stage-02 refusal has no documented recovery. Highest value per line of code by a wide margin. The exact probe is on Install stages.
- The manifest-anchor gate. Compare
sha256sum SHA256SUMS.jsonagainstazure-release.json, on the staging machine and again on the box. No code does this today, and it converts a fully self-referential trust chain into one with an external anchor. Roughly two hours of work. - Mirror
.state/*.doneinto our run manifest, along with thesite.jsonbyte hash, so the installer’s marker resume and our own resume tell one story. Includes the pre-resume hash diff that single-stage reruns skip. - Extract
CLIENT_ENVandtargetIdentityas above. Two commands, and without them the back half of the chain is unreachable offline. - Add the third deployment class to
verify-side-effectsandhivecfm-migration-verify, and make both consume the kit’s evidence files rather than re-deriving the same facts.
Not worth automating: a mitigation for the bare-assert gates. No shipped path sets python3 -O and sudo’s env_reset strips it. One sentence in the runbook is the entire fix.
Must stay human
- The identity gate. The offline install produces the target identity string; it never pre-answers the gate.
- Any decision to run the migration before the schema blocker is closed by a release.
--reboot-now. It ends the session, and on docker it is the moment you discover the boot unit was never installed.tls_mode: providedand supplying customer certificates. The private key path is a customer artifact.- An empty
local_ntp_server. Force the question rather than letting a blank pass silently; the consequence is a host with no time source. - Deleting the bootstrap owner account. Report its existence and its API key id, and stop there.
rm pki/server.crtat certificate expiry. Documented by us, executed by a person: it is a TLS identity change on a live site.- The RLS transition, per the tripwire above.
- Uninstall, rollback and CVE patching. The kit has no answer for any of them. Say so rather than inventing one.
Source of these claims
Every figure and quotation in this section was read from hivecfm-offline at commit 8a8b1c5 (release 2026.9.7) and re-verified against the files, not against a summary. Where the two disagreed, the file won.
One standing caution for anyone re-checking this on Windows: the repo has no .gitattributes and core.autocrlf is commonly true, so most files in a Windows working tree fail their own manifest hash for line-ending reasons alone. Verify against git blobs, or verify on the box. Never quote a hash taken from a Windows checkout.