Repository navigation
feat: exempt constant-table crates via rust-standards.toml, depub 3 stray constants (§18, check 49) - #44
Merged
Conversation
…tray constants (§18, check 49) http-constant's entire API is the constants themselves: exempt it through the new repo-root config field pub_const_exempt (string array of package identifiers) instead of hardcoding. The same sweep surfaced three pub constants outside the table crate with no real external readers (external name hits all resolve to http_constant's own copies): depub CONTENT_ENCODING and EMPTY_STR in http-compress, APP_NAME in http-request, switch the request common re-export to pub(crate), and drop the constant-value assertion test (§18: tests must not verify constants). audit 51/51, clippy 0 warnings, fmt clean, affected-crate tests all pass.
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.
Per the 2026-10-09 ruling: http-constant is a constant-table crate and gets an exemption from the pub-const ban — configured, not hardcoded:
rust-standards.toml(new, repo root):pub_const_exempt = ["http-constant"]— a string array of package identifiers.verify_const_visibility.py(check 49) skips flagging the listed crates' own constants while still counting them as readers for other crates' analysis. Verifier + self-test updated in .agents (separate commit).compress::CONTENT_ENCODING,compress::EMPTY_STR→ pub(crate)request::APP_NAME→ pub(crate); common re-export switched topub(crate) use(clippy: glob no longer re-exports anything pub)test_app_name_constantdeleted (§18: tests must not verify constants)Gates: audit 51/51, clippy 0 warnings, fmt idempotent, http-request/http-compress/http-type/hyperlane-core tests all pass (486 total).