Skip to content

debug-flag#44

Merged
yaacov merged 1 commit into
mainfrom
debug-flags
Jun 11, 2026
Merged

debug-flag#44
yaacov merged 1 commit into
mainfrom
debug-flags

Conversation

@yaacov

@yaacov yaacov commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added --dump-http and --dump-http-dir CLI options to capture HTTP traffic.
    • New configuration options for controlling HTTP dump locations.
  • Documentation

    • Updated documentation with new CLI and configuration options for HTTP traffic capture.
  • Tests

    • Added test coverage for HTTP dump configuration.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yaacov, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 56 minutes and 55 seconds. Learn how PR review limits work.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0250e851-d650-4563-bea9-bc7cc95d5354

📥 Commits

Reviewing files that changed from the base of the PR and between 0e6238c and e4b38ba.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • README.md
  • mtv_agent/cli.py
  • mtv_agent/server/app.py
  • mtv_agent/server/config.py
  • mtv_agent/server/data/config.json.example
  • tests/test_config.py
📝 Walkthrough

Walkthrough

This PR replaces LLM-specific dump configuration fields with HTTP-focused equivalents. Settings fields dump_llm and dump_dir are replaced with dump_http and dump_http_dir. Configuration loading, CLI arguments, server initialization, example config, tests, and documentation are updated accordingly.

Changes

HTTP Dump Configuration Replacement

Layer / File(s) Summary
Configuration schema and loading
mtv_agent/server/config.py, mtv_agent/server/data/config.json.example, tests/test_config.py
Settings dataclass replaces dump_llm/dump_dir with dump_http/dump_http_dir. load_settings() populates these from MTV_AGENT_DUMP_HTTP* environment variables and debug.dumpHttp* config keys. Tests verify both config file and environment variable loading paths.
CLI argument and environment setup
mtv_agent/cli.py
New --dump-http-dir CLI argument accepts a custom dump directory. Server subprocess environment is constructed to set MTV_AGENT_DUMP_HTTP and MTV_AGENT_DUMP_HTTP_DIR conditionally based on CLI flags, replacing prior single-flag logic.
Server LLM client initialization
mtv_agent/server/app.py
LLMClient dump_dir parameter in lifespan() is derived from the new settings.dump_http and settings.dump_http_dir instead of prior dump-related fields.
User documentation
README.md
README updated to document mtv-agent run --dump-http and mtv-agent run --dump-http-dir DIR CLI options and the debug { dumpHttp, dumpHttpDir } configuration section.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • kubev2v/mtv-agent#43: Both PRs modify the HTTP dump configuration plumbing in mtv_agent/cli.py and mtv_agent/server/config.py; this PR extends it with MTV_AGENT_DUMP_HTTP_DIR and renames the config fields from LLM-based to HTTP-based naming.

Poem

🐰 HTTP dumps now flow with grace,
No more LLM tracing the place,
Directory paths, all set with care,
Debug logs written just where you dare,
Config refactored, clean as can be!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'debug-flag' is vague and does not clearly describe the main change. The PR implements HTTP dump functionality (--dump-http and --dump-http-dir options), not a generic debug flag. Revise the title to be more specific and descriptive, such as 'Add HTTP request/response dump options' or 'Implement --dump-http and --dump-http-dir CLI options'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 debug-flags

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.

Signed-off-by: yaacov <yzamir@redhat.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@mtv_agent/server/app.py`:
- Line 80: The assignment to dump_dir in app.py is too long for the formatter;
break it across multiple lines to respect line-length limits by using a short
conditional expression split with parentheses or an if/else block so
Path(settings.dump_http_dir).expanduser() and the conditional settings.dump_http
are on separate lines; update the expression that sets dump_dir (referencing
dump_dir, Path, settings.dump_http_dir, and settings.dump_http) to a multi-line,
formatter-friendly form.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1c0bf16b-1744-40c5-99ed-1b3373a5a58f

📥 Commits

Reviewing files that changed from the base of the PR and between 9f1ab85 and 0e6238c.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • README.md
  • mtv_agent/cli.py
  • mtv_agent/server/app.py
  • mtv_agent/server/config.py
  • mtv_agent/server/data/config.json.example
  • tests/test_config.py

Comment thread mtv_agent/server/app.py Outdated
@yaacov yaacov merged commit 8ca6ea3 into main Jun 11, 2026
4 checks passed
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