Skip to content

Add Cloud Agent development environment - #492

Draft
abimaelmartell wants to merge 1 commit into
mainfrom
cursor/add-cloud-agent-environment-3c7c
Draft

abimaelmartell wants to merge 1 commit into
mainfrom
cursor/add-cloud-agent-environment-3c7c

Conversation

@abimaelmartell

@abimaelmartell abimaelmartell commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

Adds a repo-managed Cloud Agent environment for pdf-inspector (primary) with pdf-evals as a repository dependency, so a fresh Cloud Agent boots ready to build the binaries and run the regression/scoring suite end to end.

  • .cursor/environment.json — default base image + install script, with github.com/firecrawl/pdf-evals declared under repositoryDependencies.
  • scripts/cloud-agent-install.sh — idempotent, non-interactive setup:
    • installs the small missing system packages (python3.12-venv, qpdf);
    • builds the release binaries (pdf2md, detect-pdf) using the pinned rust-toolchain.toml channel (1.98.0), which cargo auto-installs;
    • creates the pdf-evals .venv and installs only the core benchmark/scoring deps (the section of requirements.txt above # optional provider dependencies), skipping the heavy cloud-OCR providers (docling/torch, pymupdf4llm, markitdown, llama-cloud) that the local dev flow does not need;
    • writes pdf-evals/config.yaml pointing the local provider at the freshly built pdf2md (git-ignored), so bench.py works without any extra env var.

No start/terminals: pdf-inspector is a CLI/library with no long-running service.

Validation (on the VM, from a clean state)

Check Result
Pinned toolchain rustc 1.98.0 auto-installed from rust-toolchain.toml
cargo fmt --check OK
cargo clippy -- -D warnings OK (zero warnings)
cargo test 1083 + 172 + 3 unit/integration + 2 doctests passed, 0 failed
Release binaries pdf2md / detect-pdf build and extract a sample PDF
bench.py doctor 194 PDFs, 0 errors
bench.py test -q 20/20 PASS at 100% vs committed snapshots (binary resolved via generated config.yaml)
bench.py score -q 20/20 scored, composite mean 0.58 (TEDS/MHS via apted+lxml)
Install idempotence Clean run + two reruns all succeed

Note on build-test tooling

This setup was validated by running the exact install script from a clean state on the VM (fresh .venv/config.yaml, re-run for idempotence). The prebuilt-image build-and-verify path was not exercised because this agent run is anchored to the pdf-evals repo, so the build tooling cannot check out pdf-inspector as the primary repo to test its committed .cursor/environment.json. Once merged, the committed file is the highest-precedence source for Cloud Agents started on pdf-inspector.

Open in Web Open in Cursor 

Summary by cubic

Adds a repo-managed Cloud Agent environment for pdf-inspector so a fresh agent boots ready to build the release binaries and run the pdf-evals regression suite.

  • The install script is idempotent and non-interactive, installing only the core benchmark dependencies (skipping heavy OCR providers).
  • It writes a git-ignored config.yaml in pdf-evals to point at the freshly built pdf2md binary.

Written for commit c853394. Summary will update on new commits.

Review in cubic

Co-authored-by: Abimael Martell <abimaelmartell@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants