paperclip/server/src/__tests__
Nicky Leach 6cfc6731d9
test(recovery): fix race condition in workspace validation comment check (#8294)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - The heartbeat service manages agent run lifecycles, including
workspace validation before launching git-sensitive local adapters
> - When workspace validation fails, `escalateStrandedAssignedIssue` in
the recovery service sets the issue to `"blocked"` and then
asynchronously posts a system comment
> - A test added in PR #7644 verifies the comment appears, but queried
the database immediately after `waitForValue` resolved the issue status
— creating a race between the status write and the comment write
> - The test was passing before PR #8284 (pnpm lockfile refresh) but
began failing after, suggesting the lockfile update shifted async
scheduling enough to expose the window
> - This pull request wraps the comment check in `waitForValue`,
consistent with two identical polling patterns already used in the same
test file (lines 1159-1162 and 1232-1235)
> - The benefit is a consistently-passing test that unblocks dependabot
PR #8155 from auto-merging via CI

## Linked Issues or Issue Description

Refs PAP-72. Unblocks PAP-68 (dependabot PR #8155 which has auto-merge
enabled and was blocked by this test failure).

## What Changed

- `server/src/__tests__/heartbeat-process-recovery.test.ts`: replaced
direct `db.select()` + `expect(comments.some(...))` with a
`waitForValue` polling loop that waits until a comment containing
`"workspace failed validation"` appears, then asserts it is truthy
- No production code changed

## Verification

The specific test `blocks a git-sensitive local adapter before launch
when a project-workspace-linked issue is missing its project id`
previously failed with:

```
AssertionError: expected false to be true
src/__tests__/heartbeat-process-recovery.test.ts:1429:94
```

After this fix: the test polls with a 3-second timeout and returns once
the comment row exists. The comment IS written by
`escalateStrandedAssignedIssue` — this was purely a timing issue in the
test assertion. CI on this PR serves as the confirmation run.

## Risks

Low risk — test-only change. No production code is modified. The
`waitForValue` helper is already used 10+ times in the same test file
with the same 3-second timeout; this use follows the identical pattern.

## Model Used

- Provider: Anthropic
- Model: Claude Sonnet 4.6 (`claude-sonnet-4-6`)
- Context window: 200k tokens
- Tool use: yes (file read, bash, edit tools)
- Reasoning mode: extended thinking

## 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
- [ ] I have run tests locally and they pass (CI will verify)
- [x] I have added or updated tests where applicable (this IS the test
fix)
- [x] If this change affects the UI, I have included before/after
screenshots (N/A)
- [x] I have updated relevant documentation to reflect my changes (N/A)
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green (pending CI run)
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
(in progress)
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-06-18 14:52:56 -07:00
..
fixtures [codex] Harden plugin runtime invocation scope (#6547) 2026-05-22 09:16:24 -05:00
helpers test(worktree): address embedded postgres helper review feedback 2026-03-26 11:56:05 -05:00
README.md [codex] Add runtime lifecycle recovery and live issue visibility (#4419) 2026-04-24 15:50:32 -05:00
access-routes-permissions-upgrade.test.ts Improve external agent invite flow (#6183) 2026-05-23 09:09:40 -05:00
access-service.test.ts [codex] Add agent permissions and controls plan (#6386) 2026-05-22 08:12:52 -05:00
access-validators.test.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
acpx-local-adapter-environment.test.ts Add ACPX local adapter runtime (#4893) 2026-04-30 19:57:05 -05:00
acpx-local-execute.test.ts Make ACPX-Claude adapter work seamlessly (PAPA-388) (#6590) 2026-05-23 13:01:27 -07:00
acpx-local-skill-sync.test.ts [codex] Add skills CLI and catalog management (#6782) 2026-05-28 07:33:51 -10:00
activity-routes.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
activity-service.test.ts [codex] Add runtime lifecycle recovery and live issue visibility (#4419) 2026-04-24 15:50:32 -05:00
adapter-model-refresh-routes.test.ts Switch OpenCode to explicit static/local-aware model selection (#5117) 2026-05-03 13:01:34 -07:00
adapter-models.test.ts feat(server): kubernetes execution integration for sandbox-provider plugins (stage 2/3) (#7938) 2026-06-10 21:09:02 -07:00
adapter-registry.test.ts fix(adapters): pass Hermes custom providers as args (#8231) 2026-06-17 11:21:33 -05:00
adapter-routes-authz.test.ts [codex] Stabilize tests and local maintenance assets (#4423) 2026-04-24 15:11:42 -05:00
adapter-routes.test.ts feat(adapters): allow external overrides of built-ins (#7394) 2026-06-07 10:47:01 -07:00
adapter-session-codecs.test.ts fix(gemini-local): treat token-overflow as a fresh-session signal (#4932) 2026-06-10 19:10:29 -07:00
agent-adapter-validation-routes.test.ts Guard codex_local agents from shared OpenAI key (#8272) 2026-06-18 10:41:00 -07:00
agent-auth-jwt.test.ts feat(security): per-company JWT signing keys for multi-tenant isolation (#5864) 2026-06-11 18:00:22 -07:00
agent-cross-tenant-authz-routes.test.ts [codex] Add clear-error agent action (#7695) 2026-06-07 10:33:29 -05:00
agent-instructions-routes.test.ts [codex] Add agent permissions and controls plan (#6386) 2026-05-22 08:12:52 -05:00
agent-instructions-service.test.ts fix: address latest Greptile runtime review 2026-03-23 19:43:50 -05:00
agent-invokability.test.ts [codex] prevent invalid agents from receiving assignments and runs (#7663) 2026-06-06 12:45:57 -05:00
agent-live-run-routes.test.ts [codex] Add agent permissions and controls plan (#6386) 2026-05-22 08:12:52 -05:00
agent-permissions-routes.test.ts fix: read-only agent config/skill endpoints should not require agents:create (#3725) 2026-06-12 10:36:49 -07:00
agent-permissions-service.test.ts [codex] Add teams catalog extraction (#7550) 2026-06-05 12:55:49 -05:00
agent-shortname-collision.test.ts Auto-deduplicate agent shortname on join request approval 2026-03-06 13:54:58 -06:00
agent-skill-contract.test.ts Add unmanaged skill provenance to agent skills 2026-03-18 14:21:50 -05:00
agent-skills-routes.test.ts Guard codex_local agents from shared OpenAI key (#8272) 2026-06-18 10:41:00 -07:00
agent-test-environment-routes.test.ts [codex] Add agent permissions and controls plan (#6386) 2026-05-22 08:12:52 -05:00
agents-service-clear-error.test.ts [codex] Add clear-error agent action (#7695) 2026-06-07 10:33:29 -05:00
app-hmr-port.test.ts [codex] Add agent permissions and controls plan (#6386) 2026-05-22 08:12:52 -05:00
app-private-hostname-gate.test.ts [codex] harden authenticated routes and issue editor reliability (#3741) 2026-04-15 08:41:15 -05:00
app-vite-dev-routing.test.ts [codex] fix worktree dev dependency ergonomics (#3743) 2026-04-15 09:47:29 -05:00
approval-routes-idempotency.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
approvals-service.test.ts Fix approvals service idempotency test 2026-03-10 15:05:19 -05:00
assets.test.ts [codex] Stabilize tests and local maintenance assets (#4423) 2026-04-24 15:11:42 -05:00
attachment-types.test.ts Support video issue attachments 2026-05-30 20:40:09 +00:00
auth-routes.test.ts [codex] Stabilize tests and local maintenance assets (#4423) 2026-04-24 15:11:42 -05:00
auth-session-route.test.ts cloud_tenant: company-scoped tenants, never instance-admin (#7525) 2026-06-11 17:59:32 -07:00
authorization-service.test.ts cloud_tenant: company-scoped tenants, never instance-admin (#7525) 2026-06-11 17:59:32 -07:00
authz-company-access.test.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
aws-secrets-manager-provider.test.ts [codex] Provider vault secrets UX (#6381) 2026-05-19 15:50:23 -05:00
better-auth.test.ts [codex] Add resource membership controls (#6677) 2026-05-25 13:12:41 -05:00
board-chat-route-feature-flag.test.ts feat(ui): NUX rework behind enableConferenceRoomChat experimental flag — capsule onboarding, conference-room chat, unified composer (#8000) 2026-06-11 16:32:55 -05:00
board-claim.test.ts Improve CLI API parity coverage (#6626) 2026-06-02 17:13:29 -07:00
board-mutation-guard.test.ts [codex] Allow cloud tenant import mutations without browser origin (#6378) 2026-05-19 14:25:58 -05:00
body-limits.test.ts [codex] Runtime control-plane fixes (#6380) 2026-05-20 10:37:11 -05:00
bootstrap-claim-routes.test.ts [codex] Add private browser first-admin claim flow (#6755) 2026-05-27 21:15:01 -10:00
budgets-service.test.ts Fix budget incident resolution edge cases 2026-03-16 16:48:13 -05:00
claude-local-adapter-environment.test.ts Harden remote sandbox runtime probes, timeouts, and installs (#5685) 2026-05-11 00:31:54 -07:00
claude-local-adapter.test.ts [codex] Retry max-turn exhausted heartbeats (#5096) 2026-05-03 11:30:48 -05:00
claude-local-execute.test.ts fix: validate session ID as UUID before --resume + error diagnostics (DLD-889) (#1742) 2026-06-09 20:21:10 -07:00
claude-local-skill-sync.test.ts Add unmanaged skill provenance to agent skills 2026-03-18 14:21:50 -05:00
cleanup-removal-service.test.ts [codex] Add local Cloud Upstream sync (#6548) 2026-05-22 09:56:22 -05:00
cli-auth-routes.test.ts Improve CLI API parity coverage (#6626) 2026-06-02 17:13:29 -07:00
cloud-upstreams.test.ts [codex] Add local Cloud Upstream sync (#6548) 2026-05-22 09:56:22 -05:00
codex-local-adapter-environment.test.ts test(codex): move OPENAI_API_KEY stub to beforeEach for all tests 2026-03-24 12:33:11 -07:00
codex-local-adapter.test.ts Add username log censor setting 2026-03-20 08:50:00 -05:00
codex-local-execute.test.ts Add sandbox callback bridge for remote environment API access (#4801) 2026-04-29 16:37:34 -07:00
codex-local-skill-injection.test.ts [codex] Harden create-agent skill governance (#4422) 2026-04-24 14:15:28 -05:00
codex-local-skill-sync.test.ts [codex] Harden create-agent skill governance (#4422) 2026-04-24 14:15:28 -05:00
companies-route-path-guard.test.ts Add company artifacts page (#7621) 2026-06-05 18:11:05 -05:00
companies-service.test.ts fix: Stop archived companies from waking agents (#7478) 2026-06-03 21:07:14 -07:00
company-artifacts-service.test.ts PAP-10440: group artifacts by task stacks (#7654) 2026-06-06 10:22:47 -05:00
company-branding-route.test.ts Add company artifacts page (#7621) 2026-06-05 18:11:05 -05:00
company-portability-routes.test.ts Add company artifacts page (#7621) 2026-06-05 18:11:05 -05:00
company-portability.test.ts Information Architecture + project/agent visual refresh (experimental) (#7543) 2026-06-06 09:17:27 -05:00
company-search-rate-limit-routes.test.ts Add company artifacts page (#7621) 2026-06-05 18:11:05 -05:00
company-search-service.test.ts Add company artifacts page (#7621) 2026-06-05 18:11:05 -05:00
company-skills-catalog-service.test.ts Add referenced last30days catalog entry 2026-06-04 20:01:25 +00:00
company-skills-detail.test.ts [codex] Speed up company skill detail loading (#4380) 2026-04-24 07:37:13 -05:00
company-skills-routes.test.ts Build the Skills Store (#7990) 2026-06-11 14:02:09 -05:00
company-skills-service.test.ts Build the Skills Store (#7990) 2026-06-11 14:02:09 -05:00
company-skills.test.ts fix: parse YAML block scalar skill descriptions (#5046) 2026-06-18 12:01:11 -07:00
company-user-directory-route.test.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
costs-service.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
cursor-local-adapter-environment.test.ts Add cursor sandbox support and fix SSH workspace sync (#4803) 2026-04-29 16:12:06 -07:00
cursor-local-adapter.test.ts Humanize run transcripts across run detail and live surfaces 2026-03-11 10:35:41 -05:00
cursor-local-execute.test.ts Add secrets provider vaults and remote import (#5429) 2026-05-09 18:22:17 -05:00
cursor-local-skill-injection.test.ts feat(cursor): export skill injection helper and document auto-behaviors 2026-03-05 08:35:59 -06:00
cursor-local-skill-sync.test.ts Namespace company skill identities 2026-03-16 18:27:20 -05:00
dashboard-service.test.ts [codex] Harden heartbeat scheduling and runtime controls (#4223) 2026-04-21 12:24:11 -05:00
dev-runner-output.test.ts Guard dev health JSON parsing 2026-04-06 21:23:33 -05:00
dev-runner-paths.test.ts [codex] Add backup endpoint and dev runtime hardening (#4087) 2026-04-20 06:08:55 -05:00
dev-runner-snapshot.test.ts Address dev runner snapshot review feedback 2026-06-01 22:03:51 +00:00
dev-runner-worktree.test.ts [codex] Bundle local branch fixes from PAP-10032 (#6604) 2026-05-25 07:25:26 -05:00
dev-server-status.test.ts [codex] UI and dev ops quality-of-life (#6384) 2026-05-19 15:52:39 -05:00
dev-watch-ignore.test.ts Harden dev-watch excludes for nested UI outputs 2026-03-26 12:35:19 -05:00
docker-entrypoint.test.ts fix: skip gosu when already running as target user (#2908) 2026-06-12 10:33:52 -07:00
document-annotation-routes.test.ts [codex] Guard document comment wake boundaries (#7766) 2026-06-08 11:29:42 -05:00
document-annotations-service.test.ts Make deleted-comment cleanup atomic 2026-06-05 03:56:39 +00:00
documents-service.test.ts [codex] Add issue document locking (#6009) 2026-05-15 08:54:55 -05:00
documents.test.ts feat(issues): add issue documents and inline editing 2026-03-13 21:30:48 -05:00
environment-config.test.ts Generalize sandbox provider core for plugin-only providers (#4449) 2026-04-24 18:03:41 -07:00
environment-execution-target.test.ts Migrate SSH environment callback to bridge (#5116) 2026-05-03 12:43:52 -07:00
environment-live-ssh.test.ts Add secrets provider vaults and remote import (#5429) 2026-05-09 18:22:17 -05:00
environment-probe.test.ts Generalize sandbox provider core for plugin-only providers (#4449) 2026-04-24 18:03:41 -07:00
environment-routes.test.ts fix: resolve secret refs before sandbox draft probes (#8256) 2026-06-18 07:48:09 -07:00
environment-run-orchestrator.test.ts Let adapters declare runtime command spec for remote provisioning (#5141) 2026-05-03 18:35:36 -07:00
environment-runtime-driver-contract.test.ts Add secrets provider vaults and remote import (#5429) 2026-05-09 18:22:17 -05:00
environment-runtime.test.ts Add Cloudflare sandbox provider plugin (#5687) 2026-05-11 07:33:13 -07:00
environment-selection-route-guards.test.ts [codex] Add document annotations and comments (#6733) 2026-05-26 06:41:23 -07:00
environment-service.test.ts fix(environments): partial unique index to dedup managed sandbox rows (#8247) 2026-06-17 16:09:45 -07:00
environment-test-harness.test.ts Add sandbox environment support (#4415) 2026-04-24 12:15:53 -07:00
error-handler.test.ts [codex] Runtime control-plane fixes (#6380) 2026-05-20 10:37:11 -05:00
execution-lock-orphan-cleanup.test.ts fix(heartbeat): clear orphan execution locks on every issue when a run finalizes (#4318) 2026-06-11 16:39:47 -07:00
execution-workspace-policy.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
execution-workspaces-routes.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
execution-workspaces-service.test.ts [codex] Bundle local branch fixes from PAP-10032 (#6604) 2026-05-25 07:25:26 -05:00
express5-auth-wildcard.test.ts [codex] Stabilize tests and local maintenance assets (#4423) 2026-04-24 15:11:42 -05:00
feedback-flush-controller.test.ts [codex] Runtime control-plane fixes (#6380) 2026-05-20 10:37:11 -05:00
feedback-service.test.ts [codex] Add runtime lifecycle recovery and live issue visibility (#4419) 2026-04-24 15:50:32 -05:00
feedback-share-client.test.ts Restore feedback trace export fixes 2026-04-03 15:59:42 -05:00
file-resources.test.ts Add workspace file viewer and artifact links (#7681) 2026-06-09 17:17:43 -05:00
first-admin-claim.test.ts [codex] Add private browser first-admin claim flow (#6755) 2026-05-27 21:15:01 -10:00
forbidden-tokens.test.ts Redact current user in comments and token checks 2026-03-11 22:17:21 -05:00
gemini-local-adapter-environment.test.ts Harden remote sandbox runtime probes, timeouts, and installs (#5685) 2026-05-11 00:31:54 -07:00
gemini-local-adapter.test.ts fix(gemini-local): treat token-overflow as a fresh-session signal (#4932) 2026-06-10 19:10:29 -07:00
gemini-local-execute.test.ts [codex] Retry max-turn exhausted heartbeats (#5096) 2026-05-03 11:30:48 -05:00
gemini-local-skill-sync.test.ts Namespace company skill identities 2026-03-16 18:27:20 -05:00
grok-local-skill-sync.test.ts [codex] Add skills CLI and catalog management (#6782) 2026-05-28 07:33:51 -10:00
health-dev-server-token.test.ts [codex] Add private browser first-admin claim flow (#6755) 2026-05-27 21:15:01 -10:00
health.test.ts [codex] Add private browser first-admin claim flow (#6755) 2026-05-27 21:15:01 -10:00
heartbeat-accepted-plan-workspace-refresh.test.ts [codex] Revert PR #7678 (#7765) 2026-06-08 10:35:58 -05:00
heartbeat-active-run-output-watchdog.test.ts fix(watchdog): suppress repeat alerts when source issue is blocked or evaluation board-closed (#5942) 2026-06-11 22:00:13 -07:00
heartbeat-archived-company-guard.test.ts [codex] prevent invalid agents from receiving assignments and runs (#7663) 2026-06-06 12:45:57 -05:00
heartbeat-comment-wake-batching.test.ts fix: skip same-run self-comments (Path A heartbeat-reopen + Path B implicit-todo move) (#4973) 2026-06-12 00:33:08 -07:00
heartbeat-context-summary.test.ts [codex] Revert PR #7678 (#7765) 2026-06-08 10:35:58 -05:00
heartbeat-dependency-scheduling.test.ts PAPA-430: workspace finalize gates + no-remote-git enforcement (#6969) 2026-05-29 08:25:29 -07:00
heartbeat-issue-liveness-escalation.test.ts [codex] Add workspace diff viewer plugin (#6071) 2026-05-18 08:50:06 -05:00
heartbeat-list.test.ts [codex] Improve agent runtime recovery and governance (#4086) 2026-04-20 06:19:48 -05:00
heartbeat-local-environment.test.ts Improve external agent invite flow (#6183) 2026-05-23 09:09:40 -05:00
heartbeat-lock-release-on-reassignment.test.ts fix(openclaw-gateway): complete and stabilize OpenClaw Gateway integration (#2322) 2026-06-11 23:31:39 -07:00
heartbeat-model-profile.test.ts [codex] Roll up May 17 branch changes (#6210) 2026-05-17 17:15:06 -05:00
heartbeat-plugin-environment.test.ts feat(server): kubernetes execution integration for sandbox-provider plugins (stage 2/3) (#7938) 2026-06-10 21:09:02 -07:00
heartbeat-process-recovery.test.ts test(recovery): fix race condition in workspace validation comment check (#8294) 2026-06-18 14:52:56 -07:00
heartbeat-project-env.test.ts Build the Skills Store (#7990) 2026-06-11 14:02:09 -05:00
heartbeat-retry-scheduling.test.ts [codex] Clarify interrupt handoffs and scoped wake semantics (#7855) 2026-06-09 21:57:21 -05:00
heartbeat-run-log.test.ts [codex] Roll up May 17 branch changes (#6210) 2026-05-17 17:15:06 -05:00
heartbeat-run-summary.test.ts [codex] Add run liveness continuations (#4083) 2026-04-20 06:01:49 -05:00
heartbeat-runtime-skills.test.ts Build the Skills Store (#7990) 2026-06-11 14:02:09 -05:00
heartbeat-runtime-state.test.ts Fix runtime state race, workspace sync, plugin startup, and orphaned leases (#4804) 2026-04-29 16:37:10 -07:00
heartbeat-stale-queue-invalidation.test.ts Improve external agent invite flow (#6183) 2026-05-23 09:09:40 -05:00
heartbeat-start-lock.test.ts [codex] Add runtime lifecycle recovery and live issue visibility (#4419) 2026-04-24 15:50:32 -05:00
heartbeat-timer-wake-session-reset-pf4.test.ts Reset task session on timer-driven wakes (PF-4) (#4838) 2026-06-09 14:16:46 -07:00
heartbeat-workspace-session.test.ts Fix heartbeat task-session reuse when agent model changes (#4195) 2026-06-10 15:40:39 -07:00
heartbeat-zombie-guard.test.ts fix(heartbeat): prevent zombie run coalescing and ensure startup reap completes before timer ticks (#1731) 2026-06-11 21:54:32 -07:00
hire-hook.test.ts fix(adapters): honor paused overrides and isolate UI parser state 2026-04-04 14:04:33 -05:00
http-log-policy.test.ts [codex] Add backup endpoint and dev runtime hardening (#4087) 2026-04-20 06:08:55 -05:00
inbox-dismissals.test.ts Persist non-issue inbox dismissals 2026-04-09 06:16:05 -05:00
instance-database-backups-routes.test.ts [codex] Add backup endpoint and dev runtime hardening (#4087) 2026-04-20 06:08:55 -05:00
instance-settings-routes.test.ts Add workspace file viewer and artifact links (#7681) 2026-06-09 17:17:43 -05:00
instance-settings-service.test.ts feat(ui): NUX rework behind enableConferenceRoomChat experimental flag — capsule onboarding, conference-room chat, unified composer (#8000) 2026-06-11 16:32:55 -05:00
instrumentation.test.ts feat(server): opt-in OpenTelemetry auto-instrumentation (#3735) 2026-06-12 10:44:22 -07:00
invite-accept-existing-member.test.ts [codex] Bundle local branch fixes from PAP-10032 (#6604) 2026-05-25 07:25:26 -05:00
invite-accept-gateway-defaults.test.ts Remove legacy OpenClaw adapter and keep gateway-only flow 2026-03-07 18:50:25 -06:00
invite-accept-replay.test.ts Remove legacy OpenClaw adapter and keep gateway-only flow 2026-03-07 18:50:25 -06:00
invite-create-route.test.ts [codex] Stabilize tests and local maintenance assets (#4423) 2026-04-24 15:11:42 -05:00
invite-expiry.test.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
invite-join-grants.test.ts [codex] Add agent permissions and controls plan (#6386) 2026-05-22 08:12:52 -05:00
invite-join-manager.test.ts Assign invite-joined agents to company CEO 2026-03-06 11:22:24 -06:00
invite-list-route.test.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
invite-logo-route.test.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
invite-onboarding-text.test.ts Improve external agent invite flow (#6183) 2026-05-23 09:09:40 -05:00
invite-summary-route.test.ts [codex] Stabilize tests and local maintenance assets (#4423) 2026-04-24 15:11:42 -05:00
invite-test-resolution-route.test.ts [codex] Add runtime lifecycle recovery and live issue visibility (#4419) 2026-04-24 15:50:32 -05:00
issue-activity-events-routes.test.ts [codex] Add document annotations and comments (#6733) 2026-05-26 06:41:23 -07:00
issue-agent-mutation-ownership-routes.test.ts Keep agent-created follow-ups in run workspace 2026-06-10 21:20:51 -05:00
issue-assigned-backlog-contract-routes.test.ts [codex] prevent invalid agents from receiving assignments and runs (#7663) 2026-06-06 12:45:57 -05:00
issue-attachment-routes.test.ts Allow inline video attachment previews 2026-06-05 03:28:07 +00:00
issue-blocker-attention.test.ts fix: resolve orphan-sweep null-assignee filter regression (#8018) 2026-06-12 09:20:00 -07:00
issue-closed-workspace-routes.test.ts [codex] Add document annotations and comments (#6733) 2026-05-26 06:41:23 -07:00
issue-comment-cancel-routes.test.ts Make deleted-comment cleanup atomic 2026-06-05 03:56:39 +00:00
issue-comment-redaction.test.ts cloud_tenant: company-scoped tenants, never instance-admin (#7525) 2026-06-11 17:59:32 -07:00
issue-comment-reopen-routes.test.ts fix: skip same-run self-comments (Path A heartbeat-reopen + Path B implicit-todo move) (#4973) 2026-06-12 00:33:08 -07:00
issue-continuation-summary.test.ts fix: harden release registry verification against npm lag (#4816) 2026-05-09 22:18:12 -07:00
issue-dependency-wakeups-routes.test.ts [codex] Add document annotations and comments (#6733) 2026-05-26 06:41:23 -07:00
issue-document-restore-routes.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
issue-execution-policy-routes.test.ts [codex] prevent invalid agents from receiving assignments and runs (#7663) 2026-06-06 12:45:57 -05:00
issue-execution-policy.test.ts [codex] Add issue monitor liveness controls (#4988) 2026-05-03 08:58:53 -05:00
issue-feedback-routes.test.ts [codex] Add document annotations and comments (#6733) 2026-05-26 06:41:23 -07:00
issue-goal-fallback.test.ts Seed onboarding project and issue goal context 2026-03-24 11:48:59 -05:00
issue-identifier-routes.test.ts cloud_tenant: company-scoped tenants, never instance-admin (#7525) 2026-06-11 17:59:32 -07:00
issue-list-assignee-filter-routes.test.ts fix: resolve orphan-sweep null-assignee filter regression (#8018) 2026-06-12 09:20:00 -07:00
issue-liveness.test.ts [codex] prevent invalid agents from receiving assignments and runs (#7663) 2026-06-06 12:45:57 -05:00
issue-monitor-scheduler.test.ts Add recovery handoff system notices (#5289) 2026-05-06 06:05:58 -05:00
issue-recovery-actions.test.ts [codex] Runtime control-plane fixes (#6380) 2026-05-20 10:37:11 -05:00
issue-references-service.test.ts Add first-class issue references (#4214) 2026-04-21 10:02:52 -05:00
issue-scheduled-retry-routes.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
issue-stale-execution-lock-routes.test.ts fix(server): adopt stale checkout run ownership (#5413) 2026-06-11 22:03:07 -07:00
issue-telemetry-routes.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
issue-thread-interaction-routes.test.ts [codex] Add checkbox confirmation issue interactions (#7649) 2026-06-06 08:48:43 -05:00
issue-thread-interactions-service.test.ts [codex] Add checkbox confirmation issue interactions (#7649) 2026-06-06 08:48:43 -05:00
issue-tree-control-routes.test.ts Improve CLI API parity coverage (#6626) 2026-06-02 17:13:29 -07:00
issue-tree-control-service-unit.test.ts [codex] Add issue subtree pause, cancel, and restore controls (#4332) 2026-04-23 14:51:46 -05:00
issue-tree-control-service.test.ts [codex] Clarify interrupt handoffs and scoped wake semantics (#7855) 2026-06-09 21:57:21 -05:00
issue-update-comment-wakeup-routes.test.ts [codex] Clarify interrupt handoffs and scoped wake semantics (#7855) 2026-06-09 21:57:21 -05:00
issue-workspace-command-authz.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
issues-checkout-wakeup.test.ts Cut over OpenClaw adapter to strict SSE streaming 2026-03-05 15:54:55 -06:00
issues-goal-context-routes.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
issues-list-query-parsing.test.ts fix(issues): accept array-form ?status= filter and stop crashing on repeated keys (#4628) (#4890) 2026-06-11 21:52:43 -07:00
issues-service.test.ts fix: resolve orphan-sweep null-assignee filter regression (#8018) 2026-06-12 09:20:00 -07:00
issues-user-context.test.ts Normalize derived issue timestamps to avoid 500s 2026-03-06 09:03:27 -06:00
join-request-dedupe.test.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
json-schema-secret-refs.test.ts Generalize sandbox provider core for plugin-only providers (#4449) 2026-04-24 18:03:41 -07:00
llms-routes.test.ts [codex] Stabilize tests and local maintenance assets (#4423) 2026-04-24 15:11:42 -05:00
log-redaction.test.ts Add username log censor setting 2026-03-20 08:50:00 -05:00
logger-tz.test.ts [codex] Harden execution reliability and heartbeat tooling (#3679) 2026-04-14 13:34:52 -05:00
low-trust-red-team-routes.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
monthly-spend-service.test.ts [codex] prevent invalid agents from receiving assignments and runs (#7663) 2026-06-06 12:45:57 -05:00
multilingual-issues-routes.test.ts cloud_tenant: company-scoped tenants, never instance-admin (#7525) 2026-06-11 17:59:32 -07:00
openapi-routes.test.ts feat(ui): NUX rework behind enableConferenceRoomChat experimental flag — capsule onboarding, conference-room chat, unified composer (#8000) 2026-06-11 16:32:55 -05:00
openclaw-gateway-adapter.test.ts Clarify issue-scoped comment wake prompts 2026-04-04 18:14:19 -05:00
openclaw-invite-prompt-route.test.ts [codex] Stabilize tests and local maintenance assets (#4423) 2026-04-24 15:11:42 -05:00
opencode-local-adapter-environment.test.ts Address PR feedback: keep testEnvironment non-destructive, warn on swallowed errors 2026-03-07 15:50:14 -05:00
opencode-local-adapter.test.ts Humanize run transcripts across run detail and live surfaces 2026-03-11 10:35:41 -05:00
opencode-local-skill-sync.test.ts Namespace company skill identities 2026-03-16 18:27:20 -05:00
paperclip-env.test.ts Fix SSH callback URL selection for LAN and private networks (#4799) 2026-04-29 15:56:17 -07:00
paperclip-skill-utils.test.ts [codex] Move maintainer task skills under .agents (#7658) 2026-06-06 10:47:59 -05:00
parse-status-filter.test.ts fix(issues): accept array-form ?status= filter and stop crashing on repeated keys (#4628) (#4890) 2026-06-11 21:52:43 -07:00
permissions-upgrade-boundary-routes.test.ts [codex] Add agent permissions and controls plan (#6386) 2026-05-22 08:12:52 -05:00
pi-local-adapter-environment.test.ts Improve Pi adapter diagnostics 2026-03-14 21:11:06 -05:00
pi-local-execute.test.ts fix(pi-local): prepend installed skill bin/ dirs to child PATH (#4331) 2026-04-23 10:15:10 -05:00
pi-local-skill-sync.test.ts Namespace company skill identities 2026-03-16 18:27:20 -05:00
plugin-access-authorization-host-services.test.ts [codex] Add agent permissions and controls plan (#6386) 2026-05-22 08:12:52 -05:00
plugin-database.test.ts feat(server): kubernetes execution integration for sandbox-provider plugins (stage 2/3) (#7938) 2026-06-10 21:09:02 -07:00
plugin-dev-watcher.test.ts [codex] Improve local plugin development workflow (#5821) 2026-05-12 17:38:24 -05:00
plugin-environment-driver-seam.test.ts Add sandbox environment support (#4415) 2026-04-24 12:15:53 -07:00
plugin-execution-workspace-bridge.test.ts [codex] Add workspace diff viewer plugin (#6071) 2026-05-18 08:50:06 -05:00
plugin-install-autobuild.test.ts Auto-build bundled plugins on install (#8254) 2026-06-17 22:39:55 -07:00
plugin-lifecycle-restart.test.ts [codex] Runtime control-plane fixes (#6380) 2026-05-20 10:37:11 -05:00
plugin-local-folders.test.ts [codex] Roll up May 17 branch changes (#6210) 2026-05-17 17:15:06 -05:00
plugin-managed-agents.test.ts Expand plugin host surface (#5205) 2026-05-05 07:42:57 -05:00
plugin-managed-routines.test.ts Expand plugin host surface (#5205) 2026-05-05 07:42:57 -05:00
plugin-managed-skills.test.ts [codex] Add LLM Wiki plugin host support (#5597) 2026-05-10 07:34:12 -05:00
plugin-orchestration-apis.test.ts [codex] Add workspace diff viewer plugin (#6071) 2026-05-18 08:50:06 -05:00
plugin-routes-authz.test.ts Auto-build bundled plugins on install (#8254) 2026-06-17 22:39:55 -07:00
plugin-scoped-api-routes.test.ts Expand plugin host surface (#5205) 2026-05-05 07:42:57 -05:00
plugin-sdk-orchestration-contract.test.ts Expand plugin host surface (#5205) 2026-05-05 07:42:57 -05:00
plugin-sdk-testing.test.ts Redact deleted issue comments 2026-06-05 03:20:46 +00:00
plugin-secrets-handler.test.ts Add secrets provider vaults and remote import (#5429) 2026-05-09 18:22:17 -05:00
plugin-telemetry-bridge.test.ts Add plugin telemetry bridge capability 2026-04-02 10:47:29 -05:00
plugin-tenant-isolation.test.ts feat(security): plugin tables get company_id FK for tenant isolation (#5865) 2026-06-12 10:17:19 -07:00
plugin-tool-dispatcher-pluginDbId.test.ts fix(plugin-tool-dispatcher): propagate pluginDbId so worker.isRunning resolves (#5671) 2026-06-03 19:13:21 -07:00
plugin-worker-manager.test.ts [codex] Harden plugin runtime invocation scope (#6547) 2026-05-22 09:16:24 -05:00
private-hostname-guard.test.ts [codex] Harden execution reliability and heartbeat tooling (#3679) 2026-04-14 13:34:52 -05:00
productivity-review-service.test.ts Add recovery handoff system notices (#5289) 2026-05-06 06:05:58 -05:00
project-goal-telemetry-routes.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
project-icon-persistence.test.ts Information Architecture + project/agent visual refresh (experimental) (#7543) 2026-06-06 09:17:27 -05:00
project-list-metrics.test.ts Information Architecture + project/agent visual refresh (experimental) (#7543) 2026-06-06 09:17:27 -05:00
project-routes-env.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
project-shortname-resolution.test.ts feat: deduplicate project shortnames on create and update 2026-03-07 08:59:34 -06:00
qa-routine-secrets-e2e.test.ts [codex] Add routine env secrets support (#6212) 2026-05-17 16:30:34 -05:00
quota-windows-service.test.ts feat(costs): add billing, quota, and budget control plane 2026-03-16 15:11:01 -05:00
quota-windows.test.ts fix: Anthropic subscription quota always shows 100% used (#3589) 2026-04-15 06:44:26 -05:00
recovery-classifiers.test.ts [codex] Add issue monitor liveness controls (#4988) 2026-05-03 08:58:53 -05:00
recovery-stale-issue-lock-sweep.test.ts Clear stale checkoutRunId on run finalization and add backstop sweeper (#6008) 2026-06-10 09:33:21 -05:00
redact-sensitive.test.ts fix(logger): redact passwords and tokens from HTTP error log lines (#8013) 2026-06-11 17:09:32 -07:00
redaction.test.ts [codex] Roll up May 17 branch changes (#6210) 2026-05-17 17:15:06 -05:00
resource-memberships-routes.test.ts [codex] Add resource membership controls (#6677) 2026-05-25 13:12:41 -05:00
routine-run-telemetry.test.ts Address Greptile telemetry review comments 2026-04-03 14:11:11 -05:00
routines-e2e.test.ts [codex] Stabilize tests and local maintenance assets (#4423) 2026-04-24 15:11:42 -05:00
routines-routes.test.ts Add routine revision history and restore flow (#5285) 2026-05-05 11:54:52 -05:00
routines-service.test.ts [codex] prevent invalid agents from receiving assignments and runs (#7663) 2026-06-06 12:45:57 -05:00
run-continuations.test.ts Guard cheap recovery model usage (#6371) 2026-05-19 13:46:02 -05:00
run-liveness.test.ts [codex] Add runtime lifecycle recovery and live issue visibility (#4419) 2026-04-24 15:50:32 -05:00
runtime-api.test.ts Fix SSH callback URL selection for LAN and private networks (#4799) 2026-04-29 15:56:17 -07:00
sandbox-provider-runtime.test.ts Generalize sandbox provider core for plugin-only providers (#4449) 2026-04-24 18:03:41 -07:00
secret-provider-registry.test.ts Add secrets provider vaults and remote import (#5429) 2026-05-09 18:22:17 -05:00
secrets-routes.test.ts [codex] Provider vault secrets UX (#6381) 2026-05-19 15:50:23 -05:00
secrets-service.test.ts fix: resolve secret refs before sandbox draft probes (#8256) 2026-06-18 07:48:09 -07:00
server-startup-feedback-export.test.ts feat(server): kubernetes execution integration for sandbox-provider plugins (stage 2/3) (#7938) 2026-06-10 21:09:02 -07:00
setup-supertest.ts [codex] Stabilize tests and local maintenance assets (#4423) 2026-04-24 15:11:42 -05:00
shared-telemetry-events.test.ts feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
sidebar-preferences-routes.test.ts [codex] Stabilize tests and local maintenance assets (#4423) 2026-04-24 15:11:42 -05:00
skills-catalog-service.test.ts Add referenced last30days catalog entry 2026-06-04 20:01:25 +00:00
source-trust.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
static-index-html.test.ts [codex] Bundle local branch fixes from PAP-10032 (#6604) 2026-05-25 07:25:26 -05:00
storage-local-provider.test.ts Address artifact PR review feedback 2026-05-30 20:51:46 +00:00
teams-catalog-install-no-overrides.test.ts [codex] Add teams catalog extraction (#7550) 2026-06-05 12:55:49 -05:00
teams-catalog-routes.test.ts [codex] Add teams catalog extraction (#7550) 2026-06-05 12:55:49 -05:00
teams-catalog-service.test.ts [codex] Add teams catalog extraction (#7550) 2026-06-05 12:55:49 -05:00
telemetry-client-flush.test.ts fix: harden heartbeat and adapter runtime workflows 2026-04-10 22:26:21 -05:00
trust-preset-resolver.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
trust-proxy.test.ts feat(server): TRUST_PROXY supports CIDR list + named subnets (supersedes #3729) (#5872) 2026-06-12 10:37:55 -07:00
ui-branding.test.ts Add worktree UI branding 2026-03-13 11:12:43 -05:00
user-profile-routes.test.ts [codex] Add structured issue-thread interactions (#4244) 2026-04-21 20:15:11 -05:00
vite-html-renderer.test.ts [codex] Add backup endpoint and dev runtime hardening (#4087) 2026-04-20 06:08:55 -05:00
work-products.test.ts Address remaining Greptile workspace review 2026-03-17 10:12:44 -05:00
workspace-runtime-routes-authz.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
workspace-runtime-service-authz.test.ts Add low-trust review containment (#7530) 2026-06-05 16:48:02 -05:00
workspace-runtime.test.ts Add workspace file viewer and artifact links (#7681) 2026-06-09 17:17:43 -05:00
worktree-config.test.ts [codex] Bundle local branch fixes from PAP-10032 (#6604) 2026-05-25 07:25:26 -05:00

README.md

Server Tests

Server tests that need a real PostgreSQL process must use ./helpers/embedded-postgres.ts instead of constructing embedded-postgres directly.

The shared helper creates a throwaway data directory and a reserved-safe loopback port for each test database. This protects the live Paperclip control-plane Postgres from server vitest runs; see PAP-2033 for the incident that introduced this guard.