Skip to content

[S6] Add an opt-in activation facade with explicit lifetime ownership - #150

Merged
Eduardo Villalpando Mello (edvilme) merged 1 commit into
mainfrom
refactor/s6-activation-facade
Nov 16, 2026
Merged

Eduardo Villalpando Mello (edvilme) merged 1 commit into
mainfrom
refactor/s6-activation-facade

Conversation

@edvilme

Copy link
Copy Markdown
Contributor

Summary

Closes #149.

  • Add activateToolExtension(context, { serverInfo, toolConfig }) and a small ToolExtensionRuntime with awaitable, idempotent deactivate(); accept legacy ToolConfig and structurally compatible typed definitions.
  • Compose the existing shared helpers, installing common listeners before deferred initialization without inferring manifests or tool policy.
  • Own only facade-created resources: cancel pending initialization, dispose late subscriptions, share explicit/context teardown, and contain asynchronous failures. Make narrowly related subscription/status/watcher construction rollback-safe.
  • Document source-relative adoption, startup timing, ownership, and inherited lifecycle limits. Keep existing low-level APIs available.

Validation

On pinned Node 24.17.0:

  • npm run build passed.
  • npm test -- --reporter dot: 169 passing (161 existing + 8 focused facade cases), including real shared-helper manual/facade comparisons with external APIs mocked. Pretest compiles source-entry type assertions.
  • Legacy/typed adoption and the exact README example separately compiled against built source-relative public declarations without path aliases; built JavaScript exports smoke-checked. Validation scratch removed.
  • npm run lint: zero errors; two existing unused-disable warnings in vscodeapi.ts.
  • Targeted Prettier checks and git diff --check passed; no broad baseline reformat.

Boundaries

This is not a restart scheduler rewrite: shutdown does not drain every in-flight start/retry, and unresolved initialization can delay cleanup. Logger/status remain module-global. No native VS Code or consumer-extension validation is claimed. No hooks, consumer migrations, Python, wire fixtures, dependency/version/identity, or layout changes.

Compose the existing shared lifecycle behind a small activation handle.
Preserve deferred startup, own cleanup and late subscriptions, and document
inherited lifecycle limits with focused runtime and public API checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 85ef72cc-9e26-4bc4-b1c3-55256d9bef91
@bschnurr

Copy link
Copy Markdown
Member

🔒 Automated review in progress — Bill Schnurr (@bschnurr) is auto-reviewing this PR.

@bschnurr

Copy link
Copy Markdown
Member

Reviewed commit: 3a78739af7a137768239dbab38fc1fee0ab7d84f

Result: 🔴 could-not-verify

Verification details

Verification: Automated verification is best effort. The PR author remains responsible for testing.

Summary: [unavailable] Container verification could not start and local execution was not authorized for this PR HEAD: C:\Program Files\RedHat\Podman\podman.EXE --connection pyrx-automation failed: stderr: Error: unable to start container "a343c55b76e8af1c167e571d1ba435fb0d4bb631547ebff3ec0bbc782ee14acd": crun: open `memory.max` for writing: No such file or directory: OCI runtime attempted to invoke a command that was not found

Test runs: none recorded.

@bschnurr Bill Schnurr (bschnurr) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved via Review Center.

@bschnurr Bill Schnurr (bschnurr) added the review-auto:approved Automated review: no blocking findings (approval posted). label Nov 16, 2026
@edvilme
Eduardo Villalpando Mello (edvilme) merged commit 85155e2 into main Nov 16, 2026
17 of 19 checks passed
@edvilme
Eduardo Villalpando Mello (edvilme) deleted the refactor/s6-activation-facade branch November 16, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-auto:approved Automated review: no blocking findings (approval posted).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[S6] Add an opt-in activation facade with explicit lifetime ownership

2 participants