Skip to content
pi-c Remote S0 qualification
Login

Remote S0 qualification

This is one explicit, bounded qualification procedure for trusted C fixtures on hetzner-hel, not a general remote platform or a sandbox for hostile operators. Main/operator alone executes host actions. No Python runs on the remote control path; the local Python collector/verifier only parses and hashes evidence.

Resources and authority

tools/remote/run.sh prepare DIR NONCE MODE first creates a private off-host manifest and source/control snapshots. NONCE is 16 lowercase hexadecimal characters; MODE is noop, disconnect, timeout, or filc. The exact workspace is $REMOTE_HOME/.pi-c-s0-NONCE.

Each run lists four transient SYSTEM-manager units:

System-manager supervision is intentional: user Linger=no cannot be the SSH-loss lifetime guarantee. Privileged calls only manage the named units; creation, workload, and filesystem cleanup run as UID1000. No privileged recursive deletion, persistent service, linger change, account, package, or reboot is performed.

Owner and worker limits include CPUQuota100%, MemoryMax1G, TasksMax64, LimitFSIZE128MiB, stop timeout5s, and NoNewPrivileges. Worker filesystem/home are read-only except its workspace and private temporary files; compiler tree is explicitly read-only and external network is isolated. These are per-process/cgroup limits, not an invented aggregate disk quota.

The installed Fil-C0.687 compiler/archive pins are in tools/remote/pins.sh. The installed compiler matches the pinned archive member. Runtime library RPATHs were changed by the existing Fil-C setup, so installed fingerprints are compared before/after; do not claim all installed library bytes equal the unpatched archive. No cache installation or mutation is allowed.

Operator sequence

nonce=$(od -An -N8 -tx1 /dev/urandom | tr -d ' \n')
run="$PWD/build/qualification/remote/filc-$nonce"
sh tools/remote/run.sh prepare "$run" "$nonce" filc
sh tools/remote/run.sh preflight "$run"
sh tools/remote/run.sh start "$run"
sh tools/remote/run.sh upload "$run"
sh tools/remote/run.sh work "$run"
# Observe until the worker exits or fails; the initiating SSH connection is closed.
sh tools/remote/run.sh observe "$run"
sh tools/remote/run.sh collect "$run"
sh tools/remote/run.sh teardown "$run"
sh tools/remote/run.sh reconcile "$run"
make filc-remote REMOTE_RUN="$run"

filc-remote verifies an already executed, explicitly supplied run; it does not silently launch host jobs. Starting a new run remains the explicit operator procedure above. There is no nightly job.

The source payload is an allowlist: existing qualification C files/header, saved corpus, and payload shell. It does not include a user's databases, credentials, the whole repository, or the third-party Pi checkout. Snapshots and manifest collisions are refused. Collection is bounded to256MiB/128 entries and rejects links, traversal, duplicate files, forged source hashes, and injected local validation metadata.

Completion, failure, and teardown

The owner lease retains artifacts even when the worker fails or times out. Collection validates the archive/source indexes and supervisor result locally. A valid collection is NOT RUN pending cleanup, or FAIL if the worker failed; neither is a production-contract PASS. The final evidence gate revalidates hashes and requires teardown/reconciliation receipts before producing fixture qualification PASS.

On any failure, still run teardown/reconcile. Teardown stops only listed worker/owner units, invokes the immutable cleanup as UID1000, verifies workspace absence, then cancels guard units. It refuses symlinks, mismatched UID/mode, canonical paths, or markers. It does not disarm the guard before workspace absence. A missing workspace is idempotent success. Missing evidence is explicitly EVIDENCE_LOST after cleanup, never a passing skip.

If SSH/controller dies, PID1 and the finite lease/guard still stop work and attempt cleanup. Source/ownership ambiguity can make cleanup fail closed; reconcile that recorded run, not unrelated files. Do not restart a second copy while an operator command is still running.

Reboot behavior/full startup-interruption and disk-fault matrices are not qualified here. Transient units are not persistent boot recovery. No host reboot was performed.

Actual verification

Artifacts live under build/qualification/remote/; the current successful Fil-C run is named in current-filc.txt. Failed attempts are retained as failed evidence, not overwritten. These are memory-safety/fixture/supervisor checks, not production harness, storage power-loss, or performance qualification.