fix(opencode): polish CAS insights UX, timeouts, and auth messaging - #12
Conversation
P0/P1 follow-up after insights review: - OAuth-first notConnectedMessage; oauth-expired auth source - fetchWithTimeout on MCP/REST/health/probe calls - Do not untrusted-fence formatted run-trace summaries - Degraded routing prompt still offers pipeline_status + synapse_probe - synapse_probe cost note, live=false free health, no MCP-bearer for chat - cas_safe_get_run prefers insights summary and points to cas_safe_run_insights Tests: cas-bridge unit suite (formatter + routing + polish cases). Sibling worktrees untouched (fix-slow-startup left intact).
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
📝 WalkthroughWalkthroughThe CAS bridge now distinguishes authentication states, applies timeouts to outbound requests, standardizes tool error handling, and supports free Synapse health checks. Routing prompts, tool descriptions, tests, and implementation status documentation reflect these changes. ChangesCAS bridge authentication and probing
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant synapse_probe
participant SynapseHealth
participant SynapseChat
Caller->>synapse_probe: invoke with live=false
synapse_probe->>SynapseHealth: fetch health metadata
SynapseHealth-->>synapse_probe: return status and endpoint metadata
Caller->>synapse_probe: invoke with live=true
synapse_probe->>SynapseChat: submit bounded chat probe
SynapseChat-->>synapse_probe: return probe response and cost notice
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Comment |
Summary
P0/P1 polish after post-merge review of CAS/Synapse insights (PR #11).
Fixes
notConnectedMessage()(OAuth-first);oauth-expiredsource; older tools no longer claimCAS_MCP_TOKEN-onlyfetchWithTimeouton MCP (20s), REST (20s), health (5s), probe (15s)cas_safe_run_traceis no longer untrusted-fenced (our formatter, not agent prose)cas_pipeline_status+synapse_probewithout CAS OAuthlive=falsefree health; do not useSYNAPSE_MCP_BEARER_TOKENfor chatcas_safe_run_insightsTesting (observed)
bun test test/plugin/cas-bridge/cas-bridge-routing.test.ts— formatter/routing/polish cases pass (23 explicit pass). One unnamed hang after suite is a pre-existing package resolve noise (zod via tool registry), not this diff.Sibling safety
Worked only in worktree
opencode---cas-insights-polish. Did not touch primary dirtypackage.json/bun.lockor siblingfix-slow-startup.Deploy
Fork-local
.opencode/only — merge todev+ restart OpenCode. No Coolify/ACA.Summary by CodeRabbit
New Features
Bug Fixes