Skip to content

refactor(runtime): compile mode profiles once - #225

Closed
Waishnav wants to merge 1 commit into
refactor/v11-config-seamsfrom
refactor/v11-runtime-composition
Closed

refactor(runtime): compile mode profiles once#225
Waishnav wants to merge 1 commit into
refactor/v11-config-seamsfrom
refactor/v11-runtime-composition

Conversation

@Waishnav

@Waishnav Waishnav commented Aug 23, 2026

Copy link
Copy Markdown
Owner

The server currently rediscovers the meaning of tool, widget, skill, and artifact settings through repeated conditionals, which makes registration and model guidance easy to drift apart. This compiles resolved configuration once into typed runtime profiles and makes server composition consume those concrete capabilities instead of interpreting raw mode selectors throughout the request path.

This PR is stacked on #224 and is intended to preserve the existing public tool surfaces and instructions.

@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: f73245d6-81ba-401b-94c5-118a3b58678b

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.

@greptile-apps

greptile-apps Bot commented Aug 23, 2026

Copy link
Copy Markdown

Greptile Summary

This PR separates resolved configuration from compiled runtime capabilities so tool, presentation, skills, artifact, and instruction profiles are derived once during server startup.

  • Adds RuntimeConfig and centralized profile compilation.
  • Updates MCP tool registration, descriptions, widget metadata, and startup reporting to use compiled profiles.
  • Updates direct server construction in tests to compile the resolved configuration first.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code failure identified.

The compiled profiles preserve the prior configuration branches, all repository call sites use the new RuntimeConfig contract, and no reachable stale-configuration path exists in current callers.

Important Files Changed

Filename Overview
src/runtime-config.ts Introduces centralized, typed compilation of tool, presentation, skills, artifact, and instruction profiles without a concrete behavioral regression.
src/server.ts Consumes one compiled runtime profile across MCP sessions and consistently replaces the previous inline mode checks.
src/config.ts Renames the effective configuration interface to ResolvedConfig while preserving ServerConfig as a compatibility alias.
src/server.test.ts Updates direct createMcpServer construction to satisfy the new RuntimeConfig boundary.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Environment and config files] --> B[loadConfig]
    B --> C[ResolvedConfig]
    C --> D[compileRuntime]
    D --> E[RuntimeConfig]
    E --> F[createServer]
    F --> G[Shared MCP server sessions]
    E --> H[Tool surface]
    E --> I[Presentation profile]
    E --> J[Skills capability]
    E --> K[Artifact capability]
    E --> L[Compiled instructions]
Loading

Reviews (1): Last reviewed commit: "refactor(runtime): compile mode profiles..." | Re-trigger Greptile

@Waishnav

Copy link
Copy Markdown
Owner Author

Closing this stacked review in favor of a single PR containing the complete runtime/config composition refactor.

@Waishnav Waishnav closed this Aug 23, 2026
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