Repository navigation
site_check: typed findings and reported read errors (closes #13997) - #14007
Merged
Merged
Conversation
check() returns Result<(), CheckError> and check_rendered() returns Vec<RenderedFinding>; asset() returns AssetError. Every input read goes through documentation_ir::tool::path_io, so an unreadable book, prose, api, shard, records file, rendered page or search index is reported with its path instead of being read as empty. Display text is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K
TrapsterDK
force-pushed
the
site-check-typed-findings-13997
branch
from
November 19, 2026 17:35
40edd42 to
736b182
Compare
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.
Closes #13997
site_checknow returns typed findings, and it reports inputs it cannot read instead of ignoring them.tools/docs/site/check/src/lib.rs:check()now returnsResult<(), CheckError>. There is one variant per earlier refusal plusRead(PathIoError). Book, prose, api, shard and records reads all go throughdocumentation_ir::tool::path_io, so a missing--booknow reportscannot read …where it used to say "book has no title".tools/docs/site/check/src/rendered.rs:check_rendered()now returnsVec<RenderedFinding>andasset()returnsAssetError.pages()returnsResult<_, PathIoError>. A page or search index that cannot be read becomes aReadfinding, and so does a failed read during the--forbidscan (now infirst_publisher).site_check_test.rsandrendered_site_test.rswere left as they are.matches!plusto_string(). New cases cover each unreadable input (book/api/guide/shard/records), a non-UTF-8 page, a non-UTF-8 search index, a missing root and a vanished page in the forbid scan.Behaviour changes:
--renderedon a missing directory now printscannot list ….Verification (Linux, with the remote cache disabled because of a remote cache blob error):
tools/dx test //tools/docs/site/check:dx_site_check_test: passed.tools/dx test //tools/docs/site:site_check_test //tools/docs/site:rendered_site_test //tools/docs/site:serve_test //tools/docs/site:deploy_smoke_test: 4 passed.tools/dx check --affected: format and typecheck ok, with no diagnostics in this package.tools/api/api_test(Starlark API snapshot),toolchain_gate_test, andapple_consumer_test/go_consumer_test. The consumer and nested-Bazel tests are left to CI.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K