Skip to content

fix: implement deriver custom instructions#430

Open
adavyas wants to merge 3 commits intofix/prefix-based-cache-optimfrom
fix/implement-custom-instructions
Open

fix: implement deriver custom instructions#430
adavyas wants to merge 3 commits intofix/prefix-based-cache-optimfrom
fix/implement-custom-instructions

Conversation

@adavyas
Copy link
Copy Markdown
Contributor

@adavyas adavyas commented Mar 17, 2026

Summary

Implements reasoning.custom_instructions for the deriver on top of the prefix-cache prompt split from #425.

What Changed

  • keeps custom_instructions in resolved reasoning config
  • adds custom_instructions to the deriver user prompt
  • updates deriver prompt token estimation to include optional custom instructions
  • adds tests for config precedence, prompt rendering, and deriver wiring

Scope

This only implements custom_instructions for the deriver.

It does not add custom_instructions support to:

  • dialectic
  • dreamer

Why

The schema already exposed reasoning.custom_instructions, but it was not used at runtime. This wires it into the deriver while preserving the cache-friendly split introduced in #425 by keeping the instructions in the user message rather than the stable system prompt.

Testing

Verified locally with:

  • python -m py_compile on changed files
  • basedpyright on changed files
  • targeted pytest on:
    • tests/deriver/test_deriver_processing.py
    • tests/deriver/test_prompts.py
    • tests/utils/test_config_helpers.py

Targeted pytest result:

  • 15 passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 17, 2026

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f347636b-77a3-4bde-8527-bf8ba27ec7a5

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/implement-custom-instructions
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

Tip

CodeRabbit can approve the review once all CodeRabbit's comments are resolved.

Enable the reviews.request_changes_workflow setting to automatically approve the review once all CodeRabbit's comments are resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant