Repository navigation
fix(setup-preflight): accept sha512 in svn-zip locks - #5
Draft
MakerFlyFly wants to merge 2 commits into
Draft
MakerFlyFly wants to merge 2 commits into
MakerFlyFly wants to merge 2 commits into
Conversation
The documented svn-zip project lock records the release zip's sha512 digest, but the parser rejected that key. The shared pre-flight exited 2 before it could report the project's setup findings. Accept and retain sha512 on Lock. It has no local-lock counterpart, so the drift comparison remains unchanged and other unknown keys still raise MalformedLock. Add regression coverage for parsing and missing-snapshot findings, and for an svn-zip pin that matches the machine's local lock. Generated-by: Codex (GPT-6)
Accepting the documented digest for every method let a git-tag lock mistype its commit anchor as sha512 and skip the commit comparison. Validate the digest's method after parsing, independent of key order, and report an empty digest as a missing value rather than a block. Derive scalar keys from Lock while keeping plugins and reconciled as structured blocks. Cover invalid methods, unknown keys, empty values, and the existing empty/version forms of an svn-zip local lock. This does not add digest drift detection or change local-lock formats. Generated-by: Codex (GPT-6)
This was referenced Oct 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sha512:, but the original parser rejected it and made the shared pre-flight exit 2 before reporting setup findings.method: svn-zip, independent of field order. Invalid methods and empty digests raiseMalformedLock; scalar keys come fromLockwhilepluginsandreconciledremain structured blocks.Type of change
tools/*/withpyproject.toml)Test plan
prek run --all-filespasses, including lychee, workspace checks and skill-script tests.setup-preflighttests pass.20cbbc56, all 15 method-restriction and empty-value diagnostic cases fail; they pass with the revision. The original parser compatibility regression was separately demonstrated on4556f693.sha521:, and invalid scalar assignments to structured blocks. Invalid cases exit 2; valid svn-zip locks still reportsnapshot-never-fetchedandsweep-never-run.fetched_commitremain readable when recorded pin fields match.RFC-AI-0004 compliance
This parser-only correction restores the documented lock contract. It adds no outbound action, host access, configurable skill policy, or LLM data flow. No skill prompt material, dependency or local-lock schema changes.
Linked issues
Closes #4.
Notes for reviewers (optional)
This Draft PR targets
MakerFlyFly/magpie:mainfor human audit before any upstream submission. It retains the original20cbbc56fix and adds a review revision, with the aggregate code diff still limited tolockfile.pyandtest_core.py.Scope and remaining limits: this fixes parsing and the applicability of the new digest field. It does not provide SHA-512 drift detection or ZIP integrity attestation.
upgrade.mdrequests a security-flagged finding when a digest changes under the same version, but the existing local lock records no fetched digest. Implementing that requires coordinated persistence, parser, comparison and legacy-lock changes and is a separate task. This revision does not add digest format checks, duplicate-key policy, general per-method schema validation or a documentation-template test harness.How svn-zip adopters receive the fix: the maintainers must advance the committed pin to a release that contains it, install/upgrade to that snapshot, and refresh the personal checker from that updated source. Repeating
configorupgradewith the same affected pinned snapshot copies the old parser again and does not fix this error. This PR does not change adopter pins or automate an upgrade.Validation uses a Linux checkout with real Git symlinks and Docker
--init; the Windows checkout keeps its existing symlink configuration. Prior reproduction and validation records are preserved, and revision records are stored separately. Python 3.9 is outside the package's declared Python 3.11+ support range.Generative AI (Codex, GPT-6) assisted reproduction, implementation and validation. Review feedback has been incorporated within the stated scope; the revised Draft PR awaits another human audit and does not claim human approval.