Skip to content

chore(deps): hold @opentui/* at the V2 host's OpenTUI version - #589

Merged
marcusrbrown merged 2 commits into
mainfrom
chore/renovate-opentui-hold
Nov 21, 2026
Merged

marcusrbrown merged 2 commits into
mainfrom
chore/renovate-opentui-hold

Conversation

@marcusrbrown

Copy link
Copy Markdown
Owner

This supersedes Renovate #577, which bumps @opentui/solid from 0.8.4 to 0.9.2. I'll close #577 after this merges.

Why hold at 0.8.4: #587 moved @opentui/core, @opentui/solid and solid-js to optional peers with dev pins. Both OpenCode hosts load their own OpenTUI at runtime (V1 1.19.6 uses 0.4.5, V2 2.3.2 uses 0.8.4; research §7). So the dev pin only types and tests the TUI, and it has to stay the lowest version that satisfies both hosts' peers. That is the V2 host's: @opencode/plugin@2.3.2 peers @opentui >=0.8.4. On 0.9.x our types and tests would target APIs that no host runs. 0.9 also replaces the input parser, according to the #577 release notes.

Rule: allowedVersions: '<=0.8.4' for @opentui/core and @opentui/solid. The description says to raise it together with the devDependencies and the @opentui/core override when the v2 pin in scripts/opencode-host-pins.json moves to a host that ships a newer OpenTUI. solid-js is not restricted: patch updates within 1.9.x are harmless.

Validation: renovate-config-validator --strict reports Config validated successfully. This is a config-only change; CI's host-contract path filter skips it.

The @OpenTui dev pin types and tests the TUI only (both hosts load their own
copy at runtime) and must stay the lowest version meeting both hosts' peers:
@opencode/plugin 2.3.2 peers @OpenTui >=0.8.4. Renovate PR #577 (0.9.2)
would drift past every host. Raise together with the v2 host pin.
@fro-bot fro-bot added the agent: working Agent is currently working on this label Nov 21, 2026

@fro-bot fro-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict: PASS

This is a config-only change: one Renovate packageRule in .github/renovate.json5. I reviewed the diff directly instead of running the ce:review pipeline. A 9-line config change has no code paths for the persona reviewers to examine. I checked the rule against package.json, which already pins @opentui/core and @opentui/solid at 0.8.4 in devDependencies. The @opentui/core override is also 0.8.4, and the peers are optional with a floor of >=0.4.5. The rule matches the state the PR description gives for the V2 host.

Blocking issues

None

Non-blocking concerns

  • allowedVersions: '<=0.8.4' is correct for an npm-versioned range. It also stops Renovate from proposing downgrades. A hand-bumped dev pin above 0.8.4 would be left alone, and the rule would not flag it.
  • The manual-sync step is documented only in the rule's description. It reads: raise allowedVersions, the devDependencies and the @opentui/core override together when the v2 host pin moves. Nothing in CI enforces it. Consider adding a check to the host-contract script that compares package.json against the hosts' OpenTUI versions. This can be a later follow-up.
  • Once the rule is merged and #577 is closed, Renovate should not re-open the 0.9.x bump. If it appears on the Dependency Dashboard, confirm the rule was applied after the shared preset's rules. Package rules later in the list win, and this one comes after the extends preset.

Missing tests

None. The PR description reports renovate-config-validator --strict passing, and there is no runtime code to test.

Risk assessment (LOW) + rationale

LOW. The change only affects which dependency PRs Renovate opens. It does not touch the shipped plugin, the TUI half, the subprocess runtime, the RPC layer or any tool output, so a plugin crash or hang affecting parent OpenCode sessions is not a concern. No changeset is needed, because this is chore(deps) and nothing in the published package changes. The worst case is that Renovate stays pinned for longer than intended, which a one-line edit fixes.


Run Summary
Field Value
Event pull_request
Repository marcusrbrown/opencode-copilot-delegate
Run ID 44914729146
Cache hit
Session ses_e0176c0fbffeyrejQHltxEs1FO

@fro-bot fro-bot removed the agent: working Agent is currently working on this label Nov 21, 2026
Fro Bot #589 NBC: the manual sync was enforced only by the rule's description.
The pins test now asserts that the @opentui/core and @opentui/solid dev pins
equal @opencode/plugin's peer floor and the renovate.json5 allowedVersions cap,
and that the @opentui/core override matches. Bumping the V2 host devDependency
without moving the others now fails CI.
@marcusrbrown

marcusrbrown commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner Author

Here is what I did with each review note, in 4ad1e5c:

  • The manual sync isn't enforced by CI. Fixed. tests/host-contract-pins.test.ts now checks that the @opentui/core and @opentui/solid dev pins equal @opencode/plugin's peer floor (>=0.8.4 → 0.8.4). It also checks that they equal the allowedVersions: '<=X' cap in renovate.json5, and that the @opentui/core override matches. If someone bumps the V2 host devDependency and forgets the rest, CI goes red. Red check: setting the cap to <=0.9.2 fails both pin tests.
  • <= doesn't flag a hand-bumped pin. Covered by the same test: a dev pin above the V2 floor fails it.
  • Rule order against the preset. The rule comes after extends in packageRules, so it wins. I'll close chore(dev): update dependency @opentui/solid to v0.9.2 #577 after this merges and check the Dependency Dashboard on the next Renovate run.

test:unit passes 424/0 locally.

@fro-bot fro-bot added the agent: working Agent is currently working on this label Nov 21, 2026

@fro-bot fro-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict: PASS

Re-review after 4ad1e5c, which adds a sync test to tests/host-contract-pins.test.ts in response to my earlier non-blocking concern. I reviewed the diff directly instead of running ce:review, because the change is one Renovate rule plus one test file. I didn't run any test commands. I read the test against the repo instead.

The new test closes the gap I raised. It requires the @opentui/core and @opentui/solid dev pins to equal the V2 host's peer floor, read from node_modules/@opencode/plugin/package.json. It also requires the Renovate cap to be <=<floor>, and the @opentui/core override to equal the dev pin. A hand-bumped pin, a stale cap or a stale override now fails CI.

What I checked:

  • @opencode/plugin is a pinned devDependency (2.3.2), and the unit job runs bun install --frozen-lockfile. node_modules/@opencode/plugin/package.json therefore exists when test:unit runs. Its peers are @opentui/core: >=0.8.4 and @opentui/solid: >=0.8.4, which matches the assertions.
  • Bun.JSON5.parse works here: a probe under Bun 1.4.5 returned typeof Bun.JSON5 === "object". @types/bun is 1.4.4, which should cover typecheck. CI gets Bun from mise.toml, so it should match.
  • The test lives in tests/*.test.ts, so the test:unit glob picks it up. The change is test-only.
  • It follows the file's existing style: top-level await readFile, Bun.YAML.parse, and as casts on JSON.parse results.

Blocking issues

None

Non-blocking concerns

  • The test reads node_modules/@opencode/plugin, so it assumes the installed devDependency is the V2 host version. That holds while @opencode/plugin stays pinned to the v2 host pin (2.3.2). If those drift, the test checks the wrong floor. It would be stricter to also assert that devDependencies['@opencode/plugin'] equals the v2 entry's version in scripts/opencode-host-pins.json. The existing pins test may already cover this.
  • floor comes from v2Peers[name]?.replace(/^>=/, ''). If the host later changes to a ^ or ~ range, the toMatch(/^\d+\.\d+\.\d+$/) assertion fails, which is the right outcome. It fails with an unhelpful message, though, so a custom failure message would help whoever hits it.
  • The solid-js dev pin is not covered. That matches the PR's intent, since solid-js is intentionally unrestricted.

Missing tests

None. The new test is the coverage for this change. The author reports a red-check run: setting the cap to <=0.9.2 fails both pin tests.

Risk assessment (LOW) + rationale

LOW. The change affects only Renovate behavior and a unit test, and nothing in the shipped plugin, TUI half, subprocess runtime or RPC layer. No changeset is needed because the published package doesn't change. The main regression risk is a false-red unit test if the @opencode/plugin devDependency drifts from the V2 host pin. That would show up in CI and is a trivial fix. A plugin crash or hang affecting parent OpenCode sessions is not a concern.


Run Summary
Field Value
Event pull_request
Repository marcusrbrown/opencode-copilot-delegate
Run ID 44916201033
Cache hit
Session ses_e0176c0fbffeyrejQHltxEs1FO

@fro-bot fro-bot removed the agent: working Agent is currently working on this label Nov 21, 2026
@marcusrbrown
marcusrbrown merged commit 18de2dd into main Nov 21, 2026
7 checks passed
@marcusrbrown
marcusrbrown deleted the chore/renovate-opentui-hold branch November 21, 2026 14:57
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.

2 participants