Skip to content

Add shared cross-plugin rename-symbol fixtures and tests (test-support)#90

Merged
leynos merged 23 commits intomainfrom
add-rename-symbol-tests-1cdz7f
Apr 21, 2026
Merged

Add shared cross-plugin rename-symbol fixtures and tests (test-support)#90
leynos merged 23 commits intomainfrom
add-rename-symbol-tests-1cdz7f

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Mar 24, 2026

Summary

  • Adds shared cross-plugin rename-symbol fixtures behind a feature-gated test-support module for weaver-plugins and wires them into rope (Python) and rust-analyzer (Rust) plugin crates via dev-dependencies.
  • Expands test coverage with contract conformance tests and fixtures for both plugins, backed by the shared fixtures to validate request/response schemas, missing fields, wrong operations, and diff/non-diff outcomes.
  • Extends End-to-End (E2E), daemon routing, and CLI snapshot coverage to exercise automatic routing, explicit-provider refusals, and provider-mismatch refusals with updated snapshots.
  • Introduces a living ExecPlan document guiding rename-symbol unit/behavioural/end-to-end coverage and milestones.
  • Updates docs and guidance to reflect cross-plugin fixture alignment and parity expectations.
  • Consumes shared fixtures from weaver-plugins in rope and rust-analyzer crates via dev-dependencies with features = ["test-support"], and re-exports fixtures and helpers from weaver-plugins for downstream crates.
  • Updates roadmap and user guide to mark 5.2.5 as complete and reflect the cross-plugin fixture strategy.
  • Artifacts updated/added include the new ExecPlan, test-support module, contract tests/fixtures for both plugins, extended E2E snapshots, and related test wiring.

Changes

  • Added dedicated ExecPlan document:
    • docs/execplans/5-2-5-unit-behavioural-and-end-to-end-coverage-for-rename-symbol.md
    • Living plan detailing purpose, constraints, risks, milestones, interfaces, and acceptance criteria for rename-symbol test coverage.
  • Introduced shared test fixtures for the rename-symbol contract behind a feature flag:
    • New test-support module wired into weaver-plugins (weaver-plugins/src/capability/test_support.rs) and exposed via weaver-plugins Cargo.toml feature test-support.
    • Public fixtures and helpers exposed for downstream crates (RenameSymbolRequestFixture, RenameSymbolResponseFixture, and fixture accessors).
    • Updated weaver-plugins/src/lib.rs to re-export the test-support fixtures when the feature flag is enabled.
  • Plugin crates updated to consume the shared fixtures:
    • rope and rust-analyzer crates declare a dev-dependency on weaver-plugins with features = ["test-support"] and register contract/conformance tests.
  • Added contract conformance tests and fixtures for both plugins:
    • New unit/BDD test modules for rope and rust-analyzer (e.g., contract_behaviour.rs, contract_fixtures.rs) and corresponding feature-backed support for shared fixtures.
    • Shared tests validate that request/response fixtures conform to the RenameSymbolContract (valid cases, missing fields, wrong operation, empty values) and that provider-resolution paths are exercised.
  • End-to-end and CLI snapshot coverage enhancements:
    • Weavee-e2e tests extended to exercise automatic routing, explicit-provider refusals, and provider-mismatch scenarios for both Python and Rust flows, with updated snapshots to reflect capability-resolution envelopes and CLI transcripts.
  • Daemon and routing tests extended:
    • Weaverd tests extended to exercise resolution envelopes, explicit-provider selections, and rollback guarantees on failure paths.
  • Documentation and roadmap updates:
    • docs/roadmap.md updated to mark 5.2.5 as complete.
    • docs/users-guide.md updated to reflect shared contract fixtures alignment across Python and Rust rename flows.
  • Artifacts updated/added:
    • ExecPlan, test-support module, contract tests/fixtures for both plugins, extended E2E snapshots, and related wiring.
  • Notes:
    • This work establishes cross-plugin parity for the rename-symbol contract and expands test infrastructure to support shared fixtures across Python and Rust flows.

Task

Updated Git diff:

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7d2df506-c1ee-4cac-9f14-aa7b75e176da

📥 Commits

Reviewing files that changed from the base of the PR and between 823ec09 and df6dc01.

📒 Files selected for processing (2)
  • crates/weaver-e2e/tests/test_support/daemon_harness.rs
  • docs/execplans/adopt-ortho-config-v0-8-0.md

Walkthrough

Consolidate rename-symbol test infrastructure: extract shared e2e harness and routing, centralise plugin contract fixtures behind a feature-gated test-support API, add BDD contract tests for rope and rust‑analyzer, extend refactor dispatch rollback tests, and enforce refusal of plugin success responses that lack diff output. (48 words)

Changes

Cohort / File(s) Summary
E2E CLI snapshot tests
crates/weaver-e2e/tests/refactor_rope_cli_snapshots.rs, crates/weaver-e2e/tests/refactor_rust_analyzer_cli_snapshots.rs
Remove inline daemon/test harness; import shared daemon_harness and refactor_routing; add parameterised snapshot helpers (rstest) and adapt tests to new FakeDaemon::start(expected_requests, renamed_symbol) signature.
E2E test support
crates/weaver-e2e/tests/test_support/daemon_harness.rs, crates/weaver-e2e/tests/test_support/refactor_routing.rs
Add FakeDaemon TCP harness, Transcript builder, request parsing/routing helpers, deterministic payload builders, and output_to_transcript for snapshot assembly.
Plugin contract tests — rope
crates/weaver-plugin-rope/src/tests/contract_behaviour.rs, crates/weaver-plugin-rope/src/tests/contract_fixtures.rs, crates/weaver-plugin-rope/src/tests/mod.rs, crates/weaver-plugin-rope/tests/features/rename_symbol_contract.feature, crates/weaver-plugin-rope/Cargo.toml
Add BDD-style contract behaviour and fixture validation tests using shared fixtures from weaver-plugins; add feature file and enable weaver-plugins test-support for dev builds.
Plugin contract tests — rust‑analyzer
crates/weaver-plugin-rust-analyzer/src/tests/contract_behaviour.rs, crates/weaver-plugin-rust-analyzer/src/tests/contract_fixtures.rs, crates/weaver-plugin-rust-analyzer/src/tests/mod.rs, crates/weaver-plugin-rust-analyzer/tests/features/rename_symbol_contract.feature, crates/weaver-plugin-rust-analyzer/Cargo.toml
Add equivalent BDD contract behaviour and fixture validation tests wired to shared fixtures; enable test-support feature in dev-deps.
Shared plugin test fixtures
crates/weaver-plugins/src/capability/test_support.rs, crates/weaver-plugins/src/capability/mod.rs, crates/weaver-plugins/src/lib.rs, crates/weaver-plugins/Cargo.toml
Introduce test-support feature; add feature-gated capability::test_support publishing canonical rename-symbol request/response fixtures, lookup APIs, validators and assertion helpers; re-export selected APIs under the feature gate.
Weaverd refactor runtime & helpers
crates/weaverd/src/dispatch/act/refactor/behaviour.rs, crates/weaverd/src/dispatch/act/refactor/mod.rs, crates/weaverd/src/dispatch/act/refactor/refactor_helpers.rs
Add RuntimeMode::EmptySuccess handling; reorganise refactor helpers into submodules with pub(crate) re-exports; add RollbackRuntime and ExecuteResult to model execution/rollback variants for tests.
Refactor dispatch tests & features
crates/weaverd/src/dispatch/act/refactor/resolution_tests.rs, crates/weaverd/src/dispatch/act/refactor/rollback_tests.rs, crates/weaverd/src/dispatch/act/refactor/contract_tests.rs, crates/weaverd/src/dispatch/act/refactor/tests.rs, crates/weaverd/tests/features/refactor.feature
Add explicit-provider unit test; strengthen candidate-rejection assertions; add rollback-focused tests covering refusal, missing plugin and missing diff output; switch tests to shared helpers; add BDD scenario for non-diff success handling.
Refactor helpers reuse in tests
crates/weaverd/src/dispatch/act/refactor/contract_tests.rs, crates/weaverd/src/dispatch/act/refactor/tests.rs
Remove local #[path = ...] module declarations; import shared refactor_helpers via super::refactor_helpers to use centralised helpers.
Documentation & guides
docs/execplans/..., docs/roadmap.md, docs/users-guide.md, docs/developers-guide.md, agent-skill/weaver/SKILL.md
Add ExecPlan for rename-symbol coverage, mark roadmap task done, document refusal behaviour for success-without-diff responses, document test-support APIs and harness usage, and update developer/SKILL docs accordingly.

Sequence Diagram(s)

sequenceDiagram
  participant CLI as CLI (weaver)
  participant Daemon as Daemon (FakeDaemon)
  participant Plugin as Plugin runtime
  participant FS as Filesystem

  CLI->>Daemon: connect to --daemon-socket and send refactor request (JSONL)
  Daemon->>Plugin: route request (automatic or explicit provider)
  Plugin-->>Daemon: respond (diff stdout OR non-diff success OR error)
  Daemon-->>CLI: stream stdout/stderr JSONL lines and exit status
  alt Plugin returned diff
    CLI->>FS: apply diff to files
  else Plugin success but no diff
    CLI-->>FS: abort and leave files unchanged
  end
Loading

Possibly related PRs

Poem

🔧 Share fixtures, harness the flow,
Daemons mock and BDDs grow,
Rope and rust now read the same,
Refactors refuse the shameless claim,
Tests hold steady — keep the flame. 🔥

🚥 Pre-merge checks | ✅ 8 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Module-Level Documentation ⚠️ Warning Nine new Rust modules totalling 1,500+ lines lack module-level docstrings (//! comments) as flagged in review comments requesting Rustdoc for public test-support APIs. Add comprehensive module-level docstrings to all new modules: document test_support.rs purpose, daemon_harness.rs TCP harness role, refactor_routing.rs request handling, and contract test modules' conformance validation role.
✅ Passed checks (8 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add shared cross-plugin rename-symbol fixtures and tests (test-support)' clearly and directly describes the main objective of the changeset: introducing shared test fixtures for the rename-symbol capability across multiple plugin crates, backed by a feature-gated test-support module.
Description check ✅ Passed The description provides detailed context on the shared fixtures, contract conformance tests, E2E coverage expansions, ExecPlan documentation, and plugin crate wiring that directly correspond to the changes across the changeset.
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.
Testing ✅ Passed PR introduces comprehensive test coverage across multiple layers including parameterised conformance tests, BDD-style behaviour tests, rollback failure paths, resolution scenarios, and E2E snapshot tests.
User-Facing Documentation ✅ Passed PR successfully documents hard-failure behaviour for act refactor when plugins return success without diff output, including error message, exit status, and filesystem preservation.
Developer Documentation ✅ Passed The PR extends docs/developers-guide.md with comprehensive documentation of new test infrastructure APIs, architectural boundaries, and build requirements for rename-symbol coverage.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-rename-symbol-tests-1cdz7f

Comment @coderabbitai help to get the list of available commands and usage tips.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Mar 24, 2026

Reviewer's Guide

Centralizes rename-symbol contract test fixtures in a feature-gated weaver-plugins test_support module and wires them into rope, rust-analyzer, daemon, and e2e/CLI tests, while adding rollback/routing coverage and an ExecPlan plus roadmap/users-guide updates.

Sequence diagram for non-diff success response and rollback behaviour

sequenceDiagram
    participant Testrunner
    participant RefactorWorld
    participant RefactorHandler
    participant StubRuntime

    Testrunner->>RefactorWorld: given_non_diff_success()
    RefactorWorld->>RefactorWorld: runtime_mode = EmptySuccess

    Testrunner->>RefactorWorld: when_refactor_executes()
    RefactorWorld->>RefactorHandler: execute act refactor command

    RefactorHandler->>StubRuntime: execute(rename request)
    StubRuntime-->>RefactorHandler: PluginResponse success Empty

    RefactorHandler->>RefactorHandler: detect non-diff success
    RefactorHandler->>RefactorHandler: enforce rollback invariant
    RefactorHandler-->>RefactorWorld: failure outcome, no diff applied

    RefactorWorld-->>Testrunner: assertions on stderr and filesystem
Loading

Class diagram for capability test_support fixtures and runtime changes

classDiagram
    class capability {
    }

    class test_support {
        +RenameSymbolRequestFixture
        +RenameSymbolResponseFixture
        +rename_symbol_request_fixtures() Vec~RenameSymbolRequestFixture~
        +rename_symbol_response_fixtures() Vec~RenameSymbolResponseFixture~
    }

    class RenameSymbolRequestFixture {
        +name: &'static str
        +request: RenameSymbolRequest
    }

    class RenameSymbolResponseFixture {
        +name: &'static str
        +response: PluginResponse
    }

    class RenameSymbolRequest {
    }

    class PluginResponse {
    }

    class weaver_plugins_lib {
        <<module re-export>>
        +RenameSymbolRequestFixture
        +RenameSymbolResponseFixture
        +rename_symbol_request_fixtures()
        +rename_symbol_response_fixtures()
    }

    class RuntimeMode {
        <<enum>>
        DiffSuccess
        RuntimeError
        MalformedDiff
        EmptySuccess
    }

    class StubRuntime {
        +mode: RuntimeMode
        +execute(request: RenameSymbolRequest) PluginResponse
    }

    capability <|-- test_support
    test_support --> RenameSymbolRequestFixture
    test_support --> RenameSymbolResponseFixture
    RenameSymbolRequestFixture --> RenameSymbolRequest
    RenameSymbolResponseFixture --> PluginResponse

    weaver_plugins_lib --> capability
    weaver_plugins_lib --> test_support

    RuntimeMode <.. StubRuntime
    StubRuntime --> PluginResponse
Loading

File-Level Changes

Change Details Files
Introduce shared, feature-gated rename-symbol contract fixtures in weaver-plugins and re-export them for downstream tests.
  • Add a capability::test_support module defining RenameSymbolFixture plus request/response fixture builders and helpers.
  • Expose RenameSymbolRequestFixture/RenameSymbolResponseFixture and fixture accessors via weaver-plugins when the test-support feature is enabled.
  • Enable the test-support Cargo feature in weaver-plugins and gate the new module appropriately.
crates/weaver-plugins/src/capability/test_support.rs
crates/weaver-plugins/src/capability/mod.rs
crates/weaver-plugins/src/lib.rs
crates/weaver-plugins/Cargo.toml
Update rope and rust-analyzer plugins to consume shared fixtures for unit and BDD contract coverage.
  • Add weaver-plugins with test-support feature as a dev-dependency in both plugin crates.
  • Add contract_fixtures unit tests that iterate shared request/response fixtures against RenameSymbolContract.
  • Add BDD worlds and step definitions that validate shared fixtures plus matching .feature files for each plugin.
  • Register new contract_* modules in the existing tests mod for each plugin.
crates/weaver-plugin-rope/Cargo.toml
crates/weaver-plugin-rope/src/tests/mod.rs
crates/weaver-plugin-rope/src/tests/contract_behaviour.rs
crates/weaver-plugin-rope/src/tests/contract_fixtures.rs
crates/weaver-plugin-rope/tests/features/rename_symbol_contract.feature
crates/weaver-plugin-rust-analyzer/Cargo.toml
crates/weaver-plugin-rust-analyzer/src/tests/mod.rs
crates/weaver-plugin-rust-analyzer/src/tests/contract_behaviour.rs
crates/weaver-plugin-rust-analyzer/src/tests/contract_fixtures.rs
crates/weaver-plugin-rust-analyzer/tests/features/rename_symbol_contract.feature
Strengthen daemon refactor routing and rollback coverage, including non-diff success handling and deterministic refusals.
  • Extend RefactorPluginRuntime stub to support an EmptySuccess mode and add BDD step for non-diff success response.
  • Add a new rollback_tests module that uses a temporary workspace plus custom runtime to assert files remain unchanged on refused resolution, runtime errors, and non-diff success.
  • Extend resolution tests to cover explicit provider success and deterministic unsupported-language candidate reasons.
  • Wire new rollback_tests into the refactor module tests.
crates/weaverd/src/dispatch/act/refactor/behaviour.rs
crates/weaverd/tests/features/refactor.feature
crates/weaverd/src/dispatch/act/refactor/rollback_tests.rs
crates/weaverd/src/dispatch/act/refactor/resolution_tests.rs
crates/weaverd/src/dispatch/act/refactor/mod.rs
Enhance e2e CLI snapshot tests to simulate capability resolution envelopes, automatic routing, and explicit-provider mismatch refusals for rope and rust-analyzer.
  • Add helpers to parse CLI request arguments and extract flag values from the fake daemon request JSON.
  • Introduce automatic_resolution_payload and provider_mismatch_payload generators that emit CapabilityResolution JSON based on file extension and provider.
  • Refactor snapshot tests to share a runner, add rstest parameterization for multiple routing scenarios, and change the fake daemon to emit stderr routing envelopes plus non-zero exit on mismatches.
  • Add new insta snapshot files for automatic routing and provider-mismatch refusal cases.
crates/weaver-e2e/tests/refactor_rust_analyzer_cli_snapshots.rs
crates/weaver-e2e/tests/refactor_rope_cli_snapshots.rs
crates/weaver-e2e/tests/snapshots/refactor_rope_cli_snapshots__refactor_automatic_rope_routing.snap
crates/weaver-e2e/tests/snapshots/refactor_rope_cli_snapshots__refactor_provider_mismatch_refusal.snap
crates/weaver-e2e/tests/snapshots/refactor_rust_analyzer_cli_snapshots__refactor_automatic_rust_routing.snap
crates/weaver-e2e/tests/snapshots/refactor_rust_analyzer_cli_snapshots__refactor_rust_provider_mismatch_refusal.snap
Document the rename-symbol coverage plan and align roadmap and user guide with the new shared-fixture strategy.
  • Add an ExecPlan document detailing constraints, risks, milestones, and validation strategy for rename-symbol coverage.
  • Update the roadmap to mark item 5.2.5 as complete.
  • Clarify in the users guide that rope and rust-analyzer rename plugins are validated against shared contract fixtures.
docs/execplans/5-2-5-unit-behavioural-and-end-to-end-coverage-for-rename-symbol.md
docs/roadmap.md
docs/users-guide.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@leynos leynos changed the title Add unit, behavioural, and e2e tests for rename-symbol Add shared rename-symbol test fixtures and full test coverage (unit, behavioural, e2e) Mar 29, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Mar 29, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix:

crates/weaver-e2e/tests/refactor_rope_cli_snapshots.rs

Comment on file

fn refactor_automatic_rope_routing_cli_snapshot() {
    let daemon = FakeDaemon::start(1).expect("fake daemon should start");
    let endpoint = daemon.endpoint();

    let command_string = String::from(
        "weaver --daemon-socket tcp://<daemon-endpoint> --output json act refactor --refactoring rename --file src/main.py new_name=renamed_symbol offset=4",
    );

    let mut command = Command::new(weaver_binary_path());
    let output = command
        .args([
            "--daemon-socket",
            endpoint.as_str(),
            "--output",
            "json",
            "act",
            "refactor",
            "--refactoring",
            "rename",
            "--file",
            "src/main.py",
            "new_name=renamed_symbol",
            "offset=4",
        ])
        .output()
        .expect("command should execute");

    let transcript = output_to_transcript(command_string, &output, daemon.requests());
    daemon.join();

    assert_debug_snapshot!("refactor_automatic_rope_routing", transcript);
}

❌ New issue: Code Duplication
The module contains 3 functions with similar structure: refactor_actuator_isolation_cli_snapshot,refactor_automatic_rope_routing_cli_snapshot,refactor_provider_mismatch_refusal_cli_snapshot

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Mar 29, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix:

crates/weaver-e2e/tests/refactor_rust_analyzer_cli_snapshots.rs

Comment on file

fn refactor_automatic_rust_routing_cli_snapshot() {
    let daemon = FakeDaemon::start(1).expect("fake daemon should start");
    let endpoint = daemon.endpoint();

    let command_string = String::from(
        "weaver --daemon-socket tcp://<daemon-endpoint> --output json act refactor --refactoring rename --file src/main.rs new_name=renamed_name offset=3",
    );

    let mut command = Command::new(weaver_binary_path());
    let output = command
        .args([
            "--daemon-socket",
            endpoint.as_str(),
            "--output",
            "json",
            "act",
            "refactor",
            "--refactoring",
            "rename",
            "--file",
            "src/main.rs",
            "new_name=renamed_name",
            "offset=3",
        ])
        .output()
        .expect("command should execute");

    let transcript = output_to_transcript(command_string, &output, daemon.requests());
    daemon.join();

    assert_debug_snapshot!("refactor_automatic_rust_routing", transcript);
}

❌ New issue: Code Duplication
The module contains 3 functions with similar structure: refactor_automatic_rust_routing_cli_snapshot,refactor_rust_analyzer_actuator_isolation_cli_snapshot,refactor_rust_provider_mismatch_refusal_cli_snapshot

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Mar 29, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix:

crates/weaver-plugins/src/capability/test_support.rs

Comment on file

    pub const fn new(
        name: &'static str,
        request: PluginRequest,
        expected_error_fragment: Option<&'static str>,
    ) -> Self {
        Self {
            name,
            request,
            expected_error_fragment,
        }
    }

❌ New issue: Code Duplication
The module contains 2 functions with similar structure: RenameSymbolRequestFixture.new,RenameSymbolResponseFixture.new

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Mar 29, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix:

crates/weaverd/src/dispatch/act/refactor/rollback_tests.rs

Comment on file

fn successful_non_diff_response_leaves_target_file_unchanged() {
    let outcome = run_failure_case(RollbackRuntime {
        resolution: selected_resolution(SelectedResolution {
            capability: weaver_plugins::CapabilityId::RenameSymbol,
            language: "python",
            provider: "rope",
            selection_mode: super::resolution::SelectionMode::Automatic,
            requested_provider: None,
        }),
        execute_result: ExecuteResult::Success(PluginResponse::success(PluginOutput::Analysis {
            data: serde_json::json!({ "unexpected": true }),
        })),
    });

    assert_eq!(outcome.status, 1);
    assert_eq!(
        outcome.content,
        original_content_for(std::path::Path::new("notes.py"))
    );
    assert!(outcome.stderr.contains("did not return diff output"));
}

❌ New issue: Code Duplication
The module contains 2 functions with similar structure: plugin_runtime_error_leaves_target_file_unchanged,successful_non_diff_response_leaves_target_file_unchanged

@coderabbitai

This comment was marked as resolved.

@coderabbitai

This comment was marked as resolved.

@coderabbitai

This comment was marked as resolved.

@coderabbitai

This comment was marked as resolved.

@leynos leynos changed the title Add shared rename-symbol test fixtures and full test coverage (unit, behavioural, e2e) Add shared rename-symbol fixtures, ExecPlan, and test coverage Mar 29, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Mar 30, 2026

@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix:

crates/weaver-e2e/tests/refactor_rust_analyzer_cli_snapshots.rs

Comment on file

fn refactor_rust_analyzer_actuator_isolation_cli_snapshot() {
    run_refactor_snapshot(
        "refactor_rust_analyzer_actuator_isolation",
        "weaver --daemon-socket tcp://<daemon-endpoint> --output json act refactor --provider rust-analyzer --refactoring rename --file src/main.rs new_name=renamed_name offset=3",
        &[

❌ New issue: Code Duplication
The module contains 3 functions with similar structure: refactor_automatic_rust_routing_cli_snapshot,refactor_rust_analyzer_actuator_isolation_cli_snapshot,refactor_rust_provider_mismatch_refusal_cli_snapshot

@coderabbitai

This comment was marked as resolved.

@leynos leynos changed the title Add shared rename-symbol fixtures, ExecPlan, and test coverage Add shared rename-symbol fixtures, contract tests, E2E, and ExecPlan Apr 8, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos leynos marked this pull request as ready for review April 8, 2026 22:59
sourcery-ai[bot]

This comment was marked as resolved.

sourcery-ai[bot]

This comment was marked as resolved.

@coderabbitai coderabbitai Bot added the Roadmap label Apr 8, 2026
coderabbitai[bot]

This comment was marked as resolved.

codescene-delta-analysis[bot]

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as resolved.

leynos and others added 3 commits April 15, 2026 16:23
Add a comprehensive ExecPlan document outlining unit, behavioural, and end-to-end test coverage for the `rename-symbol` capability. This living document details milestones, constraints, risks, progress, decisions, and plans spanning shared contract fixtures, plugin-level tests, daemon routing tests, e2e tests, and documentation updates, ensuring cross-plugin contract conformance and rollback guarantees.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
…overage

- Introduce a feature-gated shared test-support module in `weaver-plugins` providing canonical
  request and response fixtures for the `rename-symbol` capability.
- Extend `rope` and `rust-analyzer` plugin crates to consume these shared fixtures for
  unit-level contract validation and behavior-driven tests, improving consistency.
- Enhance daemon routing tests to cover automatic provider resolution, explicit provider
  mismatches refusals, and rollback scenarios ensuring failure paths leave files unchanged.
- Add CLI end-to-end snapshot tests to verify automatic routing and structured refusal outputs
  for Python and Rust rename flows.
- Update documentation in users-guide.md and roadmap.md to reflect completed coverage milestone
  5.2.5.

This improves test consistency and coverage for Python and Rust rename-symbol workflows,
ensuring plugin conformance and robustness under the new capability architecture.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
- Consolidate repeated test setup and command execution logic into reusable helper functions for refactor snapshots.
- Replace direct CLI command string assembly with parameterized command argument vectors.
- Update rename-symbol contract fixtures and validation calls to use payload access consistently.
- Extract common rollback test logic and assertions for cleaner test cases.
- General improvements to test code clarity, reducing duplication across weaver-e2e and plugin test suites.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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

Inline comments:
In `@crates/weaver-e2e/tests/test_support/refactor_routing.rs`:
- Around line 62-67: Replace the verbose argument.as_str().map_or_else(||
panic!(...), |value| value) with the idiomatic expectation call: use
argument.as_str().expect("daemon request arguments must all be JSON strings")
inside the .map closure so the code becomes .map(|argument|
argument.as_str().expect("daemon request arguments must all be JSON strings"));
this keeps the same fail-fast behavior but follows the `.expect()` guideline.
🪄 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

Run ID: 84989876-760e-47c5-ab7e-ff150e3c9df2

📥 Commits

Reviewing files that changed from the base of the PR and between 1c8116c and 447796e.

📒 Files selected for processing (1)
  • crates/weaver-e2e/tests/test_support/refactor_routing.rs

Comment thread crates/weaver-e2e/tests/test_support/refactor_routing.rs
- Add comprehensive domain and operation listings in top-level --help output.
- Implement client-side domain validation before configuration loading and daemon startup.
- Provide actionable, consistent error messaging and suggestions for unknown domains and operations.
- Standardize exit codes and output streams for --version and --help.
- Include detailed documentation updates and extensive unit, integration, and behavioural tests covering new CLI guidance and error paths.

This change enhances user experience by making command discovery clearer and early validation more helpful, reducing daemon dependency for invalid input cases and unifying error presentation across the CLI.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== users-guide.md: rename-symbol contract section ==="
fd -e md 'users-guide.md' --exec grep -n "did not return diff\|success without diff\|Diff.*output\|plugin.*success.*diff\|diff.*output.*status 1\|exits with status 1" {}

echo ""
echo "=== developers-guide.md: named helpers ==="
fd -e md 'developers-guide.md' --exec grep -n "rename_symbol_request_fixture_named\|rename_symbol_response_fixture_named\|validate_rename_symbol_request_fixture\|validate_rename_symbol_response_fixture" {}

echo ""
echo "=== module-level docs: test_support.rs (weaver-plugins) ==="
fd -e rs 'test_support.rs' --full-path -p 'weaver-plugins' --exec head -5 {}

echo ""
echo "=== module-level docs: contract_behaviour.rs (rope) ==="
fd -e rs 'contract_behaviour.rs' --full-path -p 'weaver-plugin-rope' --exec head -5 {}

echo ""
echo "=== module-level docs: contract_fixtures.rs (rope) ==="
fd -e rs 'contract_fixtures.rs' --full-path -p 'weaver-plugin-rope' --exec head -5 {}

echo ""
echo "=== module-level docs: contract_behaviour.rs (rust-analyzer) ==="
fd -e rs 'contract_behaviour.rs' --full-path -p 'weaver-plugin-rust-analyzer' --exec head -5 {}

echo ""
echo "=== module-level docs: contract_fixtures.rs (rust-analyzer) ==="
fd -e rs 'contract_fixtures.rs' --full-path -p 'weaver-plugin-rust-analyzer' --exec head -5 {}

Unrecoverable error: Failed to clone repository


@leynos: The sandbox failed to clone the repository, so I cannot directly inspect the current branch state. Based on the comment thread, the previous analysis found all three checks unresolved, and AI coding-agent prompts were provided at that point. I cannot confirm whether those prompts have since been applied.

If the branch has been updated since then, please trigger a fresh review and I will re-evaluate. If the prompts have not yet been applied, the outstanding work from the previous response remains:


Remaining work (from previous analysis)

Check File What is missing
User-Facing Documentation docs/users-guide.md Explicit statement that a plugin "success" without Diff output is rejected with exit status 1 and no filesystem changes — in the act refactor section and the rename-symbol contract subsection
Developer Documentation docs/developers-guide.md Documentation of rename_symbol_request_fixture_named, rename_symbol_response_fixture_named, validate_rename_symbol_request_fixture, validate_rename_symbol_response_fixture in the test-support section
Module-Level Documentation crates/weaver-plugins/src/capability/test_support.rs; crates/weaver-plugin-rope/src/tests/contract_behaviour.rs; crates/weaver-plugin-rope/src/tests/contract_fixtures.rs; crates/weaver-plugin-rust-analyzer/src/tests/contract_behaviour.rs; crates/weaver-plugin-rust-analyzer/src/tests/contract_fixtures.rs //! module-level docstrings at the top of each file, before any use or mod items

The AI coding-agent prompt to address all three in one pass was provided in the previous reply. Apply it, then re-trigger the review.

✅ Actions performed

Review triggered.

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

codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos leynos changed the title Improve error handling and share rename-symbol fixtures Verify error handling; add shared, cross-plugin rename-symbol fixtures Apr 21, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 45

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
docs/execplans/phase-1-implement-the-socket-listener-in-weaverd.md (1)

171-223: ⚠️ Potential issue | 🟡 Minor

Renumber the ordered list items in “Concrete Steps”.

Replace repeated 1. markers with sequential numbering to keep the document
compliant with repository Markdown style rules and to make future diffs clearer.

Triage: [type:docstyle] [type:syntax/md]

As per coding guidelines, “Use - as the first level bullet and renumber lists
when items change in documentation”.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/execplans/phase-1-implement-the-socket-listener-in-weaverd.md` around
lines 171 - 223, The "Concrete Steps" ordered list uses repeated "1." markers;
renumber the items sequentially so the list follows proper Markdown ordered-list
formatting: locate the "Concrete Steps" section (the block that currently lists
steps starting with repeated "1.") and replace the repeating "1." entries with
ascending numbers (1., 2., 3., ...) so each step is uniquely numbered and the
document follows the repository Markdown style guidelines.
docs/execplans/phase-1-jsonl-request-dispatch-loop.md (1)

17-37: 🧹 Nitpick | 🔵 Trivial

Renumber the ordered list items sequentially in the source.

The "Design Decisions" list uses 1. for all five items. While Markdown renderers auto-number such lists correctly, explicit sequential numbering (1, 2, 3, 4, 5) improves source readability and maintainability.

Triage: [type:syntax/md]

📝 Proposed fix
 ## Design Decisions
 
 1. **Modular dispatch architecture**: Create a new `dispatch` module with clear
    separation of concerns (errors, request parsing, response writing, routing,
    and connection handling). Each file remains under 400 lines per AGENTS.md.
 
-1. **Minimum viable product (MVP) placeholder handlers**: The `get-definition`
+2. **Minimum viable product (MVP) placeholder handlers**: The `get-definition`
    operation in the `observe` domain is fully implemented with LSP integration.
    Other known operations (`find-references`, `grep`, `diagnostics`,
    `call-hierarchy` in `observe`; all operations in `act` and `verify`) return
    "not implemented" responses with exit status 1 while backend wiring is
    completed.
 
-1. **Structured error responses**: All errors (malformed JSONL, unknown domain,
+3. **Structured error responses**: All errors (malformed JSONL, unknown domain,
    unknown operation) are written to stderr as structured messages before the
    terminal exit message.
 
-1. **Case-insensitive domain matching**: Domain names (`observe`, `act`,
+4. **Case-insensitive domain matching**: Domain names (`observe`, `act`,
    `verify`) are matched case-insensitively for robustness.
 
-1. **Re-use existing transport infrastructure**: Build on the existing
+5. **Re-use existing transport infrastructure**: Build on the existing
    `ConnectionHandler` trait and `read_request_line` helper from the transport
    module.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/execplans/phase-1-jsonl-request-dispatch-loop.md` around lines 17 - 37,
The ordered list under "Design Decisions" uses "1." for every item; update the
five list markers so they are sequential (1., 2., 3., 4., 5.) to improve source
readability—specifically change the leading "1." tokens for the items starting
with "**Modular dispatch architecture**", "**Minimum viable product (MVP)
placeholder handlers**", "**Structured error responses**", "**Case-insensitive
domain matching**", and "**Re-use existing transport infrastructure**" to 1
through 5 respectively, preserving the rest of the Markdown and wording.
docs/adr-001-plugin-capability-model-and-act-extricate.md (1)

150-165: ⚠️ Potential issue | 🟡 Minor

Restore sequential numbering in the migration plan.

Renumber the ordered list as 1. through 4. so the phase sequence is explicit in rendered output and review diffs.

Triage: [type:docstyle]

As per coding guidelines: "docs/**/*.md: Use - as the first level bullet and renumber lists when items change in documentation."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/adr-001-plugin-capability-model-and-act-extricate.md` around lines 150 -
165, The ordered list in the migration plan must use sequential numbering 1.–4.;
update the four top-level items ("Capability scaffolding", "Python provider
rollout", "Rust provider rollout", "Hardening and expansion") so their list
markers are "1." through "4." respectively (replace the repeated "1." markers),
ensuring the rendered markdown and diffs show the explicit phase sequence and
follow the docs styling rule for renumbered ordered lists.
docs/execplans/2-3-1-validate-domains-client-side-before-daemon-startup.md (1)

431-437: ⚠️ Potential issue | 🟠 Major

Fix broken footnote definitions in References.

Replace escaped labels and the percent-encoded roadmap link with valid GitHub-flavoured footnotes; the current forms do not render as expected.

Proposed fix
-\[^level3\]:
-[docs/ui-gap-analysis.md Level 3](../ui-gap-analysis.md#level-3--unknown-domain-weaver-bogus-something)
-\[^level10\]:
-[docs/ui-gap-analysis.md Level 10](../ui-gap-analysis.md#level-10--error-messages-and-exit-codes)
-
-[^roadmap]: %5Bdocs/roadmap.md%5D(../roadmap.md)
+[^level3]: [docs/ui-gap-analysis.md Level 3](../ui-gap-analysis.md#level-3--unknown-domain-weaver-bogus-something)
+[^level10]: [docs/ui-gap-analysis.md Level 10](../ui-gap-analysis.md#level-10--error-messages-and-exit-codes)
+[^roadmap]: [docs/roadmap.md](../roadmap.md)

Triage: [type:syntax/md]

As per coding guidelines: "docs/**/*.md: Use GitHub-flavoured numeric footnotes referenced as [^1] in documentation."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/execplans/2-3-1-validate-domains-client-side-before-daemon-startup.md`
around lines 431 - 437, The footer contains escaped footnote labels
(\[^level3\], \[^level10\]) and a percent-encoded roadmap link ([^roadmap]) that
don't render; replace them with GitHub-flavoured numeric footnotes (e.g. [^1],
[^2], [^3]) and update their corresponding definitions in the References section
so each numeric label maps to the proper target (e.g. replace the
percent‑encoded roadmap URL with a normal relative link to ../roadmap.md); also
update all in-text references elsewhere in the document from the old escaped
names to the new numeric footnote labels to keep links consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@agent-skill/weaver/SKILL.md`:
- Around line 175-176: Update the example safe-rename invocation in SKILL.md so
it is copy-pasteable: replace the standalone backticked command string starting
with "act refactor --refactoring rename --file src/main.py new_name=build_index
offset=123" with the full executable prefix "weaver --output json act refactor
--refactoring rename --file src/main.py new_name=build_index offset=123" so the
command actually runs from a shell; ensure the modified backticked line in the
doc exactly matches the new invocation.

In `@AGENTS.md`:
- Around line 228-229: The sentence uses second-person pronoun in the phrase
"when you own the trait definitions"; change that clause in the line mentioning
`newt-hype`, tuple structs, and `the-newtype` to neutral project language (e.g.,
"when the trait definitions are owned by the crate" or "when the crate owns the
trait definitions") so the sentence remains normative without "you".

In `@docs/adr-002-query-language-for-feature-extraction-in-weaver.md`:
- Around line 124-127: Replace the four leading "1." lines in the migration
steps with a first-level hyphen list (use "-" as the first-level bullet for
docs) and ensure the items are sequential/ordered as written; also correct the
possessive phrase "Weaver internal" to "Weaver’s internal" (update the phrase in
the line "Add execution over Tree-sitter-backed structures with capture support"
or whichever line contains "Weaver internal") so the document uses "- " bullets
and the correct possessive form.

In `@docs/adr-003-sempai-semgrep-compatible-query-engine.md`:
- Around line 108-111: The ordered list in the "routing sequence" section
currently repeats `1.` at Line 108 and Line 110; update those list markers so
the sequence is numeric and sequential (e.g., change the second `1.` to `2.`)
and ensure the surrounding first-level bullets use `-` where required by the doc
guidelines; update the list items in the routing sequence (the repeated numbered
entries) to a proper 1., 2., ... ordering so markdown renders and lints
correctly.
- Around line 130-133: The ordered list in the "Migration plan" section
currently uses repeated "1." markers, making the step order ambiguous; update
that list to use sequential numbering (1., 2., 3., ...) or convert to top-level
"-" bullets per doc guidelines and renumber items accordingly so each step is
unambiguous; locate the repeated "1." tokens in the Migration plan block and
replace them with the correct sequential numbers.

In `@docs/adr-005-verification-trust-boundary.md`:
- Around line 92-95: The markdown list uses repeated "1." markers; renumber the
items sequentially (1., 2., 3.) so the three migration steps "List trusted
external tools and filesystem assumptions explicitly.", "Make proof harnesses
refer to the modelled assumptions by name.", and "Keep future-proof work inside
the documented boundary." are ordered 1–3 (or 1–4 if there is a fourth item
elsewhere); update those list markers accordingly so the list renders with
explicit ordered numbering instead of repeated "1." markers.

In `@docs/adr-006-plugin-execution-and-orchestration-strategy.md`:
- Around line 68-70: Add an explicit "Verified Kernel" statement in this ADR
that names the verified kernel components as: transaction ordering, path policy,
capability routing, refusal semantics, and bounded counters, and clearly
separates trusted/verified components (the kernel) from unverified
implementation components such as plugins, parsers, and OS/filesystem semantics;
update the paragraph around "The broker should own request validation..." to
state that the broker enforces the verified kernel boundaries (transaction
ordering, path policy, capability routing, refusal semantics, bounded counters)
while plugins remain untrusted implementation details that cannot alter commit
behaviour or kernel semantics.
- Around line 89-91: The three migration plan list items currently all start
with "1."; update them to be sequentially numbered "1.", "2.", "3.", and "4."
(specifically change the lines containing "Make broker validation and routing
explicit.", "Preserve the safety-harness handoff for accepted edits.", and "Add
tests that exercise refusal, success, and rollback paths.") so the markdown
renders as an ordered sequence and follows the docs style guideline for
docs/**/*.md.

In `@docs/building-an-error-recovering-parser-with-chumsky.md`:
- Around line 77-79: In the "Linting" ordered list, fix the numbering so the
three steps progress sequentially: change the second "1." before "Run the cheap
local checks (duplicates, arity, type holes)." to "2." and change the third "1."
before "Emit a constraint set and immediately feed it to the solver; conflicts
become diagnostics." to "3.", ensuring the list reads 1., 2., 3. and reflects
the intended progression.
- Around line 50-53: The ordered list under "Error recovery" currently uses
repeated `1.` markers; change them to consecutive numbers (`1.`, `2.`, `3.`) so
the steps are sequential: update the second item mentioning
`.labelled("expression")` to `2.` and the third item about returning
`Option<AstNode>` (tri-state nodes) to `3.` to preserve explicit ordering in the
document and follow docs/*.md numbering conventions.

In `@docs/complexity-antipatterns-and-refactoring-strategies.md`:
- Around line 91-96: The ordered list under the "Nesting" and "Shorthand
Discount" items is using repeated "1." markers which makes the sequence
ambiguous; update these list entries to use sequential numbering (1., 2., etc.)
and scan other updated ordered lists in the same file to renumber them
consistently so each item follows proper numeric order; specifically locate the
list items titled "Nesting" and "Shorthand Discount" and change their leading
markers to the correct successive numbers, and apply the same renumbering rule
to any other ordered lists you modified in this markdown.

In `@docs/contents.md`:
- Line 3: Reflow the long Markdown list entries (including the link text
"Architectural decision record (ADR) 001: Plugin capability model and `act
extricate`" and the other bulleted entries referenced at the review: lines 3, 6,
9, 11, 14, 17, and 73–74) so each paragraph or bullet line is wrapped to a
maximum of 80 columns; preserve the Markdown list markers, link syntax, and
inline code backticks, break long sentences into additional indented lines as
needed to maintain readability, and ensure no content or punctuation is lost
when wrapping.

In `@docs/documentation-style-guide.md`:
- Line 346: The footnote definition uses an escaped marker "\[^1\]:" which
prevents Markdown from resolving the reference; locate the escaped footnote
marker "\[^1\]:" in the documentation-style-guide content and replace it with a
proper GitHub-Flavored Markdown footnote marker "[^1]:" so the reference
resolves correctly (search for the literal string "\[^1\]:" and change it to
"[^1]:").

In `@docs/execplans/2-2-3-top-level-version-output.md`:
- Around line 33-60: Update the Markdown ordered lists in
docs/execplans/2-2-3-top-level-version-output.md so that each ordered-list uses
sequential numbering (1., 2., 3., ...) rather than repeated "1." — specifically
renumber the constraints, outcomes, validation, and commit sequence sections
changed in the diff and also fix the same pattern at the other mentioned ranges
(lines around 154-159, 448-455, 512-520). Ensure numbering is consistent and
sequential across each list block so the execution order is clear.

In `@docs/execplans/2-2-4-provide-contextual-domain-guidance.md`:
- Around line 391-394: The footnote definitions use escaped sequences (\[^1\]:
and \[^2\]:) so they don't render; replace the two occurrences of "\[^1\]:" and
"\[^2\]:" with standard GitHub-flavoured footnote definitions "[^1]:" and
"[^2]:" so the links to the UI gap-analysis anchors render as actual footnotes;
update the text in the document where the literal strings "\[^1\]:" and
"\[^2\]:" appear (search for those exact tokens) and save the file.

In `@docs/execplans/2-3-2-valid-operation-alternatives-for-unknown-operations.md`:
- Around line 470-475: Replace the escaped footnote definitions like \[^1\]:
\[^2\]: etc. with proper GitHub-flavored Markdown footnote definitions using
unescaped `[^n]:` on their own separate lines so references resolve and lint
passes; locate the escaped sequences shown in the diff (e.g., `\[^1\]:`,
`\[^2\]:`, `\[^3\]:`, `\[^4\]:`, `\[^5\]:`) and convert each to a plain `[^n]:`
footnote definition line matching the referenced text.

In `@docs/execplans/3-1-1-weaver-plugins-crate.md`:
- Around line 343-347: The markdown file contains many fenced code blocks using
bare ```; update each to include an explicit language identifier (e.g., ```sh
for shell commands like the shown make commands, ```rust for Rust snippets,
```json for JSON blobs, or ```plaintext for non-code text) so Markdown
validation is deterministic—replace the bare fences at the shown code blocks
(including the snippet with the make commands and the other ranges listed in the
comment) with the appropriate language-tagged fences throughout the document.

In `@docs/execplans/3-1-1a-plugin-for-rope.md`:
- Around line 329-336: The fenced code blocks that currently start with lines
like "set -o pipefail && make fmt 2>&1 | tee /tmp/3-1-1a-make-fmt.log" need
explicit language identifiers; change each triple-backtick fence to include the
appropriate language (e.g., ```sh for shell commands, ```rust for Rust snippets,
or ```plaintext for non-code text) for the blocks at the shown diff and also the
other affected ranges (340-344, 394-398, 402-410) so renderers and linters
correctly parse them.

In `@docs/execplans/3-1-1b-plugin-for-rust-analyzer.md`:
- Around line 108-110: Replace the first instance of the acronym "BDD" in the
sentence "Decision: keep all unit/BDD tests mock-based at adapter boundary."
with its expanded form "Behaviour-Driven Development (BDD)" so the sentence
reads "Decision: keep all unit/Behaviour-Driven Development (BDD) tests
mock-based at adapter boundary." Ensure only the first prose occurrence is
expanded and subsequent uses can remain as "BDD."

In `@docs/execplans/4-1-1-scaffold-sempai-core-and-sempai.md`:
- Around line 162-175: The ordered lists in the outcomes/acceptance sections use
repeated "1." markers; update them to explicit sequential numbering (1., 2., 3.,
...) so items are numbered correctly (e.g., the block listing RUSTDOCFLAGS,
public types, tests, make targets, docs update, and roadmap task should be
numbered 1–6), and make the same change for the other list referenced (lines
629–636) so both lists render with proper sequential numbers.

In `@docs/execplans/4-1-2-structured-diagnostics-with-stable-error-codes.md`:
- Around line 141-148: The ordered checklist in
docs/execplans/4-1-2-structured-diagnostics-with-stable-error-codes.md currently
shows repeated "1." for each completion criterion; update the checklist so the
items (the six criteria and the final make checks) are sequentially numbered (1
through 7) to restore explicit ordered numbering; edit the list block containing
"Stable diagnostic payload..." through "`make check-fmt`, `make lint`, and `make
test` pass." and replace the repeated "1." prefixes with ascending numbers to
keep the completion checklist unambiguous.

In `@docs/execplans/4-1-4-mode-aware-sempai-validation.md`:
- Around line 232-251: Switch the top-level checklist to a first-level
dash-style bullet and renumber the outcome items sequentially as a nested
numbered list from 1 to 9; specifically, replace the current flat numbered
entries that mention symbols like `sempai_yaml`,
`sempai::Engine::compile_yaml(...)`, `docs/sempai-query-language-design.md`, and
`docs/users-guide.md` with a single leading "-" bullet and then a nested 1.–9.
numbered list containing the same nine outcomes in order (ensuring the items
referencing `extract`, `taint`, `join`, `r2c-internal-project-depends`, and
`NOT_IMPLEMENTED` remain unchanged except for numbering); run markdown linting
to ensure the new dash + nested numbering conforms to docs guidelines.

In `@docs/execplans/5-1-1-entry-help.md`:
- Around line 769-770: The docs claim adding is_bare_invocation() to Cli in
cli.rs but earlier text chose lib.rs as the canonical location; move the
is_bare_invocation() implementation into the lib.rs module (add the function on
the appropriate impl or struct in lib.rs rather than on Cli in cli.rs), remove
or revert the conflicting change in cli.rs, and ensure you register mod
localizer; and update the corresponding imports in lib.rs so the new function
compiles and uses the localizer where intended.

In `@docs/execplans/5-2-1-define-the-rename-symbol-capability-contract.md`:
- Around line 38-70: The ordered lists in the document use repeated "1."
markers; update those to sequential numbers so the compliance criteria and
acceptance checks are explicitly numbered (e.g., change the repeated "1."
entries between the block covering lines ~38-70 and the other block around
~379-390 to 1., 2., 3., ...), ensuring all list items are renumbered in order
and that any references to these numbered items in the same file are adjusted
accordingly.

In
`@docs/execplans/5-2-5-unit-behavioural-and-end-to-end-coverage-for-rename-symbol.md`:
- Around line 612-664: Update the docs to match the actual exports from
crates/weaver-plugins/src/capability/test_support.rs: remove the stale
declarations for RenameSymbolFixture, RenameSymbolRequestFixture,
RenameSymbolResponseFixture, rename_symbol_request_fixtures,
rename_symbol_response_fixtures, assert_rename_symbol_request_fixture_contract
and assert_rename_symbol_response_fixture_contract, and replace the sample
import/usage with the real re-export path and symbol names that plugin tests
actually import from weaver_plugins::test_support (use the current public
functions/types defined in test_support.rs instead of the undocumented helpers),
ensuring the example in
docs/execplans/.../5-2-5-unit-behavioural-and-end-to-end-coverage-for-rename-symbol.md
imports the real API and shows the correct iteration/assert pattern used by
plugin contract_fixtures.rs.

In `@docs/execplans/7-1-1-stable-jsonl-schemas-for-observe-get-card.md`:
- Around line 32-53: The ordered list in
docs/execplans/7-1-1-stable-jsonl-schemas-for-observe-get-card.md currently
repeats "1." for every item; update the list so each item is sequentially
numbered (1., 2., 3., ...) in that block (items describing the new crate
weaver-cards, insta snapshots, rstest-bdd scenarios,
DomainRoutingContext::OBSERVE.known_operations addition, handler returning
GetCardResponse::Refusal, docs/users-guide.md update, and roadmap item
completion) to follow the documentation numbering guideline.
- Line 960: Replace the escaped footnote marker "\[^1\]: `docs/roadmap.md`,
lines 788–795" with a valid GitHub-flavoured footnote definition using the
unescaped marker "[^1]:" so the reference resolves (i.e., change the leading
"\[^1\]:" to "[^1]:"). Locate the footnote definition text in the
docs/execplans/7-1-1-stable-jsonl-schemas-for-observe-get-card.md file (the line
containing the escaped marker) and ensure the footnote is numbered in appearance
order and formatted as "[^1]: <footnote text>".

In
`@docs/execplans/7-1-3-implement-optional-lsp-enrichment-for-observe-get-card.md`:
- Around line 157-158: The retrospective's file-count arithmetic is
inconsistent: the headline total ("12 files") doesn't match the per-crate
breakdown which sums to 14 (e.g., for `weaverd`: added `enrich.rs` and modified
`mod.rs`, `get_card.rs`, `router.rs`); fix it by reconciling the numbers—either
update the headline total to the correct sum or adjust the itemized counts to
match 12—making the change in the markdown section that lists the per-crate file
changes (referencing `enrich.rs`, `mod.rs`, `get_card.rs`, `router.rs`) so the
execution record is auditable and consistent.
- Around line 29-37: The ordered lists in this document use repeated "1."
markers; update each ordered list block (for example the block starting "The
same request against a file..." and the other blocks referenced) so items are
numbered sequentially (1., 2., 3., …) instead of all "1.", keeping the rest of
the text unchanged; apply the same renumbering to the other list ranges
mentioned in the comment (47-63, 72-75, 338-347, 379-381, 404-406, 413-415,
419-423, 463-478) to satisfy markdownlint and the repo docstyle conventions.

In
`@docs/execplans/7-2-1-define-stable-jsonl-request-and-response-schemas-for-observe-graph-slice.md`:
- Around line 23-27: Remove the spurious leading spaces before the field names
in the markdown enumeration so the items read `depth`, `budget.max_edges`, and
`node_detail` without extra indentation; update the line(s) that list `depth`,
`budget.max_edges`, and `node_detail` in the observe graph-slice description so
all field names are aligned consistently with the other entries (no leading
spaces before the identifiers).

In `@docs/execplans/adopt-ortho-config-v0-8-0.md`:
- Around line 248-249: The sentence uses the en-GB-oxendict style incorrectly by
spelling "localisation"; update the wording to "localization" so the line reads
that `crates/weaver-cli/src/localizer.rs` exercises the Fluent localization APIs
added in v0.7.0 and must continue to compile after the v0.8.0 upgrade, ensuring
any other occurrences of "localisation" in this document are changed to
"localization" (reference: crates/weaver-cli/src/localizer.rs).
- Line 1: The H1 heading currently uses title case; change the first-line
heading text "# Adopt `ortho-config` v0.8.0 Across Weaver" to sentence case by
updating it to "# Adopt `ortho-config` v0.8.0 across Weaver" so the document
follows the sentence-case docs guideline.
- Around line 98-99: Replace British “normalise”/“Normalise” with
Oxford-compliant “normalize”/“Normalize” throughout this document, specifically
updating the phrase “Mitigation: normalise every member manifest to
`rust-version.workspace = true` as part of the migration.” and the other
occurrences referenced around lines 200-201; ensure all instances in
docs/execplans/adopt-ortho-config-v0-8-0.md use “-ize” spelling (e.g.,
normalize, serialized) so the repo’s en-GB-oxendict rule is followed.

In `@docs/execplans/phase-1-end-to-end-domain-command-execution.md`:
- Around line 34-35: Replace plain mentions of users-guide.md with an inline
Markdown link: locate occurrences of the literal text "users-guide.md"
(including the one in the argument format line containing `--uri file:///path.rs
--position 10:5`) and convert them to an inline link like `[users
guide](relative/path/to/users-guide.md)` or use angle-bracketed URL; apply the
same change for the other occurrences referenced (the ones near the argument
format and at the second occurrence) so all plain-document-path mentions become
proper inline links.

In `@docs/execplans/phase-1-human-readable-output.md`:
- Around line 20-33: The ordered list in the design doc has lost sequential
numbering; renumber the decision items so they form a proper 1..N sequence
(preserve the existing item text for "CLI-side rendering", "Output format
selection", "Miette-style renderer configuration", "Lightweight response
models", and "Source grouping and fallback") so the list displays as a single
ordered sequence rather than repeating "1." for each entry; update the numeric
prefixes accordingly to reflect their intended order.

In `@docs/execplans/phase-1-process-based-language-server-adapters.md`:
- Around line 22-30: In
docs/execplans/phase-1-process-based-language-server-adapters.md replace the
repeated "1." prefixes in the ordered list items (the entries starting "Must
implement `Send`", "Synchronous interface", "Single initialization", "Graceful
degradation", "Zero-trust sandbox") with proper sequential numbering (1., 2.,
3., 4., 5.) and likewise renumber the subsequent ordered list items around lines
36–39 to be sequential; also ensure first-level bullets use "-" where the
guideline requires a dash for top-level bullets so the document follows
markdownlint-cli2 and repo docstyle rules.

In `@docs/execplans/phase-2-double-lock-on-syntactic-lock.md`:
- Around line 17-19: The ordered lists under the "Syntactic Lock" and "Semantic
Lock" sections currently use repeated "1." entries; update these to explicit
sequential numbering (1., 2., 3., ...) so steps and scenarios read in proper
order, and convert top-level bullets to use "-" where the docs style mandates
first-level hyphens; locate the blocks titled "Syntactic Lock" and "Semantic
Lock" and the scenario list currently repeated in the later section (the block
around the scenarios referenced in the comment) and renumber each list item
sequentially while changing first-level list markers to "-" as required.

In `@docs/execplans/phase-4-weaver-graph.md`:
- Line 124: The ordered list in phase-4-weaver-graph.md uses repeated "1."
markers for multiple steps (e.g., the step "If the crate does not exist, create
it and add it to the workspace.") which breaks sequential numbering and lint
rules; update the ordered list so items are numbered sequentially (1, 2, 3, … up
to 8) across the steps referenced (lines around the crate creation step and the
other occurrences noted) to replace repeated "1." markers with the correct
incremental numbers and ensure top-level bullets use "-" elsewhere per docs
guidelines.
- Around line 234-238: Replace the wrapped prose listing of provider method
signatures with a fenced Rust code block: enclose the three signatures (fn
build_graph, fn callers_graph, fn callees_graph) inside a ```rust ... ``` fence
so they render as Rust code; ensure the opening fence includes the language
identifier "rust" and close with a matching ``` fence, removing the
inline/wrapped prose version.

In `@docs/execplans/sempai-design.md`:
- Around line 66-77: The ordered list in the docs/execplans/sempai-design.md
uses repeated "1." entries; update the six implementation steps so they use a
proper sequential numbered list (1., 2., 3., 4., 5., 6.) instead of repeating
"1." — specifically renumber the list items beginning with "Inventory current
docs and link references...", "Normalize style for headings...", "Repair broken
or inconsistent repository-local links.", "Add `docs/contents.md`...", "Add
`docs/repository-layout.md`...", and "Run markdown quality gates and capture
logs." to be 1 through 6 respectively and ensure markdownlint-cli2-compatible
formatting is preserved.

In `@docs/formal-verification-methods-in-weaver.md`:
- Around line 447-479: Replace the escaped and inline-packed footnote block
(\[^1\] .. \[^18\]) with proper GitHub-flavored numeric footnote definitions:
convert each escaped marker like \[^1\] into a standalone definition line using
the form `[^1]: <URL or description>` and ensure there is exactly one `[^n]:`
entry per reference (for all markers \[^1\] through \[^18\]) ordered by
appearance; remove the backslashes and packed inline entries so each footnote is
resolvable and markdownlint-compliant while preserving the original URLs and
brief descriptions from the diff.

In `@docs/jacquard-card-first-symbol-graph-design.md`:
- Line 20: The markdown uses escaped footnote markers like "\[^1\]" which render
literally; update all occurrences in this document (e.g., the reference near
"Symbol Delta Ledger (SDL)" and the corresponding definitions between lines
~1115-1151) to use standard GitHub footnote syntax "[^1]" for both inline
references and the matching footnote definition, removing the backslashes so
footnotes render and link correctly.

In `@docs/ortho-config-v0-6-0-migration-guide.md`:
- Around line 240-274: The footnote blocks use escaped label syntax (e.g.
\[^forwarded-features\], \[^hello-world-cargo\], \[^reexports\], etc.) which
breaks GitHub-flavored numeric footnotes; replace each escaped marker with a
numeric footnote reference ([^1], [^2], ...) in order of appearance and create
one separate footnote definition per block (one paragraph per footnote) so each
label becomes a single numbered definition and definitions are numbered
sequentially to preserve reference resolution and readability.

In `@docs/pratt-parser-for-ddlog-expressions.md`:
- Around line 22-32: In the documentation
"pratt-parser-for-ddlog-expressions.md" the procedural steps are incorrectly all
numbered "1."; update the four step items under the expression parser section so
they are a single sequential numbered list (1., 2., 3., 4.) and change the
top-level bullet style to use "-" for first-level bullets per docs guidelines;
also apply the same renumbering and dash-style change to the other occurrence
referenced (around lines 393-399) so all procedural lists follow the same
sequential numbering and first-level "-" bullet convention.

In `@docs/rstest-bdd-users-guide.md`:
- Around line 543-557: Change the unordered/duplicate "1." list into a
sequentially numbered ordered list (1 through 4) in the macro-expansion flow so
the execution order is explicit; specifically renumber the steps that describe
building the StepContext, looking up step functions by (keyword, pattern)
(Given‑When‑Then), invoking the registered step function with the StepContext,
and running the original test body so they appear as 1., 2., 3., 4. in that
order and update any surrounding punctuation/spacing to match the project's docs
style.

---

Outside diff comments:
In `@docs/adr-001-plugin-capability-model-and-act-extricate.md`:
- Around line 150-165: The ordered list in the migration plan must use
sequential numbering 1.–4.; update the four top-level items ("Capability
scaffolding", "Python provider rollout", "Rust provider rollout", "Hardening and
expansion") so their list markers are "1." through "4." respectively (replace
the repeated "1." markers), ensuring the rendered markdown and diffs show the
explicit phase sequence and follow the docs styling rule for renumbered ordered
lists.

In `@docs/execplans/2-3-1-validate-domains-client-side-before-daemon-startup.md`:
- Around line 431-437: The footer contains escaped footnote labels (\[^level3\],
\[^level10\]) and a percent-encoded roadmap link ([^roadmap]) that don't render;
replace them with GitHub-flavoured numeric footnotes (e.g. [^1], [^2], [^3]) and
update their corresponding definitions in the References section so each numeric
label maps to the proper target (e.g. replace the percent‑encoded roadmap URL
with a normal relative link to ../roadmap.md); also update all in-text
references elsewhere in the document from the old escaped names to the new
numeric footnote labels to keep links consistent.

In `@docs/execplans/phase-1-implement-the-socket-listener-in-weaverd.md`:
- Around line 171-223: The "Concrete Steps" ordered list uses repeated "1."
markers; renumber the items sequentially so the list follows proper Markdown
ordered-list formatting: locate the "Concrete Steps" section (the block that
currently lists steps starting with repeated "1.") and replace the repeating
"1." entries with ascending numbers (1., 2., 3., ...) so each step is uniquely
numbered and the document follows the repository Markdown style guidelines.

In `@docs/execplans/phase-1-jsonl-request-dispatch-loop.md`:
- Around line 17-37: The ordered list under "Design Decisions" uses "1." for
every item; update the five list markers so they are sequential (1., 2., 3., 4.,
5.) to improve source readability—specifically change the leading "1." tokens
for the items starting with "**Modular dispatch architecture**", "**Minimum
viable product (MVP) placeholder handlers**", "**Structured error responses**",
"**Case-insensitive domain matching**", and "**Re-use existing transport
infrastructure**" to 1 through 5 respectively, preserving the rest of the
Markdown and wording.
🪄 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

Run ID: 6a1a3f83-ef86-47cc-bffa-32dde517ca9a

📥 Commits

Reviewing files that changed from the base of the PR and between 447796e and e63f87c.

📒 Files selected for processing (69)
  • AGENTS.md
  • README.md
  • agent-skill/weaver/SKILL.md
  • docs/adr-001-plugin-capability-model-and-act-extricate.md
  • docs/adr-002-query-language-for-feature-extraction-in-weaver.md
  • docs/adr-003-sempai-semgrep-compatible-query-engine.md
  • docs/adr-004-plugin-routing-refusal-semantics.md
  • docs/adr-005-verification-trust-boundary.md
  • docs/adr-006-plugin-execution-and-orchestration-strategy.md
  • docs/building-an-error-recovering-parser-with-chumsky.md
  • docs/complexity-antipatterns-and-refactoring-strategies.md
  • docs/contents.md
  • docs/developers-guide.md
  • docs/documentation-style-guide.md
  • docs/execplans/2-2-1-act-apply-patch-sub-command.md
  • docs/execplans/2-2-2-list-all-domains-in-top-level-help.md
  • docs/execplans/2-2-3-top-level-version-output.md
  • docs/execplans/2-2-4-provide-contextual-domain-guidance.md
  • docs/execplans/2-3-1-validate-domains-client-side-before-daemon-startup.md
  • docs/execplans/2-3-2-valid-operation-alternatives-for-unknown-operations.md
  • docs/execplans/2-3-3-standardize-actionable-guidance-in-startup-errors.md
  • docs/execplans/3-1-1-weaver-plugins-crate.md
  • docs/execplans/3-1-1a-plugin-for-rope.md
  • docs/execplans/3-1-1b-plugin-for-rust-analyzer.md
  • docs/execplans/4-1-1-scaffold-sempai-core-and-sempai.md
  • docs/execplans/4-1-2-structured-diagnostics-with-stable-error-codes.md
  • docs/execplans/4-1-3-yaml-rule-parsing-via-saphyr-and-serde-saphyr.md
  • docs/execplans/4-1-4-mode-aware-sempai-validation.md
  • docs/execplans/5-1-1-entry-help.md
  • docs/execplans/5-2-1-define-the-rename-symbol-capability-contract.md
  • docs/execplans/5-2-2-update-weaver-plugin-rope-manifest.md
  • docs/execplans/5-2-3-update-rust-plugin-to-declare-rename-symbol.md
  • docs/execplans/5-2-4-daemon-capability-resolution-for-rename-symbol.md
  • docs/execplans/5-2-5-unit-behavioural-and-end-to-end-coverage-for-rename-symbol.md
  • docs/execplans/7-1-1-stable-jsonl-schemas-for-observe-get-card.md
  • docs/execplans/7-1-2-tree-sitter-symbol-card-extraction.md
  • docs/execplans/7-1-3-implement-optional-lsp-enrichment-for-observe-get-card.md
  • docs/execplans/7-1-4-cache-integration-for-card-extraction-keyed-by-uri.md
  • docs/execplans/7-2-1-define-stable-jsonl-request-and-response-schemas-for-observe-graph-slice.md
  • docs/execplans/adopt-ortho-config-v0-8-0.md
  • docs/execplans/phase-1-end-to-end-domain-command-execution.md
  • docs/execplans/phase-1-human-readable-output.md
  • docs/execplans/phase-1-implement-the-socket-listener-in-weaverd.md
  • docs/execplans/phase-1-jsonl-request-dispatch-loop.md
  • docs/execplans/phase-1-process-based-language-server-adapters.md
  • docs/execplans/phase-2-double-lock-on-syntactic-lock.md
  • docs/execplans/phase-4-weaver-graph.md
  • docs/execplans/sempai-design.md
  • docs/formal-verification-methods-in-weaver.md
  • docs/jacquard-card-first-symbol-graph-design.md
  • docs/ortho-config-users-guide.md
  • docs/ortho-config-v0-6-0-migration-guide.md
  • docs/ortho-config-v0-8-0-migration-guide.md
  • docs/pratt-parser-for-ddlog-expressions.md
  • docs/reliable-testing-in-rust-via-dependency-injection.md
  • docs/repository-layout.md
  • docs/roadmap.md
  • docs/rstest-bdd-users-guide.md
  • docs/rust-doctest-dry-guide.md
  • docs/rust-extricate-actuator-plugin-technical-design.md
  • docs/rust-parser-testing-comprehensive-guide.md
  • docs/rust-testing-with-rstest-fixtures.md
  • docs/semgrep-language-reference/semgrep-legacy-vs-v2-guidance.md
  • docs/semgrep-language-reference/semgrep-minimal-examples.md
  • docs/semgrep-language-reference/semgrep-operator-precedence.md
  • docs/sempai-query-language-design.md
  • docs/ui-gap-analysis.md
  • docs/users-guide.md
  • docs/weaver-design.md

Comment thread agent-skill/weaver/SKILL.md Outdated
Comment thread AGENTS.md Outdated
Comment thread docs/adr-002-query-language-for-feature-extraction-in-weaver.md Outdated
Comment thread docs/adr-003-sempai-semgrep-compatible-query-engine.md Outdated
Comment thread docs/adr-003-sempai-semgrep-compatible-query-engine.md Outdated
Comment thread docs/execplans/phase-4-weaver-graph.md Outdated
Comment thread docs/execplans/sempai-design.md Outdated
Comment thread docs/formal-verification-methods-in-weaver.md Outdated
Comment thread docs/jacquard-card-first-symbol-graph-design.md Outdated
Comment thread docs/ortho-config-v0-6-0-migration-guide.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Review continued from previous batch...

Comment thread docs/execplans/4-1-4-mode-aware-sempai-validation.md Outdated
Comment thread docs/execplans/5-2-1-define-the-rename-symbol-capability-contract.md Outdated
Comment thread docs/pratt-parser-for-ddlog-expressions.md Outdated
Comment thread docs/rstest-bdd-users-guide.md Outdated
…rror handling

- Added comprehensive client-side validation for known and unknown domains with guidance
- Enhanced CLI output for missing operations to list available operations and provide hints
- Implemented structured unknown-operation error payloads from daemon with human and JSON rendering
- Unified and standardized actionable error guidance for startup and routing errors
- Introduced edit-distance based domain suggestions for mistyped domains
- Improved --help and --version behavior with proper exit codes and output streams
- Updated documentation, tests (unit, integration, BDD), and roadmap accordingly

This improves user experience by providing clearer, deterministic feedback and hints in CLI invocations, reducing confusion and aiding discoverability of commands and domain operations.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
@leynos leynos changed the title Verify error handling; add shared, cross-plugin rename-symbol fixtures Add shared cross-plugin rename-symbol fixtures; expand tests and docs Apr 21, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
docs/execplans/5-2-5-unit-behavioural-and-end-to-end-coverage-for-rename-symbol.md (1)

656-661: ⚠️ Potential issue | 🟡 Minor

Fix the fixture import path to match the shipped re-exports.

Use the crate-root re-exports in the example, not weaver_plugins::test_support, so the snippet matches crates/weaver-plugins/src/lib.rs.

Proposed fix
-use weaver_plugins::test_support::{
+use weaver_plugins::{
     assert_rename_symbol_request_fixture_contract,
     assert_rename_symbol_response_fixture_contract,
     rename_symbol_request_fixtures,
     rename_symbol_response_fixtures,
 };

Triage: [type:docstyle]

As per coding guidelines: documentation must reflect current API and behavioural changes in docs/.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@docs/execplans/5-2-5-unit-behavioural-and-end-to-end-coverage-for-rename-symbol.md`
around lines 656 - 661, The import path uses the internal module
weaver_plugins::test_support but the crate exposes these helpers at the crate
root; change the use line to import the fixtures and assertions from the crate
root re-exports (e.g. use
weaver_plugins::{assert_rename_symbol_request_fixture_contract,
assert_rename_symbol_response_fixture_contract, rename_symbol_request_fixtures,
rename_symbol_response_fixtures};) so the example matches the public API in
crates/weaver-plugins/src/lib.rs and uses the exported symbols named
assert_rename_symbol_request_fixture_contract,
assert_rename_symbol_response_fixture_contract, rename_symbol_request_fixtures,
and rename_symbol_response_fixtures.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/developers-guide.md`:
- Around line 362-367: The docs list currently exposes an internal generic type
that may not be part of the public weaver_plugins surface; check whether
RenameSymbolFixture<T> is publicly re-exported from the weaver_plugins crate and
if not remove it from the “access” list in docs/developers-guide.md, leaving
only the public symbols (e.g. RenameSymbolRequestFixture,
RenameSymbolResponseFixture, rename_symbol_request_fixtures(),
rename_symbol_response_fixtures()) that downstream crates can import directly;
if RenameSymbolFixture<T> is intended to be public, instead ensure it is
actually re-exported from weaver_plugins and update the docs to match that
public API.

---

Duplicate comments:
In
`@docs/execplans/5-2-5-unit-behavioural-and-end-to-end-coverage-for-rename-symbol.md`:
- Around line 656-661: The import path uses the internal module
weaver_plugins::test_support but the crate exposes these helpers at the crate
root; change the use line to import the fixtures and assertions from the crate
root re-exports (e.g. use
weaver_plugins::{assert_rename_symbol_request_fixture_contract,
assert_rename_symbol_response_fixture_contract, rename_symbol_request_fixtures,
rename_symbol_response_fixtures};) so the example matches the public API in
crates/weaver-plugins/src/lib.rs and uses the exported symbols named
assert_rename_symbol_request_fixture_contract,
assert_rename_symbol_response_fixture_contract, rename_symbol_request_fixtures,
and rename_symbol_response_fixtures.
🪄 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

Run ID: 8437173e-88d5-4f16-af72-15d315277f0f

📥 Commits

Reviewing files that changed from the base of the PR and between e63f87c and 4a77c22.

📒 Files selected for processing (4)
  • docs/developers-guide.md
  • docs/execplans/5-2-5-unit-behavioural-and-end-to-end-coverage-for-rename-symbol.md
  • docs/roadmap.md
  • docs/users-guide.md

Comment thread docs/developers-guide.md Outdated
Change request_arguments to return io::Result and handle non-string
arguments with proper error instead of panicking, improving daemon
request robustness.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
codescene-delta-analysis[bot]

This comment was marked as outdated.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/execplans/phase-4-weaver-graph.md (1)

10-10: ⚠️ Potential issue | 🟡 Minor

Apply sentence case to all headings.

Multiple headings capitalise words that should be lowercase. Sentence case requires only the first word and proper nouns to be capitalised.

Triage: [type:docstyle]

Apply this diff to fix all heading capitalisations
-## Purpose / Big Picture
+## Purpose / big picture

-## Surprises & Discoveries
+## Surprises & discoveries

-## Decision Log
+## Decision log

-## Outcomes & Retrospective
+## Outcomes & retrospective

-## Context and Orientation
+## Context and orientation

-## Plan of Work
+## Plan of work

-## Concrete Steps
+## Concrete steps

-## Validation and Acceptance
+## Validation and acceptance

-## Idempotence and Recovery
+## Idempotence and recovery

-## Artifacts and Notes
+## Artifacts and notes

-## Interfaces and Dependencies
+## Interfaces and dependencies

As per coding guidelines, "Write headings in sentence case in documentation."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/execplans/phase-4-weaver-graph.md`, apply sentence case to the following headings by changing only the incorrectly capitalised words to lowercase: at line 10 change "Big Picture" to "big picture"; at line 31 change "Discoveries" to "discoveries"; at line 35 change "Log" to "log"; at line 42 change "Retrospective" to "retrospective"; at line 46 change "Orientation" to "orientation"; at line 75 change "Work" to "work"; at line 111 change "Steps" to "steps"; at line 178 change "Acceptance" to "acceptance"; at line 192 change "Recovery" to "recovery"; at line 200 change "Notes" to "notes"; at line 221 change "Dependencies" to "dependencies".

Also applies to: 31-31, 35-35, 42-42, 46-46, 75-75, 111-111, 178-178, 192-192, 200-200, 221-221

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/execplans/phase-4-weaver-graph.md` at line 10, Several Markdown headings
use Title Case instead of sentence case; update the heading texts by lowercasing
only the non-initial words listed (e.g., change "Purpose / Big Picture" →
"Purpose / big picture", "Surprises & Discoveries" → "Surprises & discoveries",
"Decision Log" → "Decision log", "Outcomes & Retrospective" → "Outcomes &
retrospective", "Context and Orientation" → "Context and orientation", "Plan of
Work" → "Plan of work", "Concrete Steps" → "Concrete steps", "Validation and
Acceptance" → "Validation and acceptance", "Idempotence and Recovery" →
"Idempotence and recovery", "Artifacts and Notes" → "Artifacts and notes", and
"Interfaces and Dependencies" → "Interfaces and dependencies"); make only the
minimal edits to the heading strings so the first word and proper nouns remain
capitalized and all other words are lowercase.
♻️ Duplicate comments (1)
docs/execplans/5-1-1-entry-help.md (1)

776-777: ⚠️ Potential issue | 🟠 Major

Fix the ownership reference for is_bare_invocation() to Cli, not CliRunner.

Replace this step text so it matches B4 and the interface section, which place
is_bare_invocation() on impl Cli. Keep one canonical owner to prevent
implementation drift.

Triage: [type:docstyle]

Patch
-4. Add `is_bare_invocation()` to the `CliRunner` implementation in `lib.rs`
+4. Add `is_bare_invocation()` to the `Cli` implementation in `lib.rs`
    (B4).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/execplans/5-1-1-entry-help.md` around lines 776 - 777, Update the step
text that currently says “Add is_bare_invocation() to the CliRunner
implementation in lib.rs (B4)” so it instead states that is_bare_invocation()
belongs on impl Cli (not CliRunner), matching the B4 description and the
interface section; ensure the doc references the symbol is_bare_invocation(),
the owner type Cli, and lib.rs/B4 consistently so the documentation uses a
single canonical owner and prevents implementation drift.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@agent-skill/weaver/SKILL.md`:
- Around line 176-177: Remove the inline markdownlint suppression and replace
the single-line command with a fenced code block using a shell language tag;
locate the command string "weaver --output json act refactor --refactoring
rename --file src/main.py new_name=build_index offset=123" in SKILL.md and wrap
it like ```sh ... ``` so the command remains copy-pasteable and no HTML comment
disabling (<!-- markdownlint-disable-next-line MD013 -->) remains in the file.

In `@crates/weaver-e2e/tests/test_support/daemon_harness.rs`:
- Around line 213-230: The code currently converts JSON parse failures into a
synthetic payload (parsed_request via unwrap_or_else), hiding real errors;
instead fail fast by returning an InvalidData error when
serde_json::from_str(request_line.trim()) fails. Replace the unwrap_or_else that
creates the json! fallback with logic that maps the serde_json::Error into a
std::io::Error::new(std::io::ErrorKind::InvalidData, err) (or propagate the
serde error) so the caller sees the parse failure; keep the rest of the flow
that uses parsed_request, Operation::from(operation_str), and pushing into
requests unchanged.

---

Outside diff comments:
In `@docs/execplans/phase-4-weaver-graph.md`:
- Line 10: Several Markdown headings use Title Case instead of sentence case;
update the heading texts by lowercasing only the non-initial words listed (e.g.,
change "Purpose / Big Picture" → "Purpose / big picture", "Surprises &
Discoveries" → "Surprises & discoveries", "Decision Log" → "Decision log",
"Outcomes & Retrospective" → "Outcomes & retrospective", "Context and
Orientation" → "Context and orientation", "Plan of Work" → "Plan of work",
"Concrete Steps" → "Concrete steps", "Validation and Acceptance" → "Validation
and acceptance", "Idempotence and Recovery" → "Idempotence and recovery",
"Artifacts and Notes" → "Artifacts and notes", and "Interfaces and Dependencies"
→ "Interfaces and dependencies"); make only the minimal edits to the heading
strings so the first word and proper nouns remain capitalized and all other
words are lowercase.

---

Duplicate comments:
In `@docs/execplans/5-1-1-entry-help.md`:
- Around line 776-777: Update the step text that currently says “Add
is_bare_invocation() to the CliRunner implementation in lib.rs (B4)” so it
instead states that is_bare_invocation() belongs on impl Cli (not CliRunner),
matching the B4 description and the interface section; ensure the doc references
the symbol is_bare_invocation(), the owner type Cli, and lib.rs/B4 consistently
so the documentation uses a single canonical owner and prevents implementation
drift.
🪄 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

Run ID: 020ae643-77ab-4f72-9ea3-9ed2e23f679b

📥 Commits

Reviewing files that changed from the base of the PR and between 4a77c22 and c8d8f3e.

📒 Files selected for processing (11)
  • agent-skill/weaver/SKILL.md
  • crates/weaver-e2e/tests/test_support/daemon_harness.rs
  • crates/weaver-e2e/tests/test_support/refactor_routing.rs
  • docs/adr-006-plugin-execution-and-orchestration-strategy.md
  • docs/developers-guide.md
  • docs/execplans/3-1-1b-plugin-for-rust-analyzer.md
  • docs/execplans/5-1-1-entry-help.md
  • docs/execplans/5-2-5-unit-behavioural-and-end-to-end-coverage-for-rename-symbol.md
  • docs/execplans/adopt-ortho-config-v0-8-0.md
  • docs/execplans/phase-1-end-to-end-domain-command-execution.md
  • docs/execplans/phase-4-weaver-graph.md

Comment thread agent-skill/weaver/SKILL.md Outdated
Comment thread crates/weaver-e2e/tests/test_support/daemon_harness.rs
Corrected "Weaver internal query operators" to "Weaver's internal query operators" in docs/adr-002-query-language-for-feature-extraction-in-weaver.md for grammatical accuracy.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
@leynos leynos changed the title Add shared cross-plugin rename-symbol fixtures; expand tests and docs Add shared cross-plugin rename-symbol fixtures and tests Apr 21, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

- Format SKILL.md agent flow command as a code block for clarity.
- Adjust capitalization style across execplans documentation for consistency.
- Minor fixes in 5-1-1-entry-help.md for accurate references.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
@leynos leynos changed the title Add shared cross-plugin rename-symbol fixtures and tests Add shared cross-plugin rename-symbol fixtures and tests (test-support) Apr 21, 2026
codescene-delta-analysis[bot]

This comment was marked as outdated.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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

Inline comments:
In `@crates/weaver-e2e/tests/test_support/daemon_harness.rs`:
- Around line 219-224: The code currently defaults a missing command.operation
to an empty string and lets Operation::from map it to Other; instead, detect
when parsed_request.get("command").and_then(|c|
c.get("operation")).and_then(Value::as_str) is None and immediately return an
InvalidData (or appropriate error) instead of unwrap_or_default; update the
logic around operation_str / operation (the parsed_request extraction and the
call to Operation::from) to fail fast with a clear structured error message
indicating the missing command.operation field.
🪄 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

Run ID: 43a994f1-4000-41b1-a26e-7227964299cf

📥 Commits

Reviewing files that changed from the base of the PR and between c8d8f3e and 823ec09.

📒 Files selected for processing (5)
  • agent-skill/weaver/SKILL.md
  • crates/weaver-e2e/tests/test_support/daemon_harness.rs
  • docs/adr-002-query-language-for-feature-extraction-in-weaver.md
  • docs/execplans/5-1-1-entry-help.md
  • docs/execplans/phase-4-weaver-graph.md

Comment thread crates/weaver-e2e/tests/test_support/daemon_harness.rs
…ness

In crates/weaver-e2e/tests/test_support/daemon_harness.rs, replaced unwrap_or_default with explicit error return when the command.operation string field is missing from a fake daemon request.

Also corrected capitalization in docs/execplans/adopt-ortho-config-v0-8-0.md to maintain style consistency.

Co-authored-by: devboxerhub[bot] <devboxerhub[bot]@users.noreply.github.com>
@leynos
Copy link
Copy Markdown
Owner Author

leynos commented Apr 21, 2026

@coderabbitai Have the following failed checks now been resolved?

If further work is required, please provide an AI agent prompt for the remaining work to be done to address these failures.

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Module-Level Documentation ⚠️ Warning Nine new Rust modules totalling 1,500+ lines lack module-level docstrings (//! comments) as flagged in review comments requesting Rustdoc for public test-support APIs. Add comprehensive module-level docstrings to all new modules: document test_support.rs purpose, daemon_harness.rs TCP harness role, refactor_routing.rs request handling, and contract test modules' conformance validation role.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "=== 1. test_support.rs (weaver-plugins) ==="
fd -e rs 'test_support.rs' --full-path -p 'weaver-plugins' --exec head -8 {}

echo ""
echo "=== 2. daemon_harness.rs ==="
fd -e rs 'daemon_harness.rs' --exec head -8 {}

echo ""
echo "=== 3. refactor_routing.rs ==="
fd -e rs 'refactor_routing.rs' --exec head -8 {}

echo ""
echo "=== 4. contract_behaviour.rs (rope) ==="
fd -e rs 'contract_behaviour.rs' --full-path -p 'weaver-plugin-rope' --exec head -8 {}

echo ""
echo "=== 5. contract_fixtures.rs (rope) ==="
fd -e rs 'contract_fixtures.rs' --full-path -p 'weaver-plugin-rope' --exec head -8 {}

echo ""
echo "=== 6. contract_behaviour.rs (rust-analyzer) ==="
fd -e rs 'contract_behaviour.rs' --full-path -p 'weaver-plugin-rust-analyzer' --exec head -8 {}

echo ""
echo "=== 7. contract_fixtures.rs (rust-analyzer) ==="
fd -e rs 'contract_fixtures.rs' --full-path -p 'weaver-plugin-rust-analyzer' --exec head -8 {}

echo ""
echo "=== 8. refactor/mod.rs (weaverd) ==="
cat crates/weaverd/src/dispatch/act/refactor/mod.rs | head -10

echo ""
echo "=== 9. Any other new test modules ==="
fd -e rs 'rollback_tests.rs' --exec head -8 {}
fd -e rs 'resolution_tests.rs' --exec head -8 {}
fd -e rs 'contract_tests.rs' --exec head -8 {}

Length of output: 2733


🏁 Script executed:

#!/bin/bash
echo "=== test_support.rs (all) ==="
fd -e rs -g 'test_support.rs' | xargs -I{} sh -c 'echo "--- {} ---"; head -5 {}'

echo ""
echo "=== contract_behaviour.rs (all) ==="
fd -e rs -g 'contract_behaviour.rs' | xargs -I{} sh -c 'echo "--- {} ---"; head -5 {}'

echo ""
echo "=== contract_fixtures.rs (all) ==="
fd -e rs -g 'contract_fixtures.rs' | xargs -I{} sh -c 'echo "--- {} ---"; head -5 {}'

Length of output: 1999


@leynos Yes — the Module-Level Documentation warning is resolved. The new Rust modules now start with module-level Rustdoc (//!), as verified below:

  • crates/weaver-e2e/tests/test_support/daemon_harness.rs — “Shared fake-daemon and transcript helpers for refactor CLI snapshots.”
  • crates/weaver-e2e/tests/test_support/refactor_routing.rs — “Shared request parsing and routing payload helpers for refactor snapshots.”
  • crates/weaver-plugins/src/capability/test_support.rs — “Shared rename-symbol contract fixtures for downstream plugin tests.”
  • crates/weaver-plugin-rope/src/tests/contract_behaviour.rs — “Behaviour-driven checks for the shared rename-symbol contract fixtures.”
  • crates/weaver-plugin-rope/src/tests/contract_fixtures.rs — “Shared contract fixture coverage for the rope plugin crate.”
  • crates/weaver-plugin-rust-analyzer/src/tests/contract_behaviour.rs — “Behaviour-driven checks for shared rename-symbol contract fixtures.”
  • crates/weaver-plugin-rust-analyzer/src/tests/contract_fixtures.rs — “Shared contract fixture coverage for the rust-analyzer plugin crate.”
  • crates/weaverd/src/dispatch/act/refactor/mod.rs — module header Rustdoc describing the refactor handler and Double-Lock flow.
  • crates/weaverd/src/dispatch/act/refactor/rollback_tests.rs — “Rollback-oriented tests for act refactor failure paths.”

Additional related test modules also carry module docs:

  • crates/weaverd/src/dispatch/act/refactor/resolution_tests.rs — “Unit tests for daemon-side capability resolution.”
  • crates/weaverd/src/dispatch/act/refactor/contract_tests.rs — “Unit tests for the rename-symbol request mapping contract.”

No further action is required.

@leynos leynos merged commit b07e8e2 into main Apr 21, 2026
11 checks passed
@leynos leynos deleted the add-rename-symbol-tests-1cdz7f branch April 21, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant