Repository navigation
feat(diff): name the changed declarations in an OpenShell policy row (#968) - #1002
Merged
Merged
Conversation
…968) A changed OpenShell policy row printed endpoint counts and a facts digest. It now names the filesystem paths added or removed per list, binary selector changes, and destination or request declarations added, removed or edited, bounded and redacted by the inventory's own rules. A policy selected or removed whole lists what it declares and which defaults stood in. Display only: rows, direction, expands, severity, signals and check decisions are unchanged, and no schema moves.
pengfei-threemoonslab
force-pushed
the
claude/968-openshell-row-detail
branch
from
October 8, 2026 11:37
94478fd to
2352b60
Compare
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.
What
For openshift-kni/ai-sandbox#29 the human OpenShell row printed
authored, OpenShell 0.1.2, 6 endpoint(s), facts <digest> -> …7 endpoint(s), facts <digest>plus correct limits, but not which read path narrowed, which binary selectors changed or which destinations were added. The row now names them. Presentation only.Before:
After (same fixture shape; the reason line is unchanged):
Design
_RowView.change, published asreview.changes[].change, already used for hooks and MCP servers) carries the text. Every consumer reads it throughreview_changes:difftext and--json,verifyhost comparison,check, and the PR comment (including its bounded/shortened form).core/openshell_row_detail.pyreads the normalizedfacts.policythe comparator reads. It names filesystem paths added/removed per list,include_workdir, Landlock compatibility, process identity, and per destination the binary selectors added/removed plus destination/request declarations (protocol, enforcement, access preset, allow/deny method and path) added, removed or edited. Destinations that changed alike share one entry. Lists are bounded (5 paths or selectors, 8 destination entries, 3 selectors per added/removed destination), thenand N more._openshell_public_valuesanitizer and replaced with<redacted>on any change (defence in depth; the reader already refuses a document whose values would change). Query/param constraints and endpoint options appear by field name, never value; rule names and comments are never printed. An option value change readsother options changed (not shown); a change in no named field says so.declared: …with filesystem lists, Landlock/process (with omitted = default named), destinations with selectors, and the number of inspected endpoints that default to audit enforcement. It is a description, not a proof of expansion.rows[]values, direction,expands, severity, expansion signals,checkdecisions, limit wording. No schema, contract or version change; no schema file touched.Tests
tests/test_openshell_row_detail.py(21 tests): the issue-shaped static fixture ondifftext/JSON,verify/--previewJSON and the PR comment (whole and tight); direction/expands/limits unchanged; controls for unchanged policy (no row), equivalent respelling (no row), option-value-only change, composition-only change (existing limit wording), many paths/destinations/selectors (bounded), request declarations without query values, preset/enforcement transition, secret-shaped path/host (withheld; reader refuses the document), added and removed documents.Full CI mirror: 16527 passed, 4 failed (the two known
local_settings_enabled_plugins-*machine failures; twotest_workflow_label_redactionlinear-time wall-clock tests that pass when rerun alone).tests/test_adapter_static_only.pypasses.ruff check .clean.Closes #968
🤖 Generated with Claude Code