Skip to content

chore(ai): Audit devops-cli web features for Firecrawl adoption #2432

Closed

Description

@dan-petty

Problem or Motivation

The owner chose the hosted Firecrawl API (https://api.firecrawl.dev/v2) for web search, in place of Tavily, on 2026-10-28. #2398 adds firecrawl_search and the setting firecrawl.api_key for the refine investigation. Firecrawl also scrapes a page to Markdown (/v2/scrape), crawls a site (/v2/crawl), maps the URLs of a site (/v2/map), and extracts structured data (/v2/extract). Other devops-cli features fetch or parse web content with their own code, and nobody has checked which of them Firecrawl serves better.

Known places, checked at main 3ac1028:

  • src/devops_cli/ai/library/docs_ingester.py (devops ai ingest-library): ingest_remote_docs crawls reference pages with its own HTMLParser subclass, which turns HTML into Markdown, and opens its own httpx2.Client(timeout=30.0), not a client of the devops_cli.http.client factory (SECURITY.md, item 2).
  • src/devops_cli/ai/knowledge_base/: 61 entries carry sources: URLs and a reviewed: date (for example libraries/pydantic_ai.md, pinned to 2.54.*). Nothing reads those sources again to find drift.
  • src/devops_cli/ai/research/crawler.py (devops ai research): it forages repository edges (imports, Markdown links, git co-changes). It reads no web page today.

Proposed Solution & Architectural Design

Audit every place where devops-cli searches the web, fetches a web page, or turns HTML into text: git grep for httpx2, new_http_client, HTMLParser, text/html, crawl and scrape under src/, and the commands that take a URL. For each place, record:

  • what it does today, with the file and line;
  • the Firecrawl endpoint that covers it, if any, and what that endpoint lacks;
  • the cost in credits at the place's usual volume, and whether the place runs for a private repository or private data that must not leave the network;
  • the decision: adopt Firecrawl, keep the current code, or delete the feature.

File one item with devops roadmap intake for each place that adopts Firecrawl, with this issue as --source. Record each "keep" or "delete" decision with its reason in this issue. The audit itself changes no code.

Target Subsystem

AI (src/devops_cli/ai/), with any other command that reads the web.

Existing Tool Considered

Firecrawl is the tool. Its Python SDK (firecrawl) calls requests.post directly and takes no session or client, so it bypasses the egress factory; #2398 calls the REST API through the factory instead. Each adopted place uses that same call path.

Related

Acceptance criteria

  • This issue lists each place that reads the web, with its decision and the evidence for it.
  • Each "adopt" decision has its own filed item, linked as a sub-issue of this one.

Alternatives check of 2026-11-03: not-applicable.
Class: chore, no search.
Tool: none found.

Proposed design

Problem statement

devops-cli reads the web in a few places with its own code. The issue asks which of them a hosted or self-hosted tool serves better. The premise is stale at the staged commit. Firecrawl is now the last provider of web search. The cluster runs a Crawl4AI service, and its client fetch_page_text and the tool fetch_page already exist. The file docs_ingester.py already uses the egress factory. The audit must compare Crawl4AI and Firecrawl, correct the false body claims, and record one decision for each place.

Acceptance criteria

Requirement: Audit record lists every web-reading place

The audit record in the change folder SHALL list each place under src/ that searches the web, fetches a web page, or turns web HTML into text, with file and line, current behavior, the covering tool, the credit cost, whether private data is involved, and the decision.

Scenario: Audit table present

  • WHEN The audit pull request is reviewed
  • THEN The record has one row for each place found by git grep for httpx2, http_client, new_http_client, HTMLParser, text/html, crawl and scrape, and the row for ingest_remote_docs shows its file and line.

Requirement: Audit compares Crawl4AI and Firecrawl

The audit SHALL compare the Crawl4AI service and the Firecrawl API for each place that fetches or converts a page, and SHALL name what each tool lacks.

Scenario: Both tools compared

  • WHEN A place fetches a page or turns HTML into Markdown
  • THEN Its row names Crawl4AI and Firecrawl, states what each covers and lacks, and states the cost and the egress level for each.

Requirement: Audit corrects the body premise

The audit record MUST state that ingest_remote_docs already opens its client through http_client at EgressLevel.PUBLIC and that Firecrawl is the last search provider.

Scenario: Stale claims corrected

  • WHEN A reader opens the audit record
  • THEN The record states the egress fact and the provider order, and it cites src/devops_cli/ai/library/docs_ingester.py and k8s/README.md.

Requirement: Decision and reason for each place

Each row of the audit SHALL give one decision, adopt a named tool, keep the current code, or delete the feature, and SHALL give its reason.

Scenario: Every row decided

  • WHEN The audit is complete
  • THEN No row lacks a decision or a reason, and a row for a place that reads private data does not adopt a hosted tool.

Requirement: Adopt decisions carry ready-to-file items

Each adopt decision SHALL have a drafted item in the audit record, with a Conventional Commit title, the file, the tool endpoint and acceptance criteria, ready for devops roadmap intake with this issue as source.

Scenario: Draft item present

  • WHEN A row says adopt
  • THEN The record holds a draft item with title, file, endpoint and acceptance criteria.

Requirement: Audit changes no code

The audit pull request SHALL change no file under src/.

Scenario: No code diff

  • WHEN The audit pull request is reviewed
  • THEN The diff holds no change to a file under src/.

Existing Tool Considered

The tools are Crawl4AI and Firecrawl. Crawl4AI is open source and already runs in the cluster (changes 3884, 3887, 3892). Its client fetch_page_text converts a page to text with no credit cost and keeps data in the network. Firecrawl /v2/scrape, /v2/crawl, /v2/map and /v2/extract cover scrape, crawl, map and extract as a hosted API with a credit cost. The Firecrawl SDK bypasses the egress factory, so any adoption calls the REST API through the factory. The audit builds no code. Its cost is about 30,000 tokens and about 30 minutes to read the places and write the record.

Key questions

  • Which places under src/ search the web, fetch a web page, or parse web HTML?: Only ingest_remote_docs in docs_ingester.py fetches pages and parses HTML, with its own _HTMLContentExtractor. _JUnitHTMLParser in fail_to_pass.py reads local JUnit XML only. The file crawler.py reads no web page. Web search lives in web_search.py. The knowledge-base source URLs are metadata that no code fetches. [sources: src/devops_cli/ai/library/docs_ingester.py, src/devops_cli/ci/fail_to_pass.py, src/devops_cli/ai/research/crawler.py, src/devops_cli/ai/web_search.py]
  • Does ingest_remote_docs bypass the egress factory, as the body claims?: No. It calls http_client(EgressLevel.PUBLIC, timeout=httpx2.Timeout(30.0)) from devops_cli.http.entry. The audit corrects the claim. [sources: src/devops_cli/ai/library/docs_ingester.py]
  • What is the state of web tools since the issue was written?: Search providers default to searxng, duckduckgo and firecrawl, and Firecrawl is last for one release cycle. When crawl4ai.url is set, the run has the tool fetch_page through the Crawl4AI service. [sources: k8s/README.md:667, docs/CONFIGURATION.md:284, openspec/changes/archive/2026-11-07-3887-crawl4ai-page-text/proposal.md]
  • Which tool does the audit compare for page fetch and HTML to Markdown?: Compare Crawl4AI first and Firecrawl second. Crawl4AI is open source, already deployed, costs no credits and keeps data in the network. Firecrawl stays a candidate only for what Crawl4AI lacks. (best practice) [sources: k8s/README.md:667, openspec/changes/archive/2026-11-07-3887-crawl4ai-page-text/proposal.md]
    • Chosen: Compare Crawl4AI and Firecrawl. Crawl4AI is open source and already deployed. The comparison finds what Firecrawl adds.
    • Rejected: Compare Firecrawl only. It ignores the Crawl4AI service that the project already runs.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/chore
    on Oct 28, 2026
  2. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

  3. added
    priority/p3-low
    status/new
    value/medium
    effort/medium
    scope/ai
    on Oct 28, 2026
  4. added
    status/ready
    and removed
    status/new
    on Oct 30, 2026
  5. devops-cli-service commented on Oct 30, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at c6a837d (see proposed design in issue body).

  6. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor

    The stage job returned the item to New. The premise of the issue does not hold at the staging commit, so the job planned no change and opened no pull request.

    Evidence:

    x

  7. added
    status/new
    and removed
    status/ready
    on Nov 3, 2026
  8. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor

    Alternatives check: not-applicable

    Class: chore. The check makes no search and no model call for an item of this class.

    Tool: none found

    Checked on 2026-11-03. A person decides what this means for the item. The check changes no label and closes no issue.

  9. changed the title [-]chore(ai): find the devops-cli features that should use the Firecrawl API to search, scrape or crawl the web[/-] [+]chore(ai): Audit devops-cli web features for Firecrawl adoption[/+] on Nov 6, 2026
  10. dan-petty commented on Nov 6, 2026

    @dan-petty
    OwnerAuthor

    The job shortened the title of this item. The summary had 97 characters, and the limit is 60. The type and the scope stay.

    • Before: chore(ai): find the devops-cli features that should use the Firecrawl API to search, scrape or crawl the web
    • After: chore(ai): Audit devops-cli web features for Firecrawl adoption
    • Source of the summary: the background model
  11. added
    status/ready
    and removed
    status/new
    on Nov 9, 2026
  12. devops-cli-service commented on Nov 9, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 816cfe0 (see proposed design in issue body).

  13. added
    status/in-review
    and removed
    status/ready
    on Nov 10, 2026
  14. removed
    status/in-review
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p3-lowscope/aisource/agenttype/chorevalue/medium

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions