Prove legacy Gitea state from observed inspect orders
This commit is contained in:
@@ -145,10 +145,32 @@ NAS must prove that it explains this specific attempt before another apply.
|
||||
attempt. Its read-only `plan` checks the failed journal, failed archive and saved
|
||||
receipt digests, unchanged disabled config, leftover v1 descriptor, fixed Compose
|
||||
context, same healthy Gitea and all other container identities/uptimes. For each
|
||||
of three fresh inspections it must reconstruct the saved legacy fingerprint by
|
||||
permuting only Mounts and HostConfig.Ulimits, retaining every field and value.
|
||||
The search is capped at 4096 permutations and rejects duplicate mount destinations
|
||||
or limit names. Any unexplained difference rejects the plan before mutation.
|
||||
of the fresh inspections it must reconstruct the saved legacy fingerprint by
|
||||
changing only Mounts and HostConfig.Ulimits order, retaining every field and value.
|
||||
Duplicate mount destinations or limit names are rejected. Any unexplained
|
||||
difference rejects the plan before mutation.
|
||||
|
||||
The initial v2 plan exposed a second algorithm defect: its up-front factorial
|
||||
count exceeded 4096 before any matching was attempted. The corrected audit does
|
||||
not enumerate permutations. It collects the actual orders returned by Docker,
|
||||
their cyclic rotations, and rotations of canonical/reversed order. It tests
|
||||
combinations of the two catalogs against the exact saved SHA-256; it never
|
||||
assumes that an unobserved ordering is correct without that hash match. Each
|
||||
fresh sample must have the same canonical fingerprint, so values from different
|
||||
runtime configurations cannot be mixed into a proof. A direct legacy hash match
|
||||
is also accepted without searching.
|
||||
|
||||
The audit collects at most 64 samples for the search and two further samples to
|
||||
confirm a found proof. Each catalog has at most 256 orders, and at most 65536
|
||||
distinct combinations are hashed; identical observations do not repeat the
|
||||
search. These are bounds on read-only evidence collection, not on valid list
|
||||
lengths via factorial size. An incomplete search fails closed with counts and
|
||||
the last three fingerprint samples. The report never includes raw inspect data
|
||||
or credentials. Regression tests cover 8 mounts/16 limits, a proof requiring
|
||||
different observations for the two collections, changing values during sampling,
|
||||
and exhaustion of the read-only search without mutation. This is an exact-match
|
||||
search over a bounded candidate set, not an exhaustive solver for arbitrary
|
||||
permutations; absence of a match is not itself proof of runtime drift.
|
||||
|
||||
Only after that plan has been reviewed can a separate apply repeat the audit
|
||||
under the deploy lock and perform the same one-boolean transition. New comparison
|
||||
|
||||
Reference in New Issue
Block a user