Skip to content

fix(app): preserve the v2 sessionless first prompt - #4777

Merged
yomgui merged 6 commits into
devfrom
fix/v2-sessionless-first-send
Sep 10, 2026
Merged

yomgui merged 6 commits into
devfrom
fix/v2-sessionless-first-send

Conversation

@yomgui

@yomgui yomgui commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Current revision — CI advisory addressed

Current head: c86bc3c72713ee3a0cd11f4459d43b1334966322.

Addressed V2L-CBB (medium, spec-provenance-review): require explicit OPENWORK_EVAL_ENGINE, prefix each test verdict with v1/v2, and assert the live native engine-routing status before typing. No app or Warden-policy change in this follow-up commit.

  • Omitted engine: named command returns exit 2 / Incomplete, 0 passed and 1 skipped, rather than a false v2 pass. This negative guard check is not counted as a passing journey.
  • Final-head explicit v2 and v1 journeys: 1 passed / 0 failed / 0 skipped each.
  • Final-head v1 instant-send journey: 1 passed / 0 failed / 0 skipped.
  • App typecheck, 64 targeted unit tests, 13 catalog tests, 831 browser callback checks, and scoped eval typecheck passed again.
  • Final bare Warden run cdbda42d (2026-09-10T14:54:50Z): exit 0, all four expected skills completed, no findings/skipped files. Before/after refs unchanged: HEAD c86bc3c7…, origin/dev 326ff094…. Repeated because origin/dev moved during the preceding local review. Private logs remain private.
  • The current combined test-evidence comment contains the three matching final-head records. Earlier proof below is retained as historical provenance.
  • The review-machinery human-approval guard remains intact; no admin override, removal of coverage, or self-approval.

Problem

With v2 selected, clicking an enabled Run task on #/workspace/<id>/session creates and opens a session and clears the composer, but never sends the prompt. The new thread stays at “Try one of these” and its native message list stays empty. This is not #4757's disabled first-snapshot send gate.

Root cause and evidence

createRouteSession resolves the owning server's engine and creates a v2 session, but the hero previously keyed its submitted composer snapshot using the original workspace endpoint (.../opencode). SessionSurface looks for the scoped payload using its routed endpoint (.../opencode2). Those keys never match. The empty continuation is correctly transferred; the submitted snapshot is stranded under the wrong key, so auto-send never runs. This is an app handoff defect, not an engine defect.

  • Journey written before the app fix. Unfixed source at 634df629a919db504e27d0f00962dc772344e42a: v2 failed / v1 passed, with identical fixture and assertions. Latest unfixed v2 run captures both the missing thread prompt and native HTTP 200 body {"data":[],"cursor":{"previous":null,"next":null}} after 20 seconds.
  • Temporary read-only CDP/Vite witness on the unfixed app: legacyMark=false, v1ScopedMark=true, v2ScopedMark=false; only the v1-keyed payload contained the submitted prompt. The v1 control had consumed its mark. Diagnostic imports were removed; the committed journey uses no probe.eval.
  • Separately supplied packaged-Linux evidence, not rerun by this PR owner: actual public 0.18.46 and packaged dev 4e634905e each failed sessionless first-send 3/3, while their existing-session controls passed. Packaged dev 07bdea2f1 subsequently failed 1/1 with its control passing 1/1. All used measured v2 beta-19086 SHA-256 5a8c0975a7740e20fd29b4ee59e5499e50fd98715798bb151128f5e7aaa0e750. Those report/package/evidence trees remain untouched. These are historical baselines, not a claim that this fix has shipped or that a fixed Linux package was tested.

Fix

  • Return the resolved engine endpoint alongside the created session through createRouteSessionOnEngine; keep the existing session-only wrapper for other callers.
  • Use that returned endpoint when scoping the hero handoff. No extra engine request, key normalization, v1 fallback, or change to the consumer's isolation guards.
  • Add the missing sessionless journey on top of workspaceWorld, register local placement, wait for an enabled Run task, and assert native + visible prompt, cleared composer, reply, and exactly one new session. Native body parsing follows the app's v1/v2 adapter shapes.
  • Extend existing workspace route unit coverage to assert the returned endpoint and that the workspace endpoint is not mutated.
  • Raise Warden's file-line scan limit from the default 3,000 to 5,000: otherwise it silently skips the critical session-route.tsx. All skills and fail policies remain enabled; no .github/ changes.

Proof

Initial validated source-built head: ed9ed79f959f7516c6392c9877f2587432414896, integrated dev pin 7d5097d4258da3c8568d0735712ea47c6c2fb482 (superseded by the current revision above). Isolated local Electron lane explicitly requested; fresh profiles and synthetic loopback provider, no production service work. Root and evals/ installed with pnpm install --frozen-lockfile. Node 24.20.0 / pnpm 11.4.0 / Bun 1.4.0.

Command Exit Result
pnpm evals:e2e v2-sessionless-first-send --local --engine v2 0 1 passed, 0 failed/skipped
pnpm evals:e2e v2-sessionless-first-send --local --engine v1 0 1 passed, 0 failed/skipped
pnpm evals:e2e workspace-new-task-hit-target --local --engine v1 0 1 passed, 0 failed/skipped
pnpm --filter @openwork/app typecheck 0 Passed
bun test tests/composer-*.test.ts tests/opencode-session-native.test.ts (in apps/app) 0 39 passed, 0 failed
bun test tests/workspace-routes.test.ts (in apps/app) 0 24 passed, 0 failed
bun test tests/composer-focus-continuity.test.tsx (in apps/app) 0 1 passed, 0 failed
node --test evals/scripts/journey-ci.test.mjs 0 13 passed, 0 failed/skipped
pnpm --dir evals check:browser 0 831 callbacks checked
Scoped eval typecheck, including the new spec and worlds 0 No diagnostics
git diff --check 0 Passed

The three final-head journey records are published together in the test-evidence comment. Assertions decide the verdict, not screenshots.

Full eval baseline debt and iteration accounting

These checks remain red and are not presented as clean: full eval typecheck (exit 2, 366 diagnostics), spec-layer typecheck (exit 2, 9 diagnostics), channel ratchet (exit 1, 19 violations), boundary ratchet (exit 1, 14 violations). Each exact command was rerun on pristine source 634df629a; complete normalized diagnostic logs match, accounting for inserted world-helper line offsets. No diagnostic intersects this PR's changed lines. The new spec has zero raw channel escapes and crosses the product boundary.

The extra bun test tests/composer-editable-on-snapshot-error.test.tsx check fails (0 passed / 1 failed) with Platform context is missing; the same standalone command fails identically on clean 634df629a. No unrelated test repairs are included.

For the scoped typecheck, create a temporary evals/tsconfig.sessionless-check.json, run pnpm --dir evals exec tsc -p tsconfig.sessionless-check.json, then remove the temporary config:

{
  "extends": "./tsconfig.primitives.json",
  "compilerOptions": { "lib": ["es2024", "dom", "dom.iterable", "esnext.disposable"] },
  "include": ["packages/cdp/src/**/*.ts", "packages/test-evidence/src/**/*.ts", "packages/testkit/src/**/*.ts", "worlds/**/*.ts", "specs/v2-sessionless-first-send.e2e.test.ts"]
}

An initial fixed-v2 run exposed that raw native v2 uses type/content, unlike the app-mapped info/parts; the parser was corrected from the adapter and the unfixed control rerun. One pre-final v1 run lost typing before the click during the fixture's scheduled provider-setup reload; the world now waits for a changed performance.timeOrigin and mounted controls. Both unfixed controls and final-head journeys were rerun after that setup fix. One final pre-test invocation exited 254 when concurrent pnpm auto-installs raced on a Rollup symlink; serialized frozen installs succeeded and all journeys then ran sequentially. Historical failures remain retained, not counted as passes.

Initial Warden review (historical; current review above)

Final bare pnpm warden:check: exit 0, all four expected skills completed, no findings and no skipped files. Security and confidentiality each reviewed all 7 changed files, provenance reviewed both eval files, desktop/Den sync reviewed all 3 app files including both session-route.tsx chunks.

  • Run: 88eb53f0 (2026-09-10T05:04:34Z).
  • Before/after refs identical: HEAD ed9ed79f959f7516c6392c9877f2587432414896; origin/dev 7d5097d4258da3c8568d0735712ea47c6c2fb482.
  • Expected = actual: diff-security-review, confidentiality-review, spec-provenance-review, desktop-den-sync-review.
  • Finding IDs / disposition: none; full changed-file coverage reviewed with no blockers. Private model logs are not attached.
  • Earlier missing-credential and file-limit runs were Incomplete, not clearance. Credentials were injected process-locally; the line-limit coverage gap was fixed before the final run. Local review does not substitute for GitHub Warden clearance.

No release, customer messages, or changes in the external evidence worktrees.

@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

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

4 Skipped Deployments
Project Deployment Actions Updated
openwork-app Ignored Ignored Preview Sep 10, 2026 2:54pm UTC
openwork-den Ignored Ignored Preview Sep 10, 2026 2:54pm UTC
openwork-diagnostics Ignored Ignored Preview Sep 10, 2026 2:54pm UTC
openwork-landing Ignored Ignored Preview Sep 10, 2026 2:54pm UTC

@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Warden review summary — Clear

Native findings: 0. Blocking policy matches before consolidation: 0. Full finding text remains in Warden's native checks and review threads. This comment retains only native IDs, severity, skill attribution, and safe locations. Analysis run

Reported trigger coverage (not proof of complete repository or context coverage): diff-security-review (37482 ms), confidentiality-review (76404 ms), spec-provenance-review (72793 ms), desktop-den-sync-review (81152 ms).

Blockers

  • None.

Advisories

  • None.

Needs recheck

  • None.

Observed review-thread metrics

  • Unique observed run attempts in retained window: 3
  • Distinct heads in retained window: 2
  • Current unresolved Warden threads: 0 of 0 observed
  • Observed resolved/unresolved transitions in retained snapshots: 0 / 0
  • First observed resolved/unresolved (state at first collection, not event time): 0 / 0
  • Precision: unavailable (no adjudications; no TP/FP values are inferred)
  • Observation window: 3/20 run attempts retained; truncated: false
  • Transition snapshot: 0/0 current attributed threads retained (limit 500); truncated: false

Thread states are read-only collection snapshots. These metrics are neither lifetime totals nor exact resolution times, and this summary is not clearance authority.

@yomgui

yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

All final-head journeys and required CI checks passed; combined evidence is at #4777 (comment). GitHub Warden reported Clear (zero findings), but clearance intentionally withheld approval: this PR touches review machinery (warden.toml) and requires human review. Clearance run: https://github.com/different-ai/openwork/actions/runs/34440008768. The change raises only maxFileLines from 3000 to 5000 so the critical session-route.tsx is actually reviewed; no skills/fail policies are disabled. Local final review completed all four skills with no skipped files. Merge remains blocked pending authorized human review; no admin bypass or self-approval attempted.

@yomgui

yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Addressed Warden advisory V2L-CBB in c86bc3c: the journey now requires OPENWORK_EVAL_ENGINE explicitly, prefixes the test verdict with v1/v2, and asserts the live engine routing status before typing. An omitted-engine run returns exit 2 / Incomplete (0 passed, 1 skipped), never a false v2 pass. Explicit v2 and v1 runs each passed on the new head, as did the v1 instant-send regression, app typecheck, 64 targeted unit tests, catalog/browser checks, and scoped eval typecheck. Full local Warden rerun found no findings and no skipped files. CI is rerunning on the new head. The Warden coverage limit and human-review guard remain intact.

@yomgui

yomgui commented Sep 10, 2026 •

Copy link
Copy Markdown
Member Author

Passed · 6/6 tests · 7/7 assertions · 5 images

Commit c86bc3c72713ee3a0cd11f4459d43b1334966322 · selected evidence

Open review report

@yomgui

yomgui commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Follow-up complete at c86bc3c: advisory V2L-CBB is addressed, refreshed explicit v2/v1 and v1 instant-send journeys passed, and new-head CI/Warden passed with zero findings or advisories. Current evidence: #4777 (comment). Retried normal gh pr merge 4777 --squash --match-head-commit c86bc3c72713ee3a0cd11f4459d43b1334966322; GitHub refused because base branch policy prohibits the merge. PR remains REVIEW_REQUIRED for the guarded warden.toml coverage change. No admin override or weakening of coverage attempted.

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.

2 participants