Skip to content

fix(plugins): preserve task host context and prepare Windows PLATON - #121

Draft
stormstarlight wants to merge 1 commit into
lbx154:codex/optional-crystalpilot-plugins-20260910from
stormstarlight:fix/windows-plugin-lifecycle-20260911
Draft

fix(plugins): preserve task host context and prepare Windows PLATON#121
stormstarlight wants to merge 1 commit into
lbx154:codex/optional-crystalpilot-plugins-20260910from
stormstarlight:fix/windows-plugin-lifecycle-20260911

Conversation

@stormstarlight

Copy link
Copy Markdown
Collaborator

Dependency / review scope

This is a dependent follow-up to draft #119, targeting codex/optional-crystalpilot-plugins-20260910 rather than mixing the entire optional-plugin feature into current main. It does not merge #119 or publish a release. The proprietary CrystalPilot 0.4.0 wheel and its pinned digest are unchanged.

Fixes

  • Pin the trusted plugin host root before a workbench daemon switches its independent ARGUS_SKILL_HOME; propagate through desktop launch, clean spawn, bootstrap and CLI hooks. Trial profile lookup stays host-scoped without copying credentials.
  • Keep the isolated spawn helper for packaged executors (the fix also landed on main as 4b9bd93).
  • Reject unavailable explicitly selected plugins, missing workdir bindings and old workbench records rerouted to another vertical. Do not silently execute research instead. Native sessions can still add tools without changing their original vertical.
  • Emit a terminal failed completion for refused attempts, allowing the workbench to stop waiting; preserve the original records and never normalize an invalid backlog status back to pending.
  • Windows plugin-state readers permit atomic replacement; bounded writer retries and published/not-yet-started installer liveness prevent spurious setup failures. Retain Windows architecture metadata in clean setup environments.
  • Add explicit, authenticated license consent for preparing the official PLATON Windows runtime in a plugin-private directory. Verify publisher archives, the x86 Salford DLL and actual check.def generation, then use the existing plugin configure contract.
  • The first-party native adapter adds the publisher taskbar's +00 switch: official PLATON otherwise leaves its completion dialog alive after -z2. Native argument boundaries/Unicode and the true exit code are preserved; no shell or artificial success-by-killing.

No system installer is executed; no global PATH/registry modification, credential, scientific dataset, third-party binary, or modified proprietary plugin is included. The generated first-party adapter is built reproducibly during Windows desktop packaging and is ignored by Git. Source-only users must build it before using the optional preparation action.

Validation

On Windows:

  • Targeted Python suites on this PR worktree: 177 passed, 6 platform skips.
  • Web: 74 files / 488 tests passed, plus TypeScript checking.
  • Refreshed the branch's tracked Web/TUI assets and release identity; artifact checks passed. Generated text normalized to repository LF before final identity generation.
  • Focused Ruff and whitespace checks passed.
  • Native adapter argument tests: 2 passed; actual official PLATON probe exited 0 and generated rules.
  • This PR's host code loaded the unchanged public plugin in a separate process using the product-generated environment, exposed 29 trusted scientific tools, completed a real read-only MCP call, projected tool/assistant events, preserved accounting ownership, finished/cancelled bindings and closed the workbench turn. No model was called for that test.
  • Python/CCTBX/Gemmi/RDKit, DIALS, Systre/Java and PLATON were ready. SHELXT/SHELXL remain subject to user authorization; no full solve/refinement is claimed.
  • The corresponding isolated desktop integration was also tested as a frozen Windows backend and actual WebView2 EXE, including 300 seconds / 60 stable authenticated checks, exit/restart and separate data roots.

See docs/windows-plugin-runtime.md for boundaries and the official software preparation procedure. This PR intentionally does not alter upstream's cost-policy decision or reintroduce main's removed release-identity machinery; the retained branch identity is refreshed according to #119's existing convention.

@lbx154 lbx154 closed this Sep 14, 2026
@lbx154 lbx154 reopened this Sep 14, 2026
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