Skip to content

Conversation

@vsumner
Copy link
Contributor

@vsumner vsumner commented Jan 12, 2026

Addressed feedback: Updated OpenCode-Builder test to properly exercise production mergeAgentConfig logic.

Changes

  • Imported mergeAgentConfig from agents/utils.ts in test file
  • Test now uses actual mergeAgentConfig() function with BUILD_SYSTEM_PROMPT
  • Verifies prompt_append is appended with "\n" separator via real merge logic

Details

The test now:

  1. Imports BUILD_SYSTEM_PROMPT from build-prompt.ts
  2. Creates userConfig object with prompt_append
  3. Calls mergeAgentConfig({ prompt: BUILD_SYSTEM_PROMPT }, userConfig)
  4. Verifies the returned prompt contains both base and appended content

This properly tests the production code path, not just manual string concatenation.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files

Confidence score: 4/5

  • Overall risk looks low, with only a test-gap concern preventing full confidence in coverage of the merge logic.
  • src/plugin-handlers/config-handler.test.ts currently exercises manual string concatenation rather than the real mergeAgentConfig/resolveCategoryConfig path, so regressions in those functions could slip through without failing tests.
  • Pay close attention to src/plugin-handlers/config-handler.test.ts - strengthen coverage to ensure merge logic is truly exercised.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="src/plugin-handlers/config-handler.test.ts">

<violation number="1" location="src/plugin-handlers/config-handler.test.ts:105">
P2: Test does not exercise production merge logic; manual string concat will pass even if mergeAgentConfig/resolveCategoryConfig are broken</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

renekris added a commit to renekris/oh-my-glm that referenced this pull request Jan 13, 2026
@kdcokenny kdcokenny self-assigned this Jan 14, 2026
@kdcokenny
Copy link
Collaborator

@vsumner I'm getting a test error from this:

src/plugin-handlers/config-handler.test.ts:

# Unhandled error between tests
-------------------------------
1 | })
2 | {
    ^
SyntaxError: Export named 'mergeAgentConfig' not found in module '/Users/kenny/workspace/code-yeongyu/oh-my-opencode/src/plugin-handlers/config-handler.ts'.
      at loadAndEvaluateModule (2:1)
-------------------------------

@kdcokenny
Copy link
Collaborator

Once it passes tests, it will lgtm

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