fix(harness): adapt to ynh 0.3 JSON envelope and version_installed rename#256
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
ynh ls --format jsonnow returns{capabilities, harnesses, ynh_version}instead of a bare array.ynh info <name> --format jsonnow returns{capabilities, harness, ynh_version}instead of a bareHarnessInfo.versionfield was renamed toversion_installedin bothynh lsandynh infopayloads.HarnessRepository.refresh()andbuildDetail()now decode throughYNHListEnvelope/YNHInfoEnvelope.Harness.CodingKeysandHarnessInfo.CodingKeysremapversion→version_installed.ynd composeis unchanged soHarnessCompositionis 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,
versionrename,Harness.namespacenot 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
HarnessModelTests,YNHDecodingTests); 222+ tests pass on a clean build./tmp/termq-debug.logshows noynh ls failedordetail fetch failederrors after the fix.🤖 Generated with Claude Code