diff --git a/.run_status.toml b/.run_status.toml index caa89c7..1503182 100644 --- a/.run_status.toml +++ b/.run_status.toml @@ -1,11 +1,11 @@ [last_run_clean] run_status = "Success" -lines_parsed = 379 -coverage = 92.34 +lines_parsed = 389 +coverage = 92.4 [last_run_clean.run_duration] secs = 29 -nanos = 803755166 +nanos = 820282692 [last_run_incremental] run_status = "Success" diff --git a/CHANGELOG.md b/CHANGELOG.md index d324d59..998793d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,20 @@ All notable changes to John Slop are recorded here. The format follows ## [Unreleased] +## [0.1.21] - 2026-09-30 + +### Added + +- Added real LSP document formatting backed by the same resolved replacement + plan as `john-slop-fmt`. +- Added non-mutating exact-span diagnostics for Unicode 16.0 UTS #39 + ASCII-lookalikes and pinned Gitea invisible/bidirectional controls. + +### Changed + +- Expanded the shared fixtures and expected-failure diagnostic showcase with + deliberately non-fixable Unicode review cases. + ## [0.1.20] - 2026-09-29 ### Changed @@ -46,6 +60,7 @@ All notable changes to John Slop are recorded here. The format follows - Stdio LSP replacement diagnostics and versioned quick fixes. - Runnable examples, reviewed fixtures, fuzz targets, benchmarks, and CI gates. -[Unreleased]: https://git.dandaedre.com/idle-org/john_slop/compare/v0.1.20...HEAD +[Unreleased]: https://git.dandaedre.com/idle-org/john_slop/compare/v0.1.21...HEAD +[0.1.21]: https://git.dandaedre.com/idle-org/john_slop/compare/v0.1.20...v0.1.21 [0.1.20]: https://git.dandaedre.com/idle-org/john_slop/compare/v0.1.0...v0.1.20 [0.1.0]: https://git.dandaedre.com/idle-org/john_slop/releases/tag/v0.1.0 diff --git a/Cargo.lock b/Cargo.lock index cf10296..368b304 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -699,7 +699,7 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "john-slop-core" -version = "0.1.20" +version = "0.1.21" dependencies = [ "directories", "figment", @@ -717,7 +717,7 @@ dependencies = [ [[package]] name = "john-slop-lsp" -version = "0.1.20" +version = "0.1.21" dependencies = [ "john-slop-core", "serde_json", @@ -728,7 +728,7 @@ dependencies = [ [[package]] name = "john_slop" -version = "0.1.20" +version = "0.1.21" dependencies = [ "clap", "criterion", diff --git a/Cargo.toml b/Cargo.toml index 7cd7697..225b6fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ default-members = [".", "crates/john-slop-core", "crates/john-slop-lsp"] resolver = "3" [workspace.package] -version = "0.1.20" +version = "0.1.21" edition = "2024" rust-version = "1.98.1" license = "MIT" @@ -18,8 +18,8 @@ figment = { version = "0.10.19", default-features = false, features = ["toml"] } futures = { version = "0.3.34", default-features = false, features = ["std"] } globset = { version = "0.4.20", default-features = false } insta = { version = "1.48.0", default-features = false } -john-slop-core = { version = "0.1.20", path = "crates/john-slop-core" } -john-slop-lsp-engine = { package = "john-slop-lsp", version = "0.1.20", path = "crates/john-slop-lsp" } +john-slop-core = { version = "0.1.21", path = "crates/john-slop-core" } +john-slop-lsp-engine = { package = "john-slop-lsp", version = "0.1.21", path = "crates/john-slop-lsp" } miette = { version = "7.6.0", default-features = false, features = ["derive"] } regex = "1.13.1" serde = { version = "1.0.229", features = ["derive"] } diff --git a/badges/version.svg b/badges/version.svg index 3583d1f..fe9f041 100644 --- a/badges/version.svg +++ b/badges/version.svg @@ -1 +1 @@ -version: 0.1.20version0.1.20 \ No newline at end of file +version: 0.1.21version0.1.21 \ No newline at end of file diff --git a/docs/dependencies.md b/docs/dependencies.md index 99158e0..042cb9d 100644 --- a/docs/dependencies.md +++ b/docs/dependencies.md @@ -31,7 +31,7 @@ boundary and the synchronized package metadata. ## Security, licenses, and unsafe code -`cargo audit --deny warnings` scanned 187 locked packages against 1,277 RustSec +`cargo audit --deny warnings` scanned 193 locked packages against 1,277 RustSec advisories without a finding. `cargo deny --locked check` passed advisories, licenses, and sources; it reports seven transitive duplicate-version families as warnings for ongoing review. [`deny.toml`](../deny.toml) contains the reviewed diff --git a/docs/development.md b/docs/development.md index 47e04df..c106127 100644 --- a/docs/development.md +++ b/docs/development.md @@ -67,8 +67,8 @@ Run line coverage with Cargo Tarpaulin: cargo tarpaulin --config tarpaulin.toml ``` -The configuration enforces a 90% floor. The current suite measured 92.34% -(1,411/1,528 lines) on 2026-09-29. The remaining lines are dominated by +The configuration enforces a 90% floor. The current suite measured 92.40% +(1,472/1,593 lines) on 2026-09-30. The remaining lines are dominated by platform/I/O failure injection, malformed archive internals, coordinate overflow, LSP logging/reload failures, and subprocess attribution. Do not add brittle tests or production seams solely to make Tarpaulin count those paths. diff --git a/examples/README.md b/examples/README.md index 889c4da..1474a94 100644 --- a/examples/README.md +++ b/examples/README.md @@ -28,8 +28,11 @@ layering should call `john_slop::load_config()` instead. [`fixtures/manifest.toml`](fixtures/manifest.toml) describes small inputs shared by detector CLI, formatter, and LSP testing. Several directories deliberately contain an `example.txt`, covering clean prose, copied assistant residue, stock -style, and Unicode punctuation. A Rust source example covers source-only rules. -Each input has a checked-in expected formatted result. +style, safe Unicode punctuation replacements, and diagnostic-only Unicode +lookalikes/invisibles. A Rust source example covers source-only rules. Each +input has a checked-in expected formatted result; the Unicode review fixture's +expected result is intentionally byte-identical because those findings do not +authorize rewriting. Exercise the currently implemented boundaries with: @@ -71,10 +74,11 @@ embedded catalog remains limited to individually reviewed conservative rules. shipped prose signal, while [`diagnostic-showcase/source.rs`](diagnostic-showcase/source.rs) adds the source-placeholder and tutorial-narration rules plus all ten embedded -replacement characters. The adjacent example configuration promotes assistant +replacement characters, a Cyrillic ASCII lookalike, a zero-width space, and a +right-to-left override. The adjacent example configuration promotes assistant self-identification from warning to error and lifts the typography occurrence -cap for this display, making one run show Miette advice, warning, error, and -fixable diagnostics together: +cap for this display, making one run show Miette advice, warning, error, +fixable, and deliberately non-fixable Unicode diagnostics together: ```sh cargo run --bin john-slop -- \ diff --git a/examples/diagnostic-showcase/source.rs b/examples/diagnostic-showcase/source.rs index a0ffaa9..1dddfc7 100644 --- a/examples/diagnostic-showcase/source.rs +++ b/examples/diagnostic-showcase/source.rs @@ -3,4 +3,5 @@ fn main() { // Next, we leave the implementation placeholder visible for review. // TODO: implement let _replacement_characters = "‐ ‑ ‒ – — ― − ﹘ ﹣ -"; + let _unicode_review_only = "pаss​word‮"; } diff --git a/examples/fixtures/manifest.toml b/examples/fixtures/manifest.toml index 700537c..f6ba57a 100644 --- a/examples/fixtures/manifest.toml +++ b/examples/fixtures/manifest.toml @@ -34,6 +34,12 @@ formatted = "typography/formatted.txt" expected_rules = ["typography-non-ascii-hyphen"] expected_replacements = 3 +[[cases]] +path = "unicode-review/example.txt" +formatted = "unicode-review/formatted.txt" +expected_rules = ["unicode-ascii-confusable", "unicode-invisible-control"] +expected_replacements = 0 + [[cases]] path = "source/example.rs" formatted = "source/formatted.rs" diff --git a/examples/fixtures/unicode-review/example.txt b/examples/fixtures/unicode-review/example.txt new file mode 100644 index 0000000..3a480ba --- /dev/null +++ b/examples/fixtures/unicode-review/example.txt @@ -0,0 +1 @@ +The pаss​word contains lookalike and invisible characters. diff --git a/examples/fixtures/unicode-review/formatted.txt b/examples/fixtures/unicode-review/formatted.txt new file mode 100644 index 0000000..3a480ba --- /dev/null +++ b/examples/fixtures/unicode-review/formatted.txt @@ -0,0 +1 @@ +The pаss​word contains lookalike and invisible characters. diff --git a/fuzz/Cargo.lock b/fuzz/Cargo.lock index 3b25873..c20f63b 100644 --- a/fuzz/Cargo.lock +++ b/fuzz/Cargo.lock @@ -385,7 +385,7 @@ dependencies = [ [[package]] name = "john-slop-core" -version = "0.1.20" +version = "0.1.21" dependencies = [ "directories", "figment", @@ -394,6 +394,7 @@ dependencies = [ "regex", "serde", "thiserror", + "unicode-security", "walkdir", "zip", ] @@ -410,7 +411,7 @@ dependencies = [ [[package]] name = "john-slop-lsp" -version = "0.1.20" +version = "0.1.21" dependencies = [ "john-slop-core", "serde_json", @@ -421,7 +422,7 @@ dependencies = [ [[package]] name = "john_slop" -version = "0.1.20" +version = "0.1.21" dependencies = [ "clap", "globset", @@ -828,6 +829,12 @@ dependencies = [ "syn 3.0.6", ] +[[package]] +name = "tinyvec" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" + [[package]] name = "tokio" version = "1.53.1" @@ -1041,6 +1048,31 @@ version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954" +[[package]] +name = "unicode-normalization" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-script" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" + +[[package]] +name = "unicode-security" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e4ddba1535dd35ed8b61c52166b7155d7f4e4b8847cec6f48e71dc66d8b5e50" +dependencies = [ + "unicode-normalization", + "unicode-script", +] + [[package]] name = "unicode-width" version = "0.1.14" diff --git a/tasks.md b/tasks.md index 974db01..23bd57c 100644 --- a/tasks.md +++ b/tasks.md @@ -527,7 +527,7 @@ package assembly, and Tarpaulin passed; coverage remains 92.34% and bidirectional controls. Keep these findings distinct from the smaller automatic replacement allowlist, configurable as normal heuristic rules, and document provenance, multilingual false positives, and profile boundaries. -- [ ] Refresh examples, editor/architecture/configuration/limitations guides, +- [x] Refresh examples, editor/architecture/configuration/limitations guides, evaluation fixtures and sign-off, coverage metadata, package version `0.1.21`, changelog, and generated badges. @@ -540,6 +540,13 @@ misses remain covered; formatting, Clippy, rustdoc, both feature matrices, package assembly, and the coverage floor pass before the immutable `v0.1.21` tag is created. +Accepted on 2026-09-30 after real protocol-formatting parity tests, exact-span +CLI/LSP Unicode diagnostics, a non-mutating shared fixture, and the renewed +13-rule evaluation corpus passed. Formatting, Clippy, rustdoc, both feature +matrices, dependency policy/audit checks, and workspace package assembly pass; +coverage is 92.40% (1,472/1,593 lines), and all packages, binaries, lockfiles, +changelog, and the generated badge agree on `0.1.21`. + ## Deferred by design - Statistical or model-based authorship classification. diff --git a/tests/example_fixtures.rs b/tests/example_fixtures.rs index 286c9d5..fc65658 100644 --- a/tests/example_fixtures.rs +++ b/tests/example_fixtures.rs @@ -160,6 +160,8 @@ fn diagnostic_showcase_spans_prose_source_and_severities() { assert!(stdout.contains("assistant-self-identification")); assert!(stdout.contains("prompt-response-scaffolding")); assert!(stdout.contains("typography-non-ascii-hyphen")); + assert!(stdout.contains("unicode-ascii-confusable")); + assert!(stdout.contains("unicode-invisible-control")); assert!(stdout.contains("source-placeholder-todo")); assert!(stdout.contains("source-tutorial-narration")); assert!(stdout.contains('‐')); diff --git a/tests/fixtures/evaluation/signoff.toml b/tests/fixtures/evaluation/signoff.toml index 4af1989..4d4d4e7 100644 --- a/tests/fixtures/evaluation/signoff.toml +++ b/tests/fixtures/evaluation/signoff.toml @@ -1,5 +1,5 @@ schema_version = 1 -release = "0.1.20" +release = "0.1.21" reviewed_on = "2026-09-30" status = "accepted-after-unicode-review-profile" catalog_sha256 = "94cd36bf49f7061aad027308afb3bf8525a713af65b8ec3b730e0e75bfcef8c5"