CrossWorkFlowCI-Factory is an automated mining, zero-invalid-task ("零错题") synthesis, and offline environment compilation framework for high-difficulty, pure-Linux-container-reproducible GitHub Actions CI/CD repair benchmarks built on Harbor (schema_version = "1.4").
This repository includes:
- End-to-End Hard-Only Real-CI Collection & Compilation Pipeline (
cwci/,configs/,scripts/,tests/): Declarative multi-path GitHub Actions mining (Path APR/feature-branch single & cascading first-fail streaks,Path Bfix(ci)/build/docker/workflowPRs,Path Ccross-workflow seesaws) targeting high-star industrial repositories (>= 1000★; curated systems/compiler kernels>= 500★), extensible 13+ category registry & two-axis quota-aware priority scoring, citation-verified Gemini 4 Neon causal review with Hard-OnlyRUBRIC&no_piggyback_featurefiltering, multi-workflow offline Docker compilation (Warm-Snapshot offline caches for Node/Corepack/Yarn Berry/pnpm, Go, Rust, Python/uv, PHP, Java, Make, plus 10 digest-pinned service backends incl. MinIO & Kafka), two-phaseofficial_tests.tar+ 3-layer anti-cheat + runtime.db/.sqlite*sandbox cleanup + staticcwci lint-taskshygiene gate, 3-control Harbor admission (nop=0, oracle=1, developer=1), and TTL-bounded/dind-ramresource GC. - 11 QA-Verified Real GitHub Actions CI Tasks (
harbor_tasks/): Pure real upstream CI failures (new_upstream_actions, zero synthetic/constructed backports) across 10 public repositories, each verified undernetwork_mode = "no-network"and passingcwci lint-taskswith 0 errors. - Archived Legacy Collector (
old/): Previous repository snapshot preserved untouched for reference.
- 100% Real-CI Hard-Only Industrial Acquisition (
cwci/miner.py,cwci/auditor.py):- High-Star Industrial Floor: Real GitHub
stargazers_countresolved O(1) fromupstream/metadata (min_stars >= 1000default;>= 500exclusively for curated systems/compiler/DB kernel seed repos) with hardexcluded_low_starsintake routing. - Substantive Hard-Only Gates: Enforces
minimum_non_test_files >= 2,minimum_non_test_lines >= 25, andminimum_developer_effective_lines >= 25(with a narrow single-file deep-core exception at>= 60Land causal chain>= 3hops). UpgradedRUBRICexplicitly rejects compiler-guided interface forwarding, 1–10L local nil guards, pure type narrowing, and lint refactors (no-nested-ternary). - First-Fail Cascading Streaks & Multi-Workflow Seesaws: Prefers
first_fail_sha -> pass_sha(path_b_streak_span) over last-hop pairs, plusfix(ci)/build/dockerPRs (Path B) and cross-workflow seesaws (Path C). Synthetic Tier-2 backports are disabled by default (exclude_tier2_backport: true).
- High-Star Industrial Floor: Real GitHub
- 3-Tier Funnel for New Requirements (
cwci/auditor.py,cwci/packager.py,cwci/linter.py):- Tier 1 (
no_piggyback_feature): Rejects candidates that tack unrelated new features or brittle white-box internal mocks (e.g.redis.multi().exec()) onto an unrelated CI failure. - Tier 2 (Private-Symbol Static Ban): Scans
official_tests.tardiffs and blocks tests binding newly added unexported/private helpers (Go lowercase funcs, Python_helper, Rust non-pub fn, TS non-export, Javaprivate). - Tier 3 (Zero-Spoiler
## Behavioral Requirements): When same-root-cause black-box invariants are stated ininstruction.md, strictly enforces the zero-spoiler rule (no file paths, no internal function names, no implementation/library hints, no repair steps; optional bare exported identifier declarations only).
- Tier 1 (
- Repository-Wide Multi-Workflow Offline Compilation (
cwci/compiler.py,cwci/runtimes.py):- Compiles all applicable
.github/workflows/*.ymlinto deterministic Linux execution plans with@sha256:pinned runtime digests, 10 offline PRoot/compose service backends, and Warm-Snapshot offline caches (Corepack + Yarn v1/BerryYARN_GLOBAL_FOLDER,pnpm fetch && install,uvmanaged PythonUV_PYTHON_INSTALL_DIR,make <install/deps>, Go/Rust build caches).
- Compiles all applicable
- Two-Phase
official_tests.tar+ 3-Layer Anti-Cheat & Sandbox Cleanup (cwci/packager.py,cwci/linter.py,cwci/publisher.py):- Phase 1 runs full multi-job offline CI on
/app(after_cwci_clean_runtime_artifactsstrips agent self-test.db/.sqlite*/.wal/.shm/.piddebris without touching warm caches or baseline fixtures); anti-tamper guards verifyprotected-zone.sha256,git diff HEAD, assertion floors, and zero-test probes; Phase 2 overlays authoritativetests/official_tests.tarand re-runs the suite (gated by_plan_executes_tests()against compile-only bypasses). cwci lint-tasksenforces self-containedDockerfileADD/COPYcontext files (e.g.source.tar), non-emptytests/historical-tracked.z, zero-spoilerinstruction.md, and secret hygiene;cwci/publisher.pyforce-tracks all required task archives.
- Phase 1 runs full multi-job offline CI on
- Mandatory 3-Control Admission Gate & Bounded
/dind-ramGC (cwci/packager.py,cwci/gc.py):- Every accepted task passes
nop == 0(exact failing step + guarded historical diagnostic matching with strictOFFLINE_ENV_ERROR_RErejection),oracle == 1, anddeveloper == 1offline. - Automatic campaign stop at
HARDCI_TARGET_ACCEPTEDpluscwci/gc.pywith TTL-boundedprotected_hardci_env_tags()and 55% BuildKit cache pruning to prevent/dind-ramENOSPC.
- Every accepted task passes
CrossWorkFlowCI-Factory/
├── pyproject.toml # Package metadata & unified `cwci` CLI entrypoint
├── requirements.txt # Minimal Python dependencies (PyYAML, Jinja2)
├── run.sh # Multi-worker Harbor pipeline supervisor
├── README.md # Overview, architecture & quickstart
├── SKILL.md # Operational agent skill (also mirrored in .agents/skills/cwci-mine/)
├── cwci/ # Unified Python package (14 modules)
│ ├── cli.py # Unified CLI (`cwci <subcommand>` / `python3 -m cwci`)
│ ├── config.py # Declarative config, category registry & two-axis scoring
│ ├── core.py # State, GitHub API, patch/range checks, runner classifier & signatures
│ ├── miner.py # Real GitHub Actions multi-workflow scanner (Path A / B / C)
│ ├── auditor.py # Quota-aware router, citations & agy+Neon causal reviewer
│ ├── runtimes.py # Multiarch Linux, PHP, WASM/musl & 10 service backends (incl. MinIO/Kafka)
│ ├── compiler.py # Multi-workflow scope analyzer, sibling cap & Dockerfile synthesizer
│ ├── packager.py # Zero-spoiler Harbor 1.4 packager, 3-layer anti-cheat & 3-control eval
│ ├── linter.py # Post-packaging static compliance & anti-leak linter (`cwci lint-tasks`)
│ ├── publisher.py # Immediate GitHub auto-publisher for accepted real-CI tasks
│ ├── backport.py # Legacy optional Tier-2 PR backport module (disabled by default)
│ └── gc.py # Adaptive container, git-fetch & BuildKit cache GC daemon
├── configs/
│ ├── mining.default.json # Default high-star (>=1000★) mining pool, filters & scoring weights
│ ├── mining.systems_60d.json # 60-day deep systems/DB/compiler preset (>=500★ seed repos)
│ ├── categories.json # Extensible 13+ hard-category registry & quota targets
│ └── policy.json # Hard-Only intake policy (>=1000★, >=2 non-test files, >=25L, score >=10)
├── scripts/
│ ├── start_harbor_pipeline.sh # End-to-end collection & evaluation daemon launcher
│ ├── start_resource_gc.sh # Low-CPU/IO container & BuildKit garbage collector daemon
│ ├── start_auto_publish.sh # Continuous GitHub auto-publisher for newly accepted real-CI tasks
│ ├── build_harbor_images.sh # Rebuilds `hardci-env:<hash>` base images from task recipes
│ ├── verify_harbor_tasks.sh # Runs mandatory Harbor `nop=0` & `oracle=1` verification
│ ├── egress_bridge_override.yaml # Docker 20.10.x Harbor egress-sidecar bridge compatibility override
│ └── eval_agent_allowlist.sh # Live agent evaluation wrapper (allowlist + verifier no-network)
├── templates/harbor/ # Jinja2 zero-spoiler Harbor instruction templates
├── tests/ # 7 domain test suites (151 unit tests)
├── harbor_tasks/ # 11 QA-verified pure real-CI offline Harbor 1.4 tasks
├── docs/
│ ├── MINING_CRITERIA.md # Acquisition rules, hard categories & anti-flake gates
│ ├── HARBOR_PACKAGING_AND_EVAL.md # Multi-workflow compiler, anti-cheat, egress & 3-control spec
│ └── BENCHMARK_CATALOG.md # Catalog of all accepted real-CI Harbor tasks
└── old/ # Archived legacy version of CrossWorkFlowCI-Factory
Requires Linux, Bash, Docker, Git, Python 3.10+, authenticated gh CLI, and harbor CLI.
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
cwci --help
# Run the full 151-test unit test suite
python3 -W error::SyntaxWarning -m unittest discover -s tests -p "test_*.py"
# Lint all packaged Harbor 1.4 tasks
python3 -m cwci lint-tasks harbor_tasksBy default, the pipeline collects continuously into HARDCI_STATE_DIR (default ./state) and automatically halts all workers (user-hold.json + campaign-100/target-reached.json) once accepted tasks reach HARDCI_TARGET_ACCEPTED (default 100):
# Launch the full pipeline (stops automatically at 100 accepted tasks)
HARDCI_TARGET_ACCEPTED=100 bash scripts/start_harbor_pipeline.sh
# Launch the low-CPU/IO Docker & temp-directory garbage collector alongside it
bash scripts/start_resource_gc.shEach task in harbor_tasks/ ships its complete Harbor 1.4 definition plus environment/base_recipe/ (Dockerfile, warm-wrong.sh, dependency-preflight.sh) so frozen hardci-env:<hash> base images can be reconstructed on any Docker host:
# Rebuild base image(s) from upstream repair commit + reverse reference patch
bash scripts/build_harbor_images.sh <task-slug>
# Verify nop == 0.0 and oracle == 1.0 under Harbor (`network_mode = "no-network"`)
bash scripts/verify_harbor_tasks.sh <task-slug>- Real Upstream GitHub Actions CI Failures (
new_upstream_actions):11tasks (all synthetic/constructed Tier-2 backport tasks removed; collection continues strictly on real CI episodes)
See docs/BENCHMARK_CATALOG.md for the full catalog:
| # | Task Slug | 仓库 & 架构拓扑 | 失败 → 修复范围 | GitHub Actions 失败 Run & Compare | QA (nop/oracle/developer) |
|---|---|---|---|---|---|
| 1 | gravitl-netmaker-091a4a8a-54697ba8-f131da4502-5b72c7f866 |
gravitl/netmakerGo 1.26.0 + 3 Jobs |
6 files / 109L | Fail Run · Compare | 0.0 / 1.0 / 1.0 |
| 2 | infisical-gateway |
Infisical/infisicalLinux Offline CI |
4 files / 21L | Fail Run · Compare | 0.0 / 1.0 / 1.0 |
| 3 | jnosql-807 |
eclipse-jnosql/jnosqlLinux Offline CI |
1 files / 16L | Fail Run · Compare | 0.0 / 1.0 / 1.0 |
| 4 | linuxfoundation-insights-76481363-e8a7f055-2c7dc34ac2-c1f42506e0 |
linuxfoundation/insightsNode 24 + 4 Workflows / 4 Jobs |
9 files / 57L | Fail Run · Compare | 0.0 / 1.0 / 1.0 |
| 5 | openfrontio-openfrontio-2135e26a-4f9d37ff-a80574b822-9946f81a2f |
openfrontio/OpenFrontIONode 24 + 2 Jobs |
7 files / 97L | Fail Run · Compare | 0.0 / 1.0 / 1.0 |
| 6 | opentofu-opentofu-088ccd28-8e309ee7-c7c2cfadf3-9803a00294 |
opentofu/opentofuGo 1.27.1 |
6 commits / 7 files / 197L | Fail Run · Compare | 0.0 / 1.0 / 1.0 |
| 7 | opentofu-opentofu-d54ac27b-b1ee70bf-62bdbbfb04-gha |
opentofu/opentofuRunner.Client (Separate-Verifier) |
4 files / 115L | Fail Run · Compare | 0.0 / 1.0 / 1.0 |
| 8 | sei-protocol-sei-chain-0ada2eba-6d8f4ad5-abaa57bda2-ad4d14144b |
sei-protocol/sei-chainGo 1.27.4 |
5 files / 59L | Fail Run · Compare | 0.0 / 1.0 / 1.0 |
| 9 | tencentcloud-cubesandbox-fa21ae21-ff813eef-8ebbf832e3-63927c8754 |
TencentCloud/CubeSandboxNode 22 + 2 Workflows / 2 Jobs |
13 files / 103L | Fail Run · Compare | 0.0 / 1.0 / 1.0 |
| 10 | tornadoweb-tornado-271542a3-a3e5ef67-30a092ade8-36a52c907e |
tornadoweb/tornadoPython 3.13 + 2 Workflows / 3 Jobs |
3 files / 3L | Fail Run · Compare | 0.0 / 1.0 / 1.0 |
| 11 | uiua-lang-uiua-2cc8f585-fa6a2565-e51c1919f8-gha |
uiua-lang/uiuaRunner.Client (Separate-Verifier) |
5 files / 119L | Fail Run · Compare | 0.0 / 1.0 / 1.0 |