Upgrades and compatibility
For LLMs9 sections
Move a deployment from one pinned state to another — runtime, canon packages, configuration, or data formats — with the change reviewed before traffic switches and the prior state kept bootable.
Component law CLI + pinned world (law.toml, law.lock, .arxo
bundle, serve configuration), tool 0.1.1. Scenario: a planned upgrade
with a staging host and a production host. All versions and paths are
synthetic created-examples.
Prerequisites
Section titled “Prerequisites”- The current production pin set recorded:
law version --jsonoutput, the productionlaw.lock, the production bundle filename + hashes, and the serve invocation (world dir, journal dir, port). - A staging host that can reach the registries (for
update) or holds the new bundle (for offline hosts). - A replay corpus: saved
law ask --out <dir>evaluation directories and/or a decision journal for the current world.
- Classify the change and upgrade each layer separately, in this order (operator-policy-example order; the tool does not enforce it): (a) configuration, (b) canon packages (pins), (c) data formats, (d) runtime binary. Never move two layers in one switch.
- Canon packages: on staging, inspect drift without touching the lock
(real):
law outdated --project <dir>— “what is pinned, what is published, whether the pin bytes match; the lock is untouched”. - Apply the pin move as a preview first (real flags):
law update <name>[@<version>] --project <dir> --dry-run, then with--replay <dir>to replay saved evaluations against the new closure. - Rebuild and re-verify the bundle (real):
law pack --project <dir> --out staging-N.arxo, thenlaw inspect staging-N.arxo --verify --trust <key>. - Run the package’s declared scenarios over the new lock world (real):
law test(flags:--family,--file,--grep,--json). - Expected-change review: diff old vs new evaluations (real):
law case diff <evaluation A> <evaluation B>overask --outdirectories (or.arxoanswer sets). Every diff hunk must map to an intended normative change in the change record; an unmapped hunk blocks the switch. - Runtime binary: install the new
lawon staging only, re-run steps 5–6, and comparelaw version --json(tool,semantics,std,binaryHash) old vs new in the record. - Pre-switch checks on production: confirm the current journal is
durable, the current bundle is intact (
law inspect --verify), andGET /readyzis200. - Switch serve traffic by repointing the world symlink and letting the
server follow it (real flag): run
law servewith--watch-world, which “watches the--worldsymlink target change and warms the new world”; then flip the symlink. Alternatively stop, repoint, and start (simpler; brief downtime). Either way the--journaldirectory does not change: the journal is shared across generations and new records simply carry the new pin. Mixed-pin journals are the normal post-switch state, and rollback selects records by pin (see Rollback). - Keep the prior bundle, prior
law.lock, and prior binary path untouched on the host until the new state is accepted (see Result check). Do not garbage-collect during the observation window.
Expected result
Section titled “Expected result”- Staging
law testgreen;law case diffcontains only intended, recorded hunks. - After the switch,
GET /v1/world(real endpoint: the active pin) reports the new pin, andGET /readyzreturns200. - Prior bundle + lock + binary still present on disk.
Result check
Section titled “Result check”- Historical replay: re-run the replay corpus over the saved data
(
law eval <dir>for saved calculations;law replay-record --world <dir> --journal <dir> --decision <id>for journal entries, checkingresultHash/outcomeHashper entry) and confirm the outcomes equal the staging-reviewed outcomes. This proves the saved state still reproduces — not that production serves it. Records are pin-checked against the loaded world, so replay each entry against the world its pin names — and under the executor the backup replay map names for its (pin, executor) group (see Backup and restore): the tool does not verify executor compatibility itself, so a runtime move without a tested compatibility statement keeps the old binary as the replay executor for pre-move records — same pin, different group. - Deployment check: send the control question through the real
production ingress with the pre-approved new pin and compare the
served decision (pin,
resultHash, outcome) with the staging-reviewed expectation. Only this proves which generation actually answers the external address after the switch. - Fresh-key canary (mandatory after any runtime move): the control
question MUST use a new
Idempotency-Keyper run — resending a previously used key replays the journaled decision instead of exercising the new executable, so a fixed smoke key would “pass” without touching the new compute path. Confirm the new record’sengineidentity (version +binaryDigest) names the deployed runtime. The same-key repeat is a separate check that proves idempotent replay (samedecisionId, no second record), never fresh computation. - Acceptance checkpoint (operator-policy-example): N consecutive clean hours (created-example: 24) with zero unexpected diffs before the prior bundle may be archived.
Failures and diagnostics
Section titled “Failures and diagnostics”law updatewithout--dry-runsurprises: re-read the help — the preview flags exist precisely for this; restorelaw.lockfrom version control and redo as--dry-run+--replay.- New
law testfailures after a runtime-only move: the binary changed semantics-sensitive behavior; keep the old binary path and treat this as a runtime regression, not a canon problem. /readyznot200after a--watch-worldflip: the new world did not warm on all workers; flip the symlink back (see Rollback) and inspect server stderr /--log-socketoutput.--replaymismatches with nolaw case diffmapping: stop; the closure moved further than the change record claims.
Support boundaries
Section titled “Support boundaries”- Supported: per-layer preview and diff commands named above; symlink
world switch with
--watch-world. - Reference setting: the layer order, observation window, and acceptance checkpoint are operator-policy-examples, not tool defaults.
- Out of scope: database migrations for host-side mutable data and multi-host rolling upgrades are not tool behavior; see rollback limits in Rollback.
Next step
Section titled “Next step”After acceptance, archive (do not delete) the prior bundle with its hashes; if the switch must be undone, follow Rollback.
Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.