Repository navigation
fix(setup-hints): update first_three_launches_can_include_hotkey_notice_too to assert retired spawn-notice behavior (#139) - #140
Conversation
…per (#136) PR #128 ("refactor(setup-hints): remove unreachable startup spawn notice") removed the only call site of `StartupHints::with_spawn_notice`, leaving the helper as a dead-code associated function. The session doc `docs/sessions/2026-10-18-resume-reland/00_SESSION_OVERVIEW.md` (~line 113) records this leftover as an explicit follow-up. The CI "Quality Guardrails" check now fails with: error: associated function `with_spawn_notice` is never used --> crates/jcode-setup-hints/src/lib.rs:201:8 Delete the `with_spawn_notice` associated function entirely. No `#[allow(dead_code)]` — the call path is gone, the function should go too. Aggressive-change policy: remove, do not silence. Preserved: - `StartupHints::with_status_and_display` (used in 7+ call sites) - `SetupHintsState::startup_spawn_hint_dismissed` (state-file serde compat) - `fn startup_hints_for_launch(_state: &SetupHintsState) -> Option<StartupHints>` (callers at lib.rs:1353 + setup_hints_tests.rs depend on the signature) - `StartupHints::status_notice` field — read by `src/cli/tui_launch.rs:244` and `crates/jcode-setup-hints/src/setup_hints_tests.rs:272`, NOT dead. Validation: - cargo clippy -p jcode-setup-hints --all-targets --all-features -- -D warnings: exit 0 - cargo fmt -p jcode-setup-hints -- --check: exit 0 - cargo test -p jcode-setup-hints --lib: same pre-existing platform-specific failures as master; no new failures introduced. The one setup_hints_test failure (`first_three_launches_can_include_hotkey_notice_too`) was already broken by PR #128 and is out of scope here. Closes #136 tx-agent: jcode tx-validated: test tx-task: #136 tx-scope: jcode-setup-hints tx-intent: remove orphaned with_spawn_notice to clear CI Quality Guardrails dead-code error
…ce_too to assert retired spawn-notice behavior (#138) PR #128 ("refactor(setup-hints): remove unreachable startup spawn notice", commit 081c1cf) retired the macOS launch-hotkey spawn notice. The function `startup_hints_for_launch` now always returns `None`, with a comment explaining the prior gate (`if !hotkey_configured || dismissed`) was unreachable because the crate never wrote `startup_spawn_hint_dismissed = false` (the field defaults to `true` in `SetupHintsState::default()`). The test `first_three_launches_can_include_hotkey_notice_too` was always broken — even before PR #128, its `hotkey_configured: true` state with `..SetupHintsState::default()` produced `dismissed = true`, which would short-circuit the gate to `None`. PR #128 itself acknowledged this in its commit message ("the macOS test was already failing on master for an unrelated reason — the test relies on a spawn notice that was dead code by the time it was written"). Fix the test to assert the post-#128 behavior: `startup_hints_for_launch` returns `None` regardless of `hotkey_configured` or `startup_spawn_hint_dismissed`. Kept the `#[cfg(target_os = "macos")]` gate so the test remains macOS-only, symmetric with other launch-hotkey notice tests in this file. Updated the docstring to record the PR #128 provenance so the test's intent is obvious to future maintainers. Also cherry-picks PR #137 (dead-code removal of `StartupHints::with_spawn_notice`) onto this branch so the branch satisfies `cargo clippy ... -D warnings` — that helper was the only `dead_code` warning in the crate, and PR #128's test retirement leaves the crate with the warning active. Both commits are required for clippy to pass. Diff scope: - crates/jcode-setup-hints/src/setup_hints_tests.rs: test body + docstring (+17/-11) - crates/jcode-setup-hints/src/lib.rs (cherry-picked from PR #137): -8 lines Validation: - cargo clippy -p jcode-setup-hints --all-targets --all-features -- -D warnings: exit 0 - cargo fmt -p jcode-setup-hints -- --check: exit 0 - cargo test -p jcode-setup-hints --lib setup_hints_tests::first_three_launches_can_include_hotkey_notice_too: ok - cargo test -p jcode-setup-hints --lib: 144 passed, 5 failed; same 5 pre-existing platform-specific failures as on origin/master (linux_env x2, linux_niri x2, macos_launcher x1) — none caused by this change. Closes #138 tx-agent: jcode tx-validated: test tx-task: #136 tx-scope: jcode-setup-hints tx-intent: update PR #128 broken test to assert retired spawn-notice behavior
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 55 minutes. View limit details
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. CodeRabbit Verify
|
CodeAnt Nitpicks1 code suggestion1. With this flag true, the retired gate also returns
|
|
FYI: the docs commit ( This PR (#140) is now back to its original two-file setup-hints-only diff, exactly as originally intended. No code changes here; the docs commit was reparented via cherry-pick, not rewritten. No action requested on this PR. |
| // function must still return None — the spawn notice was retired, | ||
| // not gated. Re-introducing a hotkey-notice gate here would require | ||
| // also fixing this assertion. | ||
| startup_spawn_hint_dismissed: true, |
There was a problem hiding this comment.
WARNING: The regression guard is weakened by setting startup_spawn_hint_dismissed: true. The retired gate was if !hotkey_configured || dismissed { None }, so with dismissed = true the assertion still passes even if that gate is reintroduced with the wrong default. Set it to false so the test actually catches a re-introduced gate that fails to suppress the notice.
| startup_spawn_hint_dismissed: true, | |
| startup_spawn_hint_dismissed: false, |
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (2 files)
Fix these issues in Kilo Cloud Reviewed by free · Input: 50.5K · Output: 1.4K · Cached: 182.1K |
crates/jcode-setup-hints/src/lib.rs conflicted because master added an #[allow(dead_code)] attribute to the private StartupHints::with_spawn_notice helper while this branch deleted the helper outright. Took the branch side: with_spawn_notice has no caller anywhere in the crate, so deleting it (rather than silencing the warning with an attribute) is the resolution that preserves the branch's intent and leaves no dead code. tx-agent: jcode tx-validated: manual tx-scope: crates/jcode-setup-hints/src/lib.rs tx-intent: Delete the uncalled with_spawn_notice helper so this branch merges into master cleanly
…olved conflicts The recomputed residuals (recomputed against origin/master 2aea04d via git merge-tree --write-tree) now cover 12 open PRs in the KCode stack. The four PRs previously flagged as needing hand-resolved conflicts (#140, #127, #157, #158) have already been merged against origin/master by a parallel agent as real 2-parent merge commits at d6e4cfa, b6508e6, 264c09a, and 47b42e2 respectively; merge-tree reports zero conflict markers for all four. Two new PRs (#163 transport pipe-stem, #164 CI timeout headroom) extend the stack to 12. The CI Quality Guardrails clippy gate has a coverage gap that no existing PR fixes: the command is 'cargo clippy --all-targets --all-features -- -D warnings' with no --workspace, so exactly one workspace member (jcode-sdk) is unreachable from the root package and is never linted. In the green run id 39390720989 the cargo test -p jcode-sdk parity step still emitted the 'never used' warning for the Subscriber alias at crates/jcode-sdk/src/client.rs:330. The --workspace change is NOT a no-op and may surface additional pre-existing violations; this is recorded as an OPEN RISK, not a resolved fact. The KCode self-hosted runner desk-kcode-1 wedged on 2026-10-21 in the Build & Test (desk-linux) job of run 39530002307. Root cause: the desk WSL2 instance is capped by .wslconfig at memory=16GB (not the 64GB the Windows host has), was competing with a 1h43m orphaned cargo llvm-cov --workspace job, and the Build step in .github/workflows/ci.yml has no per-step run_with_timeout.py wrapper. Remediation (terminating the orphan) brought memory from 13.9/16 GB to 9.4/16 GB and recovered the runner. Detailed conflict resolutions and the runner wedge root-cause analysis moved to a new companion file 05a_MERGE_EVIDENCE.md so the plan itself fits the 500-line cap. tx-agent: jcode tx-validated: manual tx-scope: docs/sessions/2026-10-19-orchestration-governance/ tx-intent: Refresh the merge plan against recomputed 12-PR residuals + 4 applied conflict resolutions + clippy coverage gap + runner wedge
|
… plan (#375) * docs(sessions): add cross-harness orchestration governance proposal Proposes 4 enforcement mechanisms for the "Always Subagent — main context is management-only" operator directive (2026-10-11 21:08); records the 2026-10-19 manual cross-harness propagation of the rule to all 4 derivative AGENTS.md copies (codex, forge, kcode, helioslite); lists operator-approved next steps (none yet; each mechanism awaiting decision). tx-agent: jcode tx-validated: manual tx-task: governance-2026-10-19 tx-scope: docs/sessions/2026-10-19-orchestration-governance tx-intent: capture the cross-harness propagation decision + enforcement backlog in the repo * docs(sessions): add fix-forward merge integration plan for the KCode PR stack tx-agent: jcode tx-validated: manual tx-task: governance-2026-10-19 tx-scope: docs/sessions/2026-10-19-orchestration-governance tx-intent: give the operator a no-force-push merge order for PRs #152/#127/#140/#148/#129/#132/#134/#150/#145 * docs(ci): rebuild the merge integration plan against master 2aea04d tx-agent: jcode tx-validated: manual tx-task: 143 tx-scope: docs/sessions/2026-10-19-orchestration-governance tx-intent: replace the stale 2026-10-19 PR stack plan with one built from current master ground truth * docs(ci): rebuild the merge integration plan against master 2aea04d tx-agent: jcode tx-validated: manual tx-task: 143 tx-scope: docs/sessions/2026-10-19-orchestration-governance tx-intent: replace the stale 2026-10-19 PR stack plan with one built from current master ground truth * docs(merge): refresh the merge plan with the recomputed stack and resolved conflicts The recomputed residuals (recomputed against origin/master 2aea04d via git merge-tree --write-tree) now cover 12 open PRs in the KCode stack. The four PRs previously flagged as needing hand-resolved conflicts (#140, #127, #157, #158) have already been merged against origin/master by a parallel agent as real 2-parent merge commits at d6e4cfa, b6508e6, 264c09a, and 47b42e2 respectively; merge-tree reports zero conflict markers for all four. Two new PRs (#163 transport pipe-stem, #164 CI timeout headroom) extend the stack to 12. The CI Quality Guardrails clippy gate has a coverage gap that no existing PR fixes: the command is 'cargo clippy --all-targets --all-features -- -D warnings' with no --workspace, so exactly one workspace member (jcode-sdk) is unreachable from the root package and is never linted. In the green run id 39390720989 the cargo test -p jcode-sdk parity step still emitted the 'never used' warning for the Subscriber alias at crates/jcode-sdk/src/client.rs:330. The --workspace change is NOT a no-op and may surface additional pre-existing violations; this is recorded as an OPEN RISK, not a resolved fact. The KCode self-hosted runner desk-kcode-1 wedged on 2026-10-21 in the Build & Test (desk-linux) job of run 39530002307. Root cause: the desk WSL2 instance is capped by .wslconfig at memory=16GB (not the 64GB the Windows host has), was competing with a 1h43m orphaned cargo llvm-cov --workspace job, and the Build step in .github/workflows/ci.yml has no per-step run_with_timeout.py wrapper. Remediation (terminating the orphan) brought memory from 13.9/16 GB to 9.4/16 GB and recovered the runner. Detailed conflict resolutions and the runner wedge root-cause analysis moved to a new companion file 05a_MERGE_EVIDENCE.md so the plan itself fits the 500-line cap. tx-agent: jcode tx-validated: manual tx-scope: docs/sessions/2026-10-19-orchestration-governance/ tx-intent: Refresh the merge plan against recomputed 12-PR residuals + 4 applied conflict resolutions + clippy coverage gap + runner wedge



User description
Summary
Fixes the always-broken test
setup_hints_tests::first_three_launches_can_include_hotkey_notice_tooso it asserts the post-PR-#128 behavior ofstartup_hints_for_launch(always returnsNone). Also carries the dead-code removal ofStartupHints::with_spawn_noticefrom PR #137 so the branch satisfiescargo clippy -p jcode-setup-hints --all-targets --all-features -- -D warnings.Root cause
The test was always broken — even before PR #128. The original
startup_hints_for_launchgated onif !hotkey_configured || _state.startup_spawn_hint_dismissed { None } else { Some(notice) }, and the test's constructed state{ hotkey_configured: true, ..SetupHintsState::default() }inheritedstartup_spawn_hint_dismissed: truefrom default — short-circuiting the gate toNone. PR #128 retired the spawn notice entirely; its commit message explicitly acknowledged this test was already failing on master for that reason ("the test relies on a spawn notice that was dead code by the time it was written").Decision
Test was wrong, not production. PR #128 was deliberate and correct: the gate was demonstrably unreachable (nothing in the crate wrote
startup_spawn_hint_dismissed = false). The repo's aggressive-change policy forbids backwards-compat shims, so re-introducing a working gate would require also wiring up a state writer to flip the default tofalseon first launch — out of scope here. The right fix is to update the test.Fix
first_three_launches_can_include_hotkey_notice_tooto assertstartup_hints_for_launch(&state).is_none()for a state with bothhotkey_configured: trueandstartup_spawn_hint_dismissed: true. Updated docstring to record PR refactor(setup-hints): remove unreachable startup spawn notice #128 provenance. Kept the#[cfg(target_os = "macos")]cfg so the test stays macOS-only, symmetric with the other launch-hotkey notice tests in the file.StartupHints::with_spawn_noticehelper (-8 lines). Strictly required forcargo clippy -D warningsto exit 0.Validation
cargo test -p jcode-setup-hints --lib setup_hints_tests::first_three_launches_can_include_hotkey_notice_toocargo test -p jcode-setup-hints --liborigin/master(linux_env x2, linux_niri x2, macos_launcher x1). No new failures introduced.cargo clippy -p jcode-setup-hints --all-targets --all-features -- -D warningscargo fmt -p jcode-setup-hints -- --checkLedger
Closes #139
CodeAnt-AI Description
Keep startup hint checks aligned with the retired hotkey notice
What Changed
Impact
✅ No obsolete hotkey notice expected at launch💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.