Skip to content

feat: profile presets; NoopVerifer, NoopPathExtractor - #55

Merged
bobrykov merged 2 commits into
masterfrom
feat/profile-presets
Jul 20, 2026
Merged

feat: profile presets; NoopVerifer, NoopPathExtractor#55
bobrykov merged 2 commits into
masterfrom
feat/profile-presets

Conversation

@bobrykov

Copy link
Copy Markdown
Contributor

No description provided.

@bobrykov
bobrykov force-pushed the feat/profile-presets branch from 3fc408b to 402627e Compare July 20, 2026 02:17
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 373f010a-b18f-4b5f-9003-b3f1bf90e9e8

📥 Commits

Reviewing files that changed from the base of the PR and between 3fc408b and 5f6ed29.

📒 Files selected for processing (9)
  • CHANGELOG.md
  • src/engine/bare.rs
  • src/engine/bare/stream.rs
  • src/lib.rs
  • src/middleware.rs
  • src/middleware/memoize.rs
  • src/middleware/verify.rs
  • src/presets.rs
  • src/stream/handler.rs
🚧 Files skipped from review as they are similar to previous changes (7)
  • src/middleware.rs
  • CHANGELOG.md
  • src/engine/bare/stream.rs
  • src/middleware/memoize.rs
  • src/middleware/verify.rs
  • src/stream/handler.rs
  • src/engine/bare.rs

📝 Walkthrough

Walkthrough

The PR adds runtime profiles, per-turn RequestOptions support to BareLoop and StreamHandler, forwards options through provider streaming calls, introduces no-op middleware implementations, exports the new APIs, and documents the runtime behavior.

Changes

Runtime request options

Layer / File(s) Summary
BareLoop request option propagation
src/engine/bare.rs, src/engine/bare/stream.rs, CHANGELOG.md
BareLoop stores configurable RequestOptions, forwards them through stream_messages_with_options, and tests default and strict tool constraints.
StreamHandler request option wiring
src/stream/handler.rs
StreamHandler initializes, configures, reports, and forwards RequestOptions for each streaming attempt; related lifecycle and retry documentation is updated.

Runtime profiles and middleware

Layer / File(s) Summary
Runtime profiles and goal reminders
src/presets.rs, src/lib.rs, CHANGELOG.md
ConstrainedProfile and FrontierProfile provide runtime settings; GoalReminder injects the first user message at configured intervals; profile configuration and wiring are tested.
Default middleware implementations and exports
src/middleware/memoize.rs, src/middleware/verify.rs, src/middleware.rs
NoopPathExtractor returns no paths, NoopVerifier always passes, and tests cover their middleware behavior and public re-exports.

Sequence Diagram(s)

sequenceDiagram
  participant BareLoop
  participant StreamHandler
  participant ApiClient
  participant Provider
  BareLoop->>StreamHandler: configure per-turn RequestOptions
  StreamHandler->>ApiClient: stream_messages_with_options(request_options)
  ApiClient->>Provider: provider request with options
  Provider-->>ApiClient: stream events
  ApiClient-->>StreamHandler: stream result
Loading

Possibly related PRs

  • dch-labs/loopctl#53: Introduces related memoization and PathExtractor functionality extended here by NoopPathExtractor.
  • dch-labs/loopctl#54: Introduces the turn-boundary contributor API implemented here by GoalReminder.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main changes: new profile presets plus NoopVerifier and NoopPathExtractor middleware.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 50.00%.
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.
✨ 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 feat/profile-presets

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/middleware/verify.rs (1)

111-131: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Correct the expected output format in the documentation and fix the example indentation.

The documentation mentions that the middleware appends a [verify] passed: true block, but according to append_verify_result, it actually appends [verify] passed: (without the true). Additionally, the builder example indentation is slightly off.

📝 Proposed fix
-/// pipeline that has no real build/lint step to run — the middleware still
-/// registers and appends a `[verify] passed: true` block, but no actual
-/// check happens. Swap in a real verifier (`cargo check`, `tsc`) when one is
-/// available.
-///
-/// Zero-sized; cheap to construct and `Arc`-share.
-///
-/// # Example
-///
-/// ```rust,ignore
-/// use std::sync::Arc;
-/// use loopctl::middleware::{NoopVerifier, Verifier, VerifyMiddleware};
-///
-/// let pipeline = ToolPipeline::builder()
-///         .with(VerifyMiddleware::new(Arc::new(NoopVerifier), vec!["Write".into()]))
-///     .core(registry)
-///     .build()?;
-/// ```
+/// pipeline that has no real build/lint step to run — the middleware still
+/// registers and appends a `[verify] passed: ` block, but no actual
+/// check happens. Swap in a real verifier (`cargo check`, `tsc`) when one is
+/// available.
+///
+/// Zero-sized; cheap to construct and `Arc`-share.
+///
+/// # Example
+///
+/// ```rust,ignore
+/// use std::sync::Arc;
+/// use loopctl::middleware::{NoopVerifier, Verifier, VerifyMiddleware};
+///
+/// let pipeline = ToolPipeline::builder()
+///     .with(VerifyMiddleware::new(Arc::new(NoopVerifier), vec!["Write".into()]))
+///     .core(registry)
+///     .build()?;
+/// ```
🤖 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/middleware/verify.rs` around lines 111 - 131, Update the NoopVerifier
documentation to describe the actual `[verify] passed: ` output produced by
append_verify_result, removing the incorrect `true`. Correct the ToolPipeline
builder example indentation so the with, core, and build calls align
consistently.
🤖 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/middleware/verify.rs`:
- Around line 111-131: Update the NoopVerifier documentation to describe the
actual `[verify] passed: ` output produced by append_verify_result, removing the
incorrect `true`. Correct the ToolPipeline builder example indentation so the
with, core, and build calls align consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0dffc586-5740-4026-b225-540f1c186b80

📥 Commits

Reviewing files that changed from the base of the PR and between 7cb4c20 and 3fc408b.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • src/engine/bare.rs
  • src/engine/bare/stream.rs
  • src/lib.rs
  • src/middleware.rs
  • src/middleware/memoize.rs
  • src/middleware/verify.rs
  • src/stream/handler.rs

@bobrykov
bobrykov merged commit 459639c into master Jul 20, 2026
7 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