Skip to content

fix(harness): adapt to ynh 0.3 JSON envelope and version_installed rename#256

Merged
eyelock merged 2 commits into
mainfrom
hotfix/v0.9.5
May 3, 2026
Merged

fix(harness): adapt to ynh 0.3 JSON envelope and version_installed rename#256
eyelock merged 2 commits into
mainfrom
hotfix/v0.9.5

Conversation

@eyelock
Copy link
Copy Markdown
Owner

@eyelock eyelock commented May 3, 2026

Summary

Hotfix for v0.9.4 against ynh 0.3.0+. Three breaking changes in YNH's structured-output format combined to leave TermQ unable to load any harness data:

  1. ynh ls --format json now returns {capabilities, harnesses, ynh_version} instead of a bare array.
  2. ynh info <name> --format json now returns {capabilities, harness, ynh_version} instead of a bare HarnessInfo.
  3. The harness version field was renamed to version_installed in both ynh ls and ynh info payloads.

HarnessRepository.refresh() and buildDetail() now decode through YNHListEnvelope / YNHInfoEnvelope. Harness.CodingKeys and HarnessInfo.CodingKeys remap versionversion_installed. ynd compose is unchanged so HarnessComposition is untouched.

User-visible symptom on v0.9.4: empty Harnesses sidebar, blank harness detail, blank rounded launch sheet (or silent no-op) from worktree row. The v0.9.4 identifier-fallback fix was a downstream patch on the same bug class but couldn't help while the list was empty.

YNH-side schema concerns (envelope shape, version rename, Harness.namespace not populated for registry installs) are filed separately as a YNH bug report. All three are 0.x churn and not backward-compatible by design.

Test plan

  • Unit tests updated for the new wire-format keys (HarnessModelTests, YNHDecodingTests); 222+ tests pass on a clean build.
  • Manual launch-from-worktree on debug build: launch sheet populates, harness session starts. /tmp/termq-debug.log shows no ynh ls failed or detail fetch failed errors after the fix.
  • CHANGELOG entry included in this PR.

🤖 Generated with Claude Code

David Collie and others added 2 commits May 3, 2026 11:04
…name

Three breaking changes in ynh 0.3.0's structured-output format combined
to leave TermQ unable to load any harness data against the new YNH:

  1. `ynh ls --format json` now returns an envelope object
     `{capabilities, harnesses, ynh_version}` instead of a bare array.
  2. `ynh info <name> --format json` likewise wraps in
     `{capabilities, harness, ynh_version}`.
  3. The harness `version` field was renamed to `version_installed`
     in both `ynh ls` and `ynh info` payloads.

Update HarnessRepository to decode through YNHListEnvelope /
YNHInfoEnvelope wrappers, and remap the `version` CodingKey on
Harness and HarnessInfo to `version_installed`. ynd compose still
emits `version` so HarnessComposition is unchanged.

User-visible symptom on v0.9.4: the Harnesses sidebar tab was empty,
harness detail showed nothing, and Launch from a worktree row
presented a blank rounded sheet (or did nothing at all). The v0.9.4
identifier-fallback fix at HarnessRepository:40 was a downstream
patch on the same bug class but couldn't help while the list itself
was empty.

YNH-side schema changes are documented separately in a YNH bug
report (envelope shape, version rename, Harness.namespace not
populated for registry installs). All three are 0.x churn and
explicitly not backward-compatible.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@eyelock eyelock merged commit 392fffe into main May 3, 2026
15 checks passed
@eyelock eyelock deleted the hotfix/v0.9.5 branch May 3, 2026 10:16
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.

1 participant