Skip to content

fix(opencode): stop slash versions hanging on git ls-remote - #13

Merged
TimothyVang merged 2 commits into
mainfrom
agent/m17-hang-residual
Jul 9, 2026
Merged

fix(opencode): stop slash versions hanging on git ls-remote#13
TimothyVang merged 2 commits into
mainfrom
agent/m17-hang-residual

Conversation

@TimothyVang

Copy link
Copy Markdown
Owner

Summary

Live m17 seal smoke hung after verdict · local with a child process:

git ls-remote ssh://[email protected]/0.0.0-agent/m4-verdict-opencode-runtime-202607080429.git

Root cause is harness-owned: branch-derived preview builds stamp
OPENCODE_VERSION=0.0.0-<branch>-…. When <branch> contains /
(e.g. agent/m4-…), config dependency install pins
@opencode-ai/[email protected]/m4-…. npm-package-arg treats that as a
GitHub remote and arborist blocks on git ls-remote.

Fix

  1. Sanitize /- in Script.channel / Script.version at build time.
  2. Runtime guard pluginDependencyVersion() skips slash-containing pins for
    @opencode-ai/plugin install in config + TUI config.
  3. Regression test locks the npa git-vs-version distinction.

Evidence

  • Live hang process tree under spark-local-seal-smoke / verdict run --pure
  • npa('@opencode-ai/[email protected]/m4-…').type === 'git'
  • npa('@opencode-ai/[email protected]…').type === 'version'

Test plan

  • bun test test/installation-version.test.ts in packages/core (3 pass)
  • bash scripts/check-httpapi-error-contracts.sh (26 pass / 0 fail)
  • pre-push turbo typecheck (29 successful)
  • Rebuild/install verdict binary and re-run seal smoke (needs caseforge/engine install of this tip; not claimed here)

Not claimed

  • Agent seal / used_fallback=0
  • Model/tool/MCP loop completion after hang is unblocked

Branch-derived preview versions like 0.0.0-agent/m4-… made npm-package-arg
treat @opencode-ai/plugin pins as github remotes, blocking seal smoke on
git ls-remote. Sanitize channel/version at build and skip unsafe pins.
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

Branch-stamped preview builds like 0.0.0-agent/m4-… made npm-package-arg
treat @opencode-ai/plugin pin as a GitHub remote and block on git ls-remote.
Sanitize channel/version labels at build time and skip unsafe pins at runtime.
@TimothyVang
TimothyVang merged commit b087c7d into main Jul 9, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant