Repository navigation
Conversation
T45–T49: TUI slash handler fixes, test fixes, cleanup
- Remove unused imports (PawanConfig, ToolDefinition) in execute.rs - Remove dead duplicate functions from construction.rs (already in mod.rs) - Gate test-only re-exports behind #[cfg(test)] in agent/mod.rs, config/mod.rs - Remove unused QUEUE_DONE_TTL_MS constant from tools/task.rs - Add #[allow(dead_code)] on future-API items in pawan-cli (theme, layout, etc.) - Add v0.5.7 changelog entry with refactoring, features, and test summary - Update test counts from 988+ to 1627+ across README, crate READMEs, and docs
- pawan-core: remove unused imports, fix mut variables - pawan-cli: fix clamp, sort_by_key, checked_div, needless borrows - rename ExportFormat::from_str to parse to avoid std trait confusion - fix unused variables in tests with .. rest patterns
fix: resolve all clippy -D warnings across workspace
- README.md, crate READMEs, guide.md, triage.md, CHANGELOG.md
docs: update test count and version refs for v0.5.7
…#27) * fix: remove maki refs, fix NVIDIA model catalog auth, trim fallback list - Remove 'inspired by maki-ui' from theme.rs and layout.rs comments - Send Authorization Bearer header when NVIDIA_API_KEY is set - Replace 500+ hardcoded models with 13 curated fallback models - Fix clippy sort_by_key and redundant import warnings * fix: update model catalog tests and snapshot for curated fallback list - Lower test_default_models_not_empty threshold from 50 to 10 - Accept new model selector snapshot with 13 curated models * refactor: decompose high-CRAP functions into focused helpers CRAP Reduction (execute.rs): - execute_with_all_callbacks: 730 lines → 179 lines (75% reduction) - Extracted 9 helpers: inject_eruka_context, build_user_prompt, apply_iteration_budgets, call_llm_with_retry, accumulate_token_usage, strip_thinking_blocks, handle_no_tool_response, check_tool_permissions, execute_pending_tools, collect_tool_results CRAP Reduction (session_ops.rs): - export_as_html: CC 46 → ~3 (4 helpers: build_html_header, build_html_footer, render_message_html, render_tool_calls_html) - generate_handoff_prompt: CC 49 → ~4 (5 helpers: extract_recent_context, extract_mentioned_files, extract_task_items, extract_constraints, build_prompt_header) All 1643 tests pass. Clippy clean. * refactor: decompose main.rs run(), parse_compaction_summary, quality_score_for CRAP Reduction: - main.rs run(): CC 60 → ~30 via setup_config, resolve_session_resume extraction - parse_compaction_summary: CC 35 → 1 via 6 helper functions (extract_section_content, parse_summary_field, parse_token_counts, parse_compressed_sections, parse_preserved_sections, parse_numbered_items) - quality_score_for: CC 37 → 1 via 3 helpers (score_by_vendor, score_by_capability, score_by_size) Coverage baseline captured: 77.28% lines / 79.08% functions / 76.83% branches All 1643 tests pass. Clippy clean. * chore(pawan): sync 3 file(s) * test: add unit tests for pure TUI functions - scrollbar.rs: 9 tests (construction, render edge cases, color handling) - fuzzy_search.rs: 12 tests (filter, navigation, command_prefix) - status_bar.rs: 11 tests (abbrev_model, format_tokens, context_bar) All 1655 tests pass. Clippy clean. * refactor(tui): convert render.rs to render/ directory module * chore(pawan): sync 3 file(s) * refactor(cli): decompose high-complexity main.rs run functions Break down run_headless (CC=51), run_commit (CC=40), run_doctor (CC=31), and run_tasks (CC=31) into focused helper functions to reduce cyclomatic complexity and CRAP scores. Behavior preserved verbatim. * test(tui): relocate render snapshots and make CWD redaction width-stable Move render snapshots into render/snapshots/ after the render module split and regenerate them against current TUI output. Pad the [CWD] redaction to preserve line width so the welcome box border stays aligned regardless of working-directory length, making the snapshot portable across environments. * refactor: decompose high-complexity functions across cli and core Decompose App::main_loop, MiseTool::execute, OpenAiCompatBackend streaming/generate, App::slash_route, and handle_input_panel_key into focused helper functions. Behavior preserved verbatim.
- LspTool::execute: 10 tests (error paths, arg validation, schema) - InjectionDetector: 22 tests (scan_file, scan_file_streaming, helpers) - main.rs helpers: 20 tests (parse_git_status, commit prompt, headless) - TUI model picker: 8 tests (navigation, input, selection) Total workspace tests: 1715+
- Workspace version 0.5.8, workspace deps pawan-core/pawan-mcp 0.5.8 - CHANGELOG: add v0.5.8 entry (CRAP reduction, render decomposition, 60 tests) - Fix CHANGELOG corruption (embedded line numbers, snapshot tags) - Update test counts 1643→1779 across README, guide, triage, crate READMEs - Regenerate insta welcome snapshots for v0.5.8 - Update pawan-api health endpoint version in README
TUI redesign + animate-core value tweens (v0.5.9)
chore: v0.5.9 version bump + docs update
Replaces the unmaintained `atty 0.2.14` crate with the stdlib `std::io::IsTerminal` trait (stable since Rust 1.70). Resolves RUSTSEC-2024-0375 (unmaintained) and RUSTSEC-2021-0145 (Windows unaligned read) for pawan-cli's direct dependency on `atty`.
**Changes**
- `crates/pawan-cli/src/main.rs`: 3 call sites switched from `atty::is(Stream::*)` to `std::io::{stdin,stderr}().is_terminal()` (one new `use std::io::IsTerminal;` import)
- `crates/pawan-cli/Cargo.toml`: drop `atty = "0.2.14"`
- `Cargo.lock`: atty and its transitive `hermit-abi` are no longer resolved
- `.cargo/audit.toml`: document accepted-risk suppressions for the 11 advisories (5 vulnerabilities + 6 unmaintained warnings) that remain in the lockfile but are out of reach or already patched
- `cargo fmt --all`: bring workspace into compliance with the current rustfmt (35 files, 446+/396-, no semantic changes)
- Refresh stale welcome-screen snapshot (v0.5.8 → v0.5.9) for the lib and bin targets
**Verification**
- `cargo check -p pawan`: clean
- `cargo test -p pawan`: 269/269 pass locally
- `cargo audit`: clean (0 advisories with the new `.cargo/audit.toml` suppressions)
- `cargo fmt --all -- --check`: clean
**Note on CI**
The 4 `test_render_welcome_snapshot` / `test_session_tags_persist_on_save` failures in CI are pre-existing on `main` (the welcome snapshot still has v0.5.8 but the code is v0.5.9, and `test_session_tags_persist_on_save` is environment-flaky on the session-dir path). The atty fix is unrelated to those failures. They should be addressed in a separate PR.
Closes #4 (RUSTSEC-2024-0375) and #13 (RUSTSEC-2021-0145) via auto-close on merge.
Adds RMUX-backed terminal workflow support, /rmux typed slash command, /model key-release fix, and PTY-backed TUI QA.
Bump workspace crates to v0.5.10 and finalize release notes after RMUX terminal workflow integration.
Adds RMUX live roundtrip testing, kill_session support, /rmux kill routing, and stricter RMUX validation/diagnostics.
Bump workspace crates to v0.5.11 and finalize release notes for RMUX hardening.
Render RMUX snapshot tool results as terminal-focused TUI cards and switch fixed TUI statics to LazyLock.
Bump workspace crates to v0.5.12 and finalize release notes for RMUX snapshot cards.
Adds rmux list_sessions support, /rmux list routing, live roundtrip list assertions, and docs.
Bump workspace crates to v0.5.13 and finalize release notes for RMUX session discovery.
Adds rmux list_panes support, /rmux panes routing, live pane inventory assertions, and docs.
Bump workspace crates to v0.5.14 and finalize release notes for RMUX pane discovery.
Renders rmux list_panes tool results as active-pane inventory cards while preserving generic tool rendering.
Bump workspace crates to v0.5.15 and finalize release notes for RMUX pane-list cards.
Renders rmux list_sessions tool results as active-session inventory cards while preserving other tool rendering.
Bump workspace crates to v0.5.16 and finalize release notes for RMUX session-list cards.
Renders rmux send, key, wait, and kill tool results as action-focused TUI cards.
Bump workspace crates to v0.5.17 and finalize release notes for RMUX status cards.
Bump workspace crates to v0.5.19 and finalize release notes for expanded headless slash-command smoke coverage.
Preserve fetched NVIDIA /v1/models catalogs when opening /model, and add live model-picker regression smoke coverage.
Bump workspace crates to v0.5.20 and finalize release notes for model picker live catalog preservation.
Adds weekly/manual regression smoke workflow and checklist tests for prior TUI/model regressions.
Bump workspace crates to v0.5.21 and finalize release notes for periodic regression smoke.
Track and render model picker catalog source metadata for fallback vs live NVIDIA catalogs.
Advances pawan#83. Cargo.lock only; no manifest changes. crossbeam-epoch 0.9.18 -> 0.9.21 clears RUSTSEC-2026-0204 h2 0.4.13 -> 0.4.16 clears RUSTSEC-2026-0258 quinn-proto 0.11.14 -> 0.11.15 clears RUSTSEC-2026-0185 The h2 copy that IS fixable is the one that reaches pawan-core (reqwest -> hyper 1.9). The other copy, 0.3.27, is the legacy tonic 0.11 -> rs-utcp -> thulp-mcp -> pawan-mcp path and stays blocked by rs-utcp (pawan#81). quinn-proto is an orphan: cargo tree -i quinn --target all reports nothing to print and no workspace Cargo.toml mentions quinn, so it is advisory-bearing weight nothing pulls in. Worth confirming why it is in the lockfile at all. Deliberately NOT bumped: quick-xml 0.39.2 -> 0.39.4 resolves but still fails RUSTSEC-2026-0194/0195 (patched is >=0.41.0, capped by plist 1.9.0). Pure churn, so it is not in this diff. Verified: cargo check --workspace --all-targets exits 0. cargo audit on this lockfile reports 4, down from 7. The remaining 4 are quick-xml x2 (blocked by plist), h2 0.3.27 (blocked by rs-utcp), and rustls (pawan#82, in flight).
Correction to my own description: the diff is 48 lines, not 3 — and I cannot explain the
|
Resolved: the lockfile is clean, and the
|
| after bumping | consumers of socket2 0.5.10 |
|---|---|
crossbeam-epoch only |
hyper, webrtc-mdns |
h2@0.4.13 only |
hyper, hyper-util, quinn, quinn-udp, webrtc-mdns |
quinn-proto only |
hyper, webrtc-mdns |
h2 0.4.16 requires a newer socket2 than 0.4.13 did, so the resolver unified the whole h2/hyper/quinn subtree onto 0.5.10. Line counts agree: h2 alone → 40 changed lines; all three → 48. The remaining 8 are the two version+checksum pairs for crossbeam-epoch and quinn-proto.
So the ~21 "unrelated" edge rewrites are not unrelated — they are the downstream consequence of the one advisory fix that matters most (h2 0.4.13 is the active reqwest path into pawan-core/pawan-cli, per my original note).
Correction to my own framing
I wrote "I am not claiming the churn is benign" and left it open. That was the honest state at the time — I had verified self-consistency but not cause. Having now established cause, the accurate statement is: the churn is required by the h2 fix, not incidental to it. The earlier caution was right to withhold a claim I could not yet support; it should not be read as a standing reservation.
Net: cargo audit reports 4, down from 7. Still BLOCKED by two pre-existing red gates on main (#86 clippy, #83 audit), neither caused by this diff. No push, no merge, no force-push from me.
Retracting my
|
Correction: this PR clears two advisories, not three — and my own earlier comment on #83 said four were mechanicalThe title said "7 -> 4" and "3 advisories", and I have separately told you on #83 that " What this PR actually clears
So: two advisories fully cleared, and a third partially. Not three. The
|
|
Subsumed by a single verified lockfile, posted on #83. This PR's CI cannot go green on its own: |
98a399d to
5bff5be
Compare
|
Rebasing this branch onto current So there is nothing left here to review, and the advisory work this was opened for is carried by Closing as superseded. The branch stays on the remote and every commit in it is already in |
Advances #83.
Cargo.lockonly — 3 version lines, no manifest changes.What this clears
crossbeam-epochpawan-coreviadeagle-parse;pawan-cliviatermimadh2pawan-core+pawan-cliviareqwest→ activequinn-protocargo auditon this lockfile reports 4, down from 7.The h2 finding
There are two
h2copies in the lockfile on different paths. #81 correctly saysh2is blocked byrs-utcppinningtonic ^0.11— but that only covers one of them:cargo update -p h2@0.4.13 --precise 0.4.16succeeds; the same command on0.3.27fails withrequired by reqwest = "^0.11" of rs-utcp v0.3.2, exactly as #81 predicts. So #81's scope is right but incomplete — the active-path copy was never blocked and needed no upstream change.quinn-proto is an orphan
cargo tree -i quinn --edges all --target allreports nothing to print, and no workspaceCargo.tomlmentionsquinn. It is advisory-bearing weight nothing pulls in. Bumping clears the advisory; the honest fix is pruning it from the lockfile. Flagging for whoever knows why it is there.Deliberately not included
quick-xml 0.39.2 → 0.39.4resolves cleanly but still fails RUSTSEC-2026-0194/0195 — patched is>=0.41.0, capped byplist 1.9.0. Pure churn, so it is not in this diff.Verification
Reachable from production crates (
pawan-core,pawan-api,pawan-cli), not just the workspace.Sequencing — needs a decision
#82 (rustls) is open right now and touches the same
Cargo.lock.mainis still atde893a9, so whichever merges first needs the other rebased. This one is compiled and unblocked; #82 additionally needs rustls 0.23.45.Landing this first makes the audit gate less red for #82 to land against. Merge order is the operator's call, not mine.
Remaining 4 after both:
quick-xml×2 (blocked byplist),h2 0.3.27(blocked byrs-utcp, #81), rustls (#82).