Files
videoreg.ru/docs/rebuild-v2/reviews/release-artifact-verifier.md
huncode 419520e44f
Rebuild V2 candidate verification / candidate (push) Failing after 2m22s
Production container deploy / production (push) Failing after 2m43s
Record five exact R3 limited approvals and independently reviewed frozen delivery packet
2026-10-26 19:59:30 +03:00

68 lines
7.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Standalone release-artifact verifier review
Reviewer: `/root/v2_programmer`. Date:26October2026.
**Initial verdict: BLOCK, subsequently resolved by the same-reviewer check below. Current verdict: ACCEPT the repaired standalone verifier for its nondeploying verification scope.** This does not reject bounded publication of the useful corpus; it preserves its explicit source/delivery/five-role conditions. The current real packet remains PENDING and normal publication verification correctly refuses it. No attempt was made to bypass the automatic approval rejection.
## Actual scope inspected
Read `deploy/release-artifact.py:1–104`, including the canonical `PurePosixPath` ordering correction, and the actual pending-release manifest schema. The production master workflow remains unchanged; `git diff -- .gitea/workflows/master.yml` was empty at inspection.
The helper is nondeploying: its operations create/verify a static archive, optionally restore a checked export, or inspect a supplied image-public-tree tar. It has no Docker/SSH/registry/Swarm command. Its read-only Git checks are appropriate for separating a frozen app source commit from a later approved delivery/workflow commit. That separation must not become an excuse to omit delivery-source checks.
Important inspected lines:
- `:12–25`: relative path/root selection, symlink rejection and export enumeration.
- `:26–48`: candidate hashes, source/delivery revision checks and five-role approvals.
- `:49–65`: streaming tar inspection, regular-files-only rule, name/type/size/total bounds, exact membership and bytes/hash comparison, canonical row ordering.
- `:66–75`: deterministic gzip/tar packing and a PENDING decision until real approvals.
- `:76–93`: archive SHA verification, exact-tree comparison, restore after full validation, image-tar check.
- `:94–104`: explicit prepare-only option versus default approval-requiring verification. No production action exists in this CLI.
## Meaningful fixture tests actually run
`scripts/rebuild-v2/check-release-artifact.py` contains24 tests. All writable data live inside a unique TemporaryDirectory. Git source reads are stubbed from explicit fixture blobs; no real Git mutation, user-file read, real export restore, container, registry or deployment action occurs. Synthetic `/fixture/...` role IDs are not real release approvals and are never written into the pending production packet.
Command:
```sh
PYTHONDONTWRITEBYTECODE=1 python3 scripts/rebuild-v2/check-release-artifact.py
```
Initial result: **18pass/6fail**. Full actual log: `docs/rebuild-v2/evidence/release-verifier-tests-initial.log`.
Passing checks include:
- Valid five distinct fixture roles, source commit and separate delivery commit accepted.
- PENDING decision, missing role, duplicate agent, explicit BLOCK, full-history claim, wrong source/export revision, changed report and changed working source rejected.
- Valid exact extraction into a fresh fixture directory succeeds.
- Changed/missing/extra/duplicate tar files rejected.
- Parent/absolute names, symlinks, hardlinks and FIFO members rejected.
- Oversized member rejected before its content is read.
## Six fail-open cases and concrete repair
1. **Empty agent accepted** (`checked_manifest:40–47`). An empty string can be counted as one of five distinct “actual” agents. Require each ID to be a nonempty string before adding it to the distinct set.
2. **Role app-source manifest mismatch accepted** (`:45`). A role's app hash is ignored while source/export are checked. Bind the declared `appSourceManifestSha256` to the exact candidate app hash as well. Source/export binding still protects the reviewed bytes; this finding is specifically about the additional app-identity claim.
3. **Empty app source set accepted** (`:30–37`). An empty source list with hash-of-empty-list passes the working/Git source loop. This can falsely claim the required current-app-versus-frozen-source check was performed. Require a nonempty unique source path set; the role app-hash binding prevents silently substituting a different set for the reviewed one.
4. **Empty delivery source set accepted** (`:32–37`). No deployment files are checked when the list is empty.
5. **Omitted deployment file accepted** (same loop). For example, dropping a listed runtime/workflow input bypasses its current-file/Git revision check.
6. **Duplicate deployment file accepted** (same loop). The list is not required to be unique or complete. Require unique paths with the set exactly equal to the helper's declared `DEPLOY_FILES`.
These are attestation/coverage gaps, not an archive extraction escape. The existing tar safety controls performed correctly in the fixtures. Current actual source/packet correctness is not being called malicious or corrupted; the verifier must nevertheless fail closed on these malformed records before it is used as the strict publication guard.
Suggested compromise is a small validation-only helper change. Do not alter the rejected production workflow, restore the real output or deploy as a workaround. After the owner applies that safe standalone fix, this same reviewer should read the diff and repeat the24 fixture tests. Default verification of the actual PENDING packet must still reject publication; prepare-only verification must remain visibly preparation, not approval.
No full historical restoration PASS, R3 five-role approval or production authorization is generated by this review. The full recovery119unresolved items and the separate actual-runtime checks retain their existing status.
## Same-reviewer verification after the narrow fix
The owner applied only the standalone guard correction and committed it as `2676e474a185b54df225463019742d42852cf3fa`. Actual reinspection of `checked_manifest:31–55` confirms nonempty/unique app rows, exact unique deployment file coverage,40hex delivery revision, nonempty agent strings, and required role app-hash binding. The existing `sourceManifestSha256` and explicit `appSourceManifestSha256` names are supported; if both are present, both must equal the candidate's app hash.
Independently reran the complete same24-fixture suite: **24/24 PASS**. Evidence: `docs/rebuild-v2/evidence/release-verifier-tests-final.log`. All six formerly accepted invalid cases are now rejected; the already passing tar safety, hashes, pending refusal and valid separate app/delivery revisions remain valid.
Read-only normal verification of the real `releases/current.json` was also independently run without restore/image/deploy flags: it returned exit1, `Limited publication not approved`, as expected for the PENDING packet. The pending source is R3`78274fbe09c0fd7d0b8d94830db1f31fa76b1db9`; exact app/export identity was independently recomputed. Evidence: `programmer-r3-boundary.json`.
This resolves `videoreg-7oy.14`. Acceptance applies to the repaired standalone archive/attestation verifier, not to an unseen production workflow. Master remained unchanged after the automatic approval rejection. A later production-workflow mutation still requires the already specified five genuine scoped decisions and a separate actual delivery-code review. No bypass, production action or real export restore occurred in this review.