Skip to content

Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP compat, retry fail-fast, terminal config#417

Merged
1jehuang merged 8 commits into
masterfrom
fix/triage-issues-411-416
Jun 29, 2026
Merged

Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP compat, retry fail-fast, terminal config#417
1jehuang merged 8 commits into
masterfrom
fix/triage-issues-411-416

Conversation

@1jehuang

@1jehuang 1jehuang commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Autonomous triage of newly filed issues. Each fix is a focused commit.

Fixes

Validation

  • cargo build -p jcode --bin jcode (selfdev) succeeds.
  • FreeBSD VM CI run is green (build + run + tests).
  • New/updated unit + integration tests pass: MCP, skills, platform nofile, retry fail-fast classifier (is_fatal_model_endpoint_error), and [terminal] preferred parsing.

1jehuang added 7 commits June 28, 2026 17:52
GitHub's /releases/latest now returns single-line JSON, so the old
grep '"tag_name"' | cut matched the whole blob and returned a URL.
Use grep -o to isolate just the tag_name field, working for both
compact and pretty-printed JSON.
When $EDITOR contains arguments (e.g. 'zed --wait' or 'code -w'), the
whole string was used as the binary name and spawn failed silently.
Split on whitespace, use the first token as the binary, pass the rest
as args, and surface spawn errors instead of swallowing them.
- platform: cast rlim_cur/rlim_max to u64 (they are i64 on FreeBSD,
  u64 on Linux/macOS), keeping the nofile-limit code portable.
- auth/cursor: add an XDG-style fallback for Cursor's state.vscdb path
  on non-Linux/macOS/Windows Unix (e.g. FreeBSD) so the build no longer
  fails with an uninitialized 'relatives'.
- ci: add a FreeBSD smoke workflow that boots a real FreeBSD VM via
  vmactions/freebsd-vm to build the jcode binary, run --version, and run
  platform unit tests. GitHub has no native FreeBSD runner, so a VM is
  the only way to get a true build+test (cross-compile can't link
  aws-lc-sys).
…413)

Add the shared cross-tool `.agents` convention to both the load and
reload paths, alongside the existing .jcode and .claude locations:
- Global: ~/.agents/skills/<name>/SKILL.md
- Project-local: ./.agents/skills/<name>/SKILL.md

Improves skill portability across agent tooling.
Claude Code's real MCP conventions differ from what jcode read:
- Accept the canonical `mcpServers` key (alias of jcode's `servers`).
- Load project config from `./.mcp.json` (repo root), not just
  `.claude/mcp.json`.
- Load user config from `~/.claude.json`: top-level `mcpServers` plus
  per-project servers under `projects.<cwd>.mcpServers`.
- Recognize HTTP/SSE entries (`type`/`url`) and skip them with a log
  line, since jcode only supports stdio servers today.
- First-run import now reads `~/.claude.json` (legacy `~/.claude/mcp.json`
  kept as fallback).
- Update README MCP docs.

Adds unit tests for the mcpServers key, HTTP detection, and
~/.claude.json global+project parsing.
Reconnect/recovery continuation burned the full auto-retry budget on
deterministic 4xx model/endpoint-capability errors (e.g. Volcengine Ark's
coding-plan endpoint returning 404 UnsupportedModel for a model without
the coding plan feature, or model-not-found). Retrying the identical
request can never succeed, so this produced noisy repeated failures.

Add is_fatal_model_endpoint_error and short-circuit these in the remote
error handler: clear the pending retry, stop auto-poke, and show an
actionable hint about the model/base-URL mismatch instead of retrying.

Also extend the non-retryable auto-poke marker set with UnsupportedModel
/ coding-plan markers. Adds unit + integration tests.
…401)

The macOS Cmd+; launch terminal was only configurable via the
undocumented ~/.jcode/preferred_terminal.json. Add a discoverable,
documented [terminal] preferred key in config.toml and prefer it over the
legacy JSON file in effective_macos_terminal() (config > JSON > detection).

Document the key in the generated default config.toml next to spawn_hook/
focus_hook. (Re-running 'jcode setup-hotkey' still regenerates the
launcher script; auto-regenerate-on-change is left for a follow-up.)

Adds tests for config parsing and the documented terminal value mapping.
Apply rustfmt to the lines added in the triage fixes (#387/#401/#414)
so the new code is formatting-clean under the CI rustfmt.
@1jehuang
1jehuang merged commit 5d482ca into master Jun 29, 2026
4 of 8 checks passed
@1jehuang
1jehuang deleted the fix/triage-issues-411-416 branch June 29, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment