feat(lint): add machine fixes - #7
Merged
pocky merged 1 commit intoJun 23, 2026
Merged
Conversation
- `.zpm/kb/feedback/journal.wal`: Record feedback memory for lint fix implementation - `.zpm/kb/pr_feature_f003_lint_fix_apply_machine_applicable_lin/journal.wal`: Add PR memory journal for F003 lint fixes - `.zpm/kb/pr_feature_f003_lint_fix_apply_machine_applicable_lin/knowledge.pl`: Add PR knowledge base for F003 lint fixes - `.zpm/mounts.json`: Register PR memory mount for lint fix work - `README.md`: Document lint fix capability - `crates/core_engine/src/adapters/daemon/engine.rs`: Wire apply-edits host dependency into daemon engine - `crates/core_engine/src/adapters/extension/discovery.rs`: Load apply-edits capability from extension manifests - `crates/core_engine/src/adapters/extension/host_deps.rs`: Add apply-edits host dependency - `crates/core_engine/src/adapters/extension/mod.rs`: Export apply-edits extension support - `crates/core_engine/src/adapters/extension/sidecar.rs`: Route apply-edits host calls through sidecar - `crates/core_engine/src/adapters/extension/supervisor.rs`: Supervise apply-edits host call dispatch - `crates/core_engine/src/adapters/extension/supervisor_tests.rs`: Cover apply-edits supervisor behavior - `crates/core_engine/src/adapters/extension/tests.rs`: Add extension apply-edits adapter coverage - `crates/core_engine/src/adapters/mcp/native_tools.rs`: Expose lint fix behavior through MCP tools - `crates/core_engine/src/domain/error.rs`: Add mutation error handling for edit application - `crates/core_engine/src/domain/extension_host/mod.rs`: Add apply-edits host capability contract - `crates/core_engine/src/domain/mutation/apply_edits_tests.rs`: Add apply-edits mutation contract tests - `crates/core_engine/src/domain/mutation/file_mutation.rs`: Implement CAS-guarded multi-edit application - `crates/core_engine/src/domain/mutation/mod.rs`: Export apply-edits mutation module - `crates/core_engine/src/ports/inbound.rs`: Add inbound apply-edits use case API - `crates/core_engine/tests/extension_ast_e2e.rs`: Update extension host fixtures for apply-edits deps - `crates/core_engine/tests/extension_fmt_e2e.rs`: Update format extension fixtures for apply-edits deps - `crates/core_engine/tests/extension_lint_e2e.rs`: Add lint fix e2e coverage - `crates/core_engine/tests/extension_lsp_process_e2e.rs`: Update LSP process fixtures for apply-edits deps - `crates/core_engine/tests/extension_lsp_protocol_e2e.rs`: Update LSP protocol fixtures for apply-edits deps - `crates/core_engine/tests/functional_lint_fix_mcp.rs`: Add MCP functional tests for lint fixes - `crates/core_engine/tests/functional_lint_mcp.rs`: Update lint MCP tests for fix support - `crates/core_engine/tests/lint_support.rs`: Add lint fix test support helpers - `crates/extension_protocol/src/manifest.rs`: Add apply-edits capability manifest schema - `crates/extension_protocol/src/messages.rs`: Add apply-edits protocol messages - `crates/extension_protocol/tests/protocol_tests.rs`: Cover apply-edits protocol serialization - `docs/README.md`: Link lint fix user documentation - `docs/architecture.md`: Document apply-edits architecture flow - `docs/extensions.md`: Document extension apply-edits capability - `docs/getting-started.md`: Add lint fix usage guidance - `docs/mcp-tools.md`: Document lint fix MCP tool behavior - `docs/user-guide/lint-fixes.md`: Add lint fix user guide - `extensions/lint/extension.toml`: Declare apply-edits capability - `extensions/lint/src/fixes.rs`: Add lint fix planning and orchestration - `extensions/lint/src/lib.rs`: Export lint fix functionality - `extensions/lint/src/main.rs`: Wire lint fix tool into extension runtime - `extensions/lint/src/parsers.rs`: Extract structured fixes from linter output - `extensions/lint/src/protocol.rs`: Add lint fix request and response types - `extensions/lint/src/runner.rs`: Add fix-aware linter runner flow - `extensions/lint/tests/protocol_tests.rs`: Cover lint fix protocol behavior Closes #6
pocky
marked this pull request as ready for review
June 23, 2026 20:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
workspace/applyEditssupport so sidecar extensions can request safe, host-owned text mutations with dry-run previews and conflict reporting.tower_lint_fix, including structured fix extraction, dry-run/apply behavior, skip reasons, and stable tool error responses.Changes
Project Memory
.zpm/kb/feedback/journal.wal: Add F003 review, testing, protocol, and apply-edits architecture rules..zpm/kb/pr_feature_f003_lint_fix_apply_machine_applicable_lin/journal.wal: Add PR tracking journal entries for resolved implementation scan items..zpm/kb/pr_feature_f003_lint_fix_apply_machine_applicable_lin/knowledge.pl: Add PR tracking schema and readiness predicates for this branch..zpm/mounts.json: Mount the F003 PR memory segment.Core Apply-Edits Domain
crates/core_engine/src/domain/error.rs: AddUnsupportedOperationfor unavailable public contracts.crates/core_engine/src/domain/mutation/file_mutation.rs: Implement CAS and dry-run multi-edit application with UTF-8 validation, conflict filtering, previews, and indexed commits.crates/core_engine/src/domain/mutation/mod.rs: Register apply-edits domain tests.crates/core_engine/src/domain/mutation/apply_edits_tests.rs: Add focused tests for contracts, CAS rejection, dry-run previews, conflicts, UTF-8 boundaries, and commit behavior.crates/core_engine/src/ports/inbound.rs: Add apply-edits DTOs andFileMutationUseCasemethods.Extension Host Wiring
crates/core_engine/src/adapters/daemon/engine.rs: WireEngineApplyEditsHostinto daemon state and defer extension notifications until locks are released.crates/core_engine/src/adapters/extension/discovery.rs: Add shared-registry loading so eager extensions can use host calls during initialization.crates/core_engine/src/adapters/extension/host_deps.rs: AddApplyEditsHostPortand unsupported fallback dependency.crates/core_engine/src/adapters/extension/mod.rs: Export new extension discovery helpers.crates/core_engine/src/adapters/extension/sidecar.rs: Dispatchworkspace/applyEdits, validate params, enforce capability declaration, and map CAS/range errors.crates/core_engine/src/adapters/extension/supervisor.rs: Clone the apply-edits dependency during respawn.crates/core_engine/src/domain/extension_host/mod.rs: Queue deferred events when an extension instance is busy to avoid reentrant deadlocks.crates/core_engine/src/adapters/mcp/native_tools.rs: Expose the current extension host from engine state.Lint Fix Extension
extensions/lint/extension.toml: Declare thefixtool andrequest_apply_editscapability.extensions/lint/src/fixes.rs: Add lint fix model types.extensions/lint/src/lib.rs: Export fix support.extensions/lint/src/main.rs: Add fix orchestration, CAS hashing, dry-run handling, apply-edits host calls, and structured tool results.extensions/lint/src/parsers.rs: Extract structured fixes from supported linter output formats.extensions/lint/src/protocol.rs: Add fix request/result DTOs, preview DTOs, skip reasons, and stable error response types.extensions/lint/src/runner.rs: Preserve fix metadata through linter execution.extensions/lint/tests/protocol_tests.rs: Cover lint fix protocol serialization and manifest behavior.Tests
crates/core_engine/src/adapters/extension/supervisor_tests.rs: Add apply-edits fallback dependency to host fixture setup.crates/core_engine/src/adapters/extension/tests.rs: Add apply-edits fallback dependency to sidecar tests.crates/core_engine/tests/extension_ast_e2e.rs: Add apply-edits fallback dependency to AST extension fixtures.crates/core_engine/tests/extension_fmt_e2e.rs: Add apply-edits fallback dependency to formatting extension fixtures.crates/core_engine/tests/extension_lint_e2e.rs: Add apply-edits runtime, reentrancy, manifest, protocol, parser, dry-run, conflict, and lint fix orchestration coverage.crates/core_engine/tests/extension_lsp_process_e2e.rs: Add apply-edits fallback dependency to LSP process fixtures.crates/core_engine/tests/extension_lsp_protocol_e2e.rs: Add apply-edits fallback dependency to LSP protocol fixtures.crates/core_engine/tests/functional_lint_fix_mcp.rs: Add MCP-level lint fix coverage.crates/core_engine/tests/functional_lint_mcp.rs: Update lint MCP expectations for the added fix capability/tool surface.crates/core_engine/tests/lint_support.rs: Add lint fix manifests, apply-edits-capable test host dependencies, and fixture helpers.crates/extension_protocol/tests/protocol_tests.rs: Add protocol tests for request-apply-edits host calls and manifest capability stability.Protocol
crates/extension_protocol/src/manifest.rs: Addrequest_apply_editscapability support.crates/extension_protocol/src/messages.rs: AddRequestApplyEditshost call wire DTOs.Documentation
README.md: Describe lint fixes and add a dry-run example.docs/README.md: Link lint fix user documentation.docs/architecture.md: Document apply-edits flow in the host architecture.docs/extensions.md: Document therequest_apply_editscapability for extensions.docs/getting-started.md: Add lint fix usage to onboarding flow.docs/mcp-tools.md: Documenttower_lint_fix, arguments, results, and errors.docs/user-guide/lint-fixes.md: Add user guide for previewing and applying structured lint fixes safely.Test plan
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningscargo build --workspace --binscargo test --workspaceCloses #6
Generated with awf commit workflow