Skip to content

viewer: source builds accept an installed release viewer with the same version #491

Open

Description

@ElbertePlinio

A source build of the CLI uses an installed release pickforge-viewer when both report the same version, even if their protocol differs. Found while validating #380.

detectNativeViewer in packages/cli/src/viewer/native.ts accepts the first pickforge-viewer on PATH when its --version matches the CLI package version. On main after 0.7.1, the package version is still 0.7.1, so the installed 0.7.1 viewer passes the check. With it, watch --control fails with "Native viewer host exited during startup", and packages/cli/test/native-viewer-live.test.ts fails 2 tests. With a viewer built from the same checkout (cargo build -p pickforge-viewer --release, put first on PATH), both work: 3 of 3 live tests pass.

Releases ship a matching pair, so users are not affected. Contributors and agents running from source are.

  • Make a source build prefer or require a viewer from the same checkout, or check a protocol version instead of the package version
  • Say in AGENTS.md how tests find the viewer

Activity

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