Repository navigation
refactor(manager): simplify the role taxonomy, proposal facts and registry readers - #355
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | ed3bf05 | Commit Preview URL Branch Preview URL |
Nov 22 2026, 08:11 PM |
committed_credentials scans exactly the files the taxonomy gives a credential_scan; the Skip early return could never fire. A test over the taxonomy now fails when a file that can name registries has neither a scan nor a stated reason, replacing the tools test that only checked a decision existed.
Every Ecosystem::registry_file restated eco_roles; the Scanner now reads the registry role directly, Actions' lockfile gets it in the taxonomy, and mise's backend rows name the settings files their project checks read instead of a backend_settings hook per ecosystem.
… implies The listing path returned nothing unless selector_resolved was set, and every descriptor that set only resolved_via_listing has fixed short tags, so lookup gating on selector_resolved returns the same.
…hooks Copier's edit_refusal and Nix's inventory_only restated Edits::ReportOnly and Edits::Relock; edits() now matches on the fact, and ReportOnly carries the refusal reason.
The name pre-checks listed exactly the names the match arms parse; a name with no arm already has no verdict.
The lookup origin, the public verdict and the credential scan each parsed which .npmrc lines set a registry and how composer.json's repositories flatten; they now share npm::npmrc_lines and composer::repositories / packagist_switch, so they agree by construction. Every deny-by-default rule stays with its reader.
Every Public carried a closure of the same shape over web_host; it now lists its hosts, and is_public keeps crates.io's index and source forms through cargo::crates_io.
Seven descriptors repeated the not-a-tool, has-resolved tail; the lock fact now says only whether a lockfile the Count does not move fills resolved (npm, Bun, Terraform), and Lock::reported adds the movable case and the tail.
metadata.google.internal and metadata resolve to a link-local address where they reach an endpoint, which the address check refuses, and do not resolve anywhere else, which is refused with a message that names the metadata endpoint.
Update::RANKED restated a fixed order beside the enum; the variants are now declared in that order (pin before digest), so ALL, Ord and the new WORDS give it and RANKED, RANKED_WORDS and rank() go.
Scanner::shared_name and the engine's wrapper excluded registry, settings, credential-scanned and tooling files, none of which has a .pkl name. An engine test now pins that no role names a .pkl file.
The pkg.pkl-lang.org arm restated the shapes parse accepts, so it now takes any path and parse decides. github_segment becomes private to config, the field-by-field Pkl Proposing test becomes a lookup test that widen still writes an exact version, and shown()'s doc is shorter.
…the name mise requests Restores the METADATA_NAMES refusal: stripping a trailing dot before the lookup let search domains (Kubernetes ndots, a wildcard record) answer metadata.google.internal. with a harmless address while mise fetches the absolute name. The names are now compared without trailing dots and refused deterministically, and the lookup resolves the host as written. The tests no longer depend on live DNS for the names.
…ntial-scan test The test only partitioned files that name registries, so dropping the scan of pnpm-workspace.yaml, Gemfile or composer.json along with its SCANNED entry still passed. It now covers every file with a settings, read, writable, registry or steers role, asserts scanned files are listed unconditionally, and rejects stale unscanned entries.
sweepies
force-pushed
the
refactor/simplify-manager
branch
from
November 22, 2026 20:10
dc24b80 to
ed3bf05
Compare
Merged
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.
A simplification pass over
crates/manager,crates/miseandcrates/words, plus three follow-ups from #350. Only one thing changes for users: the order ofdisabledUpdatesin report JSON (item 9). Item 10 makes the metadata check stricter. Everything else is unchanged; the reasoning is below, per item.Items
CredentialCheck.committed_credentialsalready scanned only the files the taxonomy gives acredential_scan. ItsSkipearly return could never fire, because no scanned file was rankedSkip. Removed: the enum,credential_check,EcoRoles.check/selected,Roles.checkand theMISE_FILEStable (nowMISE_SELECTEDplus the mise lock name). Also removed the tools testevery_materialized_file_has_a_credential_decision, which only checked that a decision existed.roles::tests::credential_bearing_settings_are_scanned. Its probes are every name the taxonomy lists plus one path per role predicate, at the root and nested. Every file whose tool reads credentials must have a scan. Every other file that can name registries must appear in an explicit unscanned list with a reason, or the test fails.publicpartition's boundary.Ecosystem::registry_filerestatedeco_roles(..).registry, so the hook is gone and the Scanner reads the role directly.actions.lockgets the registry role in the taxonomy. mise's backend rows now name the settings files their project checks read (Project { settings, check }), which replaces the per-ecosystembackend_settingshook. Same file sets as before; the classification table is unchanged.Proposing::resolved_via_listing. The listing path returnedNoneunlessselector_resolvedwas set. Every descriptor that set onlyresolved_via_listing(npm, NuGet, devcontainer and pre-commit tools) has fixed short tags, so lookup returnsNonefor them either way. Lookup now gates onselector_resolved.Proposing::edits. Copier'sedit_refusaland Nix'sinventory_onlyrestatedEdits::ReportOnlyandEdits::Relock.edits()now matches on the fact, andReportOnlycarries the refusal reason, so the corpus refusal text is identical./flux-versionrefusal and Cargo'sworkspace = truekeep their hooks..npmrcand Composerrepositoriesparsed once (security: agreement now by construction). Before, the lookup origin, the public verdict and the credential scan each decided separately which.npmrclines set a registry, and howrepositoriesflattens. They now sharenpm::npmrc_lines(NpmrcLine::{Ignored, Registry, Setting, Other}),composer::repositoriesandcomposer::packagist_switch.string_ok; a wrong-shaperepositoriesstill fails the verdict and the origin.Publiclists itshosts. This replaces seven closures of the same shape.is_publickeeps crates.io's git-index andregistry+/sparse+forms throughcargo::crates_io, which now readsCRATES.on_host.Lock::reported(dep)computed once. Seven descriptors repeated the same tail: not a tool or toolchain, and hasresolved.Locknow holdslock_resolved(npm, Bun, Terraform: a lockfile the Count does not move fillsresolved), andreportedis(movable || lock_resolved) && tail. Same truth table for every descriptor.Update::RANKEDreplaced by declaration order. The variants are now declared Major, Minor, Patch, Pin, Digest, soALL,Ordand the newWORDSgive the rank.RANKED,RANKED_WORDSandrank()are gone. I checked everyUpdate::ALLloop and every derivedOrdthat holds anUpdate:lookupEvidence.disabledUpdatesin report JSON now listspinbeforedigest, becausedisabled_updatespushes inALLorder.catalog_wait_hours(min) andlockfile_wait_hours(max).plan::ChangederivesOrdwithkindaftervalue/version/digest, so order differs only when two changes tie on every earlier field, which one proposal per declaration rules out.as_str; the CLI--typechoices and the TUI filter cycle were already in rank order.METADATA_NAMESon the theory that the DNS check covers those names. It does not: the check stripped a trailing dot before resolving, so under Kubernetesndots:5or a search domain with a wildcard record,metadata.google.internal.could resolve to a harmless address and pass, while mise fetches the absolute name, which reaches 169.254.169.254.metadata.google.internalandmetadataare refused before any lookup, compared without trailing dots and case-insensitively. Every other host is resolved exactly as written, trailing dot kept, so the check resolves what mise requests.guide/sources.mdkeeps main's wording.testing::dependency.From the #350 report:
Scanner::shared_nameno longer excludes registry, settings and credential-scanned files, and the engine's localshared_namewrapper (tooling reads/manifests) is gone. No such file has a.pklname. Replaced by the engine testno_role_names_a_pkl_file: its probes are every taxonomy name with.pklappended, plus.pklfiles in the folders each role predicate reads.pkg.pkl-lang.orgarm is("pkg.pkl-lang.org", _), andPklPackage::parsedecides the shape. Any other shape gets the sameUNSUPPORTED_PATH. The?check stays.github_segmentis private to config. The field-by-field PklProposingassertion is nowpkl_package_updates_write_an_exact_version_under_widenin lookup: underwiden, every Pkl update writes exactly the release version.shown()'s doc comment is shorter.State and derived versions are bumped for every row whose sources changed: extract, files, config, config-files, catalog, catalog-controls, osv-advisory, changelog, notes-adapter, notes-adapter-listing, parsed-postgres-sgml, parsed-go-history.
Dropped
None of the items assigned to this PR.
Follow-ups
The new credential test names three files that can hold credentials their tools read but that are not scanned yet. These are gaps in the hygiene check, not in the
publicboundary:pdm.toml: PDM repository passwords..bundle/config:BUNDLE_<HOST>credentials.settings.xml: server passwords.Checks run
On the VM:
-D warningson manager, config, lookup, engine, words, mise, cli, update and tools.After review
An adversarial review found two defects; both are fixed.
a6c55eef). See item 10 above: the metadata names are refused deterministically again, and the lookup now resolves the host as mise requests it (trailing dot kept), which closes the search-domain bypass. Trailing-dot tests added; the tests no longer depend on live DNS.credential_bearing_settings_are_scannedwas too narrow (b10cf2f3). It guarded only files whose roles name registries, sopnpm-workspace.yaml,Gemfileandcomposer.jsoncould lose their scan, along with theirSCANNEDentry, without failing it.GRADLE_WRAPPER,PYTHON_READandNUGET_WRITABLEare probed, along with suffix-matched sources, workflows and action files.SCANNEDentry.gradle-wrapper.propertiescan carry a user and password indistributionUrl. Like the three in Follow-ups, it is a gap in the hygiene check, not in thepublicboundary.-D warningson manager and mise; manager and mise tests (220 passed); workspace parity, with state hashes refreshed indc24b80c.