Skip to content

feat(coordinator): complete track 4 slice 1 foundations#607

Merged
yacosta738 merged 7 commits into
developfrom
feat/track-4-slice-1-coordinator-foundations
Apr 20, 2026
Merged

feat(coordinator): complete track 4 slice 1 foundations#607
yacosta738 merged 7 commits into
developfrom
feat/track-4-slice-1-coordinator-foundations

Conversation

@yacosta738
Copy link
Copy Markdown
Contributor

Related Issues

Closes #525


Summary

  • add Track 4 Slice 1 coordinator foundations to clients/agent-runtime, including the coordinator state machine, supervised child registry, in-process messaging envelopes, fan-out/fan-in behavior, and session-mode delegate routing through the coordinator seam
  • archive the completed OpenSpec change, sync the source-of-truth specs into openspec/specs/agent-loop/spec.md and openspec/specs/multi-agent-orchestration/spec.md, and keep tmp/CLAUDIO_ROADMAP.md aligned with delivered scope and deferred Track 4 gaps
  • restore verification gates by fixing runtime-wide clippy issues and allowing the dashboard contract tests to import repo-root raw artifacts for roadmap/spec traceability checks

Tested Information

  • cargo fmt --manifest-path clients/agent-runtime/Cargo.toml --all -- --check
  • cargo check --manifest-path clients/agent-runtime/Cargo.toml
  • cargo clippy --manifest-path clients/agent-runtime/Cargo.toml --all-targets -- -D warnings
  • cargo test --manifest-path clients/agent-runtime/Cargo.toml
  • make web-test-all
  • pnpm --dir clients/web check
  • pnpm --dir clients/web/apps/dashboard exec vitest run src/composables/chatOnboardingContract.spec.ts --environment happy-dom

Documentation Impact

  • Docs updated in:
    • tmp/CLAUDIO_ROADMAP.md
    • openspec/specs/agent-loop/spec.md
    • openspec/specs/multi-agent-orchestration/spec.md
    • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/
  • No docs update required because:
  • I verified the documentation matches the current behavior.

Breaking Changes

None.


Checklist

  • I have checked that there isn’t already a PR solving the same problem.
  • I have read the Contributing Guidelines.
  • I ensured my code follows the project's style guidelines.
  • I have added or updated tests that prove my fix is effective or that my feature works.
  • I have updated the documentation, or I explained above why no documentation update is needed.
  • I verified the documentation matches the current behavior.
  • I have documented any breaking changes in the Breaking Changes section.
  • I have linked the related issue (if any).

# Conflicts:
#	clients/rook/Cargo.lock
#	clients/rook/Cargo.toml
#	clients/rook/migrations/0001_initial.sql
#	clients/rook/src/db/account.rs
#	clients/rook/src/db/mod.rs
#	clients/rook/src/db/pool.rs
#	clients/rook/src/db/route.rs
#	clients/rook/src/services/account.rs
#	clients/rook/src/services/health.rs
#	clients/rook/src/services/pool.rs
#	clients/rook/src/services/route.rs
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 20, 2026

Deploying corvus with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0ef9b53
Status: ✅  Deploy successful!
Preview URL: https://ceba98bc.corvus-42x.pages.dev
Branch Preview URL: https://feat-track-4-slice-1-coordin.corvus-42x.pages.dev

View logs

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

Warning

Rate limit exceeded

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

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 12 minutes and 30 seconds.

⌛ 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 891c7446-3bbf-43ca-9c32-2900a8944c9c

📥 Commits

Reviewing files that changed from the base of the PR and between c876dd9 and 0ef9b53.

📒 Files selected for processing (8)
  • clients/agent-runtime/src/agent/coordinator.rs
  • clients/agent-runtime/src/observability/log.rs
  • clients/agent-runtime/src/tools/delegate.rs
  • clients/web/apps/dashboard/src/composables/chatOnboardingContract.spec.ts
  • clients/web/apps/dashboard/vite.config.js
  • clients/web/apps/dashboard/vite.config.ts
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/verify-report.md
  • openspec/specs/multi-agent-orchestration/spec.md
📝 Walkthrough

Walkthrough

This PR introduces a new in-process multi-agent coordinator module for Corvus that supervises parallel child agents with deterministic state transitions, envelope-based messaging, and fan-in aggregation. The coordinator is integrated into the delegate tool and accompanied by comprehensive specifications and timeout standardization across provider/channel configs.

Changes

Cohort / File(s) Summary
Coordinator Core
clients/agent-runtime/src/agent/coordinator.rs, clients/agent-runtime/src/agent/mod.rs
New 1678-line coordinator module implementing state machine (Initialized→Dispatching→Supervising→Cancelling→Completed/Failed/Cancelled), child lifecycle tracking, envelope sequencing/correlation, and AllMustSucceed fan-in. Public types: CoordinatorState, CoordinatorChildRunner trait, DelegatedAgentRunner, Coordinator with run/run_with_cancellation methods, CoordinatorOutcome aggregation, and comprehensive error/enum types.
Delegate Tool Integration
clients/agent-runtime/src/tools/delegate.rs
Refactored session-mode execution to use coordinator-backed supervision via SessionCoordinatorExecutor abstraction; maps CoordinatorOutcome→ToolResult; added fail-closed behavior and boundary tests for disallowed deferred transport fields. OneShot path unmodified. ~255 net lines added.
Duration Standardization
clients/agent-runtime/src/agent/unified_loop.rs, clients/agent-runtime/src/channels/..., clients/agent-runtime/src/providers/..., clients/agent-runtime/src/gateway/..., clients/agent-runtime/src/tools/..., clients/agent-runtime/src/update/mod.rs, clients/agent-runtime/src/security/policy.rs
Converted timeout/duration constants across ~30 files from from_secs(N) to equivalent from_mins() or from_hours() constructors (e.g., 60s→1min, 120s→2min, 300s→5min, 3600s→1hour). No behavior change; improves readability and consistency.
Minor Refactorings
clients/agent-runtime/src/agent/classifier.rs, clients/agent-runtime/src/identity.rs, clients/agent-runtime/src/providers/mod.rs, clients/agent-runtime/src/providers/openai_codex.rs, clients/agent-runtime/src/channels/irc.rs, clients/agent-runtime/src/config/schema.rs
Sort/loop optimizations: replaced sort_by(cmp) with sort_by_key(Reverse(...)), converted loop{break} patterns to while let, simplified IRC match guard, refactored schema validation chains. Preserved original logic.
Format String Cleanup
clients/agent-runtime/src/channels/cli.rs, clients/agent-runtime/src/skillforge/integrate.rs, clients/agent-runtime/src/skills/mod.rs
Removed trailing commas in format!() and bail!() argument lists; purely cosmetic, no output change.
Vite Configuration
clients/web/apps/dashboard/vite.config.js, clients/web/apps/dashboard/vite.config.ts
Added computed repoRoot path and extended server.fs.allow to include repository root for dev/test server access.
Web Test Assertions
clients/web/apps/dashboard/src/composables/chatOnboardingContract.spec.ts
Added test verifying roadmap Markdown contains Track 4 "Multi-Agent Orchestration" markers (coordinator state machine, delegate session-mode routing, transport/orchestration boundaries).
Specifications & Documentation
openspec/specs/multi-agent-orchestration/spec.md, openspec/specs/agent-loop/spec.md, openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/...
New multi-agent orchestration spec (206 lines) covering coordinator state machine, child supervision, messaging envelopes, fan-out/fan-in, failure/cancellation propagation, and slice boundaries. Updated agent-loop spec with coordinator-backed delegation boundary requirements. Marked 14/14 tasks complete; added verification report (143 lines) documenting passing checks (cargo fmt, clippy, tests, web checks) and 17/17 spec compliance matrix.

Sequence Diagram(s)

sequenceDiagram
    actor Parent as Parent Agent
    participant C as Coordinator
    participant DAR as DelegatedAgentRunner
    participant Child as Child Agent
    participant R as Registry

    Parent->>C: run(CoordinatorLaunchRequest)
    C->>C: transition(Dispatching)
    
    Note over C: admit_child() for each child
    C->>R: register ChildRecord
    
    C->>C: transition(Supervising)
    
    par Child Execution
        C->>DAR: spawn_child_task
        DAR->>Child: configure & execute
        Child->>DAR: CodeSessionResult
        DAR->>C: MessageEnvelope<ChildCompleted>
        C->>R: apply_envelope, update state
    and Supervision Loop
        C->>C: monitor JoinSet for completion
        alt First child fails
            C->>C: transition(Cancelling)
            C->>Child: cancel_token
        else Parent cancelled
            C->>Child: cancel_token  
            C->>C: transition(Cancelling)
        else All succeed
            C->>C: transition(Completed)
        end
    end
    
    C->>Parent: CoordinatorOutcome
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

The coordinator module itself is dense with state machine logic, concurrency primitives (mutex-protected registries, atomic sequence counter, CancellationToken), and envelope sequencing/validation that demands careful correctness review. The delegate tool integration adds another layer of concern (outcome mapping, fail-closed semantics). While the duration refactorings are largely homogeneous and low-risk, the overall heterogeneity and logic density (particularly around state transitions, child supervision, and envelope correlation) warrant thorough analysis for race conditions, edge cases, and behavior correctness.

Possibly related PRs

Suggested labels

area:rust, area:docs, risk:high, risk:security

Suggested reviewers

  • yuniel-acosta
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title follows Conventional Commit format with 'feat' prefix and scope; clearly summarizes the main change (Track 4 Slice 1 coordinator foundations) and is well under the 72-character limit.
Description check ✅ Passed Description covers all template sections: related issues (#525), comprehensive summary of changes, tested information with specific commands, documentation updates, breaking changes (none), and completed checklist items.
Linked Issues check ✅ Passed The PR implements all core coding requirements from #525: coordinator state machine (CoordinatorState enum), child lifecycle management (ChildRecord, ChildState), in-process messaging (MessageEnvelope, EnvelopeMeta), fan-out/fan-in orchestration (CoordinatorOutcome aggregation), and session-mode delegate routing via coordinator seam.
Out of Scope Changes check ✅ Passed Changes are tightly scoped to coordinator implementation, delegate session-mode routing, timeout normalization (from seconds to Duration constructors), clippy fixes, and spec/documentation updates—all aligned with PR objectives and #525 scope.
Docstring Coverage ✅ Passed Docstring coverage is 89.23% which is sufficient. The required threshold is 80.00%.

✏️ 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 feat/track-4-slice-1-coordinator-foundations

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2026

✅ Contributor Report

User: @yacosta738
Status: Passed (12/13 metrics passed)

Metric Description Value Threshold Status
PR Merge Rate PRs merged vs closed 91% >= 30%
Repo Quality Repos with ≥100 stars 0 >= 0
Positive Reactions Positive reactions received 11 >= 1
Negative Reactions Negative reactions received 0 <= 5
Account Age GitHub account age 3096 days >= 30 days
Activity Consistency Regular activity over time 108% >= 0%
Issue Engagement Issues with community engagement 0 >= 0
Code Reviews Code reviews given to others 584 >= 0
Merger Diversity Unique maintainers who merged PRs 2 >= 0
Repo History Merge Rate Merge rate in this repo 93% >= 0%
Repo History Min PRs Previous PRs in this repo 262 >= 0
Profile Completeness Profile richness (bio, followers) 90 >= 0
Suspicious Patterns Spam-like activity detection 1 N/A

Contributor Report evaluates based on public GitHub activity. Analysis period: 2025-04-20 to 2026-04-20

Copy link
Copy Markdown
Contributor

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@clients/agent-runtime/src/agent/coordinator.rs`:
- Around line 1346-1362: The test
coordinator_slice_defers_non_in_process_transport_and_deferred_scope is brittle
because it uses include_str!("coordinator.rs") and substring checks; replace
this string-based check with a compile-time type-level assertion or
exhaustiveness check against the enum CoordinatorTransport so CI fails only when
the actual type/variants change. For example, remove the include_str! usage and
instead use a static assertion (e.g., static_assertions::assert_type_ne_all! or
a const/compile-time match) that only compiles if CoordinatorTransport contains
only the allowed InProcess variant and does not contain RemoteBridge,
CrossProcess, MailboxPersistence, or WorktreeIsolation; keep the test name but
change its body to perform the compile-time guard against the unwanted variants
rather than string inspections.
- Around line 403-410: The match on error.downcast_ref::<AgentExecutionError>()
in the coordinator logic currently only lists the two known variants
(AgentExecutionError::IterationBudgetExceeded and ::CostBudgetExceeded) — add an
explicit catch-all Some(_) arm that returns CodeSessionStatus::Error so new
variants map deterministically to Error instead of causing future compile/merge
issues; update the match near where AgentExecutionError and CodeSessionStatus
are used to include Some(_) => CodeSessionStatus::Error while leaving None =>
CodeSessionStatus::Error unchanged.

In `@clients/agent-runtime/src/observability/log.rs`:
- Line 472: Replace the invalid call to Duration::from_mins(2) with a valid
std::time::Duration construction, e.g. Duration::from_secs(120); locate
occurrences of the Duration::from_mins(...) call (such as the duration:
Duration::from_mins(2) initializer in
clients/agent-runtime/src/observability/log.rs) and update each to use
Duration::from_secs(number_of_minutes * 60) (or an equivalent from_secs value)
across the codebase.

In `@clients/agent-runtime/src/tools/delegate.rs`:
- Around line 1162-1214: The test name and assertions overclaim because
execute() only consumes "agent", "prompt", and "context" so the runtime never
sees the deferred fields; either rename
session_mode_preserves_fail_closed_boundaries_for_deferred_transport_and_escalation
to something like session_mode_schema_rejects_deferred_transport_fields to
reflect that it only validates the schema, or add a new non-readonly test that
constructs the same DelegateTool (using DelegateTool::new with
DelegateExecutionMode::Session) but sets AutonomyLevel::Supervised and injects a
StubSessionCoordinatorExecutor (or similar test double used by your session
coordinator path) so the stub can assert that the coordinator request produced
by execute() does not contain transport, mailbox, remote_bridge, worktree, or
permission_escalation; ensure the new test calls execute() and inspects the
coordinator call arguments rather than relying solely on the schema assertions.

In `@clients/web/apps/dashboard/src/composables/chatOnboardingContract.spec.ts`:
- Line 15: Remove the unstable import of tmp/CLAUDIO_ROADMAP.md from
chatOnboardingContract.spec.ts (the import of claudioRoadmap) — either commit
that file to the repo or replace the import with a committed fixture/inline test
string so the test can resolve in CI; then update the assertions that currently
match exact prose (the assertions around the roadmap verification in the spec)
to assert on stable markers instead (e.g., headings, IDs, comment anchors, or a
simple regex/contains for a heading like "##" or "Roadmap" rather than verbatim
lines) so future rewording of the roadmap won’t break the test.

In `@clients/web/apps/dashboard/vite.config.js`:
- Around line 7-10: The Vite dev server currently sets server.fs.allow:
[repoRoot], exposing the whole repository; narrow this to only the necessary
paths (e.g., the openspec, tmp, and clients/composeApp directories referenced by
tests) or make the broad allowlist conditional for test mode only. Update the
vite.config.js server.fs.allow configuration (the server.fs.allow array) to list
explicit absolute paths derived from repoRoot joined with the specific
directories used by the dashboard contract tests (e.g., path.join(repoRoot,
"openspec"), path.join(repoRoot, "tmp"), path.join(repoRoot,
"clients/composeApp")) or add a guard around this setting that uses a TEST_MODE
flag to permit repoRoot only during tests. Ensure you modify the server.fs.allow
entry and remove the single repoRoot entry so high-risk source directories are
not exposed.

In `@clients/web/apps/dashboard/vite.config.ts`:
- Around line 6-14: The Vite config currently exposes the whole repo by setting
server.fs.allow: [repoRoot]; change it so that broad repo access is enabled only
in test mode and otherwise only the dashboard root and the specific test file
are allowed: detect test mode via process.env.NODE_ENV or a dedicated flag
(where defineConfig and repoRoot are referenced), and update server.fs.allow to
conditionally include either repoRoot (for tests) or a narrowed array containing
the dashboard root path (compute from fileURLToPath(new URL(...,
import.meta.url)) and the explicit tmp/CLAUDIO_ROADMAP.md path). Apply the same
conditional change to the second allow block referenced around the defineConfig
section at lines ~34-38 (the other server.fs.allow usage) so only tests get
repoRoot while normal dev gets the minimal allowed paths.

In
`@openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/verify-report.md`:
- Line 1: The first markdown heading "## Verification Report" is level 2; change
it to a top-level heading by replacing it with a level 1 heading "# Verification
Report" so the file starts with an H1 and satisfies markdownlint.

In `@openspec/specs/multi-agent-orchestration/spec.md`:
- Around line 61-85: The spec and the code diverge: EnvelopeMeta (symbols:
EnvelopeMeta, coordinator_id, child_id, sequence, correlation_id, sent_at,
transport) conveys sender/recipient implicitly and message kind is the
CoordinatorMessage enum tag in payload; add a short non-normative note to the
spec clarifying that "kind is conveyed by the typed payload variant
(CoordinatorMessage) and sender/recipient are derived from coordinator_id +
child_id plus message direction" so readers can map the spec to the Rust struct,
or alternatively update EnvelopeMeta to include explicit sender/recipient/kind
fields to make the mapping explicit (choose one approach and apply
consistently).
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2a5ccac6-8d1e-4a2c-9f03-381aab987584

📥 Commits

Reviewing files that changed from the base of the PR and between c6d1b82 and c876dd9.

📒 Files selected for processing (51)
  • clients/agent-runtime/src/agent/classifier.rs
  • clients/agent-runtime/src/agent/coordinator.rs
  • clients/agent-runtime/src/agent/mod.rs
  • clients/agent-runtime/src/agent/unified_loop.rs
  • clients/agent-runtime/src/channels/cli.rs
  • clients/agent-runtime/src/channels/irc.rs
  • clients/agent-runtime/src/channels/lark.rs
  • clients/agent-runtime/src/channels/telegram.rs
  • clients/agent-runtime/src/channels/whatsapp.rs
  • clients/agent-runtime/src/config/schema.rs
  • clients/agent-runtime/src/daemon/mod.rs
  • clients/agent-runtime/src/gateway/admin.rs
  • clients/agent-runtime/src/gateway/cerebro.rs
  • clients/agent-runtime/src/gateway/cost.rs
  • clients/agent-runtime/src/gateway/mod.rs
  • clients/agent-runtime/src/identity.rs
  • clients/agent-runtime/src/main.rs
  • clients/agent-runtime/src/observability/log.rs
  • clients/agent-runtime/src/providers/anthropic.rs
  • clients/agent-runtime/src/providers/compatible.rs
  • clients/agent-runtime/src/providers/copilot.rs
  • clients/agent-runtime/src/providers/gemini.rs
  • clients/agent-runtime/src/providers/glm.rs
  • clients/agent-runtime/src/providers/mod.rs
  • clients/agent-runtime/src/providers/ollama.rs
  • clients/agent-runtime/src/providers/openai.rs
  • clients/agent-runtime/src/providers/openai_codex.rs
  • clients/agent-runtime/src/providers/openrouter.rs
  • clients/agent-runtime/src/providers/pool.rs
  • clients/agent-runtime/src/security/policy.rs
  • clients/agent-runtime/src/skillforge/integrate.rs
  • clients/agent-runtime/src/skills/mod.rs
  • clients/agent-runtime/src/tools/composio.rs
  • clients/agent-runtime/src/tools/delegate.rs
  • clients/agent-runtime/src/tools/shell.rs
  • clients/agent-runtime/src/transcription/whisper_cli.rs
  • clients/agent-runtime/src/update/mod.rs
  • clients/agent-runtime/tests/admin_config_api_integration.rs
  • clients/web/apps/dashboard/src/composables/chatOnboardingContract.spec.ts
  • clients/web/apps/dashboard/vite.config.js
  • clients/web/apps/dashboard/vite.config.ts
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/design.md
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/exploration.md
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/proposal.md
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/specs/agent-loop/spec.md
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/specs/multi-agent-orchestration/spec.md
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/state.yaml
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/tasks.md
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/verify-report.md
  • openspec/specs/agent-loop/spec.md
  • openspec/specs/multi-agent-orchestration/spec.md
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🧰 Additional context used
📓 Path-based instructions (11)
clients/agent-runtime/src/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

clients/agent-runtime/src/**/*.rs: Never log secrets, tokens, raw credentials, or sensitive payloads in any logging statements
Avoid unnecessary allocations, clones, and blocking operations to maintain performance and efficiency

Files:

  • clients/agent-runtime/src/skillforge/integrate.rs
  • clients/agent-runtime/src/providers/anthropic.rs
  • clients/agent-runtime/src/providers/openrouter.rs
  • clients/agent-runtime/src/agent/classifier.rs
  • clients/agent-runtime/src/providers/pool.rs
  • clients/agent-runtime/src/observability/log.rs
  • clients/agent-runtime/src/tools/composio.rs
  • clients/agent-runtime/src/providers/ollama.rs
  • clients/agent-runtime/src/daemon/mod.rs
  • clients/agent-runtime/src/providers/gemini.rs
  • clients/agent-runtime/src/transcription/whisper_cli.rs
  • clients/agent-runtime/src/identity.rs
  • clients/agent-runtime/src/gateway/cerebro.rs
  • clients/agent-runtime/src/providers/compatible.rs
  • clients/agent-runtime/src/security/policy.rs
  • clients/agent-runtime/src/skills/mod.rs
  • clients/agent-runtime/src/update/mod.rs
  • clients/agent-runtime/src/providers/glm.rs
  • clients/agent-runtime/src/channels/lark.rs
  • clients/agent-runtime/src/providers/openai.rs
  • clients/agent-runtime/src/channels/telegram.rs
  • clients/agent-runtime/src/channels/cli.rs
  • clients/agent-runtime/src/agent/unified_loop.rs
  • clients/agent-runtime/src/providers/mod.rs
  • clients/agent-runtime/src/channels/irc.rs
  • clients/agent-runtime/src/gateway/cost.rs
  • clients/agent-runtime/src/providers/openai_codex.rs
  • clients/agent-runtime/src/providers/copilot.rs
  • clients/agent-runtime/src/agent/mod.rs
  • clients/agent-runtime/src/tools/shell.rs
  • clients/agent-runtime/src/main.rs
  • clients/agent-runtime/src/gateway/mod.rs
  • clients/agent-runtime/src/channels/whatsapp.rs
  • clients/agent-runtime/src/config/schema.rs
  • clients/agent-runtime/src/gateway/admin.rs
  • clients/agent-runtime/src/tools/delegate.rs
  • clients/agent-runtime/src/agent/coordinator.rs
clients/agent-runtime/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

Run cargo fmt --all -- --check, cargo clippy --all-targets -- -D warnings, and cargo test for code validation, or document which checks were skipped and why

Files:

  • clients/agent-runtime/src/skillforge/integrate.rs
  • clients/agent-runtime/src/providers/anthropic.rs
  • clients/agent-runtime/src/providers/openrouter.rs
  • clients/agent-runtime/src/agent/classifier.rs
  • clients/agent-runtime/src/providers/pool.rs
  • clients/agent-runtime/src/observability/log.rs
  • clients/agent-runtime/src/tools/composio.rs
  • clients/agent-runtime/src/providers/ollama.rs
  • clients/agent-runtime/src/daemon/mod.rs
  • clients/agent-runtime/src/providers/gemini.rs
  • clients/agent-runtime/src/transcription/whisper_cli.rs
  • clients/agent-runtime/src/identity.rs
  • clients/agent-runtime/tests/admin_config_api_integration.rs
  • clients/agent-runtime/src/gateway/cerebro.rs
  • clients/agent-runtime/src/providers/compatible.rs
  • clients/agent-runtime/src/security/policy.rs
  • clients/agent-runtime/src/skills/mod.rs
  • clients/agent-runtime/src/update/mod.rs
  • clients/agent-runtime/src/providers/glm.rs
  • clients/agent-runtime/src/channels/lark.rs
  • clients/agent-runtime/src/providers/openai.rs
  • clients/agent-runtime/src/channels/telegram.rs
  • clients/agent-runtime/src/channels/cli.rs
  • clients/agent-runtime/src/agent/unified_loop.rs
  • clients/agent-runtime/src/providers/mod.rs
  • clients/agent-runtime/src/channels/irc.rs
  • clients/agent-runtime/src/gateway/cost.rs
  • clients/agent-runtime/src/providers/openai_codex.rs
  • clients/agent-runtime/src/providers/copilot.rs
  • clients/agent-runtime/src/agent/mod.rs
  • clients/agent-runtime/src/tools/shell.rs
  • clients/agent-runtime/src/main.rs
  • clients/agent-runtime/src/gateway/mod.rs
  • clients/agent-runtime/src/channels/whatsapp.rs
  • clients/agent-runtime/src/config/schema.rs
  • clients/agent-runtime/src/gateway/admin.rs
  • clients/agent-runtime/src/tools/delegate.rs
  • clients/agent-runtime/src/agent/coordinator.rs
**/*.rs

⚙️ CodeRabbit configuration file

**/*.rs: Focus on Rust idioms, memory safety, and ownership/borrowing correctness.
Flag unnecessary clones, unchecked panics in production paths, and weak error context.
Prioritize unsafe blocks, FFI boundaries, concurrency races, and secret handling.

Files:

  • clients/agent-runtime/src/skillforge/integrate.rs
  • clients/agent-runtime/src/providers/anthropic.rs
  • clients/agent-runtime/src/providers/openrouter.rs
  • clients/agent-runtime/src/agent/classifier.rs
  • clients/agent-runtime/src/providers/pool.rs
  • clients/agent-runtime/src/observability/log.rs
  • clients/agent-runtime/src/tools/composio.rs
  • clients/agent-runtime/src/providers/ollama.rs
  • clients/agent-runtime/src/daemon/mod.rs
  • clients/agent-runtime/src/providers/gemini.rs
  • clients/agent-runtime/src/transcription/whisper_cli.rs
  • clients/agent-runtime/src/identity.rs
  • clients/agent-runtime/tests/admin_config_api_integration.rs
  • clients/agent-runtime/src/gateway/cerebro.rs
  • clients/agent-runtime/src/providers/compatible.rs
  • clients/agent-runtime/src/security/policy.rs
  • clients/agent-runtime/src/skills/mod.rs
  • clients/agent-runtime/src/update/mod.rs
  • clients/agent-runtime/src/providers/glm.rs
  • clients/agent-runtime/src/channels/lark.rs
  • clients/agent-runtime/src/providers/openai.rs
  • clients/agent-runtime/src/channels/telegram.rs
  • clients/agent-runtime/src/channels/cli.rs
  • clients/agent-runtime/src/agent/unified_loop.rs
  • clients/agent-runtime/src/providers/mod.rs
  • clients/agent-runtime/src/channels/irc.rs
  • clients/agent-runtime/src/gateway/cost.rs
  • clients/agent-runtime/src/providers/openai_codex.rs
  • clients/agent-runtime/src/providers/copilot.rs
  • clients/agent-runtime/src/agent/mod.rs
  • clients/agent-runtime/src/tools/shell.rs
  • clients/agent-runtime/src/main.rs
  • clients/agent-runtime/src/gateway/mod.rs
  • clients/agent-runtime/src/channels/whatsapp.rs
  • clients/agent-runtime/src/config/schema.rs
  • clients/agent-runtime/src/gateway/admin.rs
  • clients/agent-runtime/src/tools/delegate.rs
  • clients/agent-runtime/src/agent/coordinator.rs
**/*

⚙️ CodeRabbit configuration file

**/*: Security first, performance second.
Validate input boundaries, auth/authz implications, and secret management.
Look for behavioral regressions, missing tests, and contract breaks across modules.

Files:

  • clients/agent-runtime/src/skillforge/integrate.rs
  • clients/agent-runtime/src/providers/anthropic.rs
  • clients/agent-runtime/src/providers/openrouter.rs
  • clients/agent-runtime/src/agent/classifier.rs
  • clients/agent-runtime/src/providers/pool.rs
  • clients/agent-runtime/src/observability/log.rs
  • clients/agent-runtime/src/tools/composio.rs
  • clients/agent-runtime/src/providers/ollama.rs
  • clients/agent-runtime/src/daemon/mod.rs
  • clients/agent-runtime/src/providers/gemini.rs
  • clients/agent-runtime/src/transcription/whisper_cli.rs
  • clients/agent-runtime/src/identity.rs
  • clients/agent-runtime/tests/admin_config_api_integration.rs
  • clients/agent-runtime/src/gateway/cerebro.rs
  • clients/agent-runtime/src/providers/compatible.rs
  • clients/agent-runtime/src/security/policy.rs
  • clients/web/apps/dashboard/vite.config.ts
  • clients/agent-runtime/src/skills/mod.rs
  • clients/agent-runtime/src/update/mod.rs
  • clients/agent-runtime/src/providers/glm.rs
  • clients/agent-runtime/src/channels/lark.rs
  • clients/web/apps/dashboard/vite.config.js
  • clients/agent-runtime/src/providers/openai.rs
  • clients/agent-runtime/src/channels/telegram.rs
  • clients/agent-runtime/src/channels/cli.rs
  • clients/agent-runtime/src/agent/unified_loop.rs
  • clients/agent-runtime/src/providers/mod.rs
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/tasks.md
  • clients/agent-runtime/src/channels/irc.rs
  • clients/agent-runtime/src/gateway/cost.rs
  • clients/agent-runtime/src/providers/openai_codex.rs
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/verify-report.md
  • clients/agent-runtime/src/providers/copilot.rs
  • clients/web/apps/dashboard/src/composables/chatOnboardingContract.spec.ts
  • clients/agent-runtime/src/agent/mod.rs
  • clients/agent-runtime/src/tools/shell.rs
  • clients/agent-runtime/src/main.rs
  • clients/agent-runtime/src/gateway/mod.rs
  • clients/agent-runtime/src/channels/whatsapp.rs
  • clients/agent-runtime/src/config/schema.rs
  • openspec/specs/multi-agent-orchestration/spec.md
  • clients/agent-runtime/src/gateway/admin.rs
  • clients/agent-runtime/src/tools/delegate.rs
  • clients/agent-runtime/src/agent/coordinator.rs
  • openspec/specs/agent-loop/spec.md
clients/agent-runtime/src/providers/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

Implement Provider trait in src/providers/ and register in src/providers/mod.rs factory when adding a new provider

Files:

  • clients/agent-runtime/src/providers/anthropic.rs
  • clients/agent-runtime/src/providers/openrouter.rs
  • clients/agent-runtime/src/providers/pool.rs
  • clients/agent-runtime/src/providers/ollama.rs
  • clients/agent-runtime/src/providers/gemini.rs
  • clients/agent-runtime/src/providers/compatible.rs
  • clients/agent-runtime/src/providers/glm.rs
  • clients/agent-runtime/src/providers/openai.rs
  • clients/agent-runtime/src/providers/mod.rs
  • clients/agent-runtime/src/providers/openai_codex.rs
  • clients/agent-runtime/src/providers/copilot.rs
clients/agent-runtime/src/tools/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

Implement Tool trait in src/tools/ with strict parameter schema, validate and sanitize all inputs, and return structured ToolResult without panics in runtime path

Files:

  • clients/agent-runtime/src/tools/composio.rs
  • clients/agent-runtime/src/tools/shell.rs
  • clients/agent-runtime/src/tools/delegate.rs
clients/agent-runtime/src/{security,gateway,tools}/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

Treat src/security/, src/gateway/, src/tools/ as high-risk surfaces and never broaden filesystem/network execution scope without explicit policy checks

Files:

  • clients/agent-runtime/src/tools/composio.rs
  • clients/agent-runtime/src/gateway/cerebro.rs
  • clients/agent-runtime/src/security/policy.rs
  • clients/agent-runtime/src/gateway/cost.rs
  • clients/agent-runtime/src/tools/shell.rs
  • clients/agent-runtime/src/gateway/mod.rs
  • clients/agent-runtime/src/gateway/admin.rs
  • clients/agent-runtime/src/tools/delegate.rs
clients/agent-runtime/src/{security,gateway,tools,config}/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

Do not silently weaken security policy or access constraints; keep default behavior secure-by-default with deny-by-default where applicable

Files:

  • clients/agent-runtime/src/tools/composio.rs
  • clients/agent-runtime/src/gateway/cerebro.rs
  • clients/agent-runtime/src/security/policy.rs
  • clients/agent-runtime/src/gateway/cost.rs
  • clients/agent-runtime/src/tools/shell.rs
  • clients/agent-runtime/src/gateway/mod.rs
  • clients/agent-runtime/src/config/schema.rs
  • clients/agent-runtime/src/gateway/admin.rs
  • clients/agent-runtime/src/tools/delegate.rs
clients/agent-runtime/src/channels/**/*.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

Implement Channel trait in src/channels/ with consistent send, listen, and health_check semantics and cover auth/allowlist/health behavior with tests

Files:

  • clients/agent-runtime/src/channels/lark.rs
  • clients/agent-runtime/src/channels/telegram.rs
  • clients/agent-runtime/src/channels/cli.rs
  • clients/agent-runtime/src/channels/irc.rs
  • clients/agent-runtime/src/channels/whatsapp.rs
**/*.{md,mdx}

⚙️ CodeRabbit configuration file

**/*.{md,mdx}: Verify technical accuracy and that docs stay aligned with code changes.
For user-facing docs, check EN/ES parity or explicitly note pending translation gaps.

Files:

  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/tasks.md
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/verify-report.md
  • openspec/specs/multi-agent-orchestration/spec.md
  • openspec/specs/agent-loop/spec.md
clients/agent-runtime/src/main.rs

📄 CodeRabbit inference engine (clients/agent-runtime/AGENTS.md)

clients/agent-runtime/src/main.rs: Preserve CLI contract unless change is intentional and documented; prefer explicit errors over silent fallback for unsupported critical paths
Keep startup path lean and avoid heavy initialization in command parsing flow

Files:

  • clients/agent-runtime/src/main.rs
🧠 Learnings (13)
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/**/*.rs : Run `cargo fmt --all -- --check`, `cargo clippy --all-targets -- -D warnings`, and `cargo test` for code validation, or document which checks were skipped and why

Applied to files:

  • clients/agent-runtime/src/skillforge/integrate.rs
  • clients/agent-runtime/src/tools/composio.rs
  • clients/agent-runtime/src/daemon/mod.rs
  • clients/agent-runtime/src/skills/mod.rs
  • clients/agent-runtime/src/channels/cli.rs
  • openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/tasks.md
  • clients/agent-runtime/src/providers/openai_codex.rs
  • clients/agent-runtime/src/main.rs
  • clients/agent-runtime/src/gateway/mod.rs
  • clients/agent-runtime/src/config/schema.rs
  • clients/agent-runtime/src/gateway/admin.rs
  • clients/agent-runtime/src/agent/coordinator.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/main.rs : Preserve CLI contract unless change is intentional and documented; prefer explicit errors over silent fallback for unsupported critical paths

Applied to files:

  • clients/agent-runtime/src/skillforge/integrate.rs
  • clients/agent-runtime/src/providers/anthropic.rs
  • clients/agent-runtime/src/agent/classifier.rs
  • clients/agent-runtime/src/tools/composio.rs
  • clients/agent-runtime/src/daemon/mod.rs
  • clients/agent-runtime/src/providers/gemini.rs
  • clients/agent-runtime/src/transcription/whisper_cli.rs
  • clients/agent-runtime/src/identity.rs
  • clients/agent-runtime/tests/admin_config_api_integration.rs
  • clients/agent-runtime/src/gateway/cerebro.rs
  • clients/agent-runtime/src/providers/compatible.rs
  • clients/agent-runtime/src/security/policy.rs
  • clients/agent-runtime/src/skills/mod.rs
  • clients/agent-runtime/src/update/mod.rs
  • clients/agent-runtime/src/providers/glm.rs
  • clients/agent-runtime/src/channels/lark.rs
  • clients/agent-runtime/src/channels/cli.rs
  • clients/agent-runtime/src/agent/unified_loop.rs
  • clients/agent-runtime/src/providers/mod.rs
  • clients/agent-runtime/src/channels/irc.rs
  • clients/agent-runtime/src/gateway/cost.rs
  • clients/agent-runtime/src/providers/openai_codex.rs
  • clients/agent-runtime/src/providers/copilot.rs
  • clients/agent-runtime/src/agent/mod.rs
  • clients/agent-runtime/src/tools/shell.rs
  • clients/agent-runtime/src/main.rs
  • clients/agent-runtime/src/gateway/mod.rs
  • clients/agent-runtime/src/config/schema.rs
  • clients/agent-runtime/src/gateway/admin.rs
  • clients/agent-runtime/src/tools/delegate.rs
  • clients/agent-runtime/src/agent/coordinator.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/providers/**/*.rs : Implement `Provider` trait in `src/providers/` and register in `src/providers/mod.rs` factory when adding a new provider

Applied to files:

  • clients/agent-runtime/src/providers/openrouter.rs
  • clients/agent-runtime/src/providers/compatible.rs
  • clients/agent-runtime/src/providers/glm.rs
  • clients/agent-runtime/src/agent/mod.rs
  • clients/agent-runtime/src/agent/coordinator.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/tools/**/*.rs : Implement `Tool` trait in `src/tools/` with strict parameter schema, validate and sanitize all inputs, and return structured `ToolResult` without panics in runtime path

Applied to files:

  • clients/agent-runtime/src/tools/composio.rs
  • clients/agent-runtime/src/skills/mod.rs
  • clients/agent-runtime/src/tools/shell.rs
  • clients/agent-runtime/src/config/schema.rs
  • clients/agent-runtime/src/tools/delegate.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/**/Cargo.toml : Do not add heavy dependencies for minor convenience; justify new crate additions

Applied to files:

  • clients/agent-runtime/src/tools/composio.rs
  • clients/agent-runtime/src/skills/mod.rs
  • clients/agent-runtime/src/channels/cli.rs
  • clients/agent-runtime/src/agent/mod.rs
  • clients/agent-runtime/src/agent/coordinator.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/{security,gateway,tools,config}/**/*.rs : Do not silently weaken security policy or access constraints; keep default behavior secure-by-default with deny-by-default where applicable

Applied to files:

  • clients/agent-runtime/src/daemon/mod.rs
  • clients/agent-runtime/src/identity.rs
  • clients/agent-runtime/src/security/policy.rs
  • clients/agent-runtime/src/providers/mod.rs
  • clients/agent-runtime/src/main.rs
  • clients/agent-runtime/src/gateway/mod.rs
  • clients/agent-runtime/src/config/schema.rs
  • clients/agent-runtime/src/gateway/admin.rs
  • clients/agent-runtime/src/tools/delegate.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/**/*.rs : Avoid unnecessary allocations, clones, and blocking operations to maintain performance and efficiency

Applied to files:

  • clients/agent-runtime/src/identity.rs
  • clients/agent-runtime/src/skills/mod.rs
  • clients/agent-runtime/src/providers/mod.rs
  • clients/agent-runtime/src/providers/openai_codex.rs
  • clients/agent-runtime/src/main.rs
  • clients/agent-runtime/src/agent/coordinator.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/main.rs : Keep startup path lean and avoid heavy initialization in command parsing flow

Applied to files:

  • clients/agent-runtime/src/skills/mod.rs
  • clients/agent-runtime/src/gateway/cost.rs
  • clients/agent-runtime/src/tools/shell.rs
  • clients/agent-runtime/src/main.rs
  • clients/agent-runtime/src/agent/coordinator.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/channels/**/*.rs : Implement `Channel` trait in `src/channels/` with consistent `send`, `listen`, and `health_check` semantics and cover auth/allowlist/health behavior with tests

Applied to files:

  • clients/agent-runtime/src/channels/telegram.rs
  • clients/agent-runtime/src/gateway/mod.rs
  • clients/agent-runtime/src/channels/whatsapp.rs
  • clients/agent-runtime/src/agent/coordinator.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/**/Cargo.toml : Preserve release-size profile assumptions in `Cargo.toml` and avoid adding heavy dependencies unless clearly justified

Applied to files:

  • clients/agent-runtime/src/channels/cli.rs
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/**/*.rs : Never log secrets, tokens, raw credentials, or sensitive payloads in any logging statements

Applied to files:

  • clients/agent-runtime/src/providers/mod.rs
📚 Learning: 2026-02-17T07:28:38.934Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-17T07:28:38.934Z
Learning: Applies to .agents/AGENTS.md : Document agent configurations and capabilities in AGENTS.md

Applied to files:

  • openspec/specs/multi-agent-orchestration/spec.md
📚 Learning: 2026-02-17T12:31:17.076Z
Learnt from: CR
Repo: dallay/corvus PR: 0
File: clients/agent-runtime/AGENTS.md:0-0
Timestamp: 2026-02-17T12:31:17.076Z
Learning: Applies to clients/agent-runtime/src/{security,gateway,tools}/**/*.rs : Treat `src/security/`, `src/gateway/`, `src/tools/` as high-risk surfaces and never broaden filesystem/network execution scope without explicit policy checks

Applied to files:

  • clients/agent-runtime/src/agent/coordinator.rs
🪛 markdownlint-cli2 (0.22.0)
openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/verify-report.md

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

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

🔇 Additional comments (47)
clients/agent-runtime/src/channels/cli.rs (1)

469-469: No issues in this change.

Formatting-only cleanup in format! keeps output and behavior intact.

clients/agent-runtime/src/skills/mod.rs (3)

634-634: No regression in discover output formatting.

This is a safe formatting-only cleanup; output and behavior stay unchanged.


1284-1284: Local-skill update skip path remains correct.

bail! semantics and message intent are preserved; this change is non-functional.


1375-1375: Missing official subdir error handling remains intact.

This is a syntax/format cleanup only; failure behavior is unchanged and still explicit.

clients/agent-runtime/src/skillforge/integrate.rs (1)

169-169: LGTM: Formatting cleanup.

Trailing comma removed from format! arguments. No behavioral change.

clients/agent-runtime/src/update/mod.rs (1)

1584-1584: No issue — Duration::from_mins is stable.

Duration::from_mins was stabilized in Rust 1.91.0 and requires no feature flags on stable Rust. The API is already widely used throughout the codebase without issues. No action needed.

			> Likely an incorrect or invalid review comment.
clients/agent-runtime/src/channels/irc.rs (1)

15-15: No issue. std::time::Duration::from_mins was stabilized in Rust 1.91.0, and the project uses toolchain 1.92. The API is available on stable and the code is valid.

clients/agent-runtime/src/channels/telegram.rs (1)

2227-2227: MSRV requirement met: workspace uses Rust 1.92.

The workspace is configured with rust-toolchain channel 1.92, which satisfies the requirement for Duration::from_mins (stabilized in Rust 1.91.0). No build issues will occur.

clients/agent-runtime/src/identity.rs (1)

457-457: LGTM: Idiomatic Rust refactoring for deterministic ordering.

The change from .sort_by() to .sort_by_key() is a clean improvement that makes the sorting logic more idiomatic and potentially more efficient. This aligns well with the PR's focus on deterministic behavior for multi-agent coordination, and the existing test at line 565 confirms the ordering remains correct.

Also applies to: 475-475

clients/agent-runtime/src/transcription/whisper_cli.rs (1)

395-395: No issues found. Duration::from_mins is a valid std::time::Duration constructor (available since Rust 1.53.0). The change from Duration::from_secs(120) to Duration::from_mins(2) is correct and semantically equivalent; no action required.

clients/agent-runtime/src/channels/lark.rs (3)

128-128: LGTM — clearer heartbeat duration.

The timeout remains 5 minutes and still exceeds the default 120-second ping interval.


309-310: LGTM — fragment GC cutoff stays bounded.

This keeps the stale-fragment retention at 5 minutes with more readable duration construction.


413-413: LGTM — dedup retention is unchanged and clearer.

The 30-minute dedup window is preserved while avoiding the manual seconds expression.

clients/agent-runtime/src/gateway/cerebro.rs (1)

863-879: Same MSRV check applies to Duration::from_mins.

The test fixture still uses a 5-minute idempotency TTL, so behavior is unchanged. Please confirm the Rust toolchain/MSRV supports Duration::from_mins; otherwise keep Duration::from_secs(300).

clients/agent-runtime/src/gateway/admin.rs (1)

2543-2565: Same MSRV check applies to this test fixture TTL.

Duration::from_mins(5) preserves the previous 300-second window. Verify the repo’s Rust version supports it; otherwise use Duration::from_secs(300).

clients/agent-runtime/src/gateway/cost.rs (1)

342-389: Same MSRV check applies to both cost gateway test states.

Both helpers keep the same 5-minute idempotency TTL. Confirm the project toolchain supports Duration::from_mins; otherwise use Duration::from_secs(300).

clients/agent-runtime/tests/admin_config_api_integration.rs (1)

71-87: Same MSRV check applies to the 1-minute integration-test TTL.

The idempotency duration remains 60 seconds. Verify Duration::from_mins is supported by the declared Rust toolchain; otherwise use Duration::from_secs(60).

clients/agent-runtime/src/security/policy.rs (1)

109-122: No action required—Duration::from_hours() is compatible with your toolchain.

Rust 1.92 (declared in rust-toolchain.toml) supports the convenience constructors from_hours() and from_mins(), both stabilized in Rust 1.84.0. The codebase already uses these consistently across 40+ locations (channels, gateways, providers, security). The one-hour window is preserved, and the code is semantically sound.

clients/agent-runtime/src/gateway/mod.rs (1)

3678-3678: No action needed. The project's rust-toolchain.toml declares Rust 1.92, which exceeds the 1.91.0 minimum required for Duration::from_mins(). The code change is compatible.

clients/agent-runtime/src/channels/whatsapp.rs (1)

353-353: No action needed — Duration::from_hours is stable.

std::time::Duration::from_hours() was stabilized in Rust 1.91.0 (October 2025) and is a valid stable API as of now (April 2026). The code compiles correctly and requires no changes.

			> Likely an incorrect or invalid review comment.
clients/agent-runtime/src/providers/glm.rs (1)

93-95: Equivalent timeout normalization.

This keeps the same 2-minute request timeout and leaves the connect timeout unchanged.

clients/agent-runtime/src/providers/anthropic.rs (1)

181-183: Equivalent timeout normalization.

This preserves the same overall request timeout while keeping connection setup bounded separately.

clients/agent-runtime/src/tools/composio.rs (1)

40-42: Equivalent timeout normalization.

This keeps the Composio client at a 1-minute request timeout without broadening network behavior.

clients/agent-runtime/src/providers/openrouter.rs (1)

116-118: Equivalent timeout normalization.

This keeps the OpenRouter request timeout unchanged at 2 minutes.

clients/agent-runtime/src/providers/gemini.rs (1)

228-230: Equivalent timeout normalization.

This preserves the existing 2-minute Gemini request timeout.

clients/agent-runtime/src/providers/pool.rs (1)

516-519: Equivalent test fixture update.

The cooldown remains one minute in the future and still exercises account skipping deterministically.

clients/agent-runtime/src/providers/ollama.rs (1)

79-81: Equivalent timeout normalization.

This keeps Ollama’s longer 5-minute request timeout intact for local/remote model calls.

clients/agent-runtime/src/providers/openai.rs (1)

141-143: No MSRV issue. Duration::from_mins is available since Rust 1.53.0; the repository is pinned to Rust 1.92, which fully supports this API. The timeout change is safe.

			> Likely an incorrect or invalid review comment.
clients/agent-runtime/src/daemon/mod.rs (1)

497-503: LGTM — minute-based expectations are equivalent.

The configured and floored updater interval assertions still match the production calculation.

clients/agent-runtime/src/main.rs (2)

2224-2228: LGTM — callback wait remains three minutes.

This is a readability-only timeout constructor change with no OAuth flow behavior change.


2890-2894: LGTM — the threshold assertion remains equivalent.

The override still validates a 90-minute staged-image reaper threshold.

clients/agent-runtime/src/providers/compatible.rs (1)

58-62: LGTM — provider timeout value is unchanged.

Both constructors still use a two-minute request timeout and preserve the existing connect timeout/fallback behavior.

Also applies to: 80-84

clients/agent-runtime/src/providers/copilot.rs (2)

249-253: LGTM — Copilot request timeout remains two minutes.

The HTTP client behavior is unchanged.


1019-1021: LGTM — the polling-delay expectation is clearer.

The test still asserts the 5-second interval plus 3-second safety margin.

clients/agent-runtime/src/providers/mod.rs (1)

237-250: Loop refactor is clean and behavior-preserving.

Switching to while let improves clarity without changing scan/replace semantics, including the bare-prefix continuation path.

clients/agent-runtime/src/config/schema.rs (2)

3326-3341: LGTM.

The catalog URL validation still fails closed for non-HTTPS and loopback targets.


3650-3694: LGTM.

Treating a whitespace-only Cerebro auth token as missing closes the configuration gap when an endpoint is set.

clients/agent-runtime/src/providers/openai_codex.rs (2)

90-94: LGTM.

The overall request timeout remains two minutes and the connect timeout is unchanged.


279-294: LGTM.

The while let loop keeps the same SSE frame processing and trailing-buffer behavior.

clients/agent-runtime/src/agent/mod.rs (1)

5-5: LGTM.

Exporting coordinator from agent matches the new orchestration module boundary.

clients/agent-runtime/src/agent/classifier.rs (1)

59-60: LGTM.

Reverse(rule.priority) preserves the descending-priority rule order with clearer intent.

clients/agent-runtime/src/tools/shell.rs (1)

60-60: Same Duration::from_mins MSRV concern already raised on unified_loop.rs.

openspec/changes/archive/2026-04-20-track-4-slice-1-coordinator-foundations/tasks.md (1)

5-30: Archive checklist flip looks consistent with the rest of the PR.

Every referenced implementation file in tasks 1.1–5.2 has a matching diff (coordinator.rs, delegate.rs, CLAUDIO_ROADMAP.md, specs). No discrepancies.

openspec/specs/agent-loop/spec.md (1)

491-519: Requirement scoping is tight and matches implementation.

The "MUST NOT be interpreted as enabling remote child transport, disk-backed mailbox delivery, worktree isolation, or full delegated permission escalation" line mirrors the deferred-scope assertions enforced by coordinator.rs::coordinator_slice_defers_non_in_process_transport_and_deferred_scope — good traceability.

clients/agent-runtime/src/tools/delegate.rs (1)

47-77: Clean seam; fail-closed fallbacks read well.

The SessionCoordinatorExecutor trait cleanly isolates the coordinator from the tool layer for testability, and session_result_from_outcome/fail_closed_session_result correctly fall back to a non-success ToolResult in every branch where the child slot is empty (children.first() == None). Preserves the existing ToolResult contract and keeps the OneShot path untouched.

Also applies to: 149-204

clients/agent-runtime/src/agent/coordinator.rs (1)

480-510: Solid lock discipline and deterministic aggregation — nice work on this slice.

  • std::sync::Mutex held only around tight synchronous critical sections (no awaits), correctly converting poison to FailedClosed.
  • JoinSet + parent-owned CancellationToken gives deterministic cancel/fail propagation without a bespoke message bus.
  • ordered_outcomes() sorting by launch_index guarantees the spec's "stable aggregation regardless of completion order" requirement, and the aggregate_results_preserve_launch_order test actually proves it with reversed delays.
  • First-failure-wins guard (!failed on Line 888) plus coordinator_cancellation.cancel() gives the "fatal child failure cancels siblings" semantic cleanly.

Ship it (after the smaller nits above).

Also applies to: 821-957

clients/agent-runtime/src/agent/unified_loop.rs (1)

16-16: MSRV is sufficient — change is valid.

Rust 1.92 (workspace toolchain) supports Duration::from_mins (stabilized in 1.81). Both changes in unified_loop.rs:16 and shell.rs:60 compile and run without issue.

Comment thread clients/agent-runtime/src/agent/coordinator.rs
Comment on lines +548 to +579
pub fn admit_child(&self, request: &ChildLaunchRequest) -> Result<(), CoordinatorError> {
let mut registry = self
.registry
.lock()
.map_err(|_| CoordinatorError::FailedClosed("registry lock poisoned".to_string()))?;

if registry.contains_key(&request.child_id) {
return Err(CoordinatorError::DuplicateChild(request.child_id.0.clone()));
}

if registry
.values()
.any(|record| record.launch_index == request.launch_index)
{
return Err(CoordinatorError::DuplicateLaunchIndex(request.launch_index));
}

registry.insert(
request.child_id.clone(),
ChildRecord {
child_id: request.child_id.clone(),
agent_name: request.agent_name.clone(),
launch_index: request.launch_index,
session_id: None,
state: ChildState::Registered,
last_sequence: 0,
terminal_reason: None,
summary: None,
},
);
Ok(())
}
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.

⚠️ Potential issue | 🟡 Minor

Partial-admit state leak on duplicate child.

admit_child is called in a loop before transition(Dispatching) (Lines 836–839). If children[0] admits successfully but children[1] is a duplicate / has a colliding launch_index, the registry now contains children[0] while the coordinator is still in Initialized and the caller gets an Err. A retry on the same Coordinator instance would then either double-admit children[0] or silently skip it depending on caller logic.

Two safe fixes: (a) validate all children up-front (uniqueness of child_id and launch_index) before any registry mutation, or (b) document that a failed run/run_with_cancellation invalidates the coordinator and callers must construct a fresh one. Today's callers (only DefaultSessionCoordinatorExecutor) always build a fresh Coordinator, so this is latent rather than exploitable — but worth closing before slice 2 reuses coordinators.

Also applies to: 836-839

Comment thread clients/agent-runtime/src/agent/coordinator.rs
Comment thread clients/agent-runtime/src/observability/log.rs Outdated
Comment thread clients/agent-runtime/src/tools/delegate.rs
Comment thread clients/web/apps/dashboard/src/composables/chatOnboardingContract.spec.ts Outdated
Comment thread clients/web/apps/dashboard/vite.config.js
Comment thread clients/web/apps/dashboard/vite.config.ts
Comment thread openspec/specs/multi-agent-orchestration/spec.md
- coordinator.rs: swap string-based test for exhaustive compile-time match
- coordinator.rs: add Some(_) catch-all for future AgentExecutionError variants
- log.rs: replace invalid Duration::from_mins(2) with from_secs(120)
- delegate.rs: rename test to reflect schema-only validation
- chatOnboardingContract.spec.ts: inline roadmap fixture, use regex assertions
- vite.config.js: narrow server.fs.allow to specific paths
- vite.config.ts: make fs.allow conditional on test mode
- verify-report.md: change H2 to H1 heading
- spec.md: add non-normative note on implicit kind/sender/recipient
@yacosta738 yacosta738 merged commit 753cd53 into develop Apr 20, 2026
7 checks passed
@yacosta738 yacosta738 deleted the feat/track-4-slice-1-coordinator-foundations branch April 20, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant