Skip to content

Commit 475659a

Browse files
author
HiddenTrojan
committed
Repair Experiment 013 model staging preflight
1 parent dae5587 commit 475659a

3 files changed

Lines changed: 1231 additions & 61 deletions

File tree

research/EXPERIMENT_013_STATIC_RHT_Q468_PROTOCOL.md

Lines changed: 170 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Experiment 013: static RHT-Q468 packed-native adoption protocol
22

3-
> **Status: second replacement-H0 candidate after a preserved pre-model
4-
> sealed-smoke contract failure; not yet re-preregistered.**
3+
> **Status: third replacement-H0 candidate after a preserved post-authorization,
4+
> pre-payload model-staging path failure; not yet re-preregistered.**
55
>
66
> This replacement working copy becomes the next frozen Experiment 013
77
> preregistration only when its exact bytes and dependencies are committed in a
@@ -19,7 +19,7 @@
1919
2020
Protocol draft initiated: 2026-08-02
2121

22-
Current second replacement-H0 candidate amended: 2026-08-15
22+
Current third replacement-H0 candidate amended: 2026-08-15
2323

2424
Pre-resolution audit amendment: 2026-08-02. The amendment corrects a
2525
cache-exposed-span off-by-one, binds the Stage-A calibration chain by exact
@@ -379,6 +379,108 @@ pass unchanged. The old H1 model root may be treated only as preserved incident
379379
evidence, not as the official model root for the next H1; a fresh no-overwrite
380380
root must be published by a newly authorized `stage-model` execution.
381381

382+
Fifteenth pre-resolution model-staging-path amendment: 2026-08-15. Under
383+
source commit `0f3ea5e86e5d2ec13d5c5836540ce105e41ad02b`, tag
384+
`experiment013-h0-0f3ea5e`, and identity-only descendant
385+
`dae5587adc8f9a2b16335dfdc501e7f0a3f5e6ab`, the required read-only
386+
model-staging authorization succeeded. Its frozen identity file SHA-256 was
387+
`65cd1ccd932db1aa4c8f2f06e4b7a88b67532734f611dc33bbba39fbfea1cdb7`.
388+
The subsequent first `stage-model` invocation supplied repository-local Hub
389+
cache root `.cache/exp013-identity`. Calibration-runner v4 fully
390+
reauthenticated H1, H0 source, the frozen identity, and the public model-
391+
metadata manifest, then deterministically rejected the normalized cache root
392+
because an official Hub cache must be outside the repository.
393+
394+
The attempted output root
395+
`C:\tmp\recurquant-exp013-model-h1-dae5587a` remained absent. The failed
396+
command inspected only staging-path metadata after authorization. It did not
397+
import a Hub client, invoke a downloader, traverse or read cached payload
398+
files, create a staging directory, publish an output root, construct an
399+
adapter, load model configuration or weights, materialize calibration data,
400+
execute CUDA or Fisher computation, or produce a score, policy, smoke marker,
401+
calibration binding, stability value, or quality result. The Git worktree
402+
remained clean.
403+
404+
The immediate cause was an invalid command argument. The execution-control
405+
defect was the absence of a non-consuming staging-path preflight and runner
406+
v4's ordering of path validation after H1 authentication. This was neither an
407+
experimental result nor an infrastructure interruption, so the existing
408+
same-command infrastructure-retry exception does not apply and no retroactive
409+
exception is introduced. The H0, tag, H1, identity, and failed command remain
410+
unchanged as superseded incident evidence and authorize no further official
411+
execution.
412+
413+
Calibration-runner v5 introduces one pure staging-path validator shared by
414+
`verify-model-staging-paths` and `stage-model`. The read-only verifier accepts
415+
only repository root, Hub cache root, and prospective model output root. It
416+
performs no Git operation or identity, source-manifest, model-manifest, Hub,
417+
cache-payload, adapter, model, or dataset access; imports no Hub downloader;
418+
creates no directory or artifact; and writes only deterministic canonical JSON
419+
to stdout. It requires an existing regular non-link repository root, an
420+
existing regular non-link external Hub cache, an existing regular non-link
421+
output parent, an absent non-root output destination, and pairwise disjoint
422+
repository, cache, and output roots in both nesting directions. Every existing
423+
path component must be free of links and reparse points. The Hub-cache root and
424+
output parent may not themselves be filesystem roots. The output leaf is 1
425+
through 128 characters, begins with an ASCII alphanumeric, contains only ASCII
426+
alphanumerics, dot, underscore, or hyphen, and ends with an ASCII alphanumeric,
427+
underscore, or hyphen. Reserved DOS names are also rejected.
428+
429+
`stage-model` invokes the same pure validator before Git-executable
430+
authentication or any H1 authentication and requires
431+
`--expected-model-staging-path-contract-sha256` to equal the digest produced by
432+
the prior verifier. A missing, malformed, or unequal digest fails at that pure
433+
boundary and does not consume H1. After successful authentication, it repeats
434+
the validator and requires the same normalized roots and directory-component
435+
identities before Hub import, payload access, or staging creation. Immediately
436+
before atomic publication it repeats both staging-path and identity
437+
authorization and rejects any root, component-identity, destination-existence,
438+
or authorization drift. A semantic or authentication mismatch still retires
439+
H1; a documented infrastructure interruption after authentication begins but
440+
before payload access permits only the existing exact same-command retry.
441+
442+
Runner revision advances from v4 to v5. The new canonical stdout document uses
443+
artifact kind `recurquant_experiment013_model_staging_paths_verification` and
444+
schema version one. It publishes no raw local path. It contains SHA-256 digests
445+
of the normalized absolute repository, Hub-cache, output-parent, and output-
446+
root paths; SHA-256 digests of the ordered device/inode/mode identity chains for
447+
the repository, cache, and output-parent components; explicit states
448+
`existing_regular_non_link_directory` for those three existing roots and
449+
`absent` for the output root; and `path_contract_sha256`. That contract digest
450+
authenticates canonical newline-terminated JSON containing schema version one
451+
plus exactly those path, component-identity, and state fields. A successful
452+
`stage-model` result repeats the same digest as
453+
`model_staging_path_contract_sha256`, coupling the standalone preflight to the
454+
internally revalidated staging call. Identity schema v5; capture and resolver
455+
procedure v6; adapter revision v2; RULER launcher v7, generation-manifest v2,
456+
and runtime-manifest v3; calibration runtime-manifest v4; source-manifest
457+
schema/profile v2; model-manifest v1; existing verification stdout schemas v1;
458+
run-report v2; and Fisher-boundary and smoke-marker contracts v1 remain
459+
unchanged. No record selection, dataset revision, calibration span, Fisher
460+
boundary, quantization policy, metric, gate, model contract, or protected-stage
461+
rule changes.
462+
463+
A fresh clean H0 and source manifest, newly promoted calibration identity,
464+
identity-only H1, successful staging-path preflight, model-staging
465+
authorization, and fresh no-overwrite identity-bound model publication are
466+
required. The exact RULER v7 batch, sealed runtime, public model metadata
467+
manifest, Parquet manifest, and external shared Hub cache remain reusable only
468+
after their existing point-of-use checks pass unchanged. The replacement
469+
identity must retain all 160 records and content manifest
470+
`ee72483a8f8b4370c9e667e4287747e5bc358aeb0265a58167140f4e780a7b29`;
471+
relative to the retired
472+
`65cd1ccd932db1aa4c8f2f06e4b7a88b67532734f611dc33bbba39fbfea1cdb7`
473+
identity, only these five repository-source and promotion-hash cascade JSON
474+
pointers may differ:
475+
476+
```text
477+
/canonical_evidence_sha256
478+
/evidence/execution_bindings/repository_source_manifest_file_sha256
479+
/evidence/promotion/candidate_canonical_evidence_sha256
480+
/evidence/promotion/candidate_file_sha256
481+
/evidence/source_manifest_sha256
482+
```
483+
382484
## Question
383485

384486
Can a calibration-frozen, static Q4/Q6/Q8 recurrent-state layout satisfy the
@@ -774,44 +876,74 @@ Before committing H1, the exact promoted identity bytes in their ignored,
774876
no-overwrite precommit location must pass `verify-frozen-identity-contract`.
775877
That read-only command authenticates H0 and its source manifest, loads the exact
776878
H0 resolver, and consumes the complete record inventory through calibration-
777-
runner v4's identity view. It accepts no H1, model manifest, Hub, cache, or
879+
runner v5's identity view. It accepts no H1, model manifest, Hub, cache, or
778880
output argument. Its non-persisted canonical JSON stdout document uses artifact
779881
kind `recurquant_experiment013_frozen_identity_contract_verification`, schema
780882
version one, and binds the H0/source contract, portable Git identity, all four
781883
execution bindings, complete identity/canonical/assignment hashes, public model
782884
and tokenizer contracts, and record count. The bytes that passed are then copied
783885
without modification as the sole H1 tree change; regeneration or hand editing
784-
after that preflight is forbidden. After H1, the read-only command
785-
`verify-model-staging-authorization` must invoke the same authorization path
786-
used by `stage-model` and reauthenticate the H1, index, and
787-
worktree identity bytes; H0 ancestry and unchanged source tree; the complete
788-
frozen identity and execution bindings; and the exact public model-metadata
789-
manifest. The command accepts no cache or output root, imports no Hub downloader,
886+
after that preflight is forbidden.
887+
888+
After H1 and before model-staging authorization, run the read-only
889+
`verify-model-staging-paths` command twice against the exact intended
890+
repository, external Hub cache, and absent output root. It accepts only those
891+
three path arguments, uses the same pure validator as `stage-model`, performs no
892+
Git or artifact authentication and no Hub, payload, adapter, model, or dataset
893+
access, and creates no filesystem entry. Its non-persisted canonical JSON
894+
stdout document uses artifact kind
895+
`recurquant_experiment013_model_staging_paths_verification`, schema version one,
896+
and binds status, runner revision, normalized absolute-path digests for the
897+
repository, cache, output parent, and output root; component-identity-chain
898+
digests for the three existing roots; their exact regular/non-link states; the
899+
absent-output state; and the aggregate `path_contract_sha256`. The two stdout
900+
byte strings must be identical. The exact digest must then be supplied to
901+
`stage-model` as `--expected-model-staging-path-contract-sha256`; a missing,
902+
malformed, or unequal value fails before Git or H1 authentication. A successful
903+
`stage-model` result must echo that required digest as
904+
`model_staging_path_contract_sha256`. A failure at this pre-authentication
905+
boundary does not consume H1.
906+
907+
Only then may `verify-model-staging-authorization` invoke the same authorization
908+
path used by `stage-model` and reauthenticate the H1, index, and worktree
909+
identity bytes; H0 ancestry and unchanged source tree; the complete frozen
910+
identity and execution bindings; and the exact public model-metadata manifest.
911+
The command accepts no cache or output root, imports no Hub downloader,
790912
downloads no file, and creates no directory or artifact. Its canonical JSON
791913
stdout document, which the command does not persist, uses artifact kind
792914
`recurquant_experiment013_model_staging_authorization`, schema version one, and
793915
binds status, runner revision, frozen-identity hash, H1, H0, repository-source-
794916
manifest hash, model-manifest hash, public model ID/revision, Hub-tree-manifest
795-
hash, file count, and total bytes. Only a successful stdout document permits
796-
`stage-model` to be attempted. A semantic or authentication mismatch retires
797-
that H1; it may not be hand-edited or weakened. An argument-parse failure does
798-
not consume H1 because authentication did not begin. A documented infrastructure
799-
interruption before any model-payload access permits only an exact same-command
800-
retry under that H1.
917+
hash, file count, and total bytes. Only successful path and authorization
918+
documents permit `stage-model` to be attempted with those same roots. A
919+
semantic or authentication mismatch retires that H1; it may not be hand-edited
920+
or weakened. An argument-parse or initial pure path-precondition failure does
921+
not consume H1 because authentication did not begin. A documented
922+
infrastructure interruption after authentication begins but before model-
923+
payload access permits only an exact same-command retry under that H1.
801924

802925
Model payload staging begins only after the frozen identity is tracked with
803926
identical H1, index, and worktree bytes. The identity-bound stager downloads
804927
only the exact sorted root files in the frozen model manifest at the exact
805-
40-hex public Hub revision, using an external cache and no token. Returned cache
806-
paths are untrusted: every source must resolve inside that cache, then be
807-
stream-copied into a fresh sibling staging directory. Ordinary files are checked
808-
by Git blob OID and size; LFS payloads are checked by payload SHA-256 and size.
809-
The staged tree must have exact case-insensitive-unique inventory and contain no
810-
links, reparse points, cache metadata, marker, or extra file. Reauthenticate the
811-
identity, source, and manifest immediately before an atomic no-replace directory
812-
rename, then independently authenticate the published model root. Failure may
813-
clean only the owned staging directory; it never overwrites the output or
814-
deletes the shared Hub cache.
928+
40-hex public Hub revision, using an external cache and no token. Before Git or
929+
H1 authentication, immediately after authorization, and immediately before
930+
publication, the stager repeats the pure path validator and requires identical
931+
normalized roots and existing-component identities. The cache and output
932+
parent may not be filesystem roots, and the absent output leaf must be the same
933+
canonical 1-through-128-character basename accepted by the preflight: an ASCII
934+
alphanumeric first character, only ASCII alphanumeric/dot/underscore/hyphen
935+
interior characters, an ASCII alphanumeric/underscore/hyphen final character,
936+
and no reserved DOS name. Returned cache paths are untrusted: every source must
937+
resolve inside that cache, then be stream-copied into a fresh sibling staging
938+
directory.
939+
Ordinary files are checked by Git blob OID and size; LFS payloads are checked by
940+
payload SHA-256 and size. The staged tree must have exact case-insensitive-
941+
unique inventory and contain no links, reparse points, cache metadata, marker,
942+
or extra file. Reauthenticate the identity, source, and manifest immediately
943+
before an atomic no-replace directory rename, then independently authenticate
944+
the published model root. Failure may clean only the exact owned staging-
945+
directory identity; it never overwrites the output or deletes the shared Hub
946+
cache.
815947

816948
Stage-A resolution additionally consumes one strictly decoded
817949
`experiment-013-stage-a-calibration-binding-v3` artifact. The resolved Stage-A
@@ -1193,6 +1325,18 @@ accepted revision, manifest, and downloaded object is checked against its
11931325
frozen identity before protected execution. Reports must not describe this as
11941326
cryptographic attestation of the complete OS or toolchain.
11951327

1328+
The model-staging directory-component snapshots are honest-process race
1329+
hardening, not complete filesystem attestation. The runner snapshots every
1330+
component before and after resolution and repeats the complete path contract
1331+
before authentication, after authentication, and immediately before no-replace
1332+
publication; observed replacement or identity drift fails closed. It does not
1333+
retain kernel directory handles or perform every operation handle-relatively,
1334+
so a hostile local process or administrator could still race path-based I/O
1335+
between checks. The local OS, filesystem, and concurrently privileged processes
1336+
therefore remain in the trusted computing base. Stronger protection would
1337+
require held Windows directory handles and file IDs, or POSIX `openat`-style
1338+
no-follow operations.
1339+
11961340
A person with filesystem control can deliberately delete the lock and reflog,
11971341
rewrite or remove refs, or start from a fresh clone. The pre-run seal also
11981342
cannot authenticate a result that does not yet exist. Stronger public proof

0 commit comments

Comments
 (0)