-
Notifications
You must be signed in to change notification settings - Fork 0
Let the loader answer which rules run, and close the second reader #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f50cd5f
b93623e
8411a96
a884fd2
987b4b6
7b7685d
c76d78b
8200b04
7c2244b
5745367
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ namespace — that is what lets a claim in | |
| - [`uphold guard` — the guards](#uphold-guard--the-guards) | ||
| - [`uphold shim` — the shims](#uphold-shim--the-shims) | ||
| - [`uphold audit --for-publication`](#uphold-audit---for-publication) | ||
| - [`--coverage` and `--oscal`](#--coverage-and---oscal) | ||
| - [`uphold check --coverage` and `--oscal`](#uphold-check---coverage-and---oscal) | ||
| - [The review tier](#the-review-tier) | ||
|
|
||
| ## Rule shape | ||
|
|
@@ -137,11 +137,18 @@ uphold rules --effective # every resolved rule, and where it fires | |
| uphold rules --effective --json # the same, for a program | ||
| ``` | ||
|
|
||
| The JSON is one array of `{"id": ..., "git_hooks": [...]}`, in the order the | ||
| engine resolved them. It exists so that nothing has to re-implement the loader | ||
| to find out what runs — a second reader of these fields is a reader free to | ||
| disagree with the engine, and it will disagree exactly where somebody used a | ||
| field it does not know about. | ||
| The JSON is one array of `{"id": ..., "git_hooks": [...], "seams": [...]}`, in | ||
| the order the engine resolved them. It exists so that nothing has to | ||
| re-implement the loader to find out what runs — a second reader of these fields | ||
| is a reader free to disagree with the engine, and it will disagree exactly where | ||
| somebody used a field it does not know about. | ||
|
|
||
| `seams` is `scan`, `guard`, `shim`, or more than one, and it is the half | ||
| `git_hooks` cannot express. An empty hook list is true of a content rule and of | ||
| a checker standing in front of a command alike, so a reader with only the hooks | ||
| has to guess between two unrelated places — and the reconciler guessed `scan`, | ||
| which credited a shim-only rule to a seam that never touches it. An empty | ||
| `seams` means nothing runs the rule at all, which the loader refuses. | ||
|
Comment on lines
+146
to
+151
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Describe the valid A loaded rule cannot currently have more than one seam. Validation permits 🤖 Prompt for AI Agents |
||
|
|
||
| The two requests this shape exists to make writable: | ||
|
|
||
|
|
@@ -596,10 +603,10 @@ found, `2` where a surface this run tried to read could not be read, `0` when | |
| every surface a flip would republish was read and was clean — subject to the | ||
| standing caveats, which the clean line says. | ||
|
|
||
| ## `--coverage` and `--oscal` | ||
| ## `uphold check --coverage` and `--oscal` | ||
|
|
||
| ```sh | ||
| uphold_check.py --coverage # every rule the four tiers run, vs the claims | ||
| uphold check --coverage # every rule this repository runs, vs the claims | ||
| uphold_check.py --oscal > component-definition.json | ||
| ``` | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
The step name does not match what the step exercises.
/tmp/unreadableis empty.uphold checktherefore fails at policy discovery, not at reading a declaration. The exit code is 2 in both cases, so the assertion passes for the wrong reason, and a regression in the unreadable-declaration path would not be caught here. Write an actual malformed declaration into the directory, or rename the step to describe missing policy.🧪 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents