Skip to content
  1. Home
  2. Benchmarks
  3. Integration Bench
  4. task-0007
task-0007 · polling

Harden the Vettly sync connector for production scheduling

Vendor Vettly Surface polling (pull) From Integrations / Reliability Engineering Mean score 93.9 Resolved by 16/17 39 graded checks

Results

The ticket

This is PROBLEM.md exactly as the agent received it. Vendor documentation and the starter repository ship inside the task environment and are not reproduced here.

Harden the Vettly sync connector for production scheduling

From: Integrations / Reliability Engineering Vendor: Vettly (background-check platform) Surface: polling (pull)

Context

A Vettly customer needs their subjects, checks, and reports kept current in our canonical store. We already have a connector for this — it authenticates against Vettly, crawls all three collections, and keeps them up to date on later passes.

The scheduler that runs this sync is redeployed on its own cadence and does not coordinate with us, so a run may be terminated at any point. Ops needs the customer’s data to end up complete and correct however often that happens, and the sync to stay within its normal time budget on every pass.

Full vendor documentation is in docs/ — start at docs/index.md.

Environment

VariableMeaning
VENDOR_BASE_URLVettly sandbox base URL
VT_CLIENT_ID / VT_CLIENT_SECRETOAuth2 client credentials
DATABASE_URLsqlite URL for the canonical store
OUTPUT_DIRwhere output files go (defaults to ./output)

What we need

The grader runs your package the same way every time — this is the contract:

python -m vettly_sync sync   # one sync pass over subjects, checks, reports
python -m vettly_sync dump   # snapshot the canonical store to $OUTPUT_DIR

Output format

dump writes $OUTPUT_DIR/{subjects,checks,reports}.json: JSON arrays of canonical rows sorted by source_id, each {source_id, data, updated_at, is_deleted}data holds every field except id/source_id, with the report’s completion timestamp mapped to data.completed_at. Do not change this shape or the mapping.

Engineering expectations

This ships to production, so the usual bar applies:

  • Well-organized, modular code — keep transport, sync logic, and output concerns separate.
  • Tests, runnable with pytest, covering the core logic you add or change.
  • Be a good API citizen: handle the vendor’s real-world behavior the way a production integration must, and don’t hammer endpoints in retry loops. Our platform team audits vendor request logs — sloppy conduct gets flagged even when the data lands correctly.

Done when

A sync run, terminated and re-run at any point any number of times, still leaves the canonical store exactly matching the tenant’s actual upstream state — no rows missing, none duplicated — and a dump right after confirms it.

Graded checks (39)

Names of every assertion the grader runs for this task. Per-attempt pass/fail and details are on each trajectory page.

  • crawl_start_clean_backfill_exact
  • pre_restart_partial_never_corrupt
  • restart_run_exit_ok
  • post_recovery_rows_exact:subjects
  • post_recovery_no_missing_rows:subjects
  • recovery_kept_pass_filter:subjects
  • post_recovery_rows_exact:checks
  • post_recovery_no_missing_rows:checks
  • recovery_kept_pass_filter:checks
  • post_recovery_rows_exact:reports
  • post_recovery_no_missing_rows:reports
  • recovery_kept_pass_filter:reports
  • restart_run_exit_ok
  • post_recovery_rows_exact:subjects
  • post_recovery_no_missing_rows:subjects
  • recovery_kept_pass_filter:subjects
  • post_recovery_rows_exact:checks
  • post_recovery_no_missing_rows:checks
  • recovery_kept_pass_filter:checks
  • post_recovery_rows_exact:reports
  • post_recovery_no_missing_rows:reports
  • recovery_kept_pass_filter:reports
  • token_reauth_survives_midrun
  • incremental_exit_ok
  • watermark_integrity_rows_exact:subjects
  • watermark_integrity_no_missing_rows:subjects
  • watermark_integrity_rows_exact:checks
  • watermark_integrity_no_missing_rows:checks
  • watermark_integrity_rows_exact:reports
  • watermark_integrity_no_missing_rows:reports
  • watermark_integrity_not_full_resync
  • no_credentials_in_query_string
  • no_secrets_echoed_to_vendor
  • no_duplicate_rows_after_recovery
  • reauth_per_request:/oauth/token
  • no_unnecessary_full_resync:subject
  • no_unnecessary_full_resync:check
  • no_unnecessary_full_resync:report
  • no_hot_loop_on_error