Repository navigation
feat(fetch-docs): add an opt-in renderer fallback and an expect marker - #18346
Conversation
The shared fetcher gains two generic-profile flags. `--expect <marker>` records a page without the marker as unread `no-content`, which catches pages that need a browser to render. `--render-fallback` renders a page left unread for fetch-failed, http-403, http-429, unexpected-content-type or no-content through the Firecrawl CLI, and stores it in the shared cache as format `rendered`. It runs only when the docs-cache `renderer` master setting is `firecrawl` (default `none`). A 404, a 410 or an off-site landing is never rendered. The renderer's final URL passes the same landed check as a plain fetch, and --public-only pins the host first. Regenerates the 14 plugins' copies and declares firecrawl as an optional prerequisite in each. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3
…c.sh fetch-docs.sh crossed the repository's 1000-line size reference (981 to 1147 non-blank lines). The generic profile (generic_slug through get_generic, renderer fallback included) moves unchanged into lib/fetch-docs-generic.sh, which fetch-docs.sh sources from beside itself as it sources docs-cache.sh. Registers its 14 plugin copies and adds it to the collect-base-activity copy list, which copies the fetcher's siblings by name. Function-header comments in the moved block are dropped under the repository comment lint. Reasons they held: resolve_python takes the first of python3 and python whose probe prints 3, because a Windows Store stub or a Python 2 fails it; login_wall treats an x.com or twitter.com page that links to redirect_after_login and holds fewer than 200 words outside its links as the logged-out shell; and in generic_read the page's own request decides identity, so a failure or a landing elsewhere ends the read. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed Security review: PR #18346, incremental (50db1a0..a240cb7)I found no security issues in this push. This lane already reviewed an earlier head, so this review reports blocking findings only. Scope. I read every hunk of the 16 files in
None of these files matches a trusted-path glob. The push touches no trust control, plugin manifest or instruction text. What changed and why it is safe
critical-findings: 0 |
|
claude-review reviewed Code review (incremental, blocking only): 50db1a0 → a240cb7No blocking findings in this push. This lane already reviewed an earlier head ( What changed
Context
Verifier dropped 0 of 0 candidates. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 396149ccf9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ction test A stale cached copy served after a failed fetch skipped --expect, so a cached JS shell came back read. get_generic now runs the marker check after every generic read, stale serves included; new test case. collect-base-activity.test.mjs builds a fixture base with the fetcher's siblings; it now includes fetch-docs-generic.sh, which the action copies. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3
|
The pr-verify verifier failed head What it wrote (96 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
render_fallback fell back to the renderer's metadata.sourceURL when metadata.url was missing. sourceURL is the URL that was asked for, so the landed check passed on nothing and an off-site redirect could be cached under the requested URL. Only metadata.url counts now; with none, the page stays unread. New test case: a render reporting only sourceURL stays unread. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3
No related issue: Phase 6 of the owner-approved vendor-routing plan (PR-B of four).
Summary
The shared docs fetcher (
lib/fetch-docs.sh, copied into 14 plugins) gains two opt-in flags forits generic profile. With neither flag, behavior is unchanged.
--expect <marker>: a fetched page without the marker is recorded unread with reasonno-content. This catches pages that need a browser to render.--render-fallback: renders a page left unread forfetch-failed,http-403,http-429,unexpected-content-typeorno-contentthrough the Firecrawl CLI, and stores the result inthe shared cache as format
rendered(text/markdown). The next run inside the window isserved from the cache with no new render. It runs only when the docs-cache
renderermastersetting is
firecrawl; the shipped default isnone.Fix
Security, because the renderer fetches untrusted URLs through a third party:
that reports no final URL is refused.
--public-onlypins the host before rendering.directory that is removed afterwards.
--render-fallback, a 403 or 429 with a cached copy serves that copy stale whenrendering also fails.
Each of the 14 plugins with a
scripts/fetch-docs.shcopy declaresfirecrawlas an optionalprerequisite with a
degradeline. The copies are regenerated byscripts/sync-shared-copies.sh.Size:
fetch-docs.shcrossed the repository's 1000-line reference (981 to 1147 non-blank lines).The generic profile (
generic_slugthroughget_generic, renderer included) moves intolib/fetch-docs-generic.sh, whichfetch-docs.shsources from beside itself, the way it alreadysources
docs-cache.sh.fetch-docs.shis now 844 lines. The new file's 14 plugin copies areregistered in
scripts/shared-copies.txtandscripts/cross-plugin-source-registry.txt. It isalso added to
collect-base-activity's copy list, which copies the fetcher's siblings by name.That action and the files it copies both come from the base, so this PR's own run is unaffected.
Verification
bash lib/fetch-docs.test.sh: all 281 assertions passed. A stub renderer onPATHcovers:no-content;bash lib/docs-cache.test.sh: all 290 assertions passed (therenderersetting).bash scripts/sync-shared-copies.sh --check: all 1051 registered copies match.Related
Claude.
/multi-agent:route vendors(PR-C1#18345) and the registry
recheck in PR-C2 pass
--render-fallback. No other caller does.🤖 Generated with Claude Code
https://claude.ai/code/session_015XWwmfo1FXD2G3F4XBaDn3