Skip to content

fix(providers,agent): share devin model list, validate auth URL, fix token tracking - #226

Merged
w0wl0lxd merged 35 commits into
mainfrom
fix/devin-model-auth-tokens
Aug 4, 2026
Merged

w0wl0lxd merged 35 commits into
mainfrom
fix/devin-model-auth-tokens

Conversation

@w0wl0lxd

@w0wl0lxd w0wl0lxd commented Aug 3, 2026 •

Copy link
Copy Markdown
Owner

Why

The devin/devin2 providers had three related issues:

  • swe-1-7-max was not the canonical model id; the SWE-1.7 family has only -max and -medium variants.
  • Configuring a provider name like devin2 as the base_url produced failed to build auth request: invalid format because the value was used as a URL without validation.
  • The TUI token/context meter was not tracking input tokens correctly and appeared to reset on each message because Devin usage was being converted inconsistently, and compaction reported the wrong context size.

A code review also found that the pre-existing Fusion orchestration code on this branch had a real bug in apply_fusion_route, which was fixed in this PR.

What changed

  • Made swe-1-7-max the canonical id for the SWE-1.7 Max variant and swe-1-7-medium canonical for the Medium variant. Added swe-1-7, swe-1.7, swe-1.7-max, swe-1.7-medium, and swe-1.7-lightning as aliases so all common forms resolve. Updated the Devin manifest's default_model to devin/swe-1-7-max.
  • The Devin provider now picks the first catalog prefix that is present in the server-side CLI model-config map before looking up the wire uid, so aliases always resolve to the correct server model.
  • resolve_api_server_url now trims and validates base_url, only accepting it when it starts with http:// or https://; otherwise it falls back to the configured API server.
  • Introduced devin_usage_to_token_usage to convert Devin ModelUsageStats to TokenUsage:
    • input_tokens is treated as the total prompt (including cache reads/writes) when cache is smaller than or equal to it.
    • When input_tokens is already the non-cached remainder, the cache fields are kept as additive details and input is left unchanged.
    • Added debug! logging around usage conversion to make future Devin token bugs observable.
  • finish_compact now computes the post-compaction conversation size from the compacted history instead of using the summary output token count, so the TUI context meter no longer drops abruptly after compaction.
  • Fixed apply_fusion_route to honor the lane specified in FusionRoute::Switch and FusionRoute::Stay instead of always forcing Lead, and updated the corresponding unit test.
  • Added/updated unit tests for resolve_api_server_url, devin_usage_to_token_usage, the Devin model catalog aliases, and Fusion lane routing.

Verification

  • cargo fmt --all
  • cargo check was skipped locally because the worktree is oversubscribed; CI will run the full check.
  • git commit pre-commit hooks passed (gitleaks, rustfmt, merge-conflict, conventional-commit).
  • Added changelog.d/devin-tokens.fixed.md fragment.

Risk and rollback

  • Low risk: the Devin changes are localized to the provider and compaction UI event; the Fusion fix is localized to lane routing.
  • If the Devin usage semantics differ in an unobserved way, the debug logs will make it easy to detect and the fallback avoids underflow.
  • Rollback is a single git revert of the merge commit.

Work log

No separate work-log file; this PR description and the changelog.d/devin-tokens.fixed.md fragment capture the session.

Changelog

See changelog.d/devin-tokens.fixed.md:

  • Register swe-1-7-max and swe-1-7-medium as canonical SWE-1.7 model ids with dot/dash aliases.
  • Validate devin/devin2 base_url for auth requests.
  • Fix Devin token tracking and compaction context-size reporting.

Note

Medium Risk
Large Fusion lifecycle and agent-run behavior changes affect delegation, compaction events, and tool authorization; Devin auth/usage semantics touch billing and context display.

Overview
Devin provider and context meter (see changelog.d/devin-tokens.fixed.md): canonical swe-1-7-max / swe-1-7-medium ids with dot/dash aliases and a corrected 262k context window; base_url is validated as http(s):// before auth; gRPC usage maps input_tokens to total prompt with cache fields as additive details when consistent. After compaction, TurnComplete now uses tokenizer-based context_size on the compacted history (plus tools in auto-compact) instead of summary output tokens, so the UI meter does not cliff-drop.

Fusion orchestration is reworked around an explicit phase machine (Planning → Executing → Reviewing / LeadFallback → Complete) with FusionDispatchGuard (one direct main-agent delegate, policy/classification checks) and FusionDispatchAuth passed into tool dispatch. The run loop no longer hides fusion_delegate or strips lead prompts per turn; delegation outcomes inject review/fallback synthetic messages and emit AgentEvent::FusionPhase (serde alias for FusionPhaseChanged). apply_fusion_route respects Stay/Switch lanes and updates system prompt/tools via apply_fusion_lane_context; post-compact routing escalates on repeated sidekick/tool errors and no longer switches the main agent off lead for mechanical summaries. Usage on the main wire stays on the lead lane; sidekick costs come from delegate telemetry.

Tool dispatch checks the session filter before Fusion auth, defaults model_tier on delegate calls, and treats blocked delegate results as non-failures in Fusion counters. Permission replay on cancel/closed channels is softened (ambiguous replay can deny without channel-closed errors).

Reviewed by Cursor Bugbot for commit 73816c3. Bugbot is set up for automated code reviews on this repo. Configure here.

w0wl0lxd added 5 commits July 31, 2026 22:40
- Update router test to load queries from fixture file
- Add auto-detection patterns for search, skeleton, and trace intents
- Expand fixture with 30 labeled queries for better coverage
…token tracking

- Register the `swe-1-7-max` alias for `swe-1-7` and correct its
  context window to 262_144 tokens in the Devin model catalog.
- Validate the devin `base_url` before building auth requests, falling back
  to the configured API server when it is not an http/https URL.  This fixes
  `failed to build auth request: invalid format` for `devin2`.
- Convert Devin `ModelUsageStats` to `TokenUsage` correctly, treating
  `input_tokens` as the total prompt and cache fields as additive details,
  with a safe fallback when the server already reports input as non-cached.
- Report the post-compaction conversation size in `TurnComplete` instead of
  the summary output token count, so the TUI context meter no longer resets
  after compaction.
@coderabbitai

coderabbitai Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@w0wl0lxd, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 71652c49-8e6d-4b07-83d6-928a81bb08a6

📥 Commits

Reviewing files that changed from the base of the PR and between e8429e1 and fb124ec.

📒 Files selected for processing (22)
  • n00n-agent/src/agent/compaction.rs
  • n00n-agent/src/agent/run.rs
  • n00n-agent/src/agent/tool_dispatch.rs
  • n00n-agent/src/fusion/mod.rs
  • n00n-agent/src/lib.rs
  • n00n-agent/src/types.rs
  • n00n-config/src/lib.rs
  • n00n-lua/tests/real_plugins_restore.rs
  • n00n-providers/src/error.rs
  • n00n-providers/src/providers/devin.rs
  • n00n-providers/src/types.rs
  • n00n-ui/src/app/mod.rs
  • n00n-ui/src/app/tests.rs
  • n00n-ui/src/chat.rs
  • plugins/fusion/init.lua
  • site/docs/content/configuration/_index.md
  • site/docs/content/providers/_index.md
  • site/docs/content/tools/_index.md
  • src/cmd/mod.rs
  • src/print.rs
  • src/sdk_mode.rs
  • tests/fixtures/explore-queries.json
📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Improved Fusion workflow handling across planning, execution, review, fallback, completion, and cancellation.
    • Added support for additional SWE-1.7 model naming variants.
  • Bug Fixes

    • Improved Devin URL validation and fallback behavior.
    • Corrected Devin token usage reporting, including cached input tokens.
    • Increased SWE-1.7 context limits to 262,144 tokens.
    • Improved token and conversation-size reporting after compaction.
    • Preserved review and fallback guidance when conversations are compacted.

Walkthrough

The pull request updates Fusion lifecycle and lane handling, post-compaction context accounting, and Devin provider behavior. Devin model aliases, context windows, URL validation, and usage conversion now use corrected values and fallback rules.

Changes

Fusion orchestration

Layer / File(s) Summary
Fusion agent state and execution setup
n00n-agent/src/agent/run.rs
Fusion keeps lane state without separate lead provider and model fields. Execution uses Fusion phase and failure types.
Fusion delegation lifecycle
n00n-agent/src/agent/run.rs
Fusion emits lifecycle phases, classifies delegation failures, preserves lead identity during lane switches, and continues with review or fallback prompts.
Fusion continuation and compaction
n00n-agent/src/agent/run.rs, n00n-agent/src/agent/compaction.rs
Compaction measures compacted history with a context model, adds external context tokens, reports usage, and preserves Fusion continuation prompts.
Fusion configuration-aware test coverage
n00n-agent/src/agent/run.rs
Tests cover disabled Fusion, lane identity, delegation review, fallback behavior, costs, and phase events.

Devin provider accounting

Layer / File(s) Summary
Devin model and server resolution
n00n-providers/src/providers/devin.rs, n00n-providers/src/providers/devin_models.rs, changelog.d/devin-tokens.fixed.md
Devin defaults to devin/swe-1-7-max, supports expanded SWE-1.7 aliases, validates HTTP(S) URLs, uses server catalog prefixes, and documents the token fixes.
Devin usage conversion and validation
n00n-providers/src/providers/devin.rs
Usage conversion separates cached and non-cached input tokens, handles inconsistent cache totals, clamps counters, and adds regression tests.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

  • w0wl0lxd/n00n#180: Introduces the Fusion routing and compaction workflows updated here.
  • w0wl0lxd/n00n#201: Introduces the Devin provider and model catalog updated here.
  • w0wl0lxd/n00n#214: Overlaps with the Fusion lifecycle, delegation continuation, fallback, review, and compaction changes.

Poem

I’m a rabbit; tokens hop in line,
SWE aliases now resolve just fine.
Fusion plans, reviews, and falls back bright,
Compaction counts the context right.
Devin’s URLs stay on the track—
Nibble, test, and never look back!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.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.
Title check ✅ Passed The title accurately summarizes the main Devin provider fixes, including model handling, URL validation, and token tracking.
Description check ✅ Passed The description directly explains the Devin, compaction, and Fusion changes included in the 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 fix/devin-model-auth-tokens

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.

…liases

The two available SWE-1.7 variants are `-max` and `-medium`; `-max` is now
the canonical id and `swe-1-7`, `swe-1.7`, and `swe-1.7-max` are aliases
for it.  Dot-prefixed aliases are also added for `-medium` and
`-lightning` to match the names the Devin API recognizes.

The Devin provider now picks the first catalog prefix that is present in
the server-side CLI model-config map before looking up the wire uid, so
aliases resolve to the correct server model regardless of which form is
canonical in the catalog.
Use the explicit canonical SWE-1.7 Max id in the provider manifest so the
default model spec is unambiguous.
`apply_fusion_route` was collapsing `Switch(Sidekick)` and `EscalateToLead`
into `FusionLane::Lead`, so `route_after_compact` could return a sidekick
route but the main agent never actually entered the sidekick lane.  The
function now extracts the lane from the route, updates the Fusion state, and
applies the matching lane context.  Updated the unit test to assert the
expected sidekick lane while still checking that the lead model and provider
are not replaced.
@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@cursor review

@w0wl0lxd
w0wl0lxd marked this pull request as ready for review August 3, 2026 01:46
@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@BugBot review

@coderabbitai

coderabbitai Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

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.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 6 potential issues.

Autofix Details

Done

You can send follow-ups to the cloud agent here.

Comment thread n00n-agent/src/agent/run.rs
Comment thread n00n-agent/src/agent/compaction.rs Outdated
Comment thread n00n-agent/src/fusion/mod.rs
Comment thread n00n-agent/src/agent/run.rs
Comment thread n00n-agent/src/agent/run.rs Outdated
Comment thread n00n-agent/src/fusion/mod.rs

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

🤖 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 `@n00n-agent/src/agent/compaction.rs`:
- Around line 164-169: Update the TurnComplete send in finish_compact to stop
silently discarding delivery failures: propagate the channel-send error through
a typed error and return it from finish_compact, then ensure compact_history
propagates that result. If delivery is intentionally best effort instead, use an
explicitly named fallback with sanitized structured logging.

In `@n00n-agent/src/agent/run.rs`:
- Around line 1042-1053: The FusionFailure value returned by
fusion_failure_from_result is currently discarded in handle_fusion_results via
FusionState::delegate_failed. Either propagate and record the failure kind in
FusionState or include it in the relevant warn!/info! telemetry fields;
otherwise remove fusion_failure_from_result and its unused classification path
until a consumer is implemented.
- Around line 379-403: Reset the retained fusion lifecycle at the beginning of
each run before the FusionPhase::Planning emission. Update the run method’s
fusion_state handling so a subsequent user turn starts from a fresh non-terminal
state while preserving the existing success, cancellation, and failure
transitions.

In `@n00n-agent/src/agent/tool_dispatch.rs`:
- Around line 2196-2210: Update fusion_dispatch_guard_denies_non_delegate_policy
to pass DelegationKind values directly through #[test_case] instead of accepting
string policy keys and matching with a fallback. Move the relevant fusion import
to the test module header so DelegationKind can be referenced in the test-case
attributes, while preserving the existing enabled values, labels, and
authorization assertion.
- Around line 2183-2237: Integrate FusionDispatchGuard into the production
process_tool_calls dispatch flow, constructing it with the current fusion
configuration, delegation classification, and tool audience before execution and
consulting authorize for each applicable call. Ensure denied origins,
non-delegate policies, recursive child audiences, and repeated direct main
delegation are rejected in the real run path, replacing the tests-only usage
without altering unrelated skill/non-skill dispatch behavior.

In `@n00n-agent/src/fusion/mod.rs`:
- Around line 305-332: The lifecycle currently blocks execution whenever
FusionState::lane is Sidekick, while callers mutate the public field directly.
In n00n-agent/src/fusion/mod.rs lines 305-332, make lane private and add a
setter that preserves phase/lane consistency, then update
n00n-agent/src/agent/run.rs lines 924-936 to use it instead of assigning
state.lane directly and combine the duplicated None checks; alternatively remove
the transition precondition and, if Lead must remain required, also remove
FusionRoute::Switch(FusionLane::Sidekick) from route_after_compact.
- Around line 373-386: Update enter_terminal to call FusionPhase::is_terminal
instead of duplicating the inline matches! variant list, while preserving the
existing error and state-transition behavior.
- Around line 92-98: Remove Clone and Copy from the derive attributes on
FusionDispatchGuard, retaining only the required non-copy traits. Preserve the
guard’s single-use ownership semantics so authorize cannot be invoked again
through an implicitly duplicated value.
- Around line 550-570: Update classify_delegation_contract to compare the
DelegationKind returned by classify_delegation directly with typed expected
variants, rather than converting the result to a Debug string. Replace the
string-based test-case expectations with DelegationKind values so variant
renames remain compile-time checked.
- Around line 487-500: Extract the repeated mutation signal strings into a
module-level MUTATION_SIGNALS constant immediately after imports, then update
both the DELEGATE list and the requests_mutation check to reference it. Remove
the inline array so both paths share one authoritative list and remain aligned.

In `@n00n-providers/src/providers/devin.rs`:
- Around line 158-169: Update resolve_api_server_url to parse the trimmed
base_url as an absolute URL before accepting it, requiring an http or https
scheme and a non-empty host; otherwise log the warning and return configured.
Add coverage for a malformed HTTP(S)-prefixed value such as “https://”,
including the corresponding validation path near the other base URL handling.
- Around line 214-245: Update devin_usage_to_token_usage so it does not infer
input-token semantics from numeric comparisons between input_tokens and cache
counters. Use an explicit Devin response format indicator, version, or
documented invariant to select whether input_tokens is total prompt usage or
non-cached input, preserving the corresponding cache details and total-input
calculations. Add fixtures covering both formats with overlapping counter
ranges.

In `@n00n-ui/src/chat.rs`:
- Around line 1007-1010: Add test cases to the FusionPhase rendering table
covering Complete, Cancelled, and Failed, using each phase’s expected display
string and unique test names. Preserve the existing cases for Planning,
Executing, Reviewing, and LeadFallback.

In `@plugins/fusion/init.lua`:
- Around line 123-125: Update the header function’s description truncation to
use utf8.offset when determining the 40-character boundary, then pass that
codepoint-safe boundary to string.sub so multi-byte UTF-8 characters are never
cut mid-sequence.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ac9530d9-95a9-4162-bf4a-f6ae54861105

📥 Commits

Reviewing files that changed from the base of the PR and between fda180a and a2ce319.

📒 Files selected for processing (23)
  • changelog.d/devin-tokens.fixed.md
  • changelog.d/fusion-beta-orchestration.added.md
  • changelog.d/live-task-progress.fixed.md
  • n00n-agent/src/agent/compaction.rs
  • n00n-agent/src/agent/run.rs
  • n00n-agent/src/agent/tool_dispatch.rs
  • n00n-agent/src/fusion/mod.rs
  • n00n-agent/src/lib.rs
  • n00n-agent/src/types.rs
  • n00n-config/src/lib.rs
  • n00n-lua/tests/real_plugins_restore.rs
  • n00n-providers/src/providers/devin.rs
  • n00n-providers/src/providers/devin_models.rs
  • n00n-ui/src/app/tests.rs
  • n00n-ui/src/chat.rs
  • plugins/fusion/init.lua
  • src/cli.rs
  • src/cmd/agent.rs
  • src/cmd/mod.rs
  • src/cmd/tui.rs
  • src/print.rs
  • src/sdk_mode.rs
  • tests/fixtures/explore-queries.json
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Cursor Bugbot
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

**/*.rs: Do not add unsafe code, FFI, global mutable state, static mut, or unchecked transmute-like behavior without written review, an explicit lint exception, and a SAFETY comment where applicable.
Do not use unwrap, expect, panic!, todo!, unimplemented!, or dbg! in production Rust code; tests are exempt from the unwrap/expect/panic restriction.
Do not silently discard failures with unwrap_or, unwrap_or_default, .ok() on Result, or equivalent defaults; return typed errors, reject the operation, or use an explicitly named fallback with sanitized structured logging.
Use idiomatic Rust, descriptive names, minimal state, and avoid unnecessary comments, bloat, and magic numbers or strings.
Import types at the top of the file and use short imported names; keep constants immediately after imports.
Use Result<T, E> and explicit error handling instead of panics; use thiserror for library/domain errors and color-eyre at binary edges.
Use #[derive(Copy)] only for structs containing one primitive field.
Prefer structured logging with useful fields and provide helpful, sanitized error messages.
Place unit tests in the same file inside #[cfg(test)] modules; use #[test_case] and snake_case test names.
Propagate typed errors with ?, ok_or_else, and map_err; library crates use thiserror and binaries use color-eyre.
Treat LLM and provider output as untrusted input; validate schemas, domain constraints, and source evidence before persistence or action.
Do not log raw provider payloads, prompts, credentials, or user session data, and never commit credentials, API keys, tokens, cookies, or auth headers.
Validate and authorize HTTP, file, queue, configuration/environment, LLM, and provider-callback inputs before mutation or persistence.
Tool execution requires allowlisted tools, scoped credentials, explicit user context, audit events, and refusal or denial tests.

Files:

  • n00n-agent/src/types.rs
  • n00n-lua/tests/real_plugins_restore.rs
  • src/sdk_mode.rs
  • src/cli.rs
  • n00n-agent/src/agent/tool_dispatch.rs
  • n00n-agent/src/lib.rs
  • src/print.rs
  • src/cmd/agent.rs
  • src/cmd/tui.rs
  • n00n-ui/src/app/tests.rs
  • n00n-ui/src/chat.rs
  • src/cmd/mod.rs
  • n00n-providers/src/providers/devin_models.rs
  • n00n-agent/src/agent/compaction.rs
  • n00n-config/src/lib.rs
  • n00n-providers/src/providers/devin.rs
  • n00n-agent/src/fusion/mod.rs
  • n00n-agent/src/agent/run.rs
🧠 Learnings (1)
📚 Learning: 2026-07-31T19:15:04.814Z
Learnt from: w0wl0lxd
Repo: w0wl0lxd/n00n PR: 206
File: changelog.d/orchestration-hardening.fixed.md:1-1
Timestamp: 2026-07-31T19:15:04.814Z
Learning: Files in changelog.d are changelog fragments intended for user-facing release notes and may begin directly with summary prose. Do not flag a missing Markdown H1 or require an H1 solely because Markdownlint MD041 reports it in these fragment files.

Applied to files:

  • changelog.d/fusion-beta-orchestration.added.md
  • changelog.d/live-task-progress.fixed.md
  • changelog.d/devin-tokens.fixed.md
🪛 markdownlint-cli2 (0.23.1)
changelog.d/fusion-beta-orchestration.added.md

[warning] 1-1: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

changelog.d/live-task-progress.fixed.md

[warning] 1-1: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

changelog.d/devin-tokens.fixed.md

[warning] 1-1: First line in a file should be a top-level heading

(MD041, first-line-heading, first-line-h1)

🔇 Additional comments (38)
tests/fixtures/explore-queries.json (1)

1-32: LGTM!

changelog.d/live-task-progress.fixed.md (1)

1-1: LGTM!

n00n-providers/src/providers/devin.rs (2)

38-41: LGTM!

Also applies to: 63-63


711-726: LGTM!

n00n-providers/src/providers/devin_models.rs (1)

823-855: LGTM!

Also applies to: 2678-2683

n00n-config/src/lib.rs (4)

2248-2253: LGTM!


2255-2266: LGTM!


2268-2283: LGTM!


2285-2296: LGTM!

src/cli.rs (1)

591-609: LGTM!

src/cmd/mod.rs (2)

20-27: LGTM!


159-182: LGTM!

src/cmd/agent.rs (1)

398-399: LGTM!

src/cmd/tui.rs (1)

111-115: LGTM!

n00n-agent/src/types.rs (1)

872-876: The serde derive concern for crate::fusion::FusionPhase is already raised on n00n-agent/src/fusion/mod.rs Lines 43-54. The variant itself and its consumer coverage look correct.

n00n-agent/src/fusion/mod.rs (8)

7-11: LGTM!


100-148: LGTM!


178-180: LGTM!

Also applies to: 196-198


231-247: LGTM!


271-274: LGTM!


407-411: LGTM!

Also applies to: 445-454


631-798: LGTM!


43-54: 🩺 Stability & Availability

No change needed for FusionPhase serde derives.

AgentEvent only derives Serialize, so FusionPhase does not need Deserialize for the current serde requirements.

			> Likely an incorrect or invalid review comment.
n00n-agent/src/lib.rs (1)

21-23: LGTM!

n00n-agent/src/agent/run.rs (4)

8-9: LGTM!

Also applies to: 27-28, 44-45


561-561: LGTM!

Also applies to: 649-654


743-787: LGTM!


1465-1479: LGTM!

Also applies to: 1666-1915

n00n-ui/src/app/tests.rs (1)

2239-2268: LGTM!

n00n-ui/src/chat.rs (2)

181-195: LGTM!


1027-1050: LGTM!

src/print.rs (1)

369-369: LGTM!

src/sdk_mode.rs (1)

1057-1057: LGTM!

n00n-lua/tests/real_plugins_restore.rs (1)

766-766: LGTM!

changelog.d/fusion-beta-orchestration.added.md (1)

1-1: LGTM!

n00n-agent/src/agent/compaction.rs (2)

155-162: LGTM!


149-153: 🎯 Functional Correctness

No ownership change needed. TokenUsage is Copy, so TurnCompleteEvent receives a copy and usage is still usable afterward.

			> Likely an incorrect or invalid review comment.
changelog.d/devin-tokens.fixed.md (1)

1-7: LGTM!

Comment thread n00n-agent/src/agent/compaction.rs Outdated
Comment thread n00n-agent/src/agent/run.rs Outdated
Comment thread n00n-agent/src/agent/run.rs
Comment thread n00n-agent/src/agent/tool_dispatch.rs
Comment thread n00n-agent/src/agent/tool_dispatch.rs Outdated
Comment thread n00n-agent/src/fusion/mod.rs Outdated
Comment thread n00n-providers/src/providers/devin.rs
Comment thread n00n-providers/src/providers/devin.rs
Comment thread n00n-ui/src/chat.rs
Comment thread plugins/fusion/init.lua

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2ce319c25

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread n00n-agent/src/fusion/mod.rs
Comment thread n00n-providers/src/providers/devin.rs Outdated
Comment thread n00n-agent/src/fusion/mod.rs Outdated
Comment thread n00n-agent/src/agent/compaction.rs Outdated
@w0wl0lxd
w0wl0lxd enabled auto-merge August 3, 2026 01:55
Charge main-agent API usage to the lead lane, include continue/tool tokens
in post-compact TurnComplete context_size, and enforce FusionDispatchGuard
plus Planning/Lead lifecycle checks in live tool dispatch so extra or
sidekick-lane delegates cannot bypass review/fallback follow-up.
@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@coderabbitai

coderabbitai Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 399ef1f515

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread n00n-agent/src/agent/run.rs
Comment thread n00n-agent/src/agent/run.rs Outdated
@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@cursor review

@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 399ef1f. Configure here.

Comment thread n00n-agent/src/agent/run.rs Outdated
Comment thread n00n-agent/src/fusion/mod.rs
@codecov

codecov Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.64988% with 68 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
n00n-agent/src/agent/run.rs 92.68% 39 Missing ⚠️
n00n-agent/src/fusion/mod.rs 96.10% 13 Missing ⚠️
n00n-providers/src/providers/devin.rs 89.38% 12 Missing ⚠️
n00n-agent/src/agent/tool_dispatch.rs 98.59% 3 Missing ⚠️
n00n-ui/src/chat.rs 93.75% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@cursor review

@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_cfcc6727-f4f8-4722-9095-5bd7a7ed2288)

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d422c9b88e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread n00n-agent/src/agent/compaction.rs Outdated
Comment thread n00n-agent/src/agent/run.rs Outdated
Comment thread n00n-agent/src/agent/run.rs Outdated
Comment thread n00n-agent/src/agent/run.rs Outdated
@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@cursor review

@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_938c23f2-ef35-4b8b-be0f-aa553895e91a)

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b677020756

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/fusion/init.lua
Comment thread plugins/fusion/init.lua Outdated
Comment thread n00n-agent/src/agent/run.rs Outdated
Comment thread plugins/fusion/init.lua Outdated
@w0wl0lxd
w0wl0lxd disabled auto-merge August 3, 2026 07:26
@w0wl0lxd
w0wl0lxd enabled auto-merge (squash) August 3, 2026 08:11
@w0wl0lxd

w0wl0lxd commented Aug 3, 2026

Copy link
Copy Markdown
Owner Author

@cursor review verbose=true

@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Bugbot request id: serverGenReqId_ff2bedc7-26e9-4b94-9d82-a1772f7c7b2d

@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Bugbot rules debug

No rules were used for this review.

https://cursor.com/docs/bugbot#team-rules

Bugbot request id: serverGenReqId_ff2bedc7-26e9-4b94-9d82-a1772f7c7b2d

@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_ff2bedc7-26e9-4b94-9d82-a1772f7c7b2d)

@w0wl0lxd
w0wl0lxd merged commit 85788fe into main Aug 4, 2026
30 checks passed
@linear-code

linear-code Bot commented Aug 4, 2026

Copy link
Copy Markdown

N00N-172

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.

2 participants