Repository navigation
Bundle E: the fact-model chain — nine rows in one land #683
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
d7206aa
6f49f8f
16b62a2
9ce801f
ebb1347
5705b93
558ad08
a10ee8b
026cbc5
676bc75
14faab6
5dd93e4
7bed6f4
c1facb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -215,6 +215,22 @@ sha256 = "b2c822742e8cbf355ba0cb4cc690c3cd8fdc9ec1916c8148f27bd9098cb7aee4" | |
| # `reason` is required on a shape rule, unlike on a file rule: a mediated deny | ||
| # reaches a model as the entire explanation, so a refusal that named only its id | ||
| # would be un-actionable (CLOUD-122). The crate appends the bypass hatch. | ||
| # THESE FOUR WOULD DECLARE `bypass_env = "BATTEN_GH_GUARD_BYPASS"` AND DO NOT YET | ||
| # (CLOUD-437, deferred to CLOUD-1027). They are the ported `gh-guard`, so that | ||
| # name is TRUE of them where it was a fossil everywhere else, and declaring it | ||
| # here is behaviour-PRESERVING: the same variable already suppressed these rows | ||
| # back when it was the engine's global hatch. | ||
| # | ||
| # `config-lint` cannot see that argument. It compares `batten.toml` against | ||
| # `origin/main` and reads a new `bypass_env` on a rule as `rule-predicate-changed` | ||
| # — correctly, in its own terms, since the key makes a row suppressible. The | ||
| # admissible route is a groomed `Weakens:` clause in the Ready block plus a | ||
| # matching commit trailer, and CLOUD-437's block was groomed on 2026-08-14 without | ||
| # one. Asserting it in the change that performs it is the exact shape §8 refuses. | ||
| # | ||
| # So until that row is groomed, these four take the general `BATTEN_HOOK_BYPASS` | ||
| # like every other row. The column, the per-row lookup and the suppression all | ||
| # ship; what waits is this repository's own use of them. | ||
| [[rule]] | ||
| id = "gh-pr-merge" | ||
| kind = "shape" | ||
|
|
@@ -1806,6 +1822,86 @@ severity = "deny" | |
| # bash, inside the bundle whose whole purpose is retiring bash (CLOUD-843 measured | ||
| # "the bash grew today" as the campaign's own defect). Everything decided here | ||
| # lives in two tracked TOML files, which is CLOUD-846's structured-config bucket. | ||
| # Merged-ness is decided by patch identity, never by reachability (CLOUD-36), | ||
| # migrated off a hand-rolled source scan (CLOUD-756). | ||
| # | ||
| # THE SCAN IS DELETED IN THE SAME CHANGE. `git.rs`'s | ||
| # `no_ancestry_decides_merged_ness` is gone; a module landing beside a scan it | ||
| # does not delete is two authorities on one property. | ||
| # | ||
| # `invocations` RATHER THAN `lines`, and this session measured why: the substring | ||
| # scan fired four times on PROSE while CLOUD-914 and CLOUD-762 were being | ||
| # written, at no call site at all. Porting it onto lines would have inherited | ||
| # exactly that, obfuscated needles and all. | ||
| [[rule]] | ||
| id = "ancestry-decides-nothing" | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| kind = "policy" | ||
| scope = "tree" | ||
| invocation_sources = ["crates/batten/src/*.rs"] | ||
| module = "policy/ancestry-decides-nothing.rego" | ||
| severity = "deny" | ||
|
Comment on lines
+1837
to
+1842
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 | 🟠 Major | ⚡ Quick win Restrict ancestry detection to Git argument APIs. The configured policy receives all invocation facts. 🤖 Prompt for AI AgentsSource: MCP tools |
||
|
|
||
| # Module layering, over the resolved `use` graph (CLOUD-359). | ||
| # | ||
| # THE LAYERINGS WERE DOCUMENTED AND GATED BY NOTHING. `module-map-check` asserts | ||
| # every module APPEARS in the map and says nothing about any edge — a membership | ||
| # check standing in for a predicate, the same substitution `tests-not-deleted` | ||
| # and `assertions-not-gutted` make. A back-edge compiled and passed every gate. | ||
| # | ||
| # `use_sources` RATHER THAN `line_sources`, and CLOUD-762 is why. A line | ||
| # predicate over this tree is wrong at four measured sites: it cannot see the two | ||
| # edges that reach `error` through a crate-root re-export, and it invents two | ||
| # more where `crate::Result` is really `anyhow`. Both surfaces cost the same | ||
| # parse; only one is right, so shipping the other would be a known false green. | ||
| # | ||
| # A GLOB RATHER THAN A LIST, for `line_sources`' own stated reason: an enumerated | ||
| # set goes stale the next time somebody adds a module, silently and green, which | ||
| # is the failure the declaration bound exists to prevent. | ||
| # CLOUD-882. `[workspace.dependencies]` fixes a version; it does not add a | ||
| # dependency. An entry no member references with `<key>.workspace = true` | ||
| # resolves to nothing, so every gate reading the RESOLVED graph is green about a | ||
| # crate that is not in the tree. Measured: `orphan-probe = "=9.9.9"` -- a crate | ||
| # that does not exist, at a version that does not exist -- passed `cargo | ||
| # metadata`, `macos-link-check` and `deny`, four greens over nothing. | ||
| # | ||
| # `sources` RATHER THAN `documents`, because only `sources` is glob-selected | ||
| # (CLOUD-850) and the member set is a glob by nature: a crate added tomorrow is | ||
| # judged without anyone editing this row, which is the property an enumerated | ||
| # list loses silently. | ||
| # CLOUD-614. A `command` row's `check` is spawned with the checked tree as its | ||
| # working directory, so `mise run <task>` resolves from THERE. A row naming a | ||
| # task the tree does not define does not fail to launch — the runner is on PATH, | ||
| # it starts, exits non-zero, and the engine reports a finding at the row's own | ||
| # severity about a tree it never inspected. Measured as a `deny` asserting | ||
| # NTIA-nonconformance over a scratch tree carrying nothing but a lockfile. | ||
| # | ||
| # THE CLAUSE LIVES HERE RATHER THAN IN `config-lint` because a task runner is a | ||
| # consumer's choice: `no_artifact_name_reaches_the_core` refuses the engine | ||
| # learning this manifest's name (non-negotiable rule 1). | ||
| [[rule]] | ||
| id = "command-task-defined" | ||
| kind = "policy" | ||
| scope = "tree" | ||
| sources = ["batten.toml", "mise.toml"] | ||
| module = "policy/command-task-defined.rego" | ||
| severity = "deny" | ||
|
Comment on lines
+1882
to
+1887
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 | 🟠 Major | ⚡ Quick win Reject missing tasks when The registered policy only evaluates spawned tasks when 🤖 Prompt for AI AgentsSource: MCP tools |
||
|
|
||
| [[rule]] | ||
| id = "workspace-dep-referenced" | ||
| kind = "policy" | ||
| scope = "tree" | ||
| sources = ["Cargo.toml", "crates/*/Cargo.toml"] | ||
| module = "policy/workspace-dep-referenced.rego" | ||
| severity = "deny" | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| [[rule]] | ||
| id = "module-layering" | ||
| kind = "policy" | ||
| scope = "tree" | ||
| use_sources = ["crates/batten/src/*.rs"] | ||
| module = "policy/module-layering.rego" | ||
| severity = "deny" | ||
|
Comment on lines
+1898
to
+1903
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 | 🟠 Major | 🏗️ Heavy lift Cover nested Rust modules with stable module identities.
🤖 Prompt for AI AgentsSource: MCP tools |
||
|
|
||
| [[rule]] | ||
| id = "opa-tracks-regorus-compliance" | ||
| kind = "policy" | ||
|
|
||
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 | 🟠 Major | ⚡ Quick win
Restore the
BATTEN_GH_GUARD_BYPASScompatibility hatch.These four
ghlifecycle rows do not declarebypass_env. The row-specific bypass lookup therefore ignoresBATTEN_GH_GUARD_BYPASS, although the prior global hatch suppressed these commands. Addbypass_env = "BATTEN_GH_GUARD_BYPASS"to each lifecycle row, with the required weakening approval.🤖 Prompt for AI Agents
Source: MCP tools