fix: configure warnings gating, Windows tool resolution, and toast delivery#72
Conversation
…fy tool detection
- Make resolve_tool_uncached pub(crate) and add Windows well-known search paths
(C:\Go\bin, %USERPROFILE%\.cargo\bin, etc.) to fix false negatives on Windows.
- Delegate configure.rs resolve_tool_uncached to format.rs to eliminate
near-duplicate tool detection logic and ensure well-known path fallback
applies at configure-time too.
- Add cfg!(windows) branch to install_hint("go") with Windows paths.
- Add .qartez/ to .gitignore (local code intelligence cache, not source).
Fixes cortexkit#47
Add shared tool_path resolution (PATH walk, PATHEXT, well-known dirs). Gate missing formatter/checker warnings on format_on_edit and validate_on_edit. Unify configure with format.rs availability checks.
Deliver missing-tool warnings on session idle via TUI/HTTP toast by default (configure_warnings_delivery). Avoid createUserMessage during first tool turn to prevent provider switch and hangs. Regenerate schema and document the new option in README and pi-plugin config.
There was a problem hiding this comment.
3 issues found across 18 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/opencode-plugin/src/notifications.ts">
<violation number="1" location="packages/opencode-plugin/src/notifications.ts:695">
P2: Partial chat-delivery failures are incorrectly treated as full success, causing undelivered warnings to be marked as warned and never retried.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| formatConfigureWarningChat(warning), | ||
| { includeAgent: false }, | ||
| ); | ||
| delivered = delivered || ok; |
There was a problem hiding this comment.
P2: Partial chat-delivery failures are incorrectly treated as full success, causing undelivered warnings to be marked as warned and never retried.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/opencode-plugin/src/notifications.ts, line 695:
<comment>Partial chat-delivery failures are incorrectly treated as full success, causing undelivered warnings to be marked as warned and never retried.</comment>
<file context>
@@ -613,7 +638,63 @@ function formatConfigureWarning(warning: ConfigureWarning): string {
+ formatConfigureWarningChat(warning),
+ { includeAgent: false },
+ );
+ delivered = delivered || ok;
+ }
+ return delivered;
</file context>
Merge cortexkit/aft main. Resolve README and notifications conflicts: keep upstream warnedStatus dedup and model pinning for normal messages; configure warnings use toast idle delivery or per-message chat with per-success recordWarning. Fix chat partial-delivery marking, Unix executable checks in tool_path, and PATH test isolation.
detect_type_checker_go accepts absolute paths from tool_path resolution. Add tests for chat partial dedup, omitted agent/model, toast without TUI, and enqueue/idle flush lifecycle.
Align semantic integration tests with v0.32 degraded grep fallback, normalize CRLF in compress/structure fixture assertions for Windows bind mounts, poll bash promote drain and kill_all grandchild exit, resolve aft.exe in plugin e2e helpers, and normalize path suffix checks in search contract tests.
There was a problem hiding this comment.
1 issue found across 7 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/opencode-plugin/src/notifications.ts">
<violation number="1" location="packages/opencode-plugin/src/notifications.ts:695">
P2: Partial chat-delivery failures are incorrectly treated as full success, causing undelivered warnings to be marked as warned and never retried.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Pass grandchild pid file via env instead of single-quoted shell interpolation. Use F_OK for .exe on Windows. Normalize helpers.ts to LF for CI biome lint.
Resolve merge conflicts: - configure.rs: keep PR's should_warn_missing_* gating, discard main's resolve_tool_uncached/ruff_format_available duplicates - format.rs: keep PR's resolve_on_path/probe_tool_in_dir extraction Fix CI lint failures: - notifications.ts: remove ! non-null assertion on warnings[0] - bash.test.ts: remove unused pool destructure - pi-plugin bash.test.ts: remove unused waitForFileText + readFile import
…ngs-and-path # Conflicts: # crates/aft/tests/integration/semantic_test.rs # packages/opencode-plugin/src/__tests__/e2e/helpers.ts
- Restore upstream test bodies for semantic_search_falls_back_to_lexical* tests - Remove unused assert_semantic_disabled_degraded_fallback helper
…ngs-and-path # Conflicts: # crates/aft/src/lsp/registry.rs # crates/aft/tests/integration/aft_search_contract_test.rs
…ngs-and-path # Conflicts: # crates/aft/src/commands/configure.rs # crates/aft/src/format.rs
- Set core.autocrlf=false to prevent line ending conversion - Fix biome import ordering in index.ts (configure-warnings moved before hooks) - Fix biome format in notifications.ts (collapse multi-line call to single line) - Fix biome trailing newline in bash.test.ts - Fix cargo fmt: remove 2 extra blank lines in format.rs
Golden files checked out on Windows CI carry \r\n line endings, but the Rust process produces \n. Normalize both sides before byte-for-byte comparison to prevent 107 false drift failures on Windows CI.
The cross-filesystem move test consistently times out at 60s on Linux CI runners. Add send_with_timeout() helper and use 120s timeout for this specific test.
…ions
The file-refresh-after-watcher-invalidation test used .ends_with("src/a.rs")
and .contains("src/a.rs") which fails on Windows where paths use backslashes.
Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
…onfigure path
- Remove platform-conditional TARGET_DEBUG_BINARY_EXE/FALLBACK_BINARY_EXE
from helpers.ts debugBinaryCandidates/fallbackBinaryCandidates (these
constants were never declared, causing ReferenceError on Windows CI)
- Change move_file_cross_fs_copy_delete_failure configure from Path::new("/")
to src_tmp.path() to match the actual test project root
- Update ARCHITECTURE.md and STRUCTURE.md to reflect current codebase state
|
You're iterating quickly on this pull request. To help protect your rate limits, cubic has paused automatic reviews on new pushes for now—when you're ready for another review, comment |
…test
Path::new('/') is not absolute on Windows, causing debug_assert failure.
Use std::env::temp_dir() which returns absolute path on all platforms.
|
@cubic-dev-ai review |
@ualtinok I have started the AI code review. It will take a few minutes to complete. |
- Revert the max_depth(Some(8)) cap I added: 35745c8 deliberately removed it (and added configure_watcher_honors_deep_nested_aftignore, .aftignore 10 levels deep). PR #72 already fixed the move_file timeout by configuring against a tempdir root instead of '/', so the cap is unnecessary and regressed the deep-ignore feature. - Drop unused Path import in semantic_validation_test.rs and rustfmt helpers/mod.rs send_with_timeout (both from #72; its CI runs cargo test --workspace, not clippy -D warnings, so they slipped).
|
That was quick merge! :D |
Summary
After
aft configure, users with formatting disabled still saw formatter/checker warnings, OpenCode could switch providers and hang when warnings fired on the first tool turn, and Windows installs of Biome/Ruff via npm were reported missing even when on PATH. This PR gates warnings on real edit settings, delivers them via idle-time toasts (not session chat), and shares robust PATH resolution across configure, format, and LSP.Bugs, root causes, and fixes
format_on_edit: false, novalidate_on_edit)configure.rsalways randetect_missing_tools_for_languagesfrom project config (biome.json, etc.) without checkingformat_on_edit/validate_on_editformat_on_editor explicitformatter.<lang>; gate checker warnings onvalidate_on_edit(syntax/full) or explicitchecker.<lang>. Integration tests cover the disabled-format path.deliverConfigureWarningscalledsendIgnoredMessagewith the resolved agent during the first tool turn (setTimeout(0)), which can emitModelSwitched/AgentSwitchedeven withnoReply: truesession.idle. Default delivery is a 10s TUI/HTTP toast (configure_warnings_delivery: "toast"). Chat delivery omitsagentto avoid switch side effects.configure.rs(no PATHEXT /node_modules/.bin/ well-known dirs); duplicate logic vsformat.rstool_pathmodule: PATH walk, PATHEXT, well-known Windows dirs (npm, nodejs, pnpm, cargo, go, scoop).format.rsandlsp/registry.rsuse it; configure usesformat::tool_available_for_missing_warning().Config note: There is no top-level
formatterskey. Useformat_on_edit,formatter,checker, and optionalconfigure_warnings_delivery(toast|log|chat, defaulttoast). Documented in README, pi-plugin README, Zod schemas, and regeneratedassets/aft.schema.json.Test plan
cargo test— configure gating and tool_path-related unit/integration testsaft configurewithformat_on_edit: false→ no formatter missing warnings unlessformatterset%APPDATA%\npmBiome detected when global install presentSummary by cubic
Gates configure-time missing-tool warnings on real edit settings and delivers them as a single toast after the session goes idle. Unifies cross‑platform tool discovery across configure/format/LSP to prevent false “not installed” alerts, especially on Windows.
Bug Fixes
format_on_editor explicitformatter.<lang>; gate checker warnings onvalidate_on_edit(syntax/full) or explicitchecker.<lang>.tool_pathfor Windows/POSIX used byconfigure,format, and LSP: PATH resolution viawhich+ manual walk; well‑known Windows dirs (npm, Node.js, pnpm,.cargo\bin,go\bin,scoop\shims, Go SDK). Checker detection accepts absolute paths; Ruff requires a format‑capable version..exeprobing withF_OK; PATH‑isolated binary discovery; poll drain for bash completion; extend cross‑FSmove_filetimeout to 120s; fix e2e aft binary resolution on Windows; use correct project root inmove_filetest; use cross‑platform absolute path in semantic index dimension test; ignore.qartez/.New Features
configure_warnings_delivery:toast(default),log, orchat. Documented indocs/config.md, added topackages/opencode-pluginandpackages/pi-pluginschemas, and reflected inassets/aft.schema.json.Written for commit ec3fcf1. Summary will update on new commits.