fix: retain complete histories with bounded journal capacity and native recovery
Rust development slice / linux (push) Failing after 6s

This commit is contained in:
2026-11-13 19:11:45 +01:00
parent da7eb8109c
commit c512bd6fb2
36 changed files with 2556 additions and 38 deletions
+7
View File
@@ -95,6 +95,9 @@ def deploy(payload):
require(built['exit_code'] == 0, 'build must pass')
require(all(hashlib.sha256((root/name).read_bytes()).hexdigest() == sha for name,sha in record['files'].items()), 'source drift')
require(not (backup/'deploy-result.json').exists(), 'deployment already recorded')
if payload.get('previous_ui_index_sha256'):
require(hashlib.sha256((root/'web/dist/index.html').read_bytes()).hexdigest()==payload['previous_ui_index_sha256'],
'independently known previous UI index required')
if payload.get('closed_policy_sha256'):
import datetime as dt
policy = (root/'devstate/root-policy/policy.json').read_bytes()
@@ -142,6 +145,7 @@ def deploy(payload):
def main():
parser = argparse.ArgumentParser(description=__doc__); parser.add_argument('action', choices=('stage','status','deploy')); parser.add_argument('--id')
parser.add_argument('--preserve-known-unknown', action='store_true', help='preserve the exact fenced APT attempt while upgrading its control path')
parser.add_argument('--expected-ui-index-sha256',help='CAS the independently known previous UI build before publication')
args = parser.parse_args(); os.umask(0o077); STATE.mkdir(mode=0o700, parents=True, exist_ok=True)
if args.action == 'stage':
names = ['Cargo.toml','Cargo.lock','rust-toolchain.toml','deploy/Dockerfile','deploy/linux/rmm-apt-helper.service',
@@ -161,6 +165,9 @@ def main():
ident = str(uuid.UUID(args.id)); cloud.contract.protected_json(STATE/(ident+'.json'))
before = None; payload = dict(id=ident)
if args.action == 'deploy':
if args.expected_ui_index_sha256:
require(len(args.expected_ui_index_sha256)==64 and all(c in '0123456789abcdef' for c in args.expected_ui_index_sha256),'fixed previous UI hash')
payload['previous_ui_index_sha256']=args.expected_ui_index_sha256
target = cloud.contract.protected_json(cloud.ROOT/'devstate/remote-vm.json')['identity']
gate = cloud.bootstrap.rpc('server.conf', cloud.server, dict(kind='gate', tenant_id=cloud.TENANT, agent_id=target['agent_id']))
if args.preserve_known_unknown: