Skip to content

Commit 1043084

Browse files
committed
docs: clarify crawler RFC config sketch and scope_decision
Address Copilot review on PR #350: note that default_backend selects a crawl backend and passive extractors such as jsfinder are not selectable there; model scope_decision as a decision plus reason in both the field list and the JSON example; add an illustrative scope_entries example and clarify when allowed_hosts applies. Refs #336
1 parent 364fbd4 commit 1043084

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

examples/proposals/headless_crawler_integration.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ Per-entry fields:
252252
- `source_page`: the page the URL was discovered from.
253253
- `depth`: crawl depth at which the URL was found.
254254
- `scope_decision`: whether the URL was treated as in scope or out of
255-
scope, and why.
255+
scope, and why, modeled as a `decision` value plus a short `reason`.
256256
- `parameters`: query or body parameter names associated with the URL.
257257
- `forms`: form action, method, and input field names.
258258
- `js_endpoints`: endpoints referenced from JavaScript for this page.
@@ -268,7 +268,7 @@ An illustrative entry:
268268
"status_code": 200,
269269
"source_page": "https://target.example/",
270270
"depth": 1,
271-
"scope_decision": "in_scope",
271+
"scope_decision": { "decision": "in_scope", "reason": "same_origin" },
272272
"parameters": ["redirect", "lang"],
273273
"forms": [
274274
{
@@ -339,7 +339,9 @@ change and does not choose the final storage shape.
339339
```yaml
340340
crawler:
341341
enabled: false # off by default; operator opt-in
342-
default_backend: none # candidate values: none, katana, crawlergo, rad
342+
default_backend: none # default crawl backend; values: none, katana,
343+
# crawlergo, rad. Passive extractors such as
344+
# jsfinder are not selectable as the default.
343345
backends:
344346
katana:
345347
enabled: false
@@ -355,8 +357,11 @@ crawler:
355357
modes: [passive] # JavaScript endpoint extraction
356358
scope:
357359
follow: same_origin # same_origin | allowlist | scope_entries
358-
allowed_hosts:
360+
allowed_hosts: # used when follow=allowlist
359361
- target.example
362+
scope_entries: # used when follow=scope_entries; illustrative flow
363+
- https://target.example # scope-of-work entries, ideally sourced
364+
- target.example/app # from the flow target scope if available
360365
robots_policy: record_only # honor | ignore | record_only
361366
limits:
362367
max_depth: 3

0 commit comments

Comments
 (0)