Repository navigation
Fix/pin integrity latent logic - #899
Merged
Merged
Conversation
#862 put an unescaped `/` inside a character class in three `~r/.../` sigils (pin_integrity.ex @uses_regex and locked_refs/1, pr_automerge.ex @pin_re). In a `~r/` sigil that `/` terminates the sigil, so `mix compile` fails with MismatchedDelimiterError. Every estate Hypatia scan (hypatia-scan-reusable.yml resolves hypatia@main) has failed since. `\/` inside a character class matches the same byte set as `/`; this change is semantics-preserving and only restores compilation. The two modules' own tests (17) now run for the first time and fail on latent logic bugs in #862; nothing outside test/ calls either module. Those are fixed in a follow-up PR, kept separate so this outage fix stays three characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136eszqrQ53Kj7aBH1D4rXK
PinIntegrity and PrAutomerge never compiled on main, so their 17 tests had never run. With #876 they run; this fixes what they found. PinIntegrity - claimed_version/1: Regex.run drops trailing unmatched groups, so a `v`-led match returned a 1-element list neither clause matched -> nil. That cascaded into pi002 and pi005 never firing. - relabel_line/2 prepended `#` to relabel/2's already-`#`-led result (`##`). Now mirrors estate-pin-integrity.sh: head without `#`, comment handed over with it. - relabel/2 restores `# ` for the `#`-stripped comment pin_sites/1 emits; `#v3` and "" keep the shell mirror's byte-identical output. PrAutomerge - pin_deltas/3 returned a bare map from a flat_map callback, so every delta was flattened into {key, value} tuples. - verdict/3 dropped the scan, so decisions lacked deltas/licence_touch. - SAFETY: close_poison_only went through accept/4, i.e. a pin-only PR onto a DENYLISTED pin was classified safety=arm_auto. Now reject/4. Mutant control: reverting this alone turns exactly that test red. - decision_manifest/2 vetoes use string keys like the rest of the manifest (the schema-shaped output). Test fixture: "a patch that also edits a permissions block" carried the permissions lines as diff CONTEXT (leading space) under a mismatched hunk header, so it asserted an edit the diff did not contain. The code was right; the fixture now makes the edit real (-/+ lines). mix test: 1673 tests, 0 failures. mix compile --warnings-as-errors: clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136eszqrQ53Kj7aBH1D4rXK
Escript packaging soundness compiles with --warnings-as-errors and has been red on this since #862. Every field delta/6 needs is read from the parsed pins by its callers; nothing downstream reads a ref off a delta. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136eszqrQ53Kj7aBH1D4rXK
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Autopilot could not be updated. Open Coding to check access and billing. |
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
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
Closes #
Type of change
How has this been verified?
Checklist
git commit -S).SPDX-License-Identifier(code/configMPL-2.0,prose
CC-BY-SA-4.0); I did not relicense existing files.Notes for reviewers