Skip to content

test: repair cross-server handoff registration and isolate the app SDK smoke - #4375

Merged
yomgui merged 4 commits into
devfrom
ci/register-cross-server-handoff-spec
Sep 3, 2026
Merged

yomgui merged 4 commits into
devfrom
ci/register-cross-server-handoff-spec

Conversation

@yomgui

@yomgui yomgui commented Sep 3, 2026

Copy link
Copy Markdown
Member

Why

dev is red for every PR since #4054 (3e425fa). It added evals/specs/cross-server-handoff-atomic-commit.e2e.test.ts without registering it, so the PR lane fails two governance specs:

  • spec-impact.test.ts › every E2E spec is mapped to an implementation contract or explicitly allowlisted → E2E specs missing a contract or unmapped reason: evals/specs/cross-server-handoff-atomic-commit.e2e.test.ts
  • spec-quarantine.test.ts › the enabled E2E set equals the evidence-backed inventory → expected [ …(38) ] to deeply equal [ …(37) ]

Control (clean origin/dev @ 3e425fa, same command): both fail identically. Seen first on #4373's openwork-tests on both runners.

What

Verification

pnpm evals:pr specs/spec-impact.test.ts specs/spec-quarantine.test.ts
  Test Files 2 passed (2) · Tests 9 passed (9) · exit 0

Lane: local (governance specs; no runtime). Verdict: Passed.

…ct snapshot and trusted inventory

#4054 added evals/specs/cross-server-handoff-atomic-commit.e2e.test.ts
without mapping it, so the PR lane on dev fails two governance specs for
every PR:
- spec-impact: "every E2E spec is mapped to an implementation contract or
  explicitly allowlisted"
- spec-quarantine: "the enabled E2E set equals the evidence-backed
  inventory" (38 vs 37)

Map it to desktop.onboarding-cloud-auth (which already owns
den-auth-provider.tsx and forced-signin-page.tsx), add den-handoff.ts to
that contract's implementation, and list the spec in expectedEnabled.
Control: the same two specs fail identically on a clean origin/dev
(3e425fa) checkout.
@vercel

vercel Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Sep 3, 2026 11:32pm UTC
3 Skipped Deployments
Project Deployment Actions Updated
openwork-den Ignored Ignored Preview Sep 3, 2026 11:32pm UTC
openwork-diagnostics Ignored Ignored Preview Sep 3, 2026 11:32pm UTC
openwork-landing Ignored Ignored Preview Sep 3, 2026 11:32pm UTC

diff-warden[bot]
diff-warden Bot previously approved these changes Sep 3, 2026

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (1ab90db7297cc112bb314a86ebb32e486bf678d3). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

The same newly added e2e spec also broke the eval-runner layer ratchet by
importing @openwork/behaviors and @openwork/hosts directly. Re-export its
four required runtime helpers from @openwork/testkit and import all eval
primitives and types through that package. This removes the two new
specs-use-testkit-only violations instead of expanding the 206-entry known
violation baseline.

Proof: pnpm test:eval-runner passes 225/225; lint:layers reports zero new
dependency violations.
@yomgui

yomgui commented Sep 3, 2026 •

Copy link
Copy Markdown
Member Author

Test evidence — the-app-sdk-smoke-suite-isolates-each-opencode-process-and-completes — ✅ passed

✅ passed · 1 expectations passed · 0 failed · 0 pending

verdict passed · 0 user observations · 0 probes · steps 0/0

ℹ️ ASSERTION — 1. Every core SDK smoke script receives isolated OpenCode state

The exact app test:e2e command completes core health/path/session/prompt/todo/SSE, session switching, filesystem operations, and the browser-entry project command with no error report.

  • ✅ PASS Every core SDK smoke script receives isolated OpenCode state — The exact app test:e2e command completes core health/path/session/prompt/todo/SSE, session switching, filesystem operations, and the browser-entry project command with no error report.

Test run created 2026-09-03T23:31:42.790Z · Source: evals/results/test-runs/2026-09-03T23-31-42-790Z-the-app-sdk-smoke-suite-isolates-each-opencode-process-and-completes/test-run.json · Repro: pnpm --dir evals artifacts:publish -- --pr 4375 --test-run 2026-09-03T23-31-42-790Z-the-app-sdk-smoke-suite-isolates-each-opencode-process-and-completes

diff-warden[bot]
diff-warden Bot previously approved these changes Sep 3, 2026

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (ab11874ef8b33107056917ed161186442f0bec8e). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

The app SDK smoke inherited the runner's real OpenCode database, plugins,
MCPs, and project config even though it only verifies core SDK calls. On both
CI runners /global/health waited five minutes on unrelated setup, then
path.get hit a vanished process; rerunning reproduced it exactly.

Give this one smoke process a temporary database and minimal config, disable
external setup, and remove the temp directory after close. A PR-lane witness
runs the real script and asserts health, path.get, session operations, and
SSE all complete without an error step. Locally it completes in 4.6 seconds
instead of failing after five minutes.
@yomgui yomgui changed the title test(evals): register the cross-server handoff e2e spec in the contract snapshot and trusted inventory test: repair cross-server handoff registration and isolate the app SDK smoke Sep 3, 2026
@yomgui

yomgui commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

Follow-up after CI diagnosis:

  • First run: Run eval runner unit tests failed because the new handoff spec imported @openwork/behaviors and @openwork/hosts directly. Fixed by routing control, evalIn, relaunchDesktop, electronProfilePaths, and types through @openwork/testkit; pnpm test:eval-runner now passes 225/225 with zero new layer violations.
  • Attempts 1 and 2 then reached Run e2e tests and failed identically on Linux + macOS: OpenCode health waited five minutes, then path.get returned fetch failed. apps/app/scripts/e2e.mjs inherited the runner's real OpenCode DB/config/plugins/MCPs even though it only verifies core SDK calls. It now uses a temporary DB and minimal config, cleans up after close, and completes health/path/session/prompt/todo/SSE in 4.6–4.8 s locally.
  • New head-matching proof: pnpm evals:pr specs/app-sdk-smoke-isolation.test.ts — 1 passed / 0 failed / 0 skipped, published above.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (633b4a5a8a3be6ed67875635d64aee1360611bbe). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@yomgui
yomgui disabled auto-merge September 3, 2026 23:19
@yomgui

yomgui commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

Closing per request. Note: dev's openwork-tests lane remains red for every PR (spec-impact / spec-quarantine) until the cross-server-handoff spec from #4054 is registered.

@yomgui yomgui closed this Sep 3, 2026
@yomgui
yomgui deleted the ci/register-cross-server-handoff-spec branch September 3, 2026 23:20
@yomgui
yomgui restored the ci/register-cross-server-handoff-spec branch September 3, 2026 23:28
@yomgui yomgui reopened this Sep 3, 2026
@yomgui
yomgui enabled auto-merge (squash) September 3, 2026 23:28
diff-warden[bot]
diff-warden Bot previously approved these changes Sep 3, 2026

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (633b4a5a8a3be6ed67875635d64aee1360611bbe). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

The first isolated script passed in CI, but session-switch then inherited the
runner's real config and failed after the same five-minute wait. Move the
hermetic defaults into spawnOpencodeServe so every core smoke process gets a
temporary database and minimal config. browser-entry opts out of pure config
because it deliberately tests a project command, while retaining the private
database. Cleanup runs even when the child exits early.

The agent-first witness now executes the exact app test:e2e package command:
core SDK calls, session switching, filesystem operations, and browser-entry.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (287ae8a8bfb62b6e337fccc0b08e1b5e516af442). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@yomgui
yomgui merged commit 4041e92 into dev Sep 3, 2026
26 checks passed

This branch was successfully deployed

4 active (3 outdated) deployments
Preview – openwork-app — 287ae8a8 Deployed Sep 3, 2026 by vercel[bot]
Preview – openwork-landing — 1ab90db7 Deployed Sep 3, 2026 by vercel[bot]
Preview – openwork-den — 1ab90db7 Deployed Sep 3, 2026 by vercel[bot]
Preview – openwork-diagnostics — 1ab90db7 Deployed Sep 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant