Skip to content

refactor(runtime): compile configured capabilities - #233

Closed
Waishnav wants to merge 3 commits into
refactor/v11-harness-compositionfrom
refactor/v11-runtime-compiler
Closed

refactor(runtime): compile configured capabilities#233
Waishnav wants to merge 3 commits into
refactor/v11-harness-compositionfrom
refactor/v11-runtime-compiler

Conversation

@Waishnav

@Waishnav Waishnav commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Harness and artifact policy is currently reconstructed at multiple server registration sites. This layer compiles configuration once into concrete harness tool groups, model instructions, and artifact availability so server assembly consumes resolved capabilities instead of asking which mode is active.

Stacked on #232.

Stack created with GitHub Stacks CLIGive Feedback 💬

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 87c6e042-a07b-4526-81c2-d24028a72f47

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@Waishnav Waishnav changed the title refactor/v11 runtime compiler refactor(runtime): compile configured capabilities Aug 23, 2026
@greptile-apps

greptile-apps Bot commented Aug 23, 2026

Copy link
Copy Markdown

Greptile Summary

The PR moves harness selection and artifact availability into a compiled runtime configuration, then registers MCP tool groups from that compiled representation.

  • Adds harness compilation for minimal, full, and Codex tool contracts.
  • Adds runtime artifact-capability compilation and associated tests.
  • Refactors MCP server tool registration into composable group callbacks.
  • Changes the exported createMcpServer configuration contract, breaking existing package consumers.

Confidence Score: 4/5

The runtime composition is internally consistent, but the exported createMcpServer compatibility break should be fixed before merging.

Existing package consumers can still import createMcpServer from the public entry point, but they can no longer supply the previously accepted ServerConfig without a compile failure or missing-field runtime failure.

Files Needing Attention: src/server.ts, src/runtime-config.ts

Important Files Changed

Filename Overview
src/harness.ts Compiles each legacy harness mode into instructions and a behavior-preserving set of tool groups.
src/runtime-config.ts Adds the runtime compilation boundary for harness and artifact capability state.
src/server.ts Registers compiled tool groups correctly, but changes the exported createMcpServer contract incompatibly.
src/runtime-config.test.ts Covers all legacy harness mappings and artifact capability states.
src/server.test.ts Updates internal test construction to compile ServerConfig before creating an MCP server.
package.json Adds runtime configuration tests to the test script while retaining dist/server.js as the public package entry.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  SC[ServerConfig] --> CR[compileRuntime]
  CR --> RH[Compiled harness tool groups]
  CR --> AC[Artifact capability]
  RH --> MS[createMcpServer]
  AC --> MS
  MS --> TR[Register configured MCP tools]
Loading

Reviews (1): Last reviewed commit: "refactor(runtime): remove superseded har..." | Re-trigger Greptile

Comment thread src/server.ts
Comment on lines 695 to +696
export function createMcpServer(
config: ServerConfig,
config: RuntimeConfig,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Exported server config contract breaks

When an existing package consumer calls the exported createMcpServer with the previously accepted ServerConfig, the function now requires derived runtimeHarness and artifactCapability fields, causing TypeScript compilation to fail or untyped consumers to fail when those fields are accessed during server creation.

Knowledge Base Used: MCP server and workspace API

@Waishnav

Copy link
Copy Markdown
Owner Author

Closing this stacked PR because the v1.1 configuration/runtime refactor is being collapsed into one review PR. The commits are preserved in the combined branch.

@Waishnav Waishnav closed this Aug 23, 2026
@Waishnav

Copy link
Copy Markdown
Owner Author

Superseded by the combined v1.1 refactor PR #238.

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