Skip to content

oh-my-pi adapter never routes lifecycle-handler failures to handlers.error() #589

Backlog

Description

@abogartz

Shape

The shared contract gives every adapter an error(error) handler and the OpenCode adapter uses it for rejected handler work (src/adapters/opencode/lifecycle.ts:46 and :134). The oh-my-pi adapter's on()/track() (src/adapters/oh-my-pi/extension.ts) returns handler promises straight to the host; rejections go to the host's own error reporting and handlers.error is never called anywhere in the adapter. Core-side error telemetry therefore sees OpenCode failures and is silent for the same class of failure on oh-my-pi — a semantic divergence between two harnesses writing one shared store.

Required

Route tracked handler rejections through handlers.error (keeping the host-visible behavior unchanged), and pin with a conformance assertion in the shared runtime contract so any future adapter inherits the obligation.

Acceptance

A failing native handler produces the same core error evidence shape on oh-my-pi as on OpenCode; the shared contract test fails for an adapter that drops it.

Activity

  1. ocsi-architect commented on Nov 29, 2026

    @ocsi-architect

    Confirmed at the current head of the Pi pull request, unchanged. The contract declares the error handler at src/host/lifecycle.ts:61. The OpenCode adapter routes rejected handler work to it — src/adapters/opencode/lifecycle.ts:46 calls it with the rejection reason. The oh-my-pi adapter catches, records and rethrows at src/adapters/oh-my-pi/extension.ts:409-413 and never calls the contract member, so a handler rejection follows the host's reporting path instead of ours and the plugin's own error surface stays empty. Same asymmetry as the seam-visibility work in #591 (adapter seam contract): the contract has the member, one adapter uses it, the other does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions