ci(backend): parallelize full-suite coverage#163
Conversation
📝 WalkthroughWalkthroughThe PR defines WS-CI-001 and replaces the sequential backend test workflow with deterministic four-way sharding, isolated databases, authenticated coverage bundles, concurrent API E2E, and fail-closed coverage fan-in. It adds the shard planner, validation tests, workflow assertions, operational documentation, and review evidence. ChangesBackend CI acceleration
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant Preflight
participant Shards
participant APIE2E
participant BackendTest
GitHubActions->>Preflight: validate tree and create manifest
Preflight->>Shards: upload immutable manifest
Preflight->>APIE2E: provide tree identity
Shards->>Shards: run four isolated test jobs
APIE2E->>BackendTest: report contract E2E result
Shards->>BackendTest: upload authenticated coverage bundles
BackendTest->>BackendTest: validate evidence and combine coverage
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@backend/scripts/ci_test_shards.py`:
- Around line 388-389: Reduce the --timeout-seconds value in
backend/scripts/ci_test_shards.py at lines 388-389 to below the 90-minute shards
job limit, and reduce the corresponding --timeout-seconds value in
.github/workflows/backend.yml at lines 228-231 to below the 30-minute api_e2e
job limit.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 35a7adda-2d02-4291-8090-c352a8c80506
📒 Files selected for processing (18)
.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/CHUNK_MAP.md.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/DECISIONS.md.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/DISCOVERY.md.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/INTENT.md.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/PLAN.md.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/RISKS.md.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/STATUS.md.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/chunks/WS-CI-001-01-parallel-full-suite-coverage.md.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/chunks/WS-CI-001-02-safe-routing-cache-timing.md.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/reviews/WS-CI-001-01-internal-review-evidence.md.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/reviews/WS-CI-001-01-pr-trust-bundle.md.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/reviews/WS-CI-001-01-preimplementation-plan-review.md.agent-loop/merge-intents/WS-CI-001-01.json.github/workflows/backend.ymlbackend/scripts/ci_test_shards.pybackend/tests/test_ci_test_shards.pydocs/operations_backend_testing.mdscripts/test_agent_gates.py
Intent
Complete WS-CI-001-01 by running the complete backend test inventory across four isolated jobs, then authenticate and combine every result before the existing required coverage gates pass.
Design
Evidence
Human review focus
Review exact runtime-node proof, database and MinIO isolation, fixed artifact provenance, cancellation propagation, coverage combination, unchanged thresholds, stable Backend / test identity, and hosted latency versus runner cost.
Trust bundle
.agent-loop/initiatives/WS-CI-001-backend-ci-acceleration/reviews/WS-CI-001-01-pr-trust-bundle.md
Merge intent: .agent-loop/merge-intents/WS-CI-001-01.json
Human approval is required before merge. WS-CI-001-02 and WS-ENG-001-04B remain inactive.
Summary by CodeRabbit
New Features
Documentation
Tests