Companion origins
The optional Compose overlay stages the CoreScope map and Beacon channel feed on loopback. Health Check uses the existing protected origin. Apply the overlay only after the release inventory includes the reviewed companion commits and both public projections pass their native role and revocation tests.
Use the signed CoreScope, Beacon server and Beacon web digest references from
the same UKMesh release. Set CORESCOPE_RELEASE_IMAGE,
BEACON_SERVER_RELEASE_IMAGE, BEACON_WEB_RELEASE_IMAGE and
CORESCOPE_ASSET_REVISION (the CoreScope commit). The server image must
contain /bin/beacon-public. The initial Beacon integration pin predates
that executable.
The CoreScope web process caps its resident packet store at 64 MiB within its 512 MiB container. A smaller configured cache limit takes precedence. Historical packet pages are read from the retained analyzer database.
Mount a protected CoreScope config at CORESCOPE_PUBLIC_CONFIG and a dedicated
projection directory writable by UID 1000 at CORESCOPE_PUBLIC_DATA. Select
publicProjection: true, dbPath: /data/analyzer.db, positive source
retention, the restricted public PostgreSQL reader, and empty MQTT sources.
Set the authority URL to http://backend:3000/internal/ingest/public/policy
and its token to the backend's MQTT_RAM_PUBLIC_READ_TOKEN. A configured
live tail reads /internal/ingest/public/entries with that same credential.
Provision Beacon's separate projection database, geography, source reader, runtime grants and schema as documented by the pinned listener. Supply its two DSNs and the authority token through protected configuration. The Beacon token must differ from the public stream token. Match retention to the source. Durable mode reads the committed ledger. RAM mode also requires the protected live URL and public stream token.
Render the base, live and companion Compose files together with config -q.
Use the same three files to start the companion services. Verify the map at
loopback port 3191, the feed at port 3192 under /feed and Beacon readiness at
/beacon/readyz. Resolve a known public node and channel, change visibility
on a rehearsal fixture, and verify HTTP and live reads close over the change.
Check the existing Health Check journey through its protected origin. Switch
the upstream routes only after those checks pass and the encrypted restore
rehearsal covers each persistent store.
Restore the previous ingress routes first when rolling back. Keep the previous digest references, CoreScope assets and projection data through the rollback window. The asset volume name includes the CoreScope revision so open and rolled-back origins can serve their corresponding assets.
Recovering the previous companion image inventory
On the operator workstation, start with the deployment records for the last production CoreScope, Beacon server and Beacon web releases. The earlier UKMesh inventory covers ten other images. Keep the three actual repository digests and the corresponding CoreScope asset revision with the workstation rollback record.
If the original containers are still available in the operator’s production Docker context, these read-only commands list the repository digests of the image that each container actually started. Repeat for each deployed component.
image_id=$(docker container inspect --format '{{.Image}}' "$PREVIOUS_CONTAINER")
docker image inspect --format '{{range .RepoDigests}}{{println .}}{{end}}' "$image_id"
Match the repository to its deployment record and verify its signature with the signing identity used for that release. An empty digest list leaves that component unresolved. Use its original signed deployment or registry record. A current tag lookup can point to a different build. Keep the backup, receipts and credentials on the workstation. Record the three verification outcomes and the result of restoring the prior origins in the release decision.
For the Beacon role rehearsal, compile the companion's Go test binaries with
go test -c for ./internal/publicsource, ./cmd/beacon-public and
./internal/publicprojection. Pass the three executable paths in
BEACON_TEST_NATIVE_BINARY, BEACON_TEST_LISTENER_BINARY and
BEACON_TEST_PROJECTION_BINARY. For a staged companion checkout, set
BEACON_TEST_PROJECTION_SCHEMA to its internal/publicprojection/schema.sql.
Set BEACON_TEST_DATABASE_URL and BEACON_PROJECTION_TEST_DATABASE_URL to
the local DEV sample and Beacon administrative connections on loopback ports
5433 and 5435. From the UKMesh root, run
node --test scripts/full-dev/test-beacon-{reader,listener-roles}.mjs.
Each test creates a disposable database and credentials, exercises the native
code with the restricted role, and removes its fixture.