fix(setup): stop the update skill reporting the dropped lychee domains as drift - #1321
Merged
Merged
Conversation
…s as drift Check 4 of `setup-isolated-setup-update` told the agent that the dogfooded `allowedDomains` default carries eleven wildcard link-target hosts (`*.apache.org`, `*.nist.gov`, `lychee.cli.rs`, …) and that "without these, lychee fails the PR-blocking prek check locally on first run". Both claims stopped being true in apache#501, which moved the lychee hook to `offline = true` and dropped those hosts from `.claude/settings.json` precisely because the hook no longer reaches them. `docs/setup/secure-agent-setup.md` was updated in that PR; this skill was not, so a drift report run against current settings reports eleven correctly-absent domains as missing defaults and walks the adopter into re-adding dead allowlist entries. Rewrite the bullet pair to the post-apache#501 reality: the default allows only the two hosts prek needs to bootstrap rustup and `cargo install` lychee, the removed hosts are dead weight to *drop* if still present, and `enableWeakerNetworkIsolation` stays for native-TLS CLI tools (`gh` / `gcloud` / `terraform`) rather than for lychee. Add a guard so the prose cannot silently drift from the settings again: `tools/sandbox-lint/tests/test_doc_domain_consistency.py` parses both lists out of the skill and asserts the kept hosts are allowed and the dropped hosts are not. Re-adding `*.nist.gov` to the settings, or removing `static.rust-lang.org`, now fails the workspace pytest hook. Generated-by: Claude Opus 5
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
setup-isolated-setup-updatecheck 4 still describes the pre-chore(ci): run lychee link-check offline; drop dead sandbox network domains #501 sandbox network defaults: it tells the agent the dogfoodedallowedDomainscarries eleven wildcard link-target hosts (*.apache.org,*.nist.gov,lychee.cli.rs, …) and that "without these, lychee fails the PR-blockingprekcheck locally on first run". chore(ci): run lychee link-check offline; drop dead sandbox network domains #501 dropped exactly those hosts and moved the hook tooffline = true, so both claims are now false.docs/setup/secure-agent-setup.mdwas updated in chore(ci): run lychee link-check offline; drop dead sandbox network domains #501; this skill was missed..claude/settings.jsonso the two cannot drift apart again.Type of change
.claude/skills/<name>/) — see test plan for why no eval fixturetools/<system>/*.md)tools/*/withpyproject.toml) —tools/sandbox-lint(test only)docs/,README.md,CONTRIBUTING.md)projects/_template/)prek, workflows, validators)How it works
The rewritten bullet pair says three things the old one got wrong: the default allows only
*.crates.io+static.rust-lang.org(the hosts prek needs to bootstrap rustup andcargo installlychee); the eleven link-target hosts were dropped when the hook went offline, so their presence is dead weight to report, never their absence as drift; andenableWeakerNetworkIsolationstays for native-TLS CLI tools (gh/gcloud/terraform), not for lychee.tools/sandbox-lint/tests/test_doc_domain_consistency.pyis the guard. It parses both lists straight out of the skill — the kept hosts from the "default allows …" sentence, the dropped ones from the "once sat beside them (…)" parenthetical — and asserts the first set is present in.claude/settings.jsonand the second is absent. Rewording the bullet stays free; the two phrases are the anchors. The failure mode it closes is the one this PR fixes: settings move, prose does not, and nothing notices.Test plan
prek run --all-filespasses (32 hooks, exit 0) — includingskill-token-count, hence thedocs/mode-economics.mdrow in the diff.uv run --project tools/sandbox-lint pytest tools/sandbox-lint/tests/test_doc_domain_consistency.py— 2 passed.{*.crates.io, static.rust-lang.org}kept and the eleven dropped hosts; injecting*.nist.govinto the settings set makestest_dropped_domains_are_not_allowed_againfail.RFC-AI-0004 compliance
Linked issues
Refs #501.
Notes for reviewers (optional)
enableWeakerNetworkIsolationbullet keeps the schema's security warning verbatim; only its rationale changed (it was justified by lychee, which is now offline).🤖 Generated with Claude Code