Skip to content

Route Windows Codespaces owner ingress through managed UV - #14407

Merged
ThomasMichon merged 5 commits into
devfrom
pr/route-windows-codespaces-owner-ingress-t-f13e
Nov 24, 2026
Merged

ThomasMichon merged 5 commits into
devfrom
pr/route-windows-codespaces-owner-ingress-t-f13e

Conversation

@ThomasMichon

@ThomasMichon ThomasMichon commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

This contribution was assisted using Copilot.

Intent

Route the Windows Connection Owner's task, installation-time status query and selected-owner startup through a prepared managed-UV entry instead of bypassing admission with direct application Python. This is a finite continuation of #13775, not closure of the all-launch migration.

Changes

  • Publish a stable runtime-local bin/codespaces-owner.ps1 entry, an absolute setup-bound UV executable and the existing canonical native capture/UV helpers.
  • Resolve completed current/LKG/newest slots read-only, then admit the addressed interpreter using uv python find --managed-python --no-python-downloads before application Python. No ordinary acquisition or PATH Python/UV fallback is introduced.
  • Preserve the limited interactive-logon/headless task, scheduling and capability holds, unknown-configuration refusal, the existing selected-runtime ensure API and its durable daemon-spawn owner. Task-only retirement recognizes both the legacy and new owned action forms; foreign actions still refuse.
  • Preserve PowerShell 5.1 argument fidelity, streams, exit status and installation-root configuration. Include the new files in canonical packaging and finite uninstallation.

Validation

  • Seventeen focused PowerShell Core status, routing, scheduling/capability and task-ownership controls passed locally across four contained runs, with verified cleanup.
  • Install contract passed for all 13 runtime plugins; headless launch, 13-family bootstrap sync, 25-plugin documentation consistency and touched Python lint passed.
  • Whole-file strict checking passed for all five touched Python files on Linux and Windows, including the declared seasoned YAML stubs. The earlier broader typecheck.py --enforced run stopped at an unprepared lib-process-telemetry environment; that local attempt is not reported as a full typecheck pass.
  • The path-gated native workflow now requires all 33 Windows owner controls without skips, including both PowerShell hosts, actual bound UV, managed venvs, four cutover launches per host, missing-preparation refusal, idempotent publication and status/ensure routing. Its composed owner invocation collects exactly 117 controls: the original 81 Dispatch and 3 unit-writer controls plus all 33 owner controls. Current-head hosted results are pending.
  • The first native run reached the original launch and lifecycle five-minute limits; the new owner packet was incomplete and showed two assertion failures before cancellation. Review corrections now explicitly enable UTF-8 under isolation and restore the old boolean-status fixture. The packet shares preparation with the owner and generated-unit controls, retaining every native boundary, count and limit. The initial required unit-source admission error is also corrected without changing selected nodes or coverage.

Contract and architecture impact

This closes owner-ingress gaps toward the install contract and installer vision without changing the owner CLI or durable process API. Scheduling preservation still wins before publication/startup. The entry uses the existing exact-runtime admission stage for legacy slots: project/environment-declared selection and durable PATH UV exposure remain separate target work. Ordinary legacy CLI dispatch, installation policy readers, selected-caller on-demand children and installed-host adoption are not claimed here.

Performance and documentation impact

Each entry performs one bounded, acquisition-free UV selection through the existing native process owner. The native packet records separate cold/warm samples on both PowerShell hosts and retains cleanup, no-skip and timing-report checks. The existing six jobs and five-minute limits are unchanged; no latency-tail or desktop-observation claim is made. The plugin README and testing roster describe the implemented boundary and remaining gaps. No real service, Scheduled Task, credentials or shared-host settings are changed by the fixtures.

Preserve scheduling and capability holds while admitting the addressed runtime through the existing prepared native selector. Retain the selected-owner daemon spawn path and qualify the installed entry on both PowerShell hosts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retain the complete existing unit packet and coverage targets after changing the Windows owner producer.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The routing change breaks valid-boolean test cases when pwsh is available, and isolated Python launches do not enforce UTF-8, risking corrupted input or non-ASCII output failures on Windows.

2 open issues
What changed in this PR

This PR routes Windows Codespaces Connection Owner task launches, installation-time status queries, and selected-owner startup through a prepared managed-UV entry. It advances #13775 while leaving broader launcher migration and installed-host adoption out of scope.

Changes:

  • Adds runtime-local owner entry and canonical UV/capture helpers for acquisition-free interpreter selection.
  • Updates installer routing and task ownership recognition while preserving scheduling and capability holds.
  • Adds native Windows validation, packaging and uninstall support, and documentation.
File Description
tools/​promotion-unit-manifest.json Refreshes the installer reference hash.
tools/​installer_engine_ref.py Includes Windows UV and capture assets in canonical packaging.
TESTING.md Documents the 28-control Windows owner validation packet.
plugins/​agent-codespaces/​tests/​test_windows_scheduling.py Adapts scheduling fixtures to owner-entry publication.
plugins/​agent-codespaces/​tests/​test_managed_owner_ingress_ps1.py Adds native selection, routing, stream, and ownership controls.
plugins/​agent-codespaces/​tests/​test_connection_owner_task_idempotent.py Updates selected-owner startup and task-registration fixtures.
plugins/​agent-codespaces/​scripts/​windows-scheduled-task.ps1 Recognizes legacy and managed owner task actions.
plugins/​agent-codespaces/​scripts/​uninstall-profile.json Adds the Windows owner entry and helpers to cleanup.
plugins/​agent-codespaces/​scripts/​install.ps1 Publishes helpers and routes status/startup through the managed entry.
plugins/​agent-codespaces/​scripts/​install.human-output.json Refreshes the installer entrypoint hash.
plugins/​agent-codespaces/​scripts/​codespaces-owner.ps1 Adds prepared-UV admission before owner application launch.
plugins/​agent-codespaces/​scripts/​bootstrap-uv.ps1 Supplies canonical managed-Python selection helpers.
plugins/​agent-codespaces/​scripts/​bootstrap-capture.ps1 Supplies bounded native process capture and cleanup.
plugins/​agent-codespaces/​README.md Describes Windows owner routing and remaining migration scope.
libs/​payload-invocation/​tests/​test_codespaces_windows_owner_source.py Exposes owner controls without Codespaces dependencies.
.github/​workflows/​python-selection-native.yml Adds path gating and mandatory owner-control checks.
.changefiles/​20261124075829-route-windows-connection-owner-task-stat-cbf9b2.json Requests an agent-codespaces patch release.

Review effort: Balanced

…ixtures

Route the remaining owner-config fixture through the installed entry, explicitly retain UTF-8 under isolation, and declare the existing seasoned YAML stubs for the touched test scope. Share owner and unit-writer runner preparation without dropping native controls or raising the six five-minute job limits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ThomasMichon

Copy link
Copy Markdown
Owner Author

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Required native Windows checks remain unverified on PowerShell 5.1 and 7, particularly real bound-UV selection, argument/stdin and stream fidelity, task ownership, and process cleanup.

1 open issue
1 resolved since last review

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ThomasMichon

Copy link
Copy Markdown
Owner Author

No description provided.

@ThomasMichon

Copy link
Copy Markdown
Owner Author

This contribution was assisted using Copilot.

The corrected Windows owner packet is now natively verified at 43b0537: all 117 controls passed (81 original Dispatch + 3 original unit-writer + 33 Codespaces owner), with cleanup and every independent count/no-skip/timing verifier complete. Both PowerShell hosts passed real bound-UV selection, Unicode stdin/argv, missing preparation, publication and selected-owner ensure controls. The corrected five-case boolean-status fixture is included; its addressed thread is resolved.

That native run finished five jobs successfully. Its unchanged Linux packet passed its final 11 index controls and cleanup but reached the five-minute job limit before final verification, so I am not claiming a full native workflow pass. Required units also passed; the remaining CI issue was the manager-owned typecheck configuration needing its own changefile. Commit 7034db2 adds that changefile without changing runtime/test code. Current-head CI, native qualification and review remain required before merge.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Current-head native Windows qualification remains pending after earlier failures and cancellations, leaving PowerShell 5.1 argument and stream fidelity, managed-venv behavior, and process cleanup unverified in this review environment.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

The byte-identical native capture host retains the existing caller-contained classification used by the Bridge and Vault consumers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ThomasMichon

Copy link
Copy Markdown
Owner Author

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Native Windows qualification remains pending after failures and timeouts, leaving PowerShell 5.1/7 argument and stream handling and Windows Job containment unverified.

No open issues 🎉

Review effort: Balanced

@ThomasMichon

Copy link
Copy Markdown
Owner Author

The following contribution was assisted using Copilot.

The remaining native qualification is now complete for 202d8a3c62a92f42f734abeafbddd894eb0b7192. Native run 45437133616, attempt 2 is successful across all six jobs. The owner packet passes all 117 controls, including all 33 Codespaces controls and both PowerShell measurement reports. The required CI run 45437133579 also passes guards, admitted units and the required PR gate.

The first attempt retained five successful jobs; the launch job hit its unchanged five-minute deadline after its 63 tests passed, during final evidence verification. One failed-job retry completed that job in 4m36s, including its verifiers and cleanup. No test, assertion, worker count or deadline was removed or increased. The previous failed attempts remain recorded above.

Current-head Copilot review 6043375638 has no open issues and no inline findings; both earlier findings are fixed and their threads resolved. This qualifies the reviewed source change, not installation or activation on an existing host.

@ThomasMichon
ThomasMichon merged commit cdf4d2a into dev Nov 24, 2026
21 of 22 checks passed
@ThomasMichon
ThomasMichon deleted the pr/route-windows-codespaces-owner-ingress-t-f13e branch November 24, 2026 16:41
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