Skip to content

CrawlX 0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 15 Nov 12:43
· 30 commits to main since this release
Immutable release. Only release title and notes can be modified.
e0b2e9a

Second source release. Distribution is unchanged: the GitHub repository and the tagged source
archive, with a CycloneDX SBOM and SHA256SUMS; no binaries, container images or crates.io packages
are published. Production qualification is still in progress: the release-gate checklist in
docs/ops/release-gates.md has not been measured for this release (no soak, flake window,
restore drill, severity-classified findings or model calibration was run for it), so do not treat it
as qualified for production use.

Highlights

  • AI-native features, off by default and advisory only: a model-egress policy, natural-language crawl
    specifications, a plan-first research agent, schema extraction with exact field evidence, passive
    surface triage and grounded summaries (docs/ai.md).
  • A native, capability-scoped MCP surface with scoped API keys and a hash-chained audit log
    (docs/mcp.md).
  • Shared-instance backends: namespacing for PostgreSQL, the object store and Valkey/Redis, delivery to
    OpenSearch, Elasticsearch, ClickHouse, Kafka and RabbitMQ, and a guard against two deployments
    deleting each other's artifacts (docs/ops/backends.md).
  • A local key-encryption-key file for browser checkpoints, so durable deployments need no cloud key
    service.
  • CI runs on self-hosted runners for code owners only, and no update bot is configured.

Added

  • Local key-encryption-key file for browser checkpoints (CRAWLX_CHECKPOINT_KEK_FILE): durable
    API and worker deployments without a cloud service can run dynamic and hybrid crawls on
    PostgreSQL, MariaDB or SQLite with any artifact store. One <key-id>:<64 hex> per line, mode 0600/0400
    (or 0440 with a group of the process, as a Kubernetes secret volume under fsGroup presents it;
    other modes and foreign groups are refused with the mode and gid named), first key primary, older keys
    still unwrap for rotation. Exclusive with CRAWLX_CHECKPOINT_KMS_KEY_ID; checked by crawlx config check.
    Deployable as an optional secret file: docker/compose.checkpoint-kek.yml and Helm
    capabilities.checkpointEncryption.kekFileSecret (the chart refuses both providers). See
    docs/design/data-and-secrets.md and docs/ops/README.md.
    The provider is tested end to end on SQLite and MariaDB, each with filesystem and S3-compatible
    artifact stores (crates/crawlx-worker/tests/checkpoint_kek_durable.rs).
  • Backends guide (docs/ops/backends.md): support matrix, per-family namespacing and shared-instance
    setup.
    • Delivery destinations for OpenSearch and Elasticsearch (opensearch, elasticsearch: engine
      and version detection, a versioned index template, stable document ids), ClickHouse
      (clickhouse: versioned migrations, insert deduplication), Kafka (kafka: topic creation,
      SASL/PLAIN, TLS, keyed records) and RabbitMQ (amqp: publisher confirms, mandatory publish,
      message_id). Pure-Rust clients, no native libraries. Kafka is at-least-once: the client has no
      idempotent producer, so consumers deduplicate on the record key.
    • Namespacing for shared instances: database.schema (PostgreSQL schema, validated, refused for
      other engines), CRAWLX_S3_PREFIX (object-store key prefix) and CRAWLX_REDIS_KEY_PREFIX
      (Valkey/Redis key prefix, default crawlx: so existing keys are unchanged), plus the index,
      database and topic/exchange prefixes of the new destinations. crawlx config check validates them.
    • ci/backend-services.sh starts throwaway search, analytics, broker and self-hosted S3 containers
      for the real-service tests; the self-hosted object-store profile is verified against RustFS and
      MinIO.
  • AI-native features, off by default and advisory only (see docs/ai.md):
    • A uniform untrusted-content and model-egress policy (intel.policy): an operator switch for
      external processing, approved providers per purpose with a retention capability, typed input and
      output envelopes, projection of secrets out of every prompt and reply, bounded schemas without
      remote references, finite per-call and per-run budgets, tenant- and revision-keyed caching, and
      digest-only audit rows. GET /v1/capabilities/ai reports the policy in force.
    • Natural-language specifications compiled to native configurations: POST /v1/crawl-specs/validate,
      /compile, GET /v1/crawl-specs/{id}, operator approval (/approve) and creation from an
      approved spec (/create), with a deterministic narrowing-only compiler, diff, unsupported-intent
      reporting, native admission and a single-use digest-bound approval token.
    • Plan-first research agent: POST /v1/agent-plans, approval, cancel and /execute. Plans are
      validated deterministically, approved by an operator and executed confined to the plan's tools and
      URLs; deviations are recorded on the job result and the plan.
    • Schema extraction with exact field evidence (POST /v1/crawls/{id}/extractions): byte spans
      computed by CrawlX, observed, inferred, conflicting, rejected and unknown field states, and no
      ungrounded value in the result.
    • Passive endpoint and vulnerability-surface triage (POST|GET /v1/crawls/{id}/triage) from retained
      pages, static forms and traffic, with evidence ids, name-only hypotheses and an optional cited
      explanation.
    • Grounded run and findings summaries (POST|GET /v1/crawls/{id}/summaries) with a deterministic
      fallback, claim validation against the evidence, and operator-reviewed findings
      (PUT|GET /v1/crawls/{id}/findings) as the only source of confirmed status.
  • A native, capability-scoped MCP surface (crawlx mcp --surface native) with read-only inspection by
    default, explicit control, create, export, interact, erase and operator capabilities, structured
    results, untrusted-content labelling, resources and operator-granted upload handles; see docs/mcp.md.
  • Scoped bootstrap API keys: crawlx serve --api-key TENANT=KEY:SCOPES limits a key to the agent
    preset (read and create runs, read authorization records; no approvals:decide,
    authorizations:write, sensitive artifacts or metrics), the operator preset (all scopes) or a
    comma-separated scope list. The plain TENANT=KEY form still holds every scope. Unknown or empty
    scope lists are refused at startup. This makes the least-privilege agent key of docs/mcp.md
    creatable.
  • crawlx mcp --audit-log PATH (CRAWLX_MCP_AUDIT_LOG): an append-only, hash-chained JSON Lines audit
    log of every MCP tool call and resource read (intent before, result after; digests and sizes only,
    refusals recorded). The server refuses to start, and refuses a call, when the log cannot be written.
    crawlx mcp audit-verify PATH checks the chain; see docs/mcp.md.

Changed

  • Dependency and base-image updates are made by maintainers by hand: .github/dependabot.yml is removed, and the base-image digest comments in the Dockerfiles say so. Advisories for the locked Rust dependencies are checked by cargo deny in the CI workflow, and the self-hosted security workflow reviews dependency changes in pull requests (dependency-review) and runs the OpenSSF Scorecard.
  • ci/lint-runners.sh (run by the workflow-lint job, with a self-test) fails when a job's runs-on lacks the self-hosted label or an update bot configuration exists, so no job can fall back to a hosted runner.
  • Cleaned for the newest stable toolchain: iterator forms in the XPath axis walks, removal of unused dependencies, and explicit handling of the exit codes tests ignored.

Fixed

  • The object-store prefix claim retries a transport failure of its marker requests a bounded number of times before refusing the write, and the profile tests assert the claim's request shape (no checksum where the profile forbids it, a checksum where object lock requires it).
  • Every command now selects its configuration file like crawlx config check: CRAWLX_CONFIG, else
    ./crawlx.toml. Before, migrate, crawl, worker, serve, export, replay and the operator
    commands read only ./crawlx.toml, so database.schema was ignored (a URL from the environment migrated
    into public) and database.url_file was not read. A CRAWLX_CONFIG that names a missing or invalid file
    is an error, also for the [ocr] table. export, replay and crawl also read database.url_file and
    apply the [database] pool, timeout and schema settings.
  • crawlx config check accepts CRAWLX_ZDR_REDIS_URL_FILE (file must be readable and not empty; refused
    together with CRAWLX_ZDR_REDIS_URL) and reports the object-store bucket and prefix from
    CRAWLX_S3_BUCKET and CRAWLX_S3_PREFIX instead of an empty bucket.
  • docs/ops/object-storage.md no longer says CRAWLX_S3_BUCKET is ignored by serve, worker and
    crawl: with a database they write through the bucket; only the in-memory serve and crawl without
    --database-url use the filesystem.
  • crawlx serve now reads [intel.policy] from crawlx.toml (camelCase keys, unknown keys and inline
    credentials refused), so the native AI endpoints can be enabled; before, no way to set the policy
    existed and they always answered 403 external_processing_disabled. crawlx config check validates
    and reports it without secrets (docs/ai.md).
  • The browser DevTools URL, a bearer token, no longer has to travel on the command line:
    --cdp-ws-url-file (0600 regular file), CRAWLX_CDP_WS_URL_FILE and CRAWLX_CDP_WS_URL for
    crawl and worker; one source only. --cdp-ws-url still works with a deprecation warning, and the
    URL no longer appears in Debug output.
  • A run the worker refuses over its configuration (for example a browser run without a checkpoint
    key provider) now says why: GET /v1/crawls/{id} carries failure: {code, message}
    (checkpoint_keys_required, config_refused) next to terminalReason: fatal_error, recorded as a
    run.refused event, and the worker logs the reason.
  • ClickHouse delivery no longer drops batches of another run or deployment that share a table: the
    insert_deduplication_token was the batch key (request.<page>.<feed>), which repeats across runs
    and across deployments (request ids restart in every database), so the second batch was deduplicated
    away while the outbox said delivered. The token, the Kafka record key and the RabbitMQ message_id
    are now a hash of tenant id, run id and batch key (the plain key stays in the batch_key column and
    the crawlx-batch header); a retry of one batch still deduplicates. A batch retried across the
    upgrade can be stored once more. See docs/ops/backends.md.
  • Two deployments under one object-store prefix no longer delete each other's live artifacts as
    orphans: the first write claims the prefix with the marker object <prefix>.crawlx-deployment
    (conditional put; the id is kept in cluster_settings under deployment.id), and any write, delete
    or orphan sweep by another deployment is refused with a message naming the prefix. Reads and
    verify-artifacts are not refused; the marker is never listed or swept. Operator override:
    CRAWLX_S3_ALLOW_SHARED_PREFIX=1 (unsafe). See docs/ops/object-storage.md.

Upgrade notes

  • A ClickHouse, Kafka or RabbitMQ delivery batch that was retried across the upgrade can be stored
    once more, because the deduplication token, record key and message_id changed (see Fixed).
  • Deployments that already share one object-store prefix: the first to write after the upgrade claims
    the prefix and the others are refused until each uses its own prefix (or
    CRAWLX_S3_ALLOW_SHARED_PREFIX=1 is set, which is unsafe). A single deployment is unaffected.
  • --cdp-ws-url still works but logs a deprecation warning; use --cdp-ws-url-file or
    CRAWLX_CDP_WS_URL_FILE.
  • The plain --api-key TENANT=KEY form still holds every scope; use agent, operator or a scope
    list to narrow a key.