Skip to content

release: v6.8.0 - #49

Merged
code-crusher merged 4 commits into
mainfrom
release/6.8.0
Sep 3, 2026
Merged

release: v6.8.0#49
code-crusher merged 4 commits into
mainfrom
release/6.8.0

Conversation

@code-crusher

@code-crusher code-crusher commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

Ports the 6.8.2 coding-harness update from the Orbital extension (MatterAIOrg/Orbital-Extension, commit cdb837e) to OrbCode, switches the built-in catalog to the OSS-first model lineup with dynamic backend sync, and bumps the version to 6.8.0.

Dynamic model catalog sync

  • Syncs the model catalog from /v1/models at startup and on usage refresh (fetchDynamicModels); new backend models are registered into the picker and retired ones are pruned. Empty/failed fetches never wipe the offline fallback, and the default model is never pruned.
  • Captures the catalog's iconUrl and costMultiplier on each model.
  • Static fallback updated to the current 7-model OSS catalog: zai/glm-5.3-flash (new default), zai/glm-5.3, deepseek/deepseek-v4-flash-0731, meta/muse-spark-1.3-contributor, gpt-5.6-luna, gpt-5.6-sol, gemini-3.8-flash — all 232K context / 64K max output, available on every plan.

Provider badges in the model picker

  • Rows show text badges ([Z.ai], [Meta], [DeepSeek], [OpenAI], [Google]) — the TUI stand-in for the webapp's provider logos. Visible rows doubled to 12.

orbcode usage command

  • Prints weekly/monthly plan usage windows and each tracked OSS model's share of the shared plan pool (percentages only; requires orbcode login). /usage and /status show the same per-model block.

search_files is now one-shot

  • Ripgrep-first with FFF fallback; results bounded to the first 100 matches (default max_results 100).
  • Cursor pagination removed from the model-facing schema and output; capped results tell the model to refine the query instead of paginating.

Parallel read-only tool execution

  • Leading run of read-only tool calls (read_file, search_files, list_files, list_code_definition_names, codebase_search, lsp) executes concurrently (max 4 workers) with results committed in model order to preserve tool_call/tool_result pairing.
  • Mutating and interactive tools stay serialized.

Malformed tool-call recovery

  • A tool call with invalid JSON now returns a corrective tool result containing the raw (truncated) arguments plus a re-issue instruction, instead of a bare error.

Strict-mode schema tightening

  • Optional parameters are now required with nullable types across all native tool schemas (replace_all, recursive, follow_up, offset/limit, cwd/message/isDangerous, and the CLI-inactive tool schemas).
  • execute_command guidance asks for an explicit safety classification.

System prompt

  • search_files guidance rewritten for the bounded one-shot behavior.

Test plan

  • npm run typecheck and npm run build pass
  • npm run test:search — 11/11 pass
  • Remaining node:test suites (attachments, models, plugins, metrics, mcp, files, skills, headers) — 37/37 pass

- search_files: ripgrep-first with FFF fallback, one-shot bounded
  results (default max_results 100); cursor pagination removed from
  the model-facing schema and output
- agent loop: leading read-only tool calls execute concurrently
  (max 4 workers) with results committed in model order
- malformed tool-call JSON returns a corrective tool result with the
  raw arguments so the model can re-issue the call
- strict-mode schema tightening across native tool schemas
  (required-with-nullable optionals, execute_command safety
  classification guidance)
- system prompt search_files guidance updated for one-shot behavior

@matterai-app matterai-app Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧪 PR Review is completed: Release PR flipping search_files to a ripgrep-first one-shot model, adding parallel execution of leading read-only tool calls, and tightening tool schemas for strict mode. One real robustness gap in the new parallel batch error path; the rest of the changes look consistent.

Reviewed src/tools/executors/searchFiles.ts: no issues found.
Reviewed src/tools/executors/searchFiles/format.ts: no issues found.
Reviewed src/tools/executors/searchFiles/types.ts: no issues found.
Reviewed src/tools/schemas/search_files.ts: no issues found.
Reviewed src/tools/schemas/execute_command.ts: no issues found.
Reviewed src/prompts/system.ts: no issues found.
Reviewed test/search-files.test.ts: no issues found.

Skipped files
  • CHANGELOG.md: Skipped file pattern
⬇️ Low Priority Suggestions (1)
src/core/agent.ts (1 suggestion)

Location: src/core/agent.ts (Lines 1181-1184)

🟡 Concurrency

Issue: handleToolCall is not just tool execution — it also runs PreToolUse/PostToolUse hooks, observeCommittedCode(), and emits tool-start/tool-end events. Running up to 4 of these concurrently means user-defined hooks now fire in parallel and interleave (a hook that mutates state or rewrites inputs is not guaranteed to be concurrency-safe), and UI events for the batch arrive out of model order. This may be acceptable given the read-only restriction, but it's a behavioral change worth confirming the hook runner and TUI event consumers tolerate.

Fix: No code change required if hooks and event consumers are concurrency-safe; otherwise serialize hook execution or document the concurrency guarantee for hook authors.

Impact: Avoids subtle races in user-defined hooks and out-of-order UI event rendering.

-  		if (batchEnd > 1) {
-  			const batch = toolCalls.slice(0, batchEnd)
-  			const results = new Array<string>(batch.length)
-  			let nextIndex = 0
+  

Comment thread src/core/agent.ts
Comment on lines +1187 to +1190
while (nextIndex < batch.length) {
const index = nextIndex++
results[index] = await this.handleToolCall(batch[index])
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟠 Error Handling

Issue: In the new parallel batch, results are buffered in results[] and only pushed to this.messages after Promise.all resolves. If handleToolCall rejects for any one tool (e.g. an AbortError from user interrupt, or a throwing PreToolUse hook), Promise.all rejects immediately: the tool results that already completed are discarded and no role: "tool" messages are pushed for the batch. The assistant message with tool_calls is already in this.messages, so the next model request violates the tool_call/tool_result pairing contract and the API call will fail. The serialized path pushed each result as it completed, so this is a regression introduced by the parallel path.

Fix: Catch per-tool errors inside each worker and store the error text as that tool's result, so every tool_call_id always gets a tool response and completed results survive a sibling failure.

Impact: Keeps the OpenAI message contract intact on aborts/hook failures and prevents losing already-completed parallel tool results.

Suggested change
while (nextIndex < batch.length) {
const index = nextIndex++
results[index] = await this.handleToolCall(batch[index])
}
while (nextIndex < batch.length) {
const index = nextIndex++
try {
results[index] = await this.handleToolCall(batch[index])
} catch (error) {
results[index] = `Tool execution failed: ${error instanceof Error ? error.message : String(error)}`
}
}

- Sync the model catalog from /v1/models at startup and on usage refresh;
  register new backend models and prune retired ones (empty/failed fetches
  never wipe the offline fallback, default model is never pruned)
- Capture the catalog's iconUrl and costMultiplier on each model
- Static fallback updated to the current 7-model OSS catalog
  (muse-spark-1.3, gpt-5.6-luna, gpt-5.6-sol, gemini-3.8-flash added)
- Model picker shows provider badges ([Z.ai], [Meta], [DeepSeek],
  [OpenAI], [Google]) — the TUI stand-in for the webapp's provider logos
- orbcode usage command + per-model usage in /status and /usage
- README/CHANGELOG updated
@matterai-app

matterai-app Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary By MatterAI MatterAI logo

🔄 What Changed

  • Bumped version to v6.8.0 and ported coding-harness updates from Orbital extension.
  • Converted search_files to a one-shot grep-first operation with bounded results (max 100 matches) and removed cursor pagination.
  • Enabled concurrent read-only tool execution (up to 4 workers) while preserving model result ordering.
  • Added malformed tool-call recovery with corrective feedback and tightened strict-mode schemas.

🔍 Impact of the Change

  • Improves tool execution performance via parallel read-only operations.
  • Enhances agent reliability through robust error recovery and strict schema validation.

📁 Total Files Changed

Click to Expand
File ChangeLog
Model Picker
src/ui/components/ModelPicker.tsx
Updated visible row constraints to support the release update.

🧪 Test Added/Recommended

Added

  • npm run test:search suites (11/11 passing).
  • Core node:test suites (attachments, models, plugins, metrics, mcp, files, skills, headers) — 37/37 passing.

🔒Security Vulnerabilities

  • None detected. Strict schema enforcement and nullable type tightening improve overall input safety.

@matterai-app

matterai-app Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

✅ Reviewed the changes: Reviewed src/ui/components/ModelPicker.tsx: the only change is bumping VISIBLE_ROWS from 6 to 12, which safely widens the sliding window (the Math.max/Math.min clamping already handles lists shorter than the window, and the model count remains within the 1-9 digit-selection range) — no issues found. Note: the previously flagged src/core/agent.ts parallel-tool-batch issues are not part of this diff, so their resolution could not be verified here.

@code-crusher
code-crusher merged commit f50c7f0 into main Sep 3, 2026
1 check passed
@code-crusher
code-crusher deleted the release/6.8.0 branch September 3, 2026 13:05
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