Skip to content

test(e2e): seed Runtime Host policy authority - #2706

Closed
MoonOld wants to merge 1 commit into
apache:mainfrom
MoonOld:fix/e2e-runtime-policy-seed
Closed

test(e2e): seed Runtime Host policy authority#2706
MoonOld wants to merge 1 commit into
apache:mainfrom
MoonOld:fix/e2e-runtime-policy-seed

Conversation

@MoonOld

@MoonOldMoonOld commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Seed Desktop Playwright connections through the current Runtime Host policy authority after refactor: remove legacy runtime policy migration #2700 removed the legacy migration.
  • Persist credentials, model inventories, and the default target, then release the root owner before Electron starts.
  • Assert the public Host-backed onboarding projection before exercising the real session send path.

Fixes#2705

Verification

  • npm --workspace @maka/desktop run build:with-deps
  • npm run lint
  • npm run typecheck
  • settings.spec.ts: 3 passed
  • send-message.spec.ts: 1 passed
  • send-message.spec.ts + settings.spec.ts, --repeat-each=3: 12 passed
  • Hosted Linux CI: 17/17 Desktop E2E passed and the alignment audit was clean (run).
  • Full Desktop E2E locally: 16 passed; the existing macOS Home caret assertion in slash-command-menu.spec.ts failed identically on the pre-refactor: remove legacy runtime policy migration #2700 baseline.
  • npm run format:check: blocked by 62 existing files outside this diff; chore: finish test cleanup #2702 fixes that baseline.
  • npx knip --workspace apps/desktop: blocked by the existing unused session-list-render-helpers.ts; chore: finish test cleanup #2702 removes it.

Root cause

The shared fixture still wrote legacy connection and credential files. With migration removed and automatic bootstrap disabled for the Desktop E2E candidate, Runtime Host saw an empty catalog and 16 tests stopped at onboarding before their assertions.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@MoonOldMoonOld mentioned this pull request Aug 11, 2026
@MoonOld

Copy link
Copy Markdown
ContributorAuthor

@Astro-Han@jackwener could you review this fixture-only fix? Hosted Linux Desktop E2E is now 17/17 green. The remaining typecheck red is the 62-file formatter/Knip baseline fixed by #2702; conversely, #2702 is green there and only lacks this E2E fix. After either complementary PR lands, the other can rebase to an all-green base.

@Astro-HanAstro-Han 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.

Approved — no P0–P3 findings at c17a37d1.

This fixes the fixture at the right boundary: the test setup now seeds the authoritative Runtime Host policy stores, including credentials, model inventories, and the default target, then releases root ownership before Electron starts. The added assertion verifies the public Host-backed onboarding projection instead of only relying on the composer becoming visible.

I verified that Hosted Linux Desktop E2E passes 17/17 and that the changed files are format-clean. The remaining typecheck failure is the unrelated 62-file formatter baseline covered by #2702. Please rebase after that complementary fix lands and require an all-green head before merging.

Disclosure: Codex assisted with tracing the two-file diff, storage-authority seams, and CI evidence. Astro-Han reviewed this conclusion and owns the approval decision.

@MoonOld

Copy link
Copy Markdown
ContributorAuthor

Closing as superseded by #2742, which has already landed the authoritative Runtime Host fixture seeding on main. Thanks for the review and approval.

@MoonOldMoonOld closed this Aug 12, 2026
Sign up for freeto 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.

Desktop E2E fixtures no longer seed Runtime Host connections

2 participants

@MoonOld@Astro-Han