Skip to content

fix(harness): preserve provider errors when schema output file is missing#218

Closed
santoshkumarradha wants to merge 2 commits intomainfrom
fix/harness-provider-error-context
Closed

fix(harness): preserve provider errors when schema output file is missing#218
santoshkumarradha wants to merge 2 commits intomainfrom
fix/harness-provider-error-context

Conversation

@santoshkumarradha
Copy link
Copy Markdown
Member

Summary

Why

Schema-mode failures currently mask real provider/runtime failures (for example opencode run returning Session not found) behind Schema validation failed..., which makes diagnosis noisy and misleading.

Verification

  • Ran standalone harness debug script with Claude provider (permission_mode=auto) on /tmp/dvga and confirmed complex schemas parse successfully from file output (parsed != None for ArchitectureMap and ReconResult).
  • Reproduced provider failure path with OpenCode provider and confirmed the harness now returns provider error context including missing output-file path.
  • Checked LSP diagnostics (error severity) clean for changed files.

…sing

Keep provider failure context when schema-mode output parsing fails and no output file exists, so runtime/provider failures are not mislabeled as schema validation errors.
@santoshkumarradha santoshkumarradha requested review from a team and AbirAbbas as code owners March 4, 2026 12:22
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

Performance

SDK Memory Δ Latency Δ Tests Status
Python 9.3 KB +4% 0.34 µs -3%

✓ No regressions detected

- Rewrite opencode.py: auto-managed serve+attach pattern to bypass
  opencode v1.2.10-v1.2.16 'Session not found' bug
- Add project_dir field to HarnessConfig (types.py) so coding agents
  explore the target repo instead of a temp working directory
- Add output file placement inside project_dir (runner) so sandboxed
  Write tool can reach the output JSON
- Pass server_url to OpenCodeProvider via factory
- Clean up debug prints from runner and claude provider
- Verified working with openrouter/moonshotai/kimi-k2.5 model
@santoshkumarradha
Copy link
Copy Markdown
Member Author

Superseded by #220 (combined harness PR).

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.

harness: surface provider error when schema output file is missing

1 participant