mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-01 01:24:30 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - Release and master verification run serialized server integration suites across sharded CI jobs (`release-verify.yml`) > - `server/src/__tests__/heartbeat-process-recovery.test.ts` (17,926 lines, 466 expanded tests) takes ~6m 28s in a single file, so Vitest cannot shard it across runners even with 9 serialized shards (#22946) > - Because one file sets a hard floor on the serialized verification lane, release readiness stays slower than necessary after every merge > - This pull request moves the shared suite body into `server/src/__tests__/heartbeat-process-recovery.helper.ts` with four disjoint `part` slices and adds four thin test entrypoints (`heartbeat-process-recovery-part-{1..4}.test.ts`) > - The benefit is balanced shard distribution across serialized runners, cutting the single-file serialized ceiling by ~4.5 minutes while keeping all 466 test cases intact ## Linked Issues or Issue Description Refs #22946 **Area** CI / Test Infrastructure **Current Behavior** `server/src/__tests__/heartbeat-process-recovery.test.ts` runs as a single 17,926-line Vitest file (~344s recorded, ~388s in recent release runs), bounding `Serialized tests` even across 9 shards. **Proposed Improvement** Partition the suite into four thin entrypoint files (`heartbeat-process-recovery-part-{1..4}.test.ts`) backed by a shared `heartbeat-process-recovery.helper.ts`, with measured proportional shard weights in `scripts/serialized-shard-durations.json` and `scripts/ci/nightly-only-suites.json`. **Motivation / Use Case** Shorten master and release verification wall-clock latency without dropping or weakening any recovery test coverage. ## What Changed - Renamed `server/src/__tests__/heartbeat-process-recovery.test.ts` to `server/src/__tests__/heartbeat-process-recovery.helper.ts` exporting `registerHeartbeatProcessRecoverySuite(part: 1 | 2 | 3 | 4)`, hoisting `withTempPaperclipHome` to shared scope, making `beforeAll`'s `authUsers` seed `.onConflictDoNothing()` for shared `PAPERCLIP_TEST_DATABASE_URL` safety, routing dynamic `run-dispatch` imports through `../modules/run-dispatch/index.js`, and updating the two stack-trace file-name assertions to `.helper.ts`. - Added four 3-line entrypoints: `server/src/__tests__/heartbeat-process-recovery-part-{1,2,3,4}.test.ts`. - Updated `scripts/run-vitest-stable.mjs`, `scripts/serialized-shard-durations.json`, and `scripts/ci/nightly-only-suites.json` with the four part paths and measured proportional shard weights (`88511`, `102168`, `72141`, `81197` ms; sum `344017` ms). - Updated `.github/workflows/runner-chaos-evals.yml` (with `--no-file-parallelism` to preserve serial execution in that job), `maps/feature-map/recovery.md`, `packages/paperclip-runner/spec/evals/stress-workflow-traceability.json`, and `scripts/ci/test-selection.integration.test.mjs`. ## Verification - Executed all four split suites locally via Vitest against embedded Postgres — **466/466 tests passed** (0 failed, 0 skipped): - `heartbeat-process-recovery-part-1.test.ts`: 116/116 passed (199.67s under 4-way local contention) - `heartbeat-process-recovery-part-2.test.ts`: 103/103 passed (230.48s) - `heartbeat-process-recovery-part-3.test.ts`: 87/87 passed (162.74s) - `heartbeat-process-recovery-part-4.test.ts`: 160/160 passed (183.17s) - Verified brace-depth exhaustiveness across `heartbeat-process-recovery.helper.ts`: 0 top-level `it`/`it.each`/`describe` blocks outside `if (part === N)` guards. - `node scripts/check-module-boundaries.mjs` — passed. - `node scripts/check-maps.mjs` — passed. - `node scripts/check-test-budget.mjs --base origin/master` — passed. - `node --test scripts/check-test-budget.test.mjs scripts/__tests__/run-vitest-stable-shard.test.mjs scripts/__tests__/run-vitest-stable-pr-mode.test.mjs scripts/ci/test-selection.integration.test.mjs` — passed. ## Risks - Low risk: test-only partition; zero production runtime files changed. - Adding a future test to `heartbeat-process-recovery.helper.ts` outside an `if (part === N)` guard would not register in any part; documented the placement rule directly on `registerHeartbeatProcessRecoverySuite`. ## Model Used - Google Gemini (Antigravity agent with tool use and code execution) ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) --------- Co-authored-by: Paperclip <noreply@paperclip.ing>
66 lines
8.9 KiB
JSON
66 lines
8.9 KiB
JSON
{
|
|
"schema": "paperclip.runner.stress-eval-traceability.v1",
|
|
"campaign": "2026-08-23-paperclip-runner-stress-campaign",
|
|
"expectedFindings": 44,
|
|
"workflows": [
|
|
"final-response",
|
|
"rich-activity",
|
|
"verification-policy",
|
|
"governed-interaction",
|
|
"steering-causality",
|
|
"planning-lifecycle",
|
|
"review-lifecycle",
|
|
"delegation-return",
|
|
"completion-robustness",
|
|
"restart-recovery",
|
|
"cancellation-permissions",
|
|
"trace-lineage"
|
|
],
|
|
"findings": [
|
|
{ "id": "STRESS-001", "classification": "workflow_eval", "workflowIds": ["governed-interaction"], "regressionTests": ["src/contracts/native-execution.test.ts"] },
|
|
{ "id": "STRESS-002", "classification": "workflow_eval", "workflowIds": ["restart-recovery"], "regressionTests": ["src/backends/harness-driver-backend.test.ts"] },
|
|
{ "id": "STRESS-003", "classification": "workflow_eval", "workflowIds": ["governed-interaction"], "regressionTests": ["src/contracts/native-execution.test.ts"] },
|
|
{ "id": "STRESS-004", "classification": "workflow_eval", "workflowIds": ["restart-recovery"], "regressionTests": ["../../server/src/__tests__/heartbeat-workspace-session.test.ts"] },
|
|
{ "id": "STRESS-005", "classification": "workflow_eval", "workflowIds": ["cancellation-permissions"], "regressionTests": ["src/drivers/acpx/codex-acpx-driver.test.ts"] },
|
|
{ "id": "STRESS-006", "classification": "workflow_eval", "workflowIds": ["final-response", "verification-policy"], "regressionTests": ["src/drivers/opencode/opencode-server-driver.test.ts"] },
|
|
{ "id": "STRESS-007", "classification": "workflow_eval", "workflowIds": ["completion-robustness"], "regressionTests": ["src/protocol/result-normalization.test.ts"] },
|
|
{ "id": "STRESS-008", "classification": "workflow_eval", "workflowIds": ["restart-recovery"], "regressionTests": ["src/native-session-runtime.test.ts"] },
|
|
{ "id": "STRESS-009", "classification": "workflow_eval", "workflowIds": ["completion-robustness"], "regressionTests": ["src/drivers/opencode/mcp-bridge.test.ts"] },
|
|
{ "id": "STRESS-010", "classification": "workflow_eval", "workflowIds": ["completion-robustness"], "regressionTests": ["../../server/src/__tests__/native-finalization-recovery.test.ts"] },
|
|
{ "id": "STRESS-011", "classification": "workflow_eval", "workflowIds": ["rich-activity"], "regressionTests": ["src/drivers/opencode/opencode-server-driver.test.ts"] },
|
|
{ "id": "STRESS-012", "classification": "workflow_eval", "workflowIds": ["final-response"], "regressionTests": ["src/drivers/opencode/opencode-server-driver.test.ts"] },
|
|
{ "id": "STRESS-013", "classification": "workflow_eval", "workflowIds": ["final-response", "restart-recovery"], "regressionTests": ["../../server/src/__tests__/heartbeat-run-summary.test.ts"] },
|
|
{ "id": "STRESS-014", "classification": "workflow_eval", "workflowIds": ["completion-robustness"], "regressionTests": ["../../server/src/__tests__/issue-recovery-actions.test.ts"] },
|
|
{ "id": "STRESS-015", "classification": "workflow_eval", "workflowIds": ["steering-causality"], "regressionTests": ["../../ui/src/components/TaskChatThread.test.tsx"] },
|
|
{ "id": "STRESS-016", "classification": "workflow_eval", "workflowIds": ["review-lifecycle"], "regressionTests": ["../../ui/src/components/IssueThreadInteractionCard.test.tsx"] },
|
|
{ "id": "STRESS-017", "classification": "workflow_eval", "workflowIds": ["cancellation-permissions"], "regressionTests": ["../../ui/src/components/task-chat/transcript-adapter.test.ts"] },
|
|
{ "id": "STRESS-018", "classification": "workflow_eval", "workflowIds": ["restart-recovery", "completion-robustness"], "regressionTests": ["../../server/src/services/native-runtime/native-session-executor.test.ts"] },
|
|
{ "id": "STRESS-019", "classification": "workflow_eval", "workflowIds": ["restart-recovery", "governed-interaction"], "regressionTests": ["src/backends/harness-driver-backend.test.ts"] },
|
|
{ "id": "STRESS-020", "classification": "workflow_eval", "workflowIds": ["completion-robustness"], "regressionTests": ["../../server/src/__tests__/heartbeat-process-recovery-part-1.test.ts", "../../server/src/__tests__/heartbeat-process-recovery-part-2.test.ts", "../../server/src/__tests__/heartbeat-process-recovery-part-3.test.ts", "../../server/src/__tests__/heartbeat-process-recovery-part-4.test.ts", "../../server/src/__tests__/heartbeat-comment-wake-batching.test.ts"] },
|
|
{ "id": "STRESS-021", "classification": "workflow_eval", "workflowIds": ["governed-interaction"], "regressionTests": ["../../server/src/services/native-runtime/native-session-executor.test.ts"] },
|
|
{ "id": "STRESS-022", "classification": "workflow_eval", "workflowIds": ["governed-interaction", "restart-recovery"], "regressionTests": ["src/drivers/acpx/codex-acpx-driver.test.ts"] },
|
|
{ "id": "STRESS-023", "classification": "workflow_eval", "workflowIds": ["cancellation-permissions"], "regressionTests": ["../../server/src/services/native-runtime/native-session-executor.test.ts"] },
|
|
{ "id": "STRESS-024", "classification": "workflow_eval", "workflowIds": ["cancellation-permissions"], "regressionTests": ["src/drivers/acpx/codex-acpx-driver.test.ts"] },
|
|
{ "id": "STRESS-025", "classification": "workflow_eval", "workflowIds": ["review-lifecycle"], "regressionTests": ["../../ui/src/context/LiveUpdatesProvider.test.ts"] },
|
|
{ "id": "STRESS-026", "classification": "workflow_eval", "workflowIds": ["planning-lifecycle"], "regressionTests": ["../../server/src/__tests__/issue-thread-interaction-routes.test.ts"] },
|
|
{ "id": "STRESS-027", "classification": "workflow_eval", "workflowIds": ["delegation-return"], "regressionTests": ["../../server/src/__tests__/heartbeat-dependency-scheduling.test.ts"] },
|
|
{ "id": "STRESS-028", "classification": "workflow_eval", "workflowIds": ["delegation-return"], "regressionTests": ["../../server/src/services/native-runtime/native-session-resume.test.ts"] },
|
|
{ "id": "STRESS-029", "classification": "workflow_eval", "workflowIds": ["restart-recovery"], "regressionTests": ["../../server/src/__tests__/native-finalization-recovery.test.ts"] },
|
|
{ "id": "STRESS-030", "classification": "workflow_eval", "workflowIds": ["review-lifecycle"], "regressionTests": ["../../server/src/services/native-runtime/evidence-classifier.test.ts"] },
|
|
{ "id": "STRESS-031", "classification": "workflow_eval", "workflowIds": ["governed-interaction"], "regressionTests": ["../../server/src/__tests__/native-interaction-bridge.test.ts"] },
|
|
{ "id": "STRESS-032", "classification": "workflow_eval", "workflowIds": ["governed-interaction"], "regressionTests": ["../../server/src/services/native-runtime/native-session-executor.test.ts"] },
|
|
{ "id": "STRESS-033", "classification": "workflow_eval", "workflowIds": ["governed-interaction", "final-response"], "regressionTests": ["../../server/src/__tests__/heartbeat-run-summary.test.ts"] },
|
|
{ "id": "STRESS-034", "classification": "workflow_eval", "workflowIds": ["governed-interaction"], "regressionTests": ["src/drivers/opencode/opencode-server-driver.test.ts"] },
|
|
{ "id": "STRESS-035", "classification": "workflow_eval", "workflowIds": ["cancellation-permissions"], "regressionTests": ["src/drivers/opencode/opencode-server-driver.test.ts"] },
|
|
{ "id": "STRESS-036", "classification": "workflow_eval", "workflowIds": ["final-response"], "regressionTests": ["src/drivers/acpx/codex-acpx-driver.test.ts"] },
|
|
{ "id": "STRESS-037", "classification": "workflow_eval", "workflowIds": ["cancellation-permissions", "completion-robustness"], "regressionTests": ["src/drivers/acpx/runtime-host.test.ts"] },
|
|
{ "id": "STRESS-038", "classification": "workflow_eval", "workflowIds": ["trace-lineage"], "regressionTests": ["../../server/src/__tests__/provider-trace-store.test.ts"] },
|
|
{ "id": "STRESS-039", "classification": "workflow_eval", "workflowIds": ["trace-lineage"], "regressionTests": ["src/drivers/acpx/runtime-host.test.ts"] },
|
|
{ "id": "STRESS-040", "classification": "explicit_exclusion", "workflowIds": [], "regressionTests": [], "reason": "Campaign control cleanup is an operational hygiene check, not candidate behavior." },
|
|
{ "id": "STRESS-041", "classification": "workflow_eval", "workflowIds": ["final-response", "completion-robustness"], "regressionTests": ["../../server/src/__tests__/heartbeat-running-followup.test.ts"] },
|
|
{ "id": "STRESS-042", "classification": "regression_test", "workflowIds": [], "regressionTests": ["../../server/src/__tests__/openapi-routes.test.ts"], "reason": "Mounted-route documentation parity is deterministic API inventory." },
|
|
{ "id": "STRESS-043", "classification": "regression_test", "workflowIds": [], "regressionTests": ["../../server/src/__tests__/server-startup-feedback-export.test.ts"], "reason": "The HTTP listener test double is ordinary startup integration behavior." },
|
|
{ "id": "STRESS-044", "classification": "regression_test", "workflowIds": [], "regressionTests": ["../../server/src/__tests__/company-skills-service.test.ts"], "reason": "Filesystem path portability is deterministic service behavior." }
|
|
]
|
|
}
|