Repository navigation
Show inherited values, head rules and rule update revisions in policy views - #74
Merged
Merged
Conversation
The policy API now sends the inherited value of a path change, the head rule of a rule operation preview and the update revision of a rule. The CLI needs this build to read these fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
DocumentDurations matched "604800s" inside "0.604800s" because a word boundary is also between a dot and a digit. The message then showed "0.7d", which is not the value of the server. The pattern now captures the character before the number and excludes a dot and a word character. The replacement keeps that character. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
A field change with an empty side showed "-", as in "scan_gate.fail_on - -> medium", although the default policy gave the field the value high. The reader could not see the value that applied. The preview now shows the inherited value that the server sends on the empty side. It marks the value "(default)" for the policy base and "(inherited)" for a policy override, as the notice email does. The JSON and plain output carry the exact inherited value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
A preview showed an update or a delete of a package rule by its id only, as "delete r_68e23zskkh". An admin could not see what the rule selected before they published a rollback. The preview now reads the head rule that the server sends and shows its effect, selector and id, as "delete trust pkg:npm/lodash (r_68e23zskkh)". The row also names the policy override that the head rule attaches to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
The server now keeps added_revision as the revision that first created a rule, and sends updated_revision for the last update. rule show gave only the added revision, so an admin could not see that a later revision changed the rule. rule show now writes "added in revision 17, updated in revision 23" when an update changed the rule. The JSON and plain output carry the updated revision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
endpoint list showed "rev 0" in the POLICY column for a tool that sent no policy report. The state of such a tool is unspecified and its revision is 0, which is not a policy revision. The column now leaves out a tool with an unspecified state and revision 0, as it does for a disabled tool. A tool with an unspecified state and a revision keeps its revision. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
No test checked that rule create refuses an invalid request before it connects to the server. The trust expiry test now runs createRules with a trust entry that expires in 91 days. Its connection callback fails the test when createRules calls it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
The test of a refused edit counted the requests but did not read them. Three cases corrected a comment line in the file header and not the field, so the second request sent the refused value again, and the test passed. The test now reads the edited field in the refused request and in the corrected request. The three corrections now edit the field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
No test read the inherited column of a plain change line. A change that dropped the column passed every test. The inherited value test now checks one full plain change line in each case. The test table also uses the names oldValue and newValue, because new is a Go built-in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
The publish warning put the old and new values in parentheses. An inherited value has its own parentheses, so the warning read "scan_gate.fail_on (high (default) -> low)". A rule operation has no values, so its warning ended in "(- -> -)". The warning now reads "It loosens scan_gate.fail_on from high (default) to low in base". For an item with no old and no new value, it names only the item and its place, as "It loosens delete trust pkg:npm/leftpad (r_80b) in package rules". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
ruleOperationItem set the place of a row and then set it again for a head rule. It now finds the override id first and sets the place one time. The comment on the revisions of a rule now gives the reason for its guard. The edit retry test now says why its fix step anchors on the indent of the field. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MhRi597EX9odoSDXbVBsxz
SafeDep Report SummaryPackage Details
This report is generated by SafeDep GitHub App |
|
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 29 minutes. View limit details
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. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
abhisek
enabled auto-merge (squash)
November 6, 2026 13:11
KunalSin9h
approved these changes
Nov 6, 2026
KunalSin9h
disabled auto-merge
November 6, 2026 13:19
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.




The policy API added three fields in safedep/api#263. This change bumps the SDK to that build and shows the fields. It also fixes the last findings of the dogfood run in safedep/control-tower#1663.
Changes
scan_gate.fail_on - -> mediumhigh (default) -> medium1d -> -1d -> 7d (inherited)delete r_80bdelete trust pkg:npm/leftpad (r_80b)It loosens delete r_80b (- -> -) in package rulesIt loosens delete trust pkg:npm/leftpad (r_80b) in package rulesrule showadded in revision 40added in revision 40, updated in revision 43endpoint list, a tool with no policy reportrev 0-0.604800s0.7d0.604800sinheritedto a change item andupdated_revisionto a rule. Plain output addsinheritedas the last column of achangeline. Both additions keep the existing fields and columns.from high (default) to low, with no nested parentheses.Tests
rule createchecks a trust entry with a 91d expiry before it connects to the server.make build,make testandmake lint-conventionspass.The server side is safedep/control-tower#1668. Until it ships, the new fields are empty and the views show what they show today.
Generated by Claude Code