Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

#51-applied red team and several tasks#2

Open
jonathanMLDev wants to merge 6 commits into
CppDigest:mainfrom
jonathanMLDev:dev-51
Open

#51-applied red team and several tasks#2
jonathanMLDev wants to merge 6 commits into
CppDigest:mainfrom
jonathanMLDev:dev-51

Conversation

@jonathanMLDev
Copy link
Copy Markdown
Collaborator

@jonathanMLDev jonathanMLDev commented Feb 4, 2026

Summary by CodeRabbit

  • New Features

    • Added CLI command for executing deep research tasks
    • Introduced task-based research workflows for competitor analysis, C++ compiler errors, Beast2 CI, Boost analysis, Cursor plans, MIT licensing, and RAGaaS platforms
  • Documentation

    • Rewrote README with comprehensive setup, installation, usage examples, and project structure details
    • Added environment configuration template and dependency specifications
  • Configuration

    • Updated project packaging and tooling setup for improved development experience

@wpak-ai
Copy link
Copy Markdown

wpak-ai commented Feb 18, 2026

@coderabbitai Review this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 18, 2026

@iTinkerBell: I'll review this PR for you.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 18, 2026

Warning

Rate limit exceeded

@jonathanMLDev has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 26 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ede7092f-fbc5-4b97-b292-47bd631afaee

📥 Commits

Reviewing files that changed from the base of the PR and between 0929797 and 11d196c.

⛔ Files ignored due to path filters (1)
  • src/.DS_Store is excluded by !**/.DS_Store
📒 Files selected for processing (28)
  • .gitignore
  • README.md
  • docs/RESEARCH_AGENT_WORKFLOW.md
  • run_deep_research.py
  • src/deep_research/__init__.py
  • src/deep_research/cli.py
  • src/deep_research/dataclasses.py
  • src/deep_research/main_process.py
  • src/deep_research/model_config.py
  • src/deep_research/multi_agent_supervisor.py
  • src/deep_research/pricing_calculator.py
  • src/deep_research/prompts.py
  • src/deep_research/red_team_evaluator.py
  • src/deep_research/report_productor.py
  • src/deep_research/research_agent.py
  • src/deep_research/research_agent_full.py
  • src/deep_research/research_agent_scope.py
  • src/deep_research/run_logger.py
  • src/deep_research/state_multi_agent_supervisor.py
  • src/deep_research/state_research.py
  • src/deep_research/state_scope.py
  • src/deep_research/usage_tracker.py
  • src/deep_research/utils.py
  • tasks/Investigate_competitors.py
  • tasks/collect_cpp_compiler_error_data.py
  • tasks/investigate_beast2_ci.py
  • tasks/investigate_boost_spike.py
  • tasks/investigate_mit.py
📝 Walkthrough

Walkthrough

This pull request significantly restructures the codebase, removing the entire multi-agent research orchestration system (including supervisor, agent workflows, and state management) and replacing it with task-specific investigation modules that delegate to a shared execute_main_process function. Documentation and configuration files are updated accordingly.

Changes

Cohort / File(s) Summary
Documentation & Configuration
README.md, pyproject.toml, requirements.txt, env.example, boost_library.json, src/__init__.py
README rewritten from ThinkDepth.ai-specific to general "Deep Research" overview with new sections on features, installation, and usage. pyproject.toml adds CLI entry point (deep-research), updates packaging config to use src/ layout, and adds Pyright/Ruff tooling. New requirements.txt and env.example files establish dependencies and environment variables. boost_library.json adds metadata for 173 Boost C++ libraries.
Removed Research Infrastructure
src/prompts.py, src/utils.py, src/research_agent.py, src/research_agent_full.py, src/research_agent_scope.py, src/multi_agent_supervisor.py, src/state_research.py, src/state_scope.py, src/state_multi_agent_supervisor.py
Entire multi-agent research pipeline removed, including: prompt templates (9 removed), utility functions (search, summarization, tool definitions), research agent workflows, supervisor coordination logic, and TypedDict/Pydantic state schemas. This eliminates ~1,200 lines of agent orchestration code.
New Task Investigation Modules
tasks/Investigate_competitors.py, tasks/collect_cpp_compiler_error_data.py, tasks/investigate_beast2_ci.py, tasks/investigate_boost_spike.py, tasks/investigate_cursor_plans.py, tasks/investigate_mit.py, tasks/investigate_ragaas.py
Seven new task-specific modules added (~971 lines total). Each module defines domain-specific research queries and delegates execution to a shared execute_main_process function. Tasks cover Boost library competitor analysis, C++ compiler errors, Beast2 CI investigation, Boost usage spikes, Cursor pricing, MIT licensing, and RAGaaS platforms. Includes error handling, Rich-based output formatting, and CLI integration.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Poem

🐰 The old supervisor took its rest,
Research agents flew the nest,
New task scouts hop through the land,
Each with query cards in hand,
Deep Research now runs so spry,
With execute_main_process on high! 🌟

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.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 '#51-applied red team and several tasks' is vague and does not clearly describe the primary changes in the PR. Rewrite the title to clearly specify the main changes, e.g., 'Refactor research pipeline and add competitor investigation tasks' or 'Replace multi-agent orchestration with task-based workflow architecture'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 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.

@wpak-ai
Copy link
Copy Markdown

wpak-ai commented Feb 18, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 18, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@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: 7

🧹 Nitpick comments (2)
tasks/investigate_boost_spike.py (1)

207-216: Consider explicit conversion flag for f-string.

Per Ruff RUF010, use {e!s} instead of {str(e)} for cleaner f-string conversion.

♻️ Proposed fix
     except Exception as e:
         console.print(
             Panel(
-                f"[bold red]Unexpected error:[/bold red]\n{str(e)}\n\n"
+                f"[bold red]Unexpected error:[/bold red]\n{e!s}\n\n"
                 "If this is an API error, check your API keys and quota limits.",
                 title="[bold red]Fatal Error[/bold red]",
                 border_style="red",
             )
         )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tasks/investigate_boost_spike.py` around lines 207 - 216, Replace the
explicit str(e) call inside the f-string in the exception handling block with
the f-string conversion flag {e!s}; locate the except Exception as e block in
investigate_boost_spike.py (the console.print Panel constructing the "[bold
red]Unexpected error" message) and change the interpolation from {str(e)} to
{e!s} so Ruff RUF010 is satisfied and the f-string handles conversion cleanly.
tasks/investigate_mit.py (1)

132-141: Consider narrowing the broad exception catch or adding logging.

The broad Exception catch (flagged by Ruff BLE001) is acceptable for a CLI application to prevent crashes, but consider logging the full traceback for debugging purposes while showing a user-friendly message.

♻️ Optional improvement with traceback logging
+import traceback
+
     except Exception as e:
+        # Log full traceback for debugging
+        traceback.print_exc()
         console.print(
             Panel(
-                f"[bold red]Unexpected error:[/bold red]\n{str(e)}\n\n"
+                f"[bold red]Unexpected error:[/bold red]\n{e!s}\n\n"
                 "If this is an API error, check your API keys and quota limits.",
                 title="[bold red]Fatal Error[/bold red]",
                 border_style="red",
             )
         )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tasks/investigate_mit.py` around lines 132 - 141, The broad except Exception
as e block in tasks/investigate_mit.py currently swallows errors and only prints
a user-facing Panel then calls sys.exit(1); update this to either catch more
specific exceptions (replace except Exception with targeted exceptions used in
the try block) or log the full traceback before exiting by invoking the
logger/traceback (e.g., logging.exception(...) or capture
traceback.format_exc()) so the error details are recorded while keeping the
console.print Panel for users; retain sys.exit(1) for termination and reference
the existing console.print, Panel, the exception variable e, and sys.exit to
locate and update the handler.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pyproject.toml`:
- Around line 21-22: Create the package and module referenced by the entry
point: add src/deep_research/__init__.py and src/deep_research/cli.py and
implement a main() function that serves as the CLI entry (exported by
deep_research.cli:main); update run_deep_research.py to import and call
deep_research.cli.main() if it currently imports the same module, and ensure the
package is discoverable by the project (source root includes src) so the
pyproject.toml script deep-research = "deep_research.cli:main" works.

In `@README.md`:
- Around line 132-155: The fenced project-layout block starting with
"Deep_Research/" (containing entries like run_deep_research.py,
src/deep_research/, report_productor.py, etc.) in README.md lacks a fence
language tag; update the opening fence from ``` to ```text so the block becomes
a "text" fenced code block to satisfy MD040 and improve tooling compatibility.

In `@tasks/collect_cpp_compiler_error_data.py`:
- Around line 57-60: The argparse flag definition for "--research" is
incorrectly forcing research mode on by setting default=True; in the
parser.add_argument call that defines "--research" (action="store_true"), remove
the default=True so the flag defaults to False and users must opt in with
--research; apply the same removal for other similar add_argument occurrences in
the same file (the other blocks around the 100-128 area) to ensure non-research
runs are possible.

In `@tasks/investigate_beast2_ci.py`:
- Around line 256-271: The code unconditionally reads
report_for_beast2_ci/beast2_ci_final_report.md into initial_report even when not
needed, causing first-run failures and dead code; modify the block around
initial_report_file/initial_report so you only attempt to open and read the file
if it exists (e.g., check os.path.exists or try/except FileNotFoundError) and
then pass initial_report into execute_main_process via its initial_report
parameter (or remove the unused read entirely if you don't intend to supply an
initial report); update the call to execute_main_process to include
initial_report=initial_report when a report was successfully loaded, and ensure
initial_report is defined (None or omitted) otherwise.

In `@tasks/investigate_boost_spike.py`:
- Around line 45-116: The create_research_query function currently ignores its
distribution_data parameter and always uses the hardcoded spike_info; update
create_research_query to use the distribution_data when provided (e.g., validate
non-empty string and assign spike_info = distribution_data) and fall back to the
existing hardcoded spike_info if distribution_data is None/empty, or
alternatively remove the distribution_data parameter and its callers; reference
the create_research_query symbol to locate the change and ensure callers that
read the file and pass distribution_data are updated to match the new signature
if you remove the parameter.

In `@tasks/Investigate_competitors.py`:
- Around line 123-130: The for-loop is mistakenly re-slicing the
already-filtered libraries array with a hardcoded slice `libraries[73:74]`,
which overrides the CLI `start_index`/`max_libraries` filtering and processes
only one item; change the loop to iterate over the filtered `libraries` variable
(e.g., `for lib in libraries:`) so `start_index` and `max_libraries` take effect
and continue calling `run_for_library(lib)` for each entry.

In `@tasks/investigate_mit.py`:
- Around line 21-46: The docstring for create_research_query incorrectly states
it reads prompt.txt; update the function to match behavior by either
implementing file reading of "prompt.txt" (open and read, fall back to
default_query on missing/empty file, handle exceptions) or change the docstring
to accurately describe that the function currently returns only the hardcoded
default_query; reference create_research_query, prompt.txt, and default_query
when making the change so reviewers can find and verify the fix.

---

Nitpick comments:
In `@tasks/investigate_boost_spike.py`:
- Around line 207-216: Replace the explicit str(e) call inside the f-string in
the exception handling block with the f-string conversion flag {e!s}; locate the
except Exception as e block in investigate_boost_spike.py (the console.print
Panel constructing the "[bold red]Unexpected error" message) and change the
interpolation from {str(e)} to {e!s} so Ruff RUF010 is satisfied and the
f-string handles conversion cleanly.

In `@tasks/investigate_mit.py`:
- Around line 132-141: The broad except Exception as e block in
tasks/investigate_mit.py currently swallows errors and only prints a user-facing
Panel then calls sys.exit(1); update this to either catch more specific
exceptions (replace except Exception with targeted exceptions used in the try
block) or log the full traceback before exiting by invoking the logger/traceback
(e.g., logging.exception(...) or capture traceback.format_exc()) so the error
details are recorded while keeping the console.print Panel for users; retain
sys.exit(1) for termination and reference the existing console.print, Panel, the
exception variable e, and sys.exit to locate and update the handler.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2b552002-0a32-471e-8490-683be7d80edd

📥 Commits

Reviewing files that changed from the base of the PR and between 0f36418 and 0929797.

📒 Files selected for processing (22)
  • README.md
  • boost_library.json
  • env.example
  • pyproject.toml
  • requirements.txt
  • src/__init__.py
  • src/multi_agent_supervisor.py
  • src/prompts.py
  • src/research_agent.py
  • src/research_agent_full.py
  • src/research_agent_scope.py
  • src/state_multi_agent_supervisor.py
  • src/state_research.py
  • src/state_scope.py
  • src/utils.py
  • tasks/Investigate_competitors.py
  • tasks/collect_cpp_compiler_error_data.py
  • tasks/investigate_beast2_ci.py
  • tasks/investigate_boost_spike.py
  • tasks/investigate_cursor_plans.py
  • tasks/investigate_mit.py
  • tasks/investigate_ragaas.py
💤 Files with no reviewable changes (10)
  • src/init.py
  • src/research_agent_scope.py
  • src/state_research.py
  • src/prompts.py
  • src/research_agent.py
  • src/multi_agent_supervisor.py
  • src/utils.py
  • src/state_multi_agent_supervisor.py
  • src/state_scope.py
  • src/research_agent_full.py

Comment thread pyproject.toml
Comment thread README.md Outdated
Comment thread tasks/collect_cpp_compiler_error_data.py
Comment thread tasks/investigate_beast2_ci.py Outdated
Comment thread tasks/investigate_boost_spike.py Outdated
Comment thread tasks/Investigate_competitors.py
Comment thread tasks/investigate_mit.py Outdated
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants