Repository navigation
Conversation
|
Thanks for opening this pull request! A SPACE maintainer will take a look. CONTRIBUTING.md explains how we review outside contributions. |
ac-pplx
force-pushed
the
ac/archcheck-require-comparisons
branch
2 times, most recently
from
November 3, 2026 00:54
77295d0 to
ba65bc0
Compare
ac-pplx
marked this pull request as ready for review
November 3, 2026 04:53
kumarpallav-pplx
self-requested a review
November 3, 2026 04:53
ac-pplx
force-pushed
the
ac/archcheck-require-comparisons
branch
from
November 3, 2026 05:09
ba65bc0 to
7a3c257
Compare
ac-pplx
force-pushed
the
ac/archcheck-require-comparisons
branch
2 times, most recently
from
November 3, 2026 17:13
dbcc1a1 to
b917446
Compare
nikhilbirmiwal-pplx
approved these changes
Nov 3, 2026
ac-pplx
force-pushed
the
ac/archcheck-require-comparisons
branch
from
November 3, 2026 21:11
b917446 to
39916bf
Compare
#1222 states the policy: a behaviour is required from the day it lands and a baseline only shrinks. This makes the behaviours that were still advisory required: - all five behaviours of pattern_ratchet.direct_tables; - no_new_entries and no_raised_caps of kubernetes_access, capability_identity, substrate_literals and sandbox_writes; - no_new_entries of rootfs_copy and node_manager_commands; - crate_names.stale_entries. A pull request that adds a baseline entry or raises a cap in any of these tables now fails instead of being annotated, and so does a stale crate_names entry. The tree has no findings for them, so the baseline is unchanged. Merge groups now run the same comparison against the group's base_sha, through ci/scripts/run-archcheck.sh, which pull requests share, and a required finding fails the group. The pull request that adds a pattern_ratchet instance seeds its table, as for the layers checks: while the base branch has no such instance, each entry is an advisory no_new_entries finding, and a base that configures the instance without a table tolerates nothing. Three behaviours stay advisory because they are notices, not checks: crate_names.policy_changed and layers.policy_changed report a policy edit for review, and layers.state.pending is how a new table lands, declared before its migration. The README, archcheck's not-added advice, the rootfs-backing design note, the substrate AGENTS.md, split_rust_module.py and the comments in ARCHITECTURE.toml no longer describe a new entry as a reviewed exception that is only reported.
ac-pplx
force-pushed
the
ac/archcheck-require-comparisons
branch
from
November 3, 2026 22:59
39916bf to
ddfbae0
Compare
This was referenced Nov 4, 2026
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.
Summary
#1222 states archcheck's policy: a behaviour is required from the day it
lands, and a baseline only shrinks. Merging this makes the base comparisons
that were still advisory required, so a pull request that adds a baseline
entry or raises a cap fails instead of being annotated:
pattern_ratchet.direct_tables;no_new_entriesandno_raised_capsofkubernetes_access,capability_identity,substrate_literalsandsandbox_writes;no_new_entriesofrootfs_copyandnode_manager_commands;crate_names.stale_entries.The tree has no findings for these, so the baseline is unchanged.
The pull request that adds a
pattern_ratchetinstance seeds its table, asfor the layers checks: while the base branch has no such instance, each entry
is an advisory
no_new_entriesfinding. With--base-architecture, "no suchinstance" means the base
ARCHITECTURE.tomldoesn't configure it; a base thatconfigures it without a table tolerates nothing, and a base configuration that
can't be read counts as configuring it. Without this, adding an instance would
fail on its own entries.
Merge groups now run the same base comparisons, against the group's
base_sha, throughci/scripts/run-archcheck.sh, which the pull requestpath now calls too: a required finding fails the group, without reviewdog.
Before, the merge queue ran none of them, including the already-required
layerscomparisons andcrate_names.no_new. A group whose trees a passingPull CI run already checked still reuses that run.
Three behaviours stay advisory because they are notices, not checks:
crate_names.policy_changedandlayers.policy_changedreport a policy editfor review, and
layers.state.pendingis how a new table lands, declaredbefore its migration. The README says so in place of "they are being made
required". The README, the CLI's
--write-baselineadvice, the substrateAGENTS.md, the rootfs-backing design note and the comments inARCHITECTURE.tomlno longer describe a hand-added entry as a reviewedexception that is only reported. The README also says that an instance's
name, paths, patterns and modes are policy, changed only in review (archcheck
does not report such edits for pattern ratchets yet), and that a listed
file's matches move into the allowed paths before the file is split.
Validation
At this head:
cargo fmt --check,cargo clippy -p pplx-space-archcheck --all-targets --all-features --locked -- -D warnings:clean.
cargo test -p pplx-space-archcheck: all pass. The newpattern_ratchet_seeds_a_new_instancecovers a base without the instance(advisory, exit 0), no
--base-architecture(seeded, exit 0), a base thatconfigures the instance without a table (required, exit 1), a base baseline
with the table while the base configuration lacks the instance, and a base
configuration that can't be read (warning, tolerates nothing). Each fails
when its part of the change is reverted.
ci/scripts/run-archcheck.shon scratch commits: a merge-group-like baseand a pull-request-like synthetic merge that add a
kubernetes_accessentry both exit 1; clean ones exit 0; an empty base warns, skips the
comparisons and exits 0. It also runs under bash 3.2 and 4.3 (checked in
containers with a stub
cargo).shellcheckis clean.cargo arch: exit 0, no findings.its
ARCHITECTURE.tomlas--base-architecture: exit 0, no requiredfindings; the one advisory finding is
crate_names.policy_changedreportingthis change to
crate_names.stale_entries.exit 1. [space] fence every placement writer against the provider-terminate path #559 crosses
direct_tablesinsandbox/updates.rsand raises threesandbox_writescaps; Enforce template lookup scope after compatible rollout #806 raises one. With today's configuration both areonly annotated.
Severity and risk
Severity: does not apply; this changes which existing findings fail.
Risk: pull requests that add a baseline entry or raise a cap fail once this
lands, including #559 and #806 as they stand; their new writes need to go
through the owning store, or the change needs a configuration edit reviewed in
ARCHITECTURE.toml. A queued pull request whose last Pull CI compared with anolder base is compared again in its merge group, and fails there if it adds an
entry or raises a cap. Splitting a listed file into modules also fails while
the file has matches, since
--renamespairs only whole-file renames and thenew files' entries are new: move the matches out first. Moving whole files is
unaffected. Roll back by reverting this commit, which also removes the merge
queue's comparisons.
Stack
Stacked on #1222; merge after it.
AI assistance: Claude Code drafted the code, tests and this description.
Summary by CodeRabbit