Skip to content

fix: Fix latest 1.1.x reported bugs#383

Merged
frontegg-david merged 4 commits into
release/1.1.xfrom
bug-fixes
May 3, 2026
Merged

fix: Fix latest 1.1.x reported bugs#383
frontegg-david merged 4 commits into
release/1.1.xfrom
bug-fixes

Conversation

@frontegg-david
Copy link
Copy Markdown
Contributor

@frontegg-david frontegg-david commented May 2, 2026

Summary by CodeRabbit

  • New Features

    • Control non-finite-number handling in outputs (allowNonFinite) and added non-finite detection utility
    • Added a CLI "divide" tool for e2e/demo use
    • CLI package now publishes TypeScript types
    • Exposed decorator metadata helper for SDK consumers
  • Bug Fixes

    • Preserve explicit registry port (e.g. 0) for CLI builds
    • More robust CommonJS/TS config loading with clearer errors
    • Preserve original error objects/messages in runtime flows
    • Return JSON-RPC error for uninitialized sessions
  • Tests

    • Added E2E and unit tests covering CLI exit codes, prompt command, JSON-RPC unknown-intent, non-finite outputs, and tooling checks
  • Documentation

    • Updated auto-generated skills header/version file

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 2, 2026

📝 Walkthrough

Walkthrough

Preserves original errors in FlowControl, adds non-finite-number output validation (opt-out via metadata), returns JSON‑RPC error envelopes for uninitialized sessions, enhances TypeScript config loading with require→import→esbuild fallback plus tryLoad API, switches decorator metadata access to a helper, tweaks CLI spawn/port handling, and adds tests and a divide tool fixture.

Changes

Error Handling, Output Validation, Session Routing, Config & CLI Wiring

Layer / File(s) Summary
Data Shape / Types
libs/sdk/src/common/interfaces/flow.interface.ts, libs/cli/src/commands/package/types.ts, libs/sdk/src/common/metadata/front-mcp.metadata.ts
FlowControl.fail now attaches originalError. Registry app port becomes optional (port?: number). FrontMcpBaseMetadata gains optional output?: { allowNonFinite?: boolean }.
Utilities
libs/utils/src/content/content.ts, libs/utils/src/content/index.ts, libs/utils/src/index.ts, libs/sdk/src/errors/mcp.error.ts, libs/sdk/src/errors/index.ts
Added findNonFiniteNumber(value) and re-exported it. Added extractPublicMessage(error) and re-exported it.
Core Runtime / Flows
libs/sdk/src/tool/flows/call-tool.flow.ts, libs/sdk/src/direct/direct-server.ts, libs/sdk/src/scope/flows/http.request.flow.ts
CallToolFlow.execute re-throws caught FlowControl unchanged; CallToolFlow.finalize rejects outputs containing non-finite numbers unless scope.metadata.output?.allowNonFinite === true. DirectMcpServerImpl.runFlow rethrows originalError for FlowControl fail. HTTP router detects JSON‑RPC POSTs and returns a JSON‑RPC error (code: -32600, status 200, JSON content-type, preserving id) for unknown intent when session not initialized.
Config Loader & Decorator Wiring
libs/cli/src/config/frontmcp-config.loader.ts, libs/cli/src/config/index.ts, libs/sdk/src/common/decorators/front-mcp.decorator.ts, libs/sdk/src/direct/connect.ts, libs/sdk/src/esm-loader/esm-manifest.ts
.ts loader now tries require(), then dynamic import(), then an esbuild bundle+evaluate fallback; esbuild failures are surfaced combined with require errors. Added tryLoadFrontMcpConfig(cwd) returning undefined for missing/legacy exec-only shapes. Introduced FRONTMCP_CONFIG_METADATA_KEY and getDecoratorConfig(); modules now resolve decorator config via the helper.
CLI Tooling
libs/cli/src/commands/dev/doctor.ts, libs/cli/src/commands/dev/__tests__/doctor.spec.ts, libs/cli/src/commands/package/install.ts, libs/cli/package.json
runDoctor spawns platform-appropriate npm binary (npm.cmd on Windows) without shell: true. install uses opts.port ?? manifestData.network?.defaultPort preserving explicit 0. libs/cli/package.json adds "types": "./dist/src/index.d.ts".
Fixtures & Tests
apps/e2e/demo-e2e-cli-exec/fixture/src/apps/cli-exec/tools/divide.tool.ts, apps/e2e/demo-e2e-cli-exec/fixture/src/apps/cli-exec/index.ts, apps/e2e/demo-e2e-cli-exec/e2e/cli-errors.e2e.spec.ts, apps/e2e/demo-e2e-cli-exec/e2e/cli-prompts.e2e.spec.ts, apps/e2e/demo-e2e-elicitation/e2e/streamable-http-transport.e2e.spec.ts, libs/sdk/src/scope/flows/__tests__/http.request.unknown-intent.spec.ts, libs/cli/src/config/__tests__/frontmcp-config.loader.spec.ts, libs/utils/src/content/content.spec.ts, apps/e2e/demo-e2e-standalone/e2e/standalone.e2e.spec.ts
Added divide tool and registered it in the CLI-e2e fixture. New/updated tests: CLI exit-code conventions, prompt get behavior, streamable HTTP transport JSON‑RPC uninitialized-session test, unknown-intent router tests, non-finite detection tests, config loader CommonJS/legacy handling, doctor spawn assertions, and standalone E2E updated expectations for JSON‑RPC error envelopes.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant HTTPRouter
    participant AuthVerifier
    participant JSONRPCResponder
    Client->>HTTPRouter: POST /tools/list (JSON-RPC, no initialize)
    HTTPRouter->>AuthVerifier: verify / decide intent
    AuthVerifier-->>HTTPRouter: decision.intent == "unknown"
    HTTPRouter->>JSONRPCResponder: respondNoSession(id)
    JSONRPCResponder-->>Client: 200 OK\nContent-Type: application/json\nJSON-RPC error (code -32600)
Loading
sequenceDiagram
    participant CallToolFlow
    participant OutputParser
    participant NonFiniteChecker
    participant ConfigMetadata
    CallToolFlow->>OutputParser: parse tool raw output
    OutputParser-->>CallToolFlow: parsed data
    CallToolFlow->>ConfigMetadata: read scope.metadata.output.allowNonFinite
    ConfigMetadata-->>CallToolFlow: allowNonFinite (true|false)
    CallToolFlow->>NonFiniteChecker: findNonFiniteNumber(parsed)
    alt non-finite found and not allowed
        NonFiniteChecker-->>CallToolFlow: {path, value}
        CallToolFlow->>CallToolFlow: throw InvalidOutputError(details)
    else allowed or none found
        NonFiniteChecker-->>CallToolFlow: undefined
        CallToolFlow-->>Client: success response
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hop through flows both wide and deep,

I keep original errors safe to keep,
I sniff for NaN and infinite sky,
I answer JSON‑RPC with a clear "not initialized" cry,
Hoppity hop — the patch is neat and spry.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix: Fix latest 1.1.x reported bugs' is vague and generic, using the non-descriptive term 'bugs' without clarifying which specific issues or features are being addressed. While it indicates a bug-fix changeset, it does not convey meaningful information about what was actually fixed. Replace with a more specific title that highlights the primary fix, such as 'fix: Handle JSON-RPC errors for uninitialized sessions' or 'fix: Correct exit codes and error handling for CLI operations' based on the main change.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 70.00% which is sufficient. The required threshold is 65.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bug-fixes

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get your free trial and get 200 agent minutes per Slack user (a $50 value).


Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🧹 Nitpick comments (1)
libs/sdk/src/tool/flows/call-tool.flow.ts (1)

1228-1243: 💤 Low value

Consider including the path in the error message for easier debugging.

The logging captures path and value, but InvalidOutputError() is thrown without context. Users seeing this error won't know which field caused the failure without checking logs.

💡 Optional: include path in error
         throw new InvalidOutputError();
+        throw new InvalidOutputError(`Non-finite number at '${found.path}'`);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@libs/sdk/src/tool/flows/call-tool.flow.ts` around lines 1228 - 1243, The
InvalidOutputError thrown in the allowNonFinite check lacks context; update the
throw to include the offending field path (and optionally value) so callers can
surface it without checking logs. In the block using allowNonFinite, when
findNonFiniteNumber(parseResult.data) returns found, construct/throw an
InvalidOutputError that includes found.path (and/or String(found.value)) in its
message or properties (same area where this.logger.error is called), and ensure
the change references the existing symbols allowNonFinite, findNonFiniteNumber,
and InvalidOutputError so the error preserves the same semantics while carrying
path info.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@libs/cli/src/commands/package/install.ts`:
- Around line 125-127: The port fallback currently uses the logical OR which
treats 0 as falsy; change the fallback in the port assignment to use the nullish
coalescing operator so an explicit --port 0 is preserved: update the statement
that defines port (currently using opts.port ||
manifestData.network?.defaultPort) to use opts.port ??
manifestData.network?.defaultPort so only null/undefined fall back to
manifestData.network?.defaultPort.

In `@libs/cli/src/config/__tests__/frontmcp-config.loader.spec.ts`:
- Around line 1-3: The tests use synchronous fs calls; change them to the async
helpers from `@frontmcp/utils` by importing mkdtemp, writeFile, and rm and
replacing fs.mkdtempSync, fs.writeFileSync, and fs.rmSync accordingly; make the
helper function makeProject async (and any helper callers in this spec) and
update all test invocations to await makeProject, and ensure cleanup uses await
rm(...) with proper options to mirror the previous sync behavior.

In `@libs/cli/src/config/frontmcp-config.loader.ts`:
- Around line 103-104: Replace direct fs usage for reading the config by
importing and using the filesystem wrapper from `@frontmcp/utils`: remove or stop
using fs.readFileSync(configPath, 'utf-8') and instead import readFileSync from
'@frontmcp/utils' and call readFileSync(configPath, 'utf-8') where the variable
source is assigned; keep the existing esbuild variable and configPath unchanged
so only the import and the call to readFileSync change.
- Around line 102-110: Replace the direct fs.readFileSync usage in
loadTsConfigViaEsbuild with the readFileSync export from `@frontmcp/utils` and
change the esbuild.transformSync call to an async esbuild.build call that
bundles dependencies; specifically, import/read via readFileSync from
`@frontmcp/utils` instead of fs, convert loadTsConfigViaEsbuild to await
esbuild.build({ entryPoints: [configPath], bundle: true, write: false, platform:
'node', packages: 'external', target: 'es2022' }) (or equivalent options) so
sibling .ts helpers are bundled into the output, and return/parse the built
output instead of the transformSync result.

In `@libs/sdk/src/errors/mcp.error.ts`:
- Around line 584-613: The function extractPublicMessage can recurse
indefinitely on cyclic error chains; add a visited-object guard (e.g., a Set
passed as an optional parameter) to track objects already seen and short-circuit
when revisiting one. Update extractPublicMessage to accept an internal visited
Set, add the current error to it before exploring originalError or cause, and on
any recursive call pass the same Set; if a candidate inner/cause is already in
visited, skip it and fall back to the next option (or return 'Unknown error') to
avoid stack overflows. Ensure checks reference the existing symbols:
extractPublicMessage, PublicMcpError, McpError, originalError, and cause so all
recursive paths use the guard.

In `@libs/sdk/src/scope/flows/http.request.flow.ts`:
- Around line 285-302: Change the helper respondNoSession to return void (remove
the unconditional throw new Error('unreachable')) and keep the JSON response
behavior; then update each call site that invokes respondNoSession() in this
flow (the three session-check locations where it was previously used) to add an
explicit return; immediately after the respondNoSession() call so control does
not fall through to this.next(). Ensure the helper signature and all call sites
compile after making respondNoSession return void.

---

Nitpick comments:
In `@libs/sdk/src/tool/flows/call-tool.flow.ts`:
- Around line 1228-1243: The InvalidOutputError thrown in the allowNonFinite
check lacks context; update the throw to include the offending field path (and
optionally value) so callers can surface it without checking logs. In the block
using allowNonFinite, when findNonFiniteNumber(parseResult.data) returns found,
construct/throw an InvalidOutputError that includes found.path (and/or
String(found.value)) in its message or properties (same area where
this.logger.error is called), and ensure the change references the existing
symbols allowNonFinite, findNonFiniteNumber, and InvalidOutputError so the error
preserves the same semantics while carrying path info.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 06cc9435-4ca5-45bb-9996-d9f4eb4b6249

📥 Commits

Reviewing files that changed from the base of the PR and between c98c025 and 27313c5.

⛔ Files ignored due to path filters (18)
  • libs/cli/src/commands/build/__tests__/adapters.spec.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/adapters/cloudflare.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/adapters/distributed.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/__tests__/build-exec-cli.integration.spec.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/__tests__/generate-cli-entry.spec.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/__tests__/installer-script.spec.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/__tests__/manifest.spec.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/__tests__/runner-script.spec.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/cli-runtime/generate-cli-entry.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/cli-runtime/schema-extractor.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/index.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/installer-script.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/manifest.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/runner-script.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/index.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/mcpb/__tests__/manifest.spec.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/mcpb/manifest.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/types.ts is excluded by !**/build/**
📒 Files selected for processing (24)
  • apps/e2e/demo-e2e-cli-exec/e2e/cli-errors.e2e.spec.ts
  • apps/e2e/demo-e2e-cli-exec/e2e/cli-prompts.e2e.spec.ts
  • apps/e2e/demo-e2e-elicitation/e2e/streamable-http-transport.e2e.spec.ts
  • libs/cli/package.json
  • libs/cli/src/commands/dev/__tests__/doctor.spec.ts
  • libs/cli/src/commands/dev/doctor.ts
  • libs/cli/src/commands/package/install.ts
  • libs/cli/src/commands/package/types.ts
  • libs/cli/src/config/__tests__/frontmcp-config.loader.spec.ts
  • libs/cli/src/config/frontmcp-config.loader.ts
  • libs/sdk/src/common/interfaces/flow.interface.ts
  • libs/sdk/src/common/metadata/__tests__/parse-lite.spec.ts
  • libs/sdk/src/common/metadata/front-mcp.metadata.ts
  • libs/sdk/src/common/tokens/front-mcp.tokens.ts
  • libs/sdk/src/direct/direct-server.ts
  • libs/sdk/src/errors/index.ts
  • libs/sdk/src/errors/mcp.error.ts
  • libs/sdk/src/scope/flows/__tests__/http.request.unknown-intent.spec.ts
  • libs/sdk/src/scope/flows/http.request.flow.ts
  • libs/sdk/src/tool/flows/call-tool.flow.ts
  • libs/utils/src/content/content.spec.ts
  • libs/utils/src/content/content.ts
  • libs/utils/src/content/index.ts
  • libs/utils/src/index.ts

Comment thread libs/cli/src/commands/package/install.ts Outdated
Comment thread libs/cli/src/config/__tests__/frontmcp-config.loader.spec.ts Outdated
Comment thread libs/cli/src/config/frontmcp-config.loader.ts
Comment thread libs/cli/src/config/frontmcp-config.loader.ts Outdated
Comment thread libs/sdk/src/errors/mcp.error.ts
Comment thread libs/sdk/src/scope/flows/http.request.flow.ts
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@libs/cli/src/config/frontmcp-config.loader.ts`:
- Around line 71-76: When frontmcpConfigSchema.safeParse(raw) fails, don't
always return undefined; instead detect the legacy exec-only shape (e.g., raw
has top-level "cli" or "sea") and only then return undefined so loadExecConfig
can handle it, otherwise throw the validation error. Update the loader around
frontmcpConfigSchema.safeParse(raw) to inspect raw for legacy keys ("cli" or
"sea") and if absent throw result.error (or rethrow) rather than returning
undefined.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d2be9fc4-57f6-4ef7-b05c-b3062994c6e3

📥 Commits

Reviewing files that changed from the base of the PR and between 27313c5 and 3465326.

⛔ Files ignored due to path filters (10)
  • libs/cli/src/commands/build/exec/__tests__/build-exec-cli.integration.spec.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/cli-runtime/__tests__/extract-public-message-parity.spec.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/cli-runtime/extract-public-message.snippet.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/cli-runtime/generate-cli-entry.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/cli-runtime/schema-extractor.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/index.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/installer-script.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/exec/runner-script.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/index.ts is excluded by !**/build/**
  • libs/cli/src/commands/build/load-entry-config.ts is excluded by !**/build/**
📒 Files selected for processing (13)
  • CLAUDE.md
  • apps/e2e/demo-e2e-cli-exec/fixture/src/apps/cli-exec/index.ts
  • apps/e2e/demo-e2e-cli-exec/fixture/src/apps/cli-exec/tools/divide.tool.ts
  • libs/cli/src/commands/package/install.ts
  • libs/cli/src/config/__tests__/frontmcp-config.loader.spec.ts
  • libs/cli/src/config/frontmcp-config.loader.ts
  • libs/cli/src/config/index.ts
  • libs/sdk/src/common/decorators/front-mcp.decorator.ts
  • libs/sdk/src/direct/connect.ts
  • libs/sdk/src/errors/mcp.error.ts
  • libs/sdk/src/esm-loader/esm-manifest.ts
  • libs/sdk/src/scope/flows/http.request.flow.ts
  • libs/sdk/src/tool/flows/call-tool.flow.ts
✅ Files skipped from review due to trivial changes (4)
  • libs/cli/src/config/index.ts
  • apps/e2e/demo-e2e-cli-exec/fixture/src/apps/cli-exec/tools/divide.tool.ts
  • CLAUDE.md
  • libs/sdk/src/scope/flows/http.request.flow.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • libs/cli/src/commands/package/install.ts
  • libs/sdk/src/tool/flows/call-tool.flow.ts

Comment thread libs/cli/src/config/frontmcp-config.loader.ts
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2026

Performance Test Results

Status: ✅ All tests passed

Summary

Project Tests Passed Warnings Failed Leaks
✅ demo-e2e-agents 4 4 0 0 0
✅ demo-e2e-cache 11 11 0 0 0
✅ demo-e2e-codecall 4 4 0 0 0
✅ demo-e2e-config 4 4 0 0 0
✅ demo-e2e-direct 3 3 0 0 0
✅ demo-e2e-elicitation 1 1 0 0 0
✅ demo-e2e-errors 4 4 0 0 0
✅ demo-e2e-hooks 3 3 0 0 0
✅ demo-e2e-multiapp 4 4 0 0 0
✅ demo-e2e-notifications 3 3 0 0 0
✅ demo-e2e-openapi 2 2 0 0 0
✅ demo-e2e-providers 4 4 0 0 0
✅ demo-e2e-public 4 4 0 0 0
✅ demo-e2e-redis 15 15 0 0 0
✅ demo-e2e-remember 4 4 0 0 0
✅ demo-e2e-remote 5 5 0 0 0
✅ demo-e2e-serverless 2 2 0 0 0
✅ demo-e2e-skills 15 15 0 0 0
✅ demo-e2e-standalone 2 2 0 0 0
✅ demo-e2e-transport-recreation 3 3 0 0 0
✅ demo-e2e-ui 4 4 0 0 0

Total: 101 tests across 21 projects

📊 View full report in workflow run


Generated at: 2026-05-03T00:54:30.646Z
Commit: bd40d934

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/e2e/demo-e2e-standalone/e2e/standalone.e2e.spec.ts (1)

282-285: Extract the JSON-RPC error envelope into a shared interface instead of duplicating the inline type cast.

The same response shape appears at lines 282-285 and 300-303. Extracting a single JsonRpcErrorEnvelope interface improves consistency and aligns with the typing guidelines preferring interfaces for object shapes.

Suggested refactor
 import { expect, McpTestClient, test } from '@frontmcp/testing';
+
+interface JsonRpcErrorEnvelope {
+  jsonrpc?: string;
+  error?: { code?: number; message?: string };
+}
@@
-      const rootBody = (await rootResponse.json()) as {
-        jsonrpc?: string;
-        error?: { code?: number; message?: string };
-      };
+      const rootBody = (await rootResponse.json()) as JsonRpcErrorEnvelope;
@@
-      const isolatedBody = (await isolatedResponse.json()) as {
-        jsonrpc?: string;
-        error?: { code?: number; message?: string };
-      };
+      const isolatedBody = (await isolatedResponse.json()) as JsonRpcErrorEnvelope;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/e2e/demo-e2e-standalone/e2e/standalone.e2e.spec.ts` around lines 282 -
285, Extract the duplicated inline type used for rootResponse.json() into a
shared interface named e.g. JsonRpcErrorEnvelope and use it for both rootBody
and the later response variable; locate the two inline casts around rootBody and
the similar cast at the later response (the places currently typing as {
jsonrpc?: string; error?: { code?: number; message?: string } }) and replace
them with the interface, updating imports or file-scope declarations as needed
so both usages reference JsonRpcErrorEnvelope.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/e2e/demo-e2e-standalone/e2e/standalone.e2e.spec.ts`:
- Around line 282-285: Extract the duplicated inline type used for
rootResponse.json() into a shared interface named e.g. JsonRpcErrorEnvelope and
use it for both rootBody and the later response variable; locate the two inline
casts around rootBody and the similar cast at the later response (the places
currently typing as { jsonrpc?: string; error?: { code?: number; message?:
string } }) and replace them with the interface, updating imports or file-scope
declarations as needed so both usages reference JsonRpcErrorEnvelope.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 88b6be0a-5e0a-4b96-b177-af95478714f2

📥 Commits

Reviewing files that changed from the base of the PR and between 3465326 and 5ed7ee7.

📒 Files selected for processing (3)
  • apps/e2e/demo-e2e-standalone/e2e/standalone.e2e.spec.ts
  • libs/cli/src/config/__tests__/frontmcp-config.loader.spec.ts
  • libs/cli/src/config/frontmcp-config.loader.ts
✅ Files skipped from review due to trivial changes (1)
  • libs/cli/src/config/frontmcp-config.loader.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • libs/cli/src/config/tests/frontmcp-config.loader.spec.ts

@frontegg-david frontegg-david merged commit 5c6f287 into release/1.1.x May 3, 2026
15 of 16 checks passed
@frontegg-david frontegg-david deleted the bug-fixes branch May 3, 2026 00:47
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.nycrc.json:
- Around line 20-24: The patch lowers the global coverage thresholds in the
.nycrc.json (keys: "check-coverage", "statements", "branches", "functions",
"lines") to 60/49/58/60 which weakens the CI quality gate; restore those numeric
thresholds back to the repo standard (e.g., 95 for statements/lines/functions
and an appropriate branches value like 95) and set "check-coverage": true, or if
you truly need a temporary relaxation, add a clear comment in the PR and create
a documented exception (e.g., a separate config or README note) explaining why
and when it will be reverted.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f4ab1d44-1119-457d-aafb-3ec448b956e4

📥 Commits

Reviewing files that changed from the base of the PR and between 5ed7ee7 and 29a81ef.

📒 Files selected for processing (2)
  • .github/workflows/push.yml
  • .nycrc.json

Comment thread .nycrc.json
Comment on lines 20 to +24
"check-coverage": true,
"statements": 95,
"branches": 95,
"functions": 95,
"lines": 95
"statements": 60,
"branches": 49,
"functions": 58,
"lines": 60
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Don't lower the global coverage floor.

Dropping the enforced thresholds to 60/49/58/60 materially weakens the repo's quality gate and can let coverage regressions pass CI. If the current suite is below target, fix the coverage gap or scope a temporary, documented exception instead.

🔧 Suggested fix
-  "statements": 60,
-  "branches": 49,
-  "functions": 58,
-  "lines": 60
+  "statements": 95,
+  "branches": 95,
+  "functions": 95,
+  "lines": 95

Based on learnings, Never commit code with test failures, build warnings, or coverage below 95%.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"check-coverage": true,
"statements": 95,
"branches": 95,
"functions": 95,
"lines": 95
"statements": 60,
"branches": 49,
"functions": 58,
"lines": 60
"check-coverage": true,
"statements": 95,
"branches": 95,
"functions": 95,
"lines": 95
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.nycrc.json around lines 20 - 24, The patch lowers the global coverage
thresholds in the .nycrc.json (keys: "check-coverage", "statements", "branches",
"functions", "lines") to 60/49/58/60 which weakens the CI quality gate; restore
those numeric thresholds back to the repo standard (e.g., 95 for
statements/lines/functions and an appropriate branches value like 95) and set
"check-coverage": true, or if you truly need a temporary relaxation, add a clear
comment in the PR and create a documented exception (e.g., a separate config or
README note) explaining why and when it will be reverted.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 3, 2026

Cherry-pick Created

A cherry-pick PR to main has been automatically created.

Please review and merge if this change should also be in main.

If the cherry-pick is not needed, close the PR.

frontegg-david added a commit that referenced this pull request May 3, 2026
Cherry-picked from #383 (merged to release/1.1.x)
Original commit: 5c6f287

Co-authored-by: agentfront[bot] <agentfront[bot]@users.noreply.github.com>
Co-authored-by: frontegg-david <69419539+frontegg-david@users.noreply.github.com>
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