Make start evidence atomic and recover only bound durable outcomes
Rust development slice / linux (push) Failing after 7s

This commit is contained in:
2026-11-14 02:01:17 +01:00
parent de3b408c34
commit 74736483df
13 changed files with 764 additions and 87 deletions
+26
View File
@@ -1,5 +1,9 @@
# Native gemeinsame Core-Unitabnahme
**Persistenzprofil tatsächlich ausgeführt, 2026-11-14:**
Fall `08a9be72-dd7c-46b7-a2c6-7d17424533c2`, Linux76 vor Windows54, ohne Skip.
Getrennte eigene SQLite-/Signaturfixturen, keine native Job-/Dienstabnahme.
**Helper-Sync-Profil tatsächlich ausgeführt, 2026-11-14:**
Fall `5704073c-a135-431c-aa84-fedc68a3de0b`, Linux 69/69 vor Windows 47/47,
keine Skips oder RMM-Wirkung. Auch dies ersetzt keine Windows-SYSTEM-Dienstprobe.
@@ -72,3 +76,25 @@ python3 deploy/shared_core_acceptance.py finish-windows --profile helper-sync-v1
Profil, Quellen und Artefakte sind an den privaten create-only Intent gebunden.
Es gibt weiterhin keinen frei wählbaren Programmpfad oder Argumentvektor.
## Persistenzkorrektur `durable-outcome-v1`
Neue unveränderliche Qualifikation unter `devstate/*core/durable-outcome-v1/`.
Das feste Profil erwartet Linux **7+26+22+21=76**, danach Windows **6+26+22=54**.
Lokale Regressionen und Cross-Builds sind im Manifest separat von der noch
geplanten tatsächlichen VM-Ausführung ausgewiesen. Kein früherer Nachweis wird
umgeschrieben. Vorläufige verworfene Builds sind ausdrücklich unqualifiziert.
```sh
# GEPLANT, NICHT AUSGEFÜHRT: tatsächliche VM-Ausführung durch Parent.
python3 deploy/shared_core_acceptance.py linux --profile durable-outcome-v1
python3 deploy/shared_core_acceptance.py windows --profile durable-outcome-v1 --case-id <UUID>
```
Die gezielten Fälle prüfen atomaren Verbrauch+Startzeugen, Original-Outcome-CAS,
Crash vor/nach Resultcommit, Reconnect-Unknown mit späterer Originalcompletion
und die weiterhin verweigerte Freigabe bei fehlendem lokalen Outcome.
Startup journalisiert ausschließlich bereits gebundene gespeicherte Belege neu;
Unknown ohne solchen Beleg bleibt gesperrt. Server-/Unlockregeln bleiben strikt.
Dies simuliert Commitgrenzen mit eigenen Fixtures; es ersetzt keinen späteren
wirklichen Agentprozessabsturz oder unabhängigen SYSTEM-Helperabschlussnachweis.
+6 -5
View File
@@ -26,6 +26,7 @@ STATE = ROOT / 'devstate/shared-core/acceptance'
PROFILES = {
'original': {'linux': {'contracts':5, 'reconcile':20}, 'windows': {'contracts':4, 'reconcile':20}},
'helper-sync-v1': {'linux': {'contracts':5, 'reconcile':21, 'helper-reconcile':22, 'linux-helper':21}, 'windows': {'contracts':4, 'reconcile':21, 'helper-reconcile':22}},
'durable-outcome-v1': {'linux': {'contracts':7, 'reconcile':26, 'helper-reconcile':22, 'linux-helper':21}, 'windows': {'contracts':6, 'reconcile':26, 'helper-reconcile':22}},
}
KINDS = ('contracts', 'reconcile') # Historical original qualification only.
REMOTE_LINUX = '/var/lib/rmm-shared-core-acceptance'
@@ -44,11 +45,11 @@ def source_paths(profile):
contract.require(profile in PROFILES, 'fixed qualification profile')
sources = [ROOT/'Cargo.toml', ROOT/'Cargo.lock', ROOT/'rust-toolchain.toml']
crates = ['agent-core', 'domain', 'protocol']
if profile == 'helper-sync-v1': crates.extend(('agent', 'agent-linux', 'privileged-helper'))
if profile in ('helper-sync-v1','durable-outcome-v1'): crates.extend(('agent', 'agent-linux', 'privileged-helper'))
for name in crates:
sources.extend(p for p in (ROOT/'crates'/name).rglob('*') if p.is_file() and (p.suffix == '.rs' or p.name == 'Cargo.toml'))
sources.extend((ROOT/'proto').glob('*.proto'))
if profile == 'helper-sync-v1':
if profile in ('helper-sync-v1','durable-outcome-v1'):
sources.extend(ROOT/p for p in ('tools/apt-transaction/apt_transaction.py', 'tools/apt-transaction/hook', 'deploy/linux/rmm-apt-helper.service', 'tests/apt_transaction/fixtures/planning-canonical.json'))
return sources
@@ -83,7 +84,7 @@ def linux_case(payload):
require(ident == payload['id'] and payload['action'] in ('prepare', 'run', 'read'), 'fixed case')
entries = payload['artifacts']
profile=payload.get('profile','original')
profiles={'original':{'contracts':5,'reconcile':20},'helper-sync-v1':{'contracts':5,'reconcile':21,'helper-reconcile':22,'linux-helper':21}}
profiles={'original':{'contracts':5,'reconcile':20},'helper-sync-v1':{'contracts':5,'reconcile':21,'helper-reconcile':22,'linux-helper':21},'durable-outcome-v1':{'contracts':7,'reconcile':26,'helper-reconcile':22,'linux-helper':21}}
require(profile in profiles and set(entries)==set(profiles[profile]), 'fixed qualification artifacts')
for kind, item in entries.items():
require(len(item['binary_sha256']) == 64 and all(c in '0123456789abcdef' for c in item['binary_sha256']), 'fixed hash')
@@ -141,8 +142,8 @@ WINDOWS = r'''
$ErrorActionPreference='Stop'
$p=([Console]::In.ReadLine() | ConvertFrom-Json)
if (!$p.profile) {$p | Add-Member -NotePropertyName profile -NotePropertyValue 'original'}
$kinds=@('contracts','reconcile');if ($p.profile -eq 'helper-sync-v1') {$kinds+=@('helper-reconcile')}
if ($p.profile -notin @('original','helper-sync-v1')) {throw 'Fixed qualification profile'}
$kinds=@('contracts','reconcile');if ($p.profile -in @('helper-sync-v1','durable-outcome-v1')) {$kinds+=@('helper-reconcile')}
if ($p.profile -notin @('original','helper-sync-v1','durable-outcome-v1')) {throw 'Fixed qualification profile'}
if ([string]([guid]$p.id) -cne $p.id -or $p.kind -notin $kinds -or $p.action -notin @('run','read') -or $p.sha256 -notmatch '^[0-9a-f]{64}$' -or $p.linux_evidence_sha256 -notmatch '^[0-9a-f]{64}$') {throw 'Fixed native core case'}
$root='C:\ProgramData\RustDiscoveryBootstrap'
$case=Join-Path $root ('shared-core-'+$p.id)