Skip to content

feat(learn): common build/test/dev/run/debug commands - #51

Merged
baanish merged 9 commits into
masterfrom
feat/learn-common-commands
Jul 23, 2026
Merged

feat(learn): common build/test/dev/run/debug commands#51
baanish merged 9 commits into
masterfrom
feat/learn-common-commands

Conversation

@baanish

@baanish baanish commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • qr learn now populates common developer-loop commands into .qr/profile.json: dev_command, run_command, debug_command, plus richer scripts defaults.
  • Hardcoded language defaults (Cargo, Go, Python, Node) are overridden by manifests (package.json scripts, lockfile package managers, framework detection) and supplemented by Makefile / Justfile targets without clobbering existing keys.
  • .qr.toml can override the new fields; old profiles without them still load.

Test plan

  • cargo test
  • cargo clippy --all-targets --locked -- -D warnings
  • cargo fmt --all -- --check
  • Manual: cd a Rust project → qr learn → confirm dev/run/debug in profile and summary
  • Manual: Node Next app without scripts → framework defaults use direct tools (next dev), not pnpm <missing>

Summary by CodeRabbit

  • New Features
    • qr learn now writes richer dev/run/debug command details to ./.qr/profile.json, with language- and framework-aware defaults (and honors .qr.toml overrides).
    • The qr learn summary output now includes Dev/Run/Debug when available.
  • Bug Fixes
    • Corrected framework detection/qualification for Node and Python (e.g., main.py no longer misclassified as FastAPI).
    • Improved Makefile/Justfile target merging and skip non-command assignments; cargo run/go run . are recorded when no runnable root exists.
  • Documentation
    • Updated README and changelog to reflect the expanded qr learn behavior and output.

qr learn now fills the developer loop into .qr/profile.json using
language defaults overridden by package.json, Cargo.toml, pyproject,
go.mod, Makefile, and Justfile — so qr do gets richer project context.
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@baanish, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0dc95855-5c87-4a2e-b4ce-5771bdb2d399

📥 Commits

Reviewing files that changed from the base of the PR and between 51fbb16 and 00d6a8f.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • README.md
  • src/project_profile.rs
📝 Walkthrough

Walkthrough

qr learn now records and prints dev_command, run_command, and debug_command in project profiles. Detection expands across Node, Rust, Go, and Python, script merging is broadened, and tests, docs, and changelog text were updated.

Changes

qr learn Profile Command Detection

Layer / File(s) Summary
Schema and overrides
src/project_profile.rs
Adds optional dev, run, and debug command fields to the profile schema and override shape, with serde defaults and override application.
Baseline detection and script merge
src/project_profile.rs
Refactors profile detection to start from a baseline profile, merge Makefile and Justfile targets into scripts, and fill top-level role commands from merged scripts.
Node, Rust, and Go detection
src/project_profile.rs
Reworks Node script qualification and framework defaults, expands Rust command inference and scripts, and gates Go run/dev/debug commands on runnable root packages.
Python detection
src/project_profile.rs
Adds Python package-manager detection, dependency-based framework inference, richer default scripts, and prefixed dev/run/debug command generation.
CLI output, docs, and profile tests
src/commands/learn.rs, src/commands/do_cmd.rs, README.md, CHANGELOG.md, tests/cli.rs, src/project_profile.rs
Prints the new command fields in learn output, updates README and changelog text, and extends profile-generation and override tests for the new fields.

Test environment isolation

Layer / File(s) Summary
Env lock guards
src/ai/client.rs, src/config.rs
Locks the shared test environment and clears relevant QR environment variables before running affected config and AI client tests.

Estimated code review effort: 4 (Complex) | ~60 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding common learnable build/test/dev/run/debug commands.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/learn-common-commands

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/project_profile.rs`:
- Around line 306-327: The framework detection logic in the project profile
classifier is incorrectly treating plain main.py projects as FastAPI. Update the
framework selection branch in the function that builds the `framework` value so
that `main.py` without matching FastAPI/Flask dependency hints returns `None`
instead of `Some("fastapi")`; keep the existing `manage.py` and explicit
dependency-based detections unchanged.
- Around line 744-766: The Makefile parsing loop in the project profile logic is
misclassifying recipe lines and variable assignments as targets. In the
script-detection pass, update the trimming/guard logic in the raw line scan so
recipe body lines are excluded before any colon-based parsing, and tighten the
name filter in the same loop to reject Makefile assignment forms like := and ?=
in addition to plain =. Keep the fix localized around the line-processing code
that uses raw.lines(), split_once(':'), and insert_default(scripts, ...), so
only real target headers are learned as scripts.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8f5c9f19-686b-47aa-bc47-5b2dc445d22c

📥 Commits

Reviewing files that changed from the base of the PR and between a5980d6 and d4a503e.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • README.md
  • src/commands/do_cmd.rs
  • src/commands/learn.rs
  • src/project_profile.rs
  • tests/cli.rs

Comment thread src/project_profile.rs Outdated
Comment thread src/project_profile.rs Outdated
Comment thread src/project_profile.rs Outdated
if line.is_empty() || line.starts_with('#') || line.starts_with('\t') {
continue;
}
let Some(name) = line.split_once(':').map(|(n, _)| n.trim()) else {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: Makefile variable assignments using := are misidentified as targets.

A line like VERSION := 1.2.3 is split on the first :, yielding name = "VERSION". The filter below checks name.contains('='), but the = lives in the remainder after the colon, so it passes and a bogus make VERSION entry is added to scripts. Consider skipping the line when the remainder after : starts with = (a := assignment rather than a target rule).


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Comment thread src/project_profile.rs
continue;
}
// Only treat as recipe if the line has a colon (recipe header).
if !line.contains(':') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: Justfile assignments and set/export settings are misidentified as recipes.

Lines like foo := "bar", set shell := ["bash","-cu"], or export RUST_BACKTRACE := "1" contain a colon (from :=), so the line.contains(':') gate admits them and a bogus just foo / just set / just export entry is added to scripts. The colon check should distinguish a recipe header (name:) from a := assignment, e.g. by ensuring the matching : is not part of :=.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0

The latest commit (806768f) correctly removed the unsupported riscv64 from the Linux race-detector match arm and added regression tests. However, the remaining previously-reported defect still stands: linux/loong64 is kept in the supported list even though Go's race detector does not support it, so go run -race . can still be recorded as a debug command for a target where it will fail. The prior loong64 inline comment is now outdated (no anchored line), so it has been re-anchored on the current changed line below.

Issue Details (click to expand)

WARNING

File Line Issue
src/project_profile.rs 908 loong64 is not a race-detector-supported target; go run -race . still fails on linux/loong64 despite the cgo gating.
Files Reviewed (1 file)
  • src/project_profile.rs - 1 issue

Fix these issues in Kilo Cloud

Previous Review Summaries (4 snapshots, latest commit 7c6e83a)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 7c6e83a)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0

The new commit (7c6e83a) correctly gates the Go debug_command on go_race_detector_supported, strips the Just @ quiet prefix to its callable recipe name, and adds covering tests. One new defect remains: the race-detector support table lists linux/loong64, which Go does not actually support, so a go run -race . debug command can still be recorded on an unsupported target.

Issue Details (click to expand)

WARNING

File Line Issue
src/project_profile.rs 908 loong64 is not a race-detector-supported target; go run -race . will fail on linux/loong64 despite cgo_enabled.
Files Reviewed (1 file)
  • src/project_profile.rs - 1 issue

Fix these issues in Kilo Cloud

Previous review (commit 51fbb16)

Status: No Issues Found | Recommendation: Merge

The previously reported warning on src/project_profile.rs (explicit [[bin]] without path falling back to src/main.rs without a name == package_name guard) is resolved by commit 51fbb16, which adds the if package_name == Some(name) guard before including src/main.rs as a candidate. The accompanying ? short-circuit on an unresolved bin is sound: it only triggers for Cargo manifests whose declared bin source cannot be located, in which case cargo run would fail to build anyway, so emitting no run command is the correct behavior.

Files Reviewed (1 file)
  • src/project_profile.rs

Previous review (commit 9f8a6c3)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
src/project_profile.rs 365 Explicit [[bin]] without path falls back to src/main.rs with no name == package_name guard, emitting cargo run for a crate where cargo run would fail to locate the declared bin
Files Reviewed (4 files)
  • CHANGELOG.md - 0 issues
  • src/ai/client.rs - 0 issues
  • src/config.rs - 0 issues
  • src/project_profile.rs - 1 issue

Fix these issues in Kilo Cloud

Previous review (commit d4a503e)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
src/project_profile.rs 749 Makefile := variable assignments misidentified as targets, producing bogus make <VAR> script entries
src/project_profile.rs 802 Justfile := assignments and set/export lines misidentified as recipes, producing bogus just <name> script entries
Files Reviewed (6 files)
  • CHANGELOG.md - 0 issues
  • README.md - 0 issues
  • src/commands/do_cmd.rs - 0 issues
  • src/commands/learn.rs - 0 issues
  • src/project_profile.rs - 2 issues
  • tests/cli.rs - 0 issues

Fix these issues in Kilo Cloud


Reviewed by glm-5.2-short · Input: 28.8K · Output: 15.5K · Cached: 868K

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d4a503ea68

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/project_profile.rs Outdated
Comment on lines +681 to +682
if is_node {
qualify_script_command(profile.package_manager.as_deref(), key, Some(body.as_str()))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve make/just role commands in Node profiles

When a Node project has no package.json script for a role but does have a Makefile/Justfile target, the merge step adds entries like build -> make build or build -> just build to scripts. This branch then treats every Node scripts entry as a package script and promotes it to npm run build/pnpm build, which fails because the package script still does not exist; preserve the merged command body for non-package entries instead of qualifying it.

Useful? React with 👍 / 👎.

Comment thread src/project_profile.rs Outdated
insert_default(scripts, "dev", "next dev");
insert_default(scripts, "build", "next build");
insert_default(scripts, "start", "next start");
insert_default(scripts, "lint", "next lint");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid defaulting Next lint to a removed command

For Next.js 16 projects that omit a lint script, this fallback writes lint_command/scripts.lint as next lint. Next.js v16 removed that command (see https://nextjs.org/docs/app/guides/upgrading/version-16#next-lint-command), so in that scenario qr learn suggests a command that fails; only derive lint from an existing script/config or use ESLint/Biome directly.

Useful? React with 👍 / 👎.

Comment thread src/project_profile.rs Outdated
Comment on lines +801 to +805
// Only treat as recipe if the line has a colon (recipe header).
if !line.contains(':') {
continue;
}
insert_default(scripts, name, &format!("just {name}"));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require real Just recipe headers before inserting scripts

In Justfiles with top-level variables or aliases such as target := "main" or alias b := build (documented Just syntax), this check only requires any colon in the line and then inserts just target or just alias as if it were a recipe. If one of these names is test/build in a project without another role command, qr learn promotes a non-existent recipe to the top-level command; reject assignments/aliases or use just --summary-equivalent parsing.

Useful? React with 👍 / 👎.

Comment thread src/project_profile.rs Outdated
Comment on lines +290 to +292
dev_command: Some("cargo run".into()),
run_command: Some("cargo run".into()),
debug_command: Some("RUST_BACKTRACE=1 cargo run".into()),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Gate Cargo run commands on binary targets

For Cargo libraries or virtual workspaces that have Cargo.toml but no runnable binary target, these new role commands still get set to cargo run, so qr learn records dev/run/debug commands that fail with Cargo's no-bin-target error. Only populate these run-oriented fields when the manifest or entry points show a binary target, otherwise leave them unset or use a non-running Cargo command.

Useful? React with 👍 / 👎.

Comment thread src/project_profile.rs Outdated
Comment on lines +463 to +465
dev_command: Some("go run .".into()),
run_command: Some("go run .".into()),
debug_command: Some("go run -race .".into()),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Gate Go run commands on root main packages

For Go modules whose executable lives under cmd/ or whose root package is not main, the new dev/run/debug fields are still go run ./go run -race ., which fails from the module root even though go build ./... and go test ./... work. Since this code already detects cmd/ as an entry point, avoid emitting root go run . unless the root directory is actually runnable.

Useful? React with 👍 / 👎.

Comment thread src/project_profile.rs Outdated
Comment on lines +354 to +356
let dev = format!("uvicorn {app} --reload");
let run = format!("uvicorn {app}");
let debug = format!("uvicorn {app} --reload --log-level debug");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Don't run plain Python scripts through uvicorn

For any Python project with a root main.py but no FastAPI/Flask dependency, the existing heuristic still marks the framework as fastapi, and these new commands then record uvicorn main:app. A typical script-style main.py has no ASGI app, so the learned dev/run/debug commands fail; reserve the uvicorn defaults for projects that actually declare or expose an ASGI app, and let plain main.py use the fallback Python command.

Useful? React with 👍 / 👎.

Comment thread src/project_profile.rs
Comment on lines +390 to +394
let prefix = match package_manager.as_deref() {
Some("uv") => Some("uv run"),
Some("poetry") => Some("poetry run"),
Some("pdm") => Some("pdm run"),
_ => None,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Prefix Pipenv commands with pipenv run

When a project has a Pipfile, detection now records package_manager = "pipenv", but this prefix table leaves the learned commands as bare pytest, ruff, or uvicorn. Pipenv's command reference describes run as running a command within the virtual environment (https://pipenv.pypa.io/en/latest/commands.html), so these commands can fail whenever the tools are installed only in the Pipenv environment; add pipenv run to the same prefix handling.

Useful? React with 👍 / 👎.

Comment thread src/project_profile.rs Outdated
if line.is_empty() || line.starts_with('#') || line.starts_with('\t') {
continue;
}
let Some(name) = line.split_once(':').map(|(n, _)| n.trim()) else {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Skip Make variable assignments when merging targets

Makefiles commonly use := for variable assignments (GNU make documents this assignment form at https://ftp.gnu.org/old-gnu/Manuals/make-3.79.1/html_chapter/make_6.html), but this parser splits at the colon and validates only the left side. A line like test := pytest is therefore recorded as make test; in a project without another test command, fill_role_commands_from_scripts promotes a non-existent target and the learned command fails.

Useful? React with 👍 / 👎.

Skip Makefile/Justfile assignments, avoid inventing next lint or
FastAPI for plain main.py, preserve make/just bodies on Node, gate
cargo/go run on real binaries, and prefix Pipenv commands.

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
cursoragent and others added 3 commits July 9, 2026 09:12
Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
…8f67

fix(learn): address PR #51 review findings
Comment thread src/project_profile.rs Outdated
let candidates = [
root.join("src/bin").join(format!("{name}.rs")),
root.join("src/bin").join(name).join("main.rs"),
root.join("src/main.rs"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: Explicit [[bin]] without a path resolves src/main.rs as a fallback candidate with no name == package_name guard

For an explicit [[bin]] name = "worker" (no path) where src/bin/worker.rs and src/bin/worker/main.rs are absent but src/main.rs exists, this third candidate resolves the bin's path to src/main.rs. That path is then pushed into explicit_paths, which makes the autobins block skip re-adding src/main.rs as the package-named bin (line 409), leaving bins == ["worker"] and emitting cargo run.

But Cargo does not use src/main.rs as the path for a non-package-name explicit bin: with no path it only looks at src/bin/{name}.rs then src/bin/{name}/main.rs, so cargo run would fail (can't find \worker` bin/ ambiguous). This contradicts the function's documented contract of emitting a run command "only when Cargo can choose one runnable binary without extra features or--bin." Guard the src/main.rsfallback ondeclared_name == package_name`.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

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

⚠️ Outside diff range comments (2)
src/project_profile.rs (2)

1708-1727: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve quiet recipe headers. @test: is still callable as just test; dropping @ here causes quiet recipes to be skipped when merging scripts.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/project_profile.rs` around lines 1708 - 1727, The recipe header parsing
in project_profile should preserve quiet recipes like `@test`: instead of
filtering them out during script merging. Update the logic around the name
validation and insert_default path so the leading @ is stripped or otherwise
handled before validation, while still allowing the recipe to be inserted under
the callable name test. Use the existing first, name, and insert_default flow to
make sure quiet recipe headers remain merged as scripts.

653-656: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Gate go run -race on race-detector support. Skip the debug script when the active GoBuildContext isn’t cgo-enabled or the GOOS/GOARCH pair doesn’t support -race; otherwise some targets end up with an unusable command.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/project_profile.rs` around lines 653 - 656, The `debug` script is always
being added with `go run -race`, but it should only be generated when the active
`GoBuildContext` can actually support the race detector. Update the script
insertion logic in the `root_is_main` block to check the current
`GoBuildContext` for cgo support and a GOOS/GOARCH combination that allows
`-race`, and skip inserting `debug` otherwise. Use the existing project/profile
generation flow around `scripts.insert` so unsupported targets don’t receive an
unusable command.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/project_profile.rs`:
- Around line 1708-1727: The recipe header parsing in project_profile should
preserve quiet recipes like `@test`: instead of filtering them out during script
merging. Update the logic around the name validation and insert_default path so
the leading @ is stripped or otherwise handled before validation, while still
allowing the recipe to be inserted under the callable name test. Use the
existing first, name, and insert_default flow to make sure quiet recipe headers
remain merged as scripts.
- Around line 653-656: The `debug` script is always being added with `go run
-race`, but it should only be generated when the active `GoBuildContext` can
actually support the race detector. Update the script insertion logic in the
`root_is_main` block to check the current `GoBuildContext` for cgo support and a
GOOS/GOARCH combination that allows `-race`, and skip inserting `debug`
otherwise. Use the existing project/profile generation flow around
`scripts.insert` so unsupported targets don’t receive an unusable command.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 865c0730-4162-43a5-8881-a8553b59eaa0

📥 Commits

Reviewing files that changed from the base of the PR and between 7a6f050 and 51fbb16.

📒 Files selected for processing (3)
  • src/ai/client.rs
  • src/config.rs
  • src/project_profile.rs

Comment thread src/project_profile.rs Outdated
let target_supported = match build_context.goos.as_str() {
"linux" => matches!(
build_context.goarch.as_str(),
"amd64" | "arm64" | "loong64" | "ppc64le" | "riscv64" | "s390x"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: loong64 is not a race-detector-supported target; recording go run -race . will fail.

Go's race detector (runtime/race) is only available on linux/amd64, linux/arm64, linux/ppc64le, linux/riscv64, linux/s390x, darwin/amd64, darwin/arm64, freebsd/amd64, netbsd/amd64, and windows/amd64. linux/loong64 is not in that documented set, yet with goos == "linux" and cgo_enabled == Some(true) this match arm returns true, so qr learn populates debug_command/scripts.debug with go run -race ., which fails with the race-detector-not-supported error this commit is meant to prevent.

Suggested change
"amd64" | "arm64" | "loong64" | "ppc64le" | "riscv64" | "s390x"
"amd64" | "arm64" | "ppc64le" | "riscv64" | "s390x"

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Comment thread src/project_profile.rs
let target_supported = match build_context.goos.as_str() {
"linux" => matches!(
build_context.goarch.as_str(),
"amd64" | "arm64" | "loong64" | "ppc64le" | "s390x"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

WARNING: loong64 is not a race-detector-supported target; go run -race . still fails

Go's race detector officially supports only linux/amd64, linux/arm64, linux/ppc64le, and linux/s390x (plus amd64 on freebsd/netbsd/windows, and amd64/arm64 on darwin). linux/loong64 is not in that set, so go run -race . errors with -race is not supported on linux/loong64. This commit correctly removed riscv64 but kept loong64, so a debug command is still recorded for an unsupported target. Drop "loong64" from this linux match arm, and update the go_race_detector_support_matches_current_go_exceptions test that currently asserts loong64 is supported.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@baanish
baanish merged commit b0d46d8 into master Jul 23, 2026
5 checks passed
@baanish
baanish deleted the feat/learn-common-commands branch July 23, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants