uphold 1.8.0: one command, more than one flag vocabulary - #82
Conversation
A `[[shim]]` named one `text_flags` for a whole command, and a command's flags do not all mean one thing. On `gh`, `-c` is a boolean on `pr review` and takes a value on `issue close`; naming it once for the table reads one of the two wrong, and either way the mistake is a false negative in the seam that exists to prevent one. `[[shim.verbs]]` lets the verbs whose grammar differs say so. The entry's lists replace the table's for those verbs rather than adding to them -- the rule `allowed_scripts` already follows, because a union would mean a vocabulary nobody wrote. `target_flags` stays table-wide: a per-verb answer to which repository something is going to would be a way to publish somewhere the table did not expect. Also in this release, from #76 and #78: a baseline entry may be signed `path | owner | reason` and required to be, and a baseline line that does not parse is refused rather than skipped -- the skip removed a ratchet silently, and the staleness check could not see it because a dropped entry was never listed. #79 refuses two shim tables naming one command, which used to drop one of them. TAKING IT. Nothing existing changes shape: a policy written for 1.7.0 resolves to exactly the rules it resolved to before, and no default changed. But a policy that USES `[[shim.verbs]]` cannot be read by an older binary, and the installed binary is the shim -- so a tree whose policy adopts the field before its shims are reinstalled has every git command failing closed. Bump the pin, reinstall, then adopt. Documented pins move to v1.8.0 in README.md and hooks/lefthook.yml.
|
Warning Review limit reached
Next review available in: 48 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #82 +/- ##
==========================================
- Coverage 90.52% 90.51% -0.01%
==========================================
Files 35 35
Lines 11339 11339
==========================================
- Hits 10265 10264 -1
- Misses 1074 1075 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Cuts 1.8.0 over #76, #78, #79 and #81, all already on main.
[[shim.verbs]]-- a flag vocabulary for the verbs whose grammar differsIn this PR
Cargo.toml/Cargo.lockto 1.8.0v1.8.0inREADME.md(3) andhooks/lefthook.yml(2)docs/REFERENCE.md: a section on per-verb vocabularies -- the-ccollision that motivates it, replace-not-union, and whytarget_flagsis not overridableTaking it
Nothing existing changes shape: a policy written for 1.7.0 resolves to exactly the rules it resolved to before, and no default changed.
But a policy that uses
[[shim.verbs]]cannot be read by an older binary, and the installed binary is the shim. A tree whose policy adopts the field before its shims are reinstalled has everygitcommand failing closed. I did that to this repository while developing #81, which is why the fiveghverbs are not in this release's policy.Order: bump the pin, reinstall (
cargo install --git https://github.com/HackingGate/uphold --tag v1.8.0), then adopt.Verification
cargo test-- 564 pass, 0 failcargo clippy --all-targets,cargo fmt --check-- cleanuphold --versionreports 1.8.0