Skip to content

Add coding worker profile setup#7

Merged
rohitg00 merged 1 commit into
mainfrom
feature/coding-full-profile
May 13, 2026
Merged

Add coding worker profile setup#7
rohitg00 merged 1 commit into
mainfrom
feature/coding-full-profile

Conversation

@rohitg00
Copy link
Copy Markdown
Collaborator

@rohitg00 rohitg00 commented May 13, 2026

Summary

  • Add iii-code setup --coding-full and iii-code doctor --coding-full for coding-adjacent workers (mcp, iii-lsp, iii-database).
  • Add first-turn worker discovery context so chat/run agents inspect live functions before using tools.
  • Make doctor gracefully fall back from missing harness::status to the core function stack.
  • Increase chat stream timeout to 30 minutes and keep session summaries anchored on the user prompt.

Validation

  • cargo fmt -- --check
  • cargo test
  • cargo clippy --all-targets -- -D warnings
  • cargo install --path .
  • iii-code doctor --coding-full (with live iii engine; core stack fallback ok, anthropic auth ok)

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Increased chat stream timeout from 10 to 30 minutes to prevent premature interruptions on longer conversations.
    • Improved diagnostic messaging for unavailable system components during health checks.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

📝 Walkthrough

Walkthrough

This PR contains three independent updates: refactored health-probe reporting that defers harness-unavailable messages until core-stack results are known, an increased default timeout for chat commands from 10 to 30 minutes, and reordered user message construction that appends client context after the user prompt instead of prefixing it.

Changes

Configuration and Behavior Updates

Layer / File(s) Summary
Health probe conditional reporting
src/app.rs
report_harness_or_core no longer prints harness-unavailable messages immediately; instead, messages are deferred and printed conditionally alongside core-stack probe results. Early writeln calls in both success and error paths are removed; conditional output is added for cases when core is accepted, missing required functions, or core-functions probe errors.
Chat command timeout default
src/cli.rs
ChatArgs.stream_timeout_ms default increases from 600_000 to 1_800_000 in both the clap argument definition and Default trait implementation, with test assertion updated to match.
User message formatting
src/payload.rs
build_worker_aware_user_message reorders construction to append III_CODE_CLIENT_CONTEXT after the prompt instead of prefixing it, changing message structure from context-first to prompt-first with test assertions updated to reflect the new order.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • rohitg00/iii-code#4: Both PRs modify src/app.rs's harness-vs-core health probing logic in report_harness_or_core (changing how/when "harness unavailable" and core-stack probe results are reported).
  • rohitg00/iii-code#5: The main PR's src/payload.rs change to build_worker_aware_user_message (switching III_CODE_CLIENT_CONTEXT order to append after the prompt) is directly related to PR #5's introduction of that same client-context helper for first-turn prompting.

Poem

🐰 Three tweaks across the codebase land,
Health probes now defer with careful hand,
Chat waits longer for its response to shine,
Prompts greet context in better design.
Small changes, big clarity—thumpity-thump! 🎯

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'Add coding worker profile setup' is only partially related to the changeset. While the PR objectives mention introducing a 'coding-full' profile, the actual changes focus on health-probe fallback reporting, stream timeout increases, and message formatting—not on setup or profile configuration itself. Consider revising the title to better reflect the main technical changes, such as 'Implement harness fallback, increase chat timeout, and adjust message formatting' or similar, or verify if the title should describe the overall feature rather than implementation details.
Docstring Coverage ⚠️ Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/coding-full-profile

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.

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.

🧹 Nitpick comments (1)
src/cli.rs (1)

139-140: ⚡ Quick win

Consolidate the chat timeout default into a shared constant.

1_800_000 is defined in both the clap arg (Line 139) and Default impl (Line 160), which can drift later. Use one constant for both call sites.

♻️ Proposed refactor
+const CHAT_STREAM_TIMEOUT_MS: u64 = 1_800_000;
+
 #[derive(Debug, Args, Clone)]
 pub struct ChatArgs {
@@
-    #[arg(long, default_value_t = 1_800_000)]
+    #[arg(long, default_value_t = CHAT_STREAM_TIMEOUT_MS)]
     pub stream_timeout_ms: u64,
@@
-            stream_timeout_ms: 1_800_000,
+            stream_timeout_ms: CHAT_STREAM_TIMEOUT_MS,

Also applies to: 160-160

🤖 Prompt for 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.

In `@src/cli.rs` around lines 139 - 140, Declare a single shared constant (e.g.,
STREAM_TIMEOUT_MS_DEFAULT or CHAT_TIMEOUT_MS_DEFAULT) and replace the duplicated
literal 1_800_000 in both the clap arg attribute for stream_timeout_ms and the
Default implementation for the struct so both sites reference that constant;
update the #[arg(long, default_value_t = ...)] on stream_timeout_ms and the
Default::default() field initialization to use the new constant (referencing
stream_timeout_ms and the Default impl to find the two replacement locations).
🤖 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.

Nitpick comments:
In `@src/cli.rs`:
- Around line 139-140: Declare a single shared constant (e.g.,
STREAM_TIMEOUT_MS_DEFAULT or CHAT_TIMEOUT_MS_DEFAULT) and replace the duplicated
literal 1_800_000 in both the clap arg attribute for stream_timeout_ms and the
Default implementation for the struct so both sites reference that constant;
update the #[arg(long, default_value_t = ...)] on stream_timeout_ms and the
Default::default() field initialization to use the new constant (referencing
stream_timeout_ms and the Default impl to find the two replacement locations).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d3b4d1f2-e3a7-4b48-a5e8-b789d73ea870

📥 Commits

Reviewing files that changed from the base of the PR and between 8dbd4b1 and 3bc3187.

📒 Files selected for processing (3)
  • src/app.rs
  • src/cli.rs
  • src/payload.rs

@rohitg00 rohitg00 merged commit 62b56c6 into main May 13, 2026
1 check passed
@rohitg00 rohitg00 deleted the feature/coding-full-profile branch May 13, 2026 13:34
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