Files
PaperClipAI/tests
DottaandPaperclip 630ed6624c test(e2e): add verified dependency continuation QA (#18901)
## Thinking Path

> - Paperclip lets people manage work assigned to AI agents.
> - Task dependencies must hold assigned work until its blockers are
complete.
> - The reusable Product E2E set needs a browser journey for that full
path.
> - The journey must verify saved records, automatic wake identity, and
the result after reload.
> - The original implementation passed staging QA, but its automated
review workspace has an export hold.
> - This replacement integrates current master and earns a separate
normal review while preserving the original attempt.

## Linked Issues or Issue Description

Refs #18789, the original dependency QA pull request. Related: #7542 and
#17524 for dependency wake and explicit resume behavior; #18782 for the
merged lifecycle registration layout.

**What existing behavior does this improve?**

The Product E2E catalog can verify the complete blocked-task
continuation path against a configured native Cloud target.

**Current behavior**

The main catalog lacks this full browser journey. The original PR's
automated review task has a retained workspace export hold
(`native_workspace_sync_out_retry_exhausted`), with neither Retry nor
Continue available. Its task, files, checks, and failed export attempts
remain preserved.

**Proposed behavior**

Add the same independently checked `task-dependency-resume` journey
through this replacement. Its new commit normally merges the actual
fetched master `4e29f001396c9fc76075850165ccfa3a6743e3ef` into verified
source `e53dd51407b901b14bd582eeb2071fabe6955d9d`. That integration
contains 39 real upstream path updates. The replacement must pass fresh
CI and automated review on its own head.

**Reason and benefit**

Daily QA can detect premature work, a missing or duplicate continuation,
and a result from the wrong run. A separate review workspace lets the
normal review process inspect the current integration while the original
held workspace stays intact.

**Breaking changes**

The change adds an explicit journey. Existing journeys and their
registrations remain present.

## What Changed

- Add a browser journey that creates a human-owned blocker and dependent
task, saves their relation, selects Blocked, and assigns the configured
native agent.
- Require a measured ten-second blocked wait, a board-owned blocker
completion, and exactly one automatic successful native run.
- Independently verify the saved wake source and blocker identity,
configured provider/model/environment, committed native phase, document
revision authorship, and reloaded result.
- Return `unsupported` before observations or task creation when the
native provider or model identity is missing or blank.
- Attempt both evidence writes, preserve an existing exact error object
and outcome, and fail otherwise successful work when required evidence
cannot be saved.
- Grade runtime identity, document authorship, reload visibility, and
retained history from their own evidence bound to the same company,
task, agent, and run. All eight checks remain required.
- Keep the random review reference in the blocker description. Save
allowlisted private observations and read failures through the existing
evidence pipeline.
- Register the case at the distinct dependency anchors in the catalog,
types, checks, source hash, dispatcher, features, and documentation.

The delta against fetched master is exactly the original 15 QA paths.
The fixture, contract tests, shared registrations, and dispatch remain
unchanged. The browser actions and observations are byte-identical to
`d41558b5`; only evidence finalization changes in that flow. Six
shared-file AST comparisons still match fetched master after removing
only the dependency registrations. All upstream integration changes
remain preserved.

## Verification

Prior acceptance remains bound to its actual source:

- [Staging QA run
41731870131](https://pages.paperclip.ing/evals-qa-smoke-41731870131-1/)
passed all eight checks and all five phases, with closed cleanup, on
`dc9ea42d46d3015c010d0532b48e0da973d3611a`.
- [Original full CI run
41745149524](https://github.com/paperclipai/paperclip/actions/runs/41745149524)
passed on `e53dd51407b901b14bd582eeb2071fabe6955d9d`: 48 successful jobs
and one skip on attempt 1.
- The original failed staging result and the original held review remain
intact. These prior passes are not new checks for this replacement.

Passed locally on the current replacement source with Node 24.22.2 and
pinned pnpm 9.15.4:

- One complete `install --frozen-lockfile --ignore-scripts`, followed by
the maintained `node scripts/link-plugin-dev-sdk.mjs` for links inside
this checkout.
- `node scripts/ensure-plugin-build-deps.mjs` and `pnpm --filter
@paperclipai/db run build`.
- `node scripts/typecheck-test-projects.mjs --low-memory
tests/runner-e2e`, including the current Runner TypeScript build, fresh
server declarations, and E2E typecheck.
- 239 focused controls across eight files. These cover
missing/null/empty/blank execution identity, real filesystem write
failures, synchronous writer failures, frozen original errors, and
independent defect attribution.
- 5,302 comparisons against the prior grader, with zero aggregate
acceptance changes or new throws. The sealed actual staging observations
from run 41731870131 still produce the same eight passing checks. This
is finite calibration of retained evidence, not a new staging run.
- Credential-free discovery: 22 unique cases, including dependency and
lifecycle.
- Source-preservation checks and whitespace checks for both the normal
integration and the replacement delta.

The focused command is:

```sh
node node_modules/vitest/vitest.mjs run --config tests/runner-e2e/vitest.config.ts tests/runner-e2e/product-journeys/task-dependency-resume-evidence.test.ts tests/runner-e2e/product-journeys/task-dependency-resume.test.ts tests/runner-e2e/product-journeys/task-dependency-resume-contract.test.ts tests/runner-e2e/product-journeys/contracts.test.ts tests/runner-e2e/product-journeys/observation-read.test.ts tests/runner-e2e/catalog.test.ts tests/runner-e2e/journey-features.test.ts
```

The old generated cache failed current-source equality and was not
copied. Canonical current outputs were built and sealed with their input
hashes, including CLI, UI, and provider inputs. No Rust build, QA
dispatch, model call, or action on the held workspace was performed for
this replacement.

Review follow-up: the first replacement head
`b4408c5732e1800f7ccf66c639cf382b5ff2f01a` passed full CI run
[41749940687](https://github.com/paperclipai/paperclip/actions/runs/41749940687),
with 48 successful jobs and one skip. The native review then found the
missing execution-identity preflight. The preflight now rejects that
setup before work. Completed current-head checks are recorded below.

The current E2E typecheck reused the same canonical declarations only
after all 11,273 build inputs, two installed toolchain files, and 6,747
generated files matched their saved hashes. The five changed case files
are outside that build-input set. One sandbox test run passed 216
controls and lacked the report subprocess output. A direct `tsx`
diagnostic confirmed a temporary pipe `listen EPERM`. The unchanged 217
controls then passed with ordinary local IPC permissions. Both results
remain recorded.

The `d41558b5807e609032bbadddb103d6b0a7db4a12` attempt
[41753398775](https://github.com/paperclipai/paperclip/actions/runs/41753398775)
is retained: 45 successful jobs, one skip, two failed server shards, and
a failed aggregate. The runtime readiness case refused connections
within its ten-second window; the issue-deadline and large repository
cases hit their existing test limits. Their causes remain unknown. A
source-matched Linux CI run executed and passed all three cases, and one
unchanged local runtime case passed. No timeout or assertion changed and
no old-head diagnostic recheck was issued.

The native review then identified error masking during evidence
persistence and cumulative diagnostic flags. The current head fixes
those two owned-case issues. Its completed current-head checks are
recorded below. Seventeen of twenty new regression controls failed
before these fixes; all now pass. Two additional controls exercise
synchronous writer failures. Both original review and CI evidence remain
intact.

The eight required checks, one-run limit, 500-cent configured budget,
and bounded ten-second observation are unchanged. Fresh full CI,
current-head Greptile 5/5 with no open findings, and every actual review
context must complete before merge. Prior statuses are not copied or
overridden.

Current-head verification is complete for
`d9bc055f1f6609463679dc78fdcb96034d2c3727`:

- [Full CI run
41758005698](https://github.com/paperclipai/paperclip/actions/runs/41758005698),
attempt 2, completed successfully at 02:26:19 UTC on November 4: 48
successful jobs and one skip.
- Attempt 1 lost one exact Spot runner. AWS confirmed
`Server.SpotInstanceTermination` and `instance-terminated-no-capacity`;
its log recorded the shutdown. That failed job and the failed aggregate
remain preserved.
- One normal failed-jobs recheck ran only the interrupted static checks
(02:19:13–02:25:54 UTC) and aggregate (02:26:13–02:26:18 UTC). The other
46 successful start/finish pairs remained unchanged. The skipped
selector was not an execution.
- Greptile and Paperclip Review both scored this exact head 5/5. There
are no unresolved review findings.

## Risks

- The staging pass remains attributed to `dc9ea42`; final admission must
retain that source provenance and the current preservation proof.
- The case uses one paid work run when executed. Agent setup usage
remains separate from task-run accounting.
- The ten-second blocked observation proves a finite wait. Missing,
incomplete, foreign, premature, or duplicate evidence fails the
independent checks.
- The original held workspace still needs its own disposition. This PR
leaves it preserved for its owner.

## Model Used

OpenAI GPT-6 through Codex, with reasoning, code editing, and code
execution. The exact model ID and context-window size are not exposed in
this session.

## 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)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-11-03 20:35:43 -06:00
..