TryDotAtwo commited on
Commit
a87fe24
·
verified ·
1 Parent(s): fcf5fa4

Publish verified frozen snapshot fix and full matched source packages

Browse files

Full 10000-root archive preparation verified in Molab. Immutable frozen SQLite audit preserves byte identity and rejects sidecars. Stage complete baseline and optimized source packages with the same correctness fix and exactly four optimization differences. Linux CPU regression and real SQLite fixture passed; full restore, matched speedup and 1000-epoch campaign remain unverified. Prior artifacts retained.

NATIVE_FULL_EPOCH_SNAPSHOT_FIX_20261004.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Native full epoch and snapshot correctness — 2026-10-04
2
+
3
+ The current priority is the complete C++/CUDA + Rust generator. The reduced smoke subset was cancelled by the user on 2026-10-01 at 16:31. That earlier task is historical.
4
+
5
+ ## Verified scope
6
+
7
+ - A complete epoch of 10,000 unique train roots was generated in the existing Molab runtime. Generation time: 1046.456075262 seconds. This is generation timing, not an uninterrupted archive/restore workflow measurement.
8
+ - The complete epoch archive preparation finished successfully after the snapshot fix. All four actual reader modes and their independent returned-batch reference checks ran over all 10,000 roots.
9
+ - The complete SQLite snapshot contains 426,086,400 bytes, SHA-256 `04f7d0bcea705382ef15e1d0927403ed0b0845bc174400a194106b34de39f48d`. No WAL, SHM or journal sidecars remain. Original training, identity and approved configuration byte pins were unchanged.
10
+ - The isolated fix passed the actual SQLite backup/restore/four-reader regression in Molab Linux: 1 passed, 0 failed. The full Linux CPU suite passed 179 tests with 0 failures and 5 CUDA tests ignored.
11
+ - The optimized source with the identical correctness fix passed the independent local CPU suite: 188 passed, 0 failed, 5 CUDA tests ignored. This does not establish Linux candidate execution or performance.
12
+
13
+ ## Snapshot fix
14
+
15
+ Normal SQLite read-only inspection can create sidecars when a closed snapshot retains its WAL header. Frozen snapshots now use a separately guarded read-only immutable connection. The existing live database path remains WAL-aware. Full integrity, source schedule, root digest, exact-label, counter, admission and returned-batch validation are retained. Existing sidecars cause refusal; the fix does not delete them or convert journal mode.
16
+
17
+ ## Immutable source artifacts
18
+
19
+ | Artifact | SHA-256 |
20
+ | --- | --- |
21
+ | `frozen_snapshot_fix_transport_v1_20261004.zip` | `1568a0e77bb8f71d22d119b7af636354498402eaf8d3ec760bf79b2fe5bb590a` |
22
+ | `matched_frozen_baseline_source_v1_20261004.zip` | `3e5d0177990d0b9cab2cc0c9e9b8e6cdf83881488cdd94cc1ce4d8a0bc31a22d` |
23
+ | `matched_frozen_optimized_source_v1_20261004.zip` | `bbe4a93907c7d79f5020e7cbff0124920de1b67d919889eb2a0a4e697ff8fa01` |
24
+
25
+ Both complete source transports bind 65 source files. Their harness and snapshot owner fix are byte-identical. Only the four intended optimization files differ: `native_store.rs`, `native_store_v2.rs`, `training_records.rs` and `native_stage_profile.rs`. Earlier published artifacts remain historical and unchanged.
26
+
27
+ ## Remaining verification
28
+
29
+ Full restoration, retry and separate-process reopening are currently executing; completion is not claimed here. Actual matched full-workload speedup, 1000 epochs × 10,000 globally fresh roots, authenticated HTTP archive/rotation, strict peak storage capacity and the full campaign closure audit remain unverified. No 10× speedup is established.
30
+
31
+ Python is permitted only for the minimal Molab service cell that starts and holds a foreground native process. Generation, validation and computation remain Rust/C++/CUDA.
frozen_snapshot_fix_transport_v1_20261004.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1568a0e77bb8f71d22d119b7af636354498402eaf8d3ec760bf79b2fe5bb590a
3
+ size 34273
matched_frozen_baseline_source_v1_20261004.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e5d0177990d0b9cab2cc0c9e9b8e6cdf83881488cdd94cc1ce4d8a0bc31a22d
3
+ size 231385
matched_frozen_build_baseline_v1_20261004.sh ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # Build only on the existing audited Molab; never starts generation or a runtime.
3
+ set -euo pipefail
4
+ (( $# == 4 )) || { echo 'source-zip original-native-source fresh-output audited-hostname required' >&2; exit 2; }
5
+ test ! -e "$3"; test ! -L "$3"
6
+ zip=$(realpath "$1"); original=$(realpath "$2"); out=$(realpath -m "$3"); host=$4
7
+ case "$zip:$original:$out" in /marimo/*:/marimo/*:/marimo/*) ;; *) exit 2;; esac
8
+ test "$(hostname)" = "$host"
9
+ for tool in jq unzip sha256sum cargo rustc nvidia-smi stat flock realpath ps awk sed grep sort cmp tee find xargs df; do command -v "$tool" >/dev/null; done
10
+ lock=/marimo/.quantum-native-full-workflow.lock
11
+ test ! -L "$lock"; if [[ -e "$lock" ]]; then test -f "$lock"; fi
12
+ exec 8>"$lock"; flock -n 8
13
+ gpu_pids=$(nvidia-smi --query-compute-apps=pid --format=csv,noheader)
14
+ test -z "$gpu_pids"
15
+ ps -eo args= | awk '{name=$1; sub(/^.*\//,"",name); if(name ~ /^(generate[-_]full|verify[-_]full|verify[-_]cuda|frontier|archive[-_]native|run[-_]native[-_]full[-_]epoch)/) found=1} END {exit found}'
16
+ printf '%s %s\n' 3e5d0177990d0b9cab2cc0c9e9b8e6cdf83881488cdd94cc1ce4d8a0bc31a22d "$zip" | sha256sum -c -
17
+ printf '%s %s\n' 3de55d3adaeb334acc957e5b57bb5838f07a87870c9d6f301ab0deb0fc8675a1 "$original/SHA256SUMS" | sha256sum -c -
18
+ (cd "$original"; sha256sum -c SHA256SUMS)
19
+ printf '%s %s\n' ae6a88c94083d9a40ffef1a0c5fed128aabe85db3ec3294cdf5f0779bbbac486 "$original/rust_native_generator/Cargo.lock" | sha256sum -c -
20
+ contract=$(unzip -p "$zip" INTEGRATION_CONTRACT.json)
21
+ jq -e '.schema=="molab_live_complete_source_transport_v1" and .full_source==true and (.source_files|length)==65 and ([.source_files[].path]|unique|length)==65 and all(.source_files[]; (.path|test("^(native_generator/([a-zA-Z0-9_]+\\.rs|Cargo\\.toml|Cargo\\.lock|stage37_primary\\.md)|run_native_full_epoch_owner\\.rs)$")) and (.sha256|test("^[a-f0-9]{64}$")) and (.bytes|type=="number"))' <<< "$contract" >/dev/null
22
+ # Hash-pinned archive must contain only contract files and the contract itself.
23
+ actual=$(unzip -Z1 "$zip" | sed 's@\\@/@g' | grep -v '/$' | sort)
24
+ expected=$( { jq -r '.source_files[].path' <<< "$contract"; echo INTEGRATION_CONTRACT.json; } | sort)
25
+ test "$actual" = "$expected"
26
+ test ! -e "$out"; test ! -L "$out"
27
+ mkdir "$out"
28
+ trap 'code=$?; printf "%s\n" "$code" > "$out/build_exit.txt"' EXIT
29
+ unzip -q "$zip" -d "$out"
30
+ source="$out/native_generator"
31
+ while IFS=$'\t' read -r file hash bytes; do
32
+ test -f "$out/$file"; test ! -L "$out/$file"
33
+ test "$(stat -c %s "$out/$file")" = "$bytes"
34
+ printf '%s %s\n' "$hash" "$file" >> "$out/transport_SHA256SUMS"
35
+ done < <(jq -r '.source_files[]|[.path,.sha256,.bytes]|@tsv' <<< "$contract")
36
+ (cd "$out"; sha256sum -c transport_SHA256SUMS)
37
+ cmp "$source/Cargo.lock" "$original/rust_native_generator/Cargo.lock"
38
+ df -h "$out" > "$out/storage_audit.txt"
39
+ rustc --version > "$out/toolchain.txt"; cargo --version >> "$out/toolchain.txt"
40
+ args=(--offline --locked --manifest-path "$source/Cargo.toml" --target-dir "$out/build" --config 'source.crates-io.replace-with="vendored-sources"' --config "source.vendored-sources.directory='$original/rust_vendor'")
41
+ cargo test "${args[@]}" --lib -- --test-threads=4 2>&1 | tee "$out/cpu_tests.log"
42
+ cargo build "${args[@]}" --release --lib --bin generate-full-native-owned-stream --bin archive-native-identities 2>&1 | tee "$out/compile.log"
43
+ test -z "$(find "$out/build/release/deps" "$out/build/release/build" -type l -print -quit)"
44
+ test -z "$(find "$out/build/release/deps" "$out/build/release/build" ! -type f ! -type d -print -quit)"
45
+ shopt -s nullglob
46
+ libraries=("$out"/build/release/deps/libfrontier_native_generator*.rlib)
47
+ serde=("$out"/build/release/deps/libserde_json*.rlib)
48
+ sqlite=("$out"/build/release/build/libsqlite3-sys-*/out)
49
+ (( ${#libraries[@]} == 1 && ${#serde[@]} == 1 && ${#sqlite[@]} == 1 ))
50
+ rustc --edition=2024 -O "$out/run_native_full_epoch_owner.rs" -L "dependency=$out/build/release/deps" -L "native=${sqlite[0]}" --extern "frontier_native_generator=${libraries[0]}" --extern "serde_json=${serde[0]}" -o "$out/run-native-full-epoch-owner" 2>&1 | tee "$out/harness_compile.log"
51
+ (cd "$out"; sha256sum build/release/generate-full-native-owned-stream build/release/archive-native-identities run-native-full-epoch-owner > runtime_SHA256SUMS; find build/release/deps build/release/build -type f -print0 | sort -z | xargs -0 sha256sum > artifact_SHA256SUMS; sha256sum -c artifact_SHA256SUMS; sha256sum -c transport_SHA256SUMS)
52
+ (cd "$original"; sha256sum -c SHA256SUMS)
53
+ echo 'LIVE_BUILD_ONLY_COMPLETE; full epoch execution, HTTP anchor, rotation and matched speed remain unverified'
matched_frozen_build_optimized_v1_20261004.sh ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # Build only on the existing audited Molab; never starts generation or a runtime.
3
+ set -euo pipefail
4
+ (( $# == 4 )) || { echo 'source-zip original-native-source fresh-output audited-hostname required' >&2; exit 2; }
5
+ test ! -e "$3"; test ! -L "$3"
6
+ zip=$(realpath "$1"); original=$(realpath "$2"); out=$(realpath -m "$3"); host=$4
7
+ case "$zip:$original:$out" in /marimo/*:/marimo/*:/marimo/*) ;; *) exit 2;; esac
8
+ test "$(hostname)" = "$host"
9
+ for tool in jq unzip sha256sum cargo rustc nvidia-smi stat flock realpath ps awk sed grep sort cmp tee find xargs df; do command -v "$tool" >/dev/null; done
10
+ lock=/marimo/.quantum-native-full-workflow.lock
11
+ test ! -L "$lock"; if [[ -e "$lock" ]]; then test -f "$lock"; fi
12
+ exec 8>"$lock"; flock -n 8
13
+ gpu_pids=$(nvidia-smi --query-compute-apps=pid --format=csv,noheader)
14
+ test -z "$gpu_pids"
15
+ ps -eo args= | awk '{name=$1; sub(/^.*\//,"",name); if(name ~ /^(generate[-_]full|verify[-_]full|verify[-_]cuda|frontier|archive[-_]native|run[-_]native[-_]full[-_]epoch)/) found=1} END {exit found}'
16
+ printf '%s %s\n' bbe4a93907c7d79f5020e7cbff0124920de1b67d919889eb2a0a4e697ff8fa01 "$zip" | sha256sum -c -
17
+ printf '%s %s\n' 3de55d3adaeb334acc957e5b57bb5838f07a87870c9d6f301ab0deb0fc8675a1 "$original/SHA256SUMS" | sha256sum -c -
18
+ (cd "$original"; sha256sum -c SHA256SUMS)
19
+ printf '%s %s\n' ae6a88c94083d9a40ffef1a0c5fed128aabe85db3ec3294cdf5f0779bbbac486 "$original/rust_native_generator/Cargo.lock" | sha256sum -c -
20
+ contract=$(unzip -p "$zip" INTEGRATION_CONTRACT.json)
21
+ jq -e '.schema=="molab_live_complete_source_transport_v1" and .full_source==true and (.source_files|length)==65 and ([.source_files[].path]|unique|length)==65 and all(.source_files[]; (.path|test("^(native_generator/([a-zA-Z0-9_]+\\.rs|Cargo\\.toml|Cargo\\.lock|stage37_primary\\.md)|run_native_full_epoch_owner\\.rs)$")) and (.sha256|test("^[a-f0-9]{64}$")) and (.bytes|type=="number"))' <<< "$contract" >/dev/null
22
+ # Hash-pinned archive must contain only contract files and the contract itself.
23
+ actual=$(unzip -Z1 "$zip" | sed 's@\\@/@g' | grep -v '/$' | sort)
24
+ expected=$( { jq -r '.source_files[].path' <<< "$contract"; echo INTEGRATION_CONTRACT.json; } | sort)
25
+ test "$actual" = "$expected"
26
+ test ! -e "$out"; test ! -L "$out"
27
+ mkdir "$out"
28
+ trap 'code=$?; printf "%s\n" "$code" > "$out/build_exit.txt"' EXIT
29
+ unzip -q "$zip" -d "$out"
30
+ source="$out/native_generator"
31
+ while IFS=$'\t' read -r file hash bytes; do
32
+ test -f "$out/$file"; test ! -L "$out/$file"
33
+ test "$(stat -c %s "$out/$file")" = "$bytes"
34
+ printf '%s %s\n' "$hash" "$file" >> "$out/transport_SHA256SUMS"
35
+ done < <(jq -r '.source_files[]|[.path,.sha256,.bytes]|@tsv' <<< "$contract")
36
+ (cd "$out"; sha256sum -c transport_SHA256SUMS)
37
+ cmp "$source/Cargo.lock" "$original/rust_native_generator/Cargo.lock"
38
+ df -h "$out" > "$out/storage_audit.txt"
39
+ rustc --version > "$out/toolchain.txt"; cargo --version >> "$out/toolchain.txt"
40
+ args=(--offline --locked --manifest-path "$source/Cargo.toml" --target-dir "$out/build" --config 'source.crates-io.replace-with="vendored-sources"' --config "source.vendored-sources.directory='$original/rust_vendor'")
41
+ cargo test "${args[@]}" --lib -- --test-threads=4 2>&1 | tee "$out/cpu_tests.log"
42
+ cargo build "${args[@]}" --release --lib --bin generate-full-native-owned-stream --bin archive-native-identities 2>&1 | tee "$out/compile.log"
43
+ test -z "$(find "$out/build/release/deps" "$out/build/release/build" -type l -print -quit)"
44
+ test -z "$(find "$out/build/release/deps" "$out/build/release/build" ! -type f ! -type d -print -quit)"
45
+ shopt -s nullglob
46
+ libraries=("$out"/build/release/deps/libfrontier_native_generator*.rlib)
47
+ serde=("$out"/build/release/deps/libserde_json*.rlib)
48
+ sqlite=("$out"/build/release/build/libsqlite3-sys-*/out)
49
+ (( ${#libraries[@]} == 1 && ${#serde[@]} == 1 && ${#sqlite[@]} == 1 ))
50
+ rustc --edition=2024 -O "$out/run_native_full_epoch_owner.rs" -L "dependency=$out/build/release/deps" -L "native=${sqlite[0]}" --extern "frontier_native_generator=${libraries[0]}" --extern "serde_json=${serde[0]}" -o "$out/run-native-full-epoch-owner" 2>&1 | tee "$out/harness_compile.log"
51
+ (cd "$out"; sha256sum build/release/generate-full-native-owned-stream build/release/archive-native-identities run-native-full-epoch-owner > runtime_SHA256SUMS; find build/release/deps build/release/build -type f -print0 | sort -z | xargs -0 sha256sum > artifact_SHA256SUMS; sha256sum -c artifact_SHA256SUMS; sha256sum -c transport_SHA256SUMS)
52
+ (cd "$original"; sha256sum -c SHA256SUMS)
53
+ echo 'LIVE_BUILD_ONLY_COMPLETE; full epoch execution, HTTP anchor, rotation and matched speed remain unverified'
matched_frozen_optimized_source_v1_20261004.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bbe4a93907c7d79f5020e7cbff0124920de1b67d919889eb2a0a4e697ff8fa01
3
+ size 233465