Repository navigation
build: fetch the corpus image without a login, and make install - #67
Merged
Merged
Conversation
The blobstore package is public now, so fetching it needs no login. blobs.sh still logged crane in with whatever token gh held before every fetch, and a hosted agent environment hands gh a stand-in token that only its own proxy accepts. The registry refused it, and every fetch there failed with a message about a private package. fetch now reads anonymously first and turns to gh only when that fails. A login is checked against the registry before anything relies on it, by listing the package's tags, and dropped when refused, so a later anonymous request is not sent with bad credentials. The auth error says which case it is, no token or a refused one, and what fixes each. An export that fails after the registry agreed to serve the image is reported as a transfer failure, not an auth one. blobs.md's Access section describes the public package, the anonymous path and the token check.
The build doctrine's North Star is that a fresh clone just works, and preflight already says what is missing, but installing it was left to the reader. A hosted agent environment had cargo and git and lacked typos, so make ci stopped at preflight and the agent had to work out the install itself. make install runs scripts/install.sh, which installs with cargo what preflight checks for and the machine lacks, today typos. rustup, cargo and git are not something the repo installs behind the user's back, so for those it gives the same hint preflight does. preflight's closing line now points at make install. The doctrine gains install in its verb list, which the owner authorized on 2026-10-03. Its byte budget grows by exactly the 92 bytes that item added, in a one-file override. An override can turn a lint on but not off, so list_growth now names the three skills it judges and leaves the doctrine out.
5 tasks done
webern
added a commit
that referenced
this pull request
Nov 29, 2026
…erride (#273) ## Human Summary This gives the user the ability to exempt a single lint case. ## Summary Issue #68 asked for two things. The first is a way to exempt one violation, keyed to its place and not to the whole file. The second is a way for a narrower override to turn off a lint that a broader override turned on. Much of the first already exists. `[[<section>.allow]]` entries (#199, #251) exempt one sentence, they require a reason, a tally of them prints on every run, and a stale entry fails the check. `list_growth`, the lint behind #67, was removed in #207, so there was no list count to rebase. What was still missing: - `density` could not be exempted. An `allow` entry for `density` now quotes one whole paragraph or list item, folded the same way a sentence quote is. Any edit to that block makes the entry stale, and the block is judged again. So a paragraph that grows has to be re-exempted by a human, and an entry does not last forever. A failed entry reports `no_such_block`, `two_blocks` or `no_finding`. `deslag fix` leaves a quoted block as it is. A `line` on a `density` entry is refused. - An override can now say `off = ["<lint>", ...]`. This sets each named lint back to unset for the files the override matches. A later override that sets the lint's table turns it back on, with only the settings that table sets. Loading the config (exit 2) refuses an unknown lint, a lint named twice, a lint the same override both turns off and sets, and an `off` for a lint that no table in the section turns on. `deslag explain` shows `# <lint>: off, by override N`. The field is marked `since = "next"` with a default of `[]`, so it needs no schema version bump. Exemptions stay in the config, with no in-file marker. That keeps to the existing rule that there is one way to exempt a finding. `guide.md` and `lints/allow.md` no longer say that an override cannot turn a lint off, or that an entry only exempts a sentence. They keep the rule that an agent proposes an entry or an `off` and a human writes it. The summary line, the SARIF rule text and the docs for entries now say "text" rather than "sentence", since an entry can name a paragraph. `.agents/deslag.toml` is unchanged. The #67 workaround was already removed along with `list_growth`. ## Testing - [x] `make ci-fast`: exit 0, including `check-deslag` on the repo itself - [x] `make test-tools`: exit 0 - [x] New `density` cases: `override_off`, `allow_applied`, `allow_fails` (covering `no_such_block` and `no_finding`), `allow_rust` and `allow_fix_held` - [x] Unit tests for the `off` load errors, the merge order and `two_blocks`, plus a new `deslag explain` test - [x] Expected outputs regenerated with `make fix-test-output`, and the diff checked. Existing `density` cases changed only by the added advice sentence and the sentence-to-text wording. ## References - Closes #68 - Related: #67, #199, #207, #251
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.
Human Summary
Some fixes due to Claude cloud environment limitations.
Summary
The big tier of the test corpus is an OCI image in
ghcr.io/webern/deslag-blobs. The package became public on 2026-10-03, so fetching it needs no login.scripts/blobstore/blobs.shdid not know that: before every fetch it logged crane in with whatever tokenghheld and never checked that the registry accepted it.That broke fetching in hosted agent environments. They set
GH_TOKENto a stand-in that only their own proxy accepts,gh auth tokenhands it over, the registry refuses it, andmake fetch-blobsfailed with a message telling the user the package was private and to log in. A person on their own machine never saw this, because theirghtoken is real.Now
fetchreads anonymously first and turns toghonly when that fails, which is what a private package, such as a fork's, would need. Any login is checked against the registry before anything relies on it, by listing the package's tags, and dropped when refused, so a later anonymous request is not sent with bad credentials. The auth error says which case it is, no token or a refused one, and what fixes each. An export that fails after the registry agreed to serve the image is now reported as a transfer failure rather than an auth failure.The second commit adds
make install. Preflight already said what was missing, but installing it was left to the reader, and the same hosted environment had cargo and git but lackedtypos, somake cistopped before it started.installinstalls with cargo what preflight checks for and the machine lacks, and for rustup, cargo and git it gives preflight's hint rather than installing anything behind the user's back. Preflight's last line now points at it.installis a new verb in the build doctrine's vocabulary. That list was held at ten items by deslag's own list-growth lint, and the file sat four bytes under its budget, so this PR also, with the owner's go-ahead: raises the doctrine's byte budget by exactly the 92 bytes the new item added, in a one-file override; and, since an override can turn a lint on but not off, haslist_growthname the three other skill files it judges rather than the whole skills directory. Everything else in the doctrine is as it was.The Access section of
scripts/blobstore/blobs.mddescribes the public package, the anonymous path and the token check. The build doctrine's North Star, that a fresh clone just works, now holds formake fetch-blobsin a hosted environment too.Testing
make ci: exit 0, in a hosted agent environment with its stand-inGH_TOKENleft in placemake clean-blobs && make fetch-blobswith the environment untouched: anonymous fetch, exit 0, both batches unpacked; a secondmake fetch-blobsis a no-opGH_TOKENandGITHUB_TOKENunset: reports that there is no login and how to get one, exit 1make test-blobs: 5 passedmake installon a machine with typos present: "nothing to install", exit 0;make preflightwith cargo off PATH names the three missing tools and points atmake installdeslag explainon the doctrine shows list_growth off and a 5092-byte budget; on the other three skills it shows list_growth onReferences