Skip to content

Implement API-first runtime evidence and fail-closed OpenCLI adapters - #58

Merged
2233admin merged 1 commit into
mainfrom
agent/runtime-evidence-main-sync-20260803
Aug 3, 2026
Merged

Implement API-first runtime evidence and fail-closed OpenCLI adapters#58
2233admin merged 1 commit into
mainfrom
agent/runtime-evidence-main-sync-20260803

Conversation

@2233admin

Copy link
Copy Markdown
Owner

What changed

  • expose agent-oriented workflow demand, compile, lifecycle, and trace surfaces through the existing HTTP/MCP control plane
  • preserve materialized OpenCLI parameters through workflow assembly and runtime evidence
  • mark browser-, cookie-, and known-unavailable OpenCLI commands as preview-only and block unsafe materialization
  • synchronize frontend workflow catalog contracts and add focused regression coverage

Why

Agents need a governed API-first path that distinguishes catalog availability, compile previews, real dispatch, and resulting trace evidence. The previous working changes also treated some unverified OpenCLI commands as runnable and used a preview-only Twitter fixture for required-parameter materialization tests.

Impact

The control plane exposes clearer agent-facing workflow operations and fails closed when an OpenCLI dependency has not been verified. Runnable adapters continue to materialize required positional and named parameters correctly.

Root cause of the regression fixed during integration

The new availability boundary correctly classified browser/cookie adapters as preview_only, but two older integration tests still used the Twitter cookie adapter to validate required-parameter handling. Those tests now use a runnable non-browser fixture, preserving both contracts.

Validation

  • Backend targeted suite: 158 passed
  • Frontend workflow regressions: 59 passed
  • Frontend typecheck: passed
  • Sentrux session gate: passed with no structural degradation
  • git diff --check: passed

Code Intel's broader doctor stage still reports existing manifest reconciliation debt; native evidence and Sentrux completed successfully.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@repowise-bot

repowise-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

⏳ Repowise has not indexed this repository yet

No analysis on this PR because there is no index to compare against. Indexing usually runs automatically after install; if this persists, start it from the dashboard.

Index 2233admin/opencli-Razormind · Docs

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 29ef3916-8953-43b7-b1f4-9db11194e9ee

📥 Commits

Reviewing files that changed from the base of the PR and between d11580f and 0c24592.

📒 Files selected for processing (22)
  • backend/api/v1/studio_lifecycle.py
  • backend/main.py
  • backend/mcp_server.py
  • backend/workflow/demand_assembler.py
  • backend/workflow/node_registry.py
  • backend/workflow/opencli_adapter_nodes.py
  • backend/workflow/opencli_hda_tracer.py
  • frontend/components/flow/command-palette.tsx
  • frontend/lib/workflow/backend-opencli-adapter-nodes.ts
  • frontend/lib/workflow/schema.ts
  • frontend/lib/workflow/use-opencli-adapter-catalog.ts
  • frontend/next-env.d.ts
  • frontend/scripts/check-workflow-regressions.mjs
  • tests/integration/test_studio_lifecycle_api.py
  • tests/integration/test_workflow_capabilities_api.py
  • tests/integration/test_workflow_compile_api.py
  • tests/integration/test_workflow_opencli_hda_trace_api.py
  • tests/integration/test_workflow_patch_api.py
  • tests/unit/test_demand_assembler.py
  • tests/unit/test_main.py
  • tests/unit/test_mcp_server.py
  • tests/unit/test_opencli_adapter_nodes.py

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added API discovery information, bearer authentication details, and workflow guidance.
    • Added read-only tools for exploring capabilities, drafting workflows, previewing changes, and compiling drafts.
    • Added support for HTTP and RSS source presets.
  • Bug Fixes
    • Improved detection of isolated source nodes and clearer validation errors.
    • Improved popularity-related request handling and keyword extraction.
    • Prevented unavailable preview-only sources from running.
    • Limited source results to configured per-run maximums.
  • Tests
    • Expanded coverage for workflow validation, compilation, authentication, and source handling.

Walkthrough

The PR adds review-only workflow agent tools, API discovery metadata, isolated-source validation, demand keyword improvements, OpenCLI readiness controls, legacy catalog normalization, source preset compilation, and bounded dispatch results.

Changes

Workflow agent and source execution

Layer / File(s) Summary
Review-only agent workflow
backend/main.py, backend/mcp_server.py, tests/unit/test_main.py, tests/unit/test_mcp_server.py
The API publishes bearer authentication and agent workflow metadata. MCP exposes capability listing, intent drafting, patch preview, and in-memory compilation tools.
Demand assembly and source validation
backend/api/v1/studio_lifecycle.py, backend/workflow/demand_assembler.py, backend/workflow/node_registry.py, tests/integration/test_studio_lifecycle_api.py, tests/integration/test_workflow_compile_api.py, tests/unit/test_demand_assembler.py, tests/integration/test_workflow_patch_api.py
Draft validation reports isolated source nodes. Demand parsing improves keyword extraction and reports missing popularity ranking capability. HTTP and RSS source presets compile to the generic source-fetch binding.
OpenCLI readiness and canonical bindings
backend/workflow/opencli_adapter_nodes.py, frontend/lib/workflow/..., frontend/components/flow/command-palette.tsx, frontend/scripts/check-workflow-regressions.mjs, tests/integration/test_workflow_capabilities_api.py, tests/integration/test_workflow_patch_api.py, tests/unit/test_opencli_adapter_nodes.py, frontend/next-env.d.ts
OpenCLI availability metadata controls status and materialization. Read-only catalog mapping and legacy source ID repair preserve canonical bindings. Regression and integration tests cover runnable, preview-only, blocked, and invalid bindings.
Bounded OpenCLI dispatch results
backend/workflow/opencli_hda_tracer.py, tests/integration/test_workflow_opencli_hda_trace_api.py
Non-write dispatch results are capped by maxItemsPerRun and include truncation metadata.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Agent
  participant MCPServer
  participant WorkflowAPI
  Agent->>MCPServer: Inspect workflow capabilities
  MCPServer->>WorkflowAPI: Retrieve capabilities
  WorkflowAPI-->>MCPServer: Return readiness and contracts
  Agent->>MCPServer: Draft or preview changes
  MCPServer->>WorkflowAPI: Submit draft or patch preview
  WorkflowAPI-->>MCPServer: Return validation result
  Agent->>MCPServer: Compile draft
  MCPServer->>WorkflowAPI: Compile without persistence or execution
  WorkflowAPI-->>MCPServer: Return compile result
Loading

Suggested reviewers: lunnynight

Poem

A rabbit reviews each workflow thread,
Checks source paths before they’re spread.
Drafts stay still, previews glow,
Bounded results safely flow.
“Compile,” says Bun, “then let it run!”

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@2233admin
2233admin marked this pull request as ready for review August 3, 2026 14:26
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@2233admin
2233admin merged commit d409e55 into main Aug 3, 2026
8 of 9 checks passed
@2233admin
2233admin deleted the agent/runtime-evidence-main-sync-20260803 branch August 3, 2026 14:26
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.

2 participants