Repository navigation
fix(jcode-app-core): suppress 7 dead_code warnings on update_product public API - #127
Conversation
…public API All seven warnings were dead_code on functions/constants in the private update_product submodule that are not consumed outside the module: - GITHUB_REPO (constant) - update_repo, update_repo_for (resolvers) - fork_update_disallowed_error, resolve_update_repo (error helpers) - is_inside_git_repo (git-walk helper; update.rs has a duplicate local copy) - log_disabled (internal logger) Each is part of the documented product-identity API surface; the dead_code lint fires because non-test builds have no external callers. Adding #[allow(dead_code)] with a one-line rationale matches the existing pattern on is_fork_build (line 46) and avoids removing API surface that callers outside the crate may rely on later. Measured before: 7 warnings in update_product.rs (operator claim: 7 — match). Measured after: 0 warnings in update_product.rs; crate-wide 0 warnings. EXITCODE_check=0 EXITCODE_test=101 (17 unrelated pre-existing failures in tool::bash, tool::bridge_reload, tool::compile_remote, tool::desktop_selfdev, tool::selfdev, tool::tests, update::tests for sha256sum — none in update_product). All 8 update_product tests pass. Independent of PR #125 (resume-peer-drain) and issue #126. tx-agent: jcode tx-validated: test tx-task: warnings-update_product tx-scope: crates/jcode-app-core/src/update_product.rs tx-intent: clean up compile warnings on update_product.rs public API
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Reviewed by free · Input: 19K · Output: 661 · Cached: 95.5K |
Review: verified. One factual imprecision in the body, and the title wording is unfair to the actual change.I independently re-ran and re-read the evidence rather than trusting the body:
The change itself is right: 7 one-line Correction to the body's summary
That is true of six of the seven. Why the title should change"suppress 7 dead_code warnings" reads as hiding a real defect. It isn't one, which is exactly why the wording costs more than it saves. Suggested retitle: or, if the maintainer wants the reason in the subject rather than the body: One real gap this PR does not closeFour of the seven now-annotated items have no tests referencing them at all: Not blocking. The code change is good as-is; the title and the one-sentence body claim are what I want corrected. |
… head Deep re-derivation of every pass-5 claim against primary sources. THE BIG ONE: #132's head moved from 9ead396 to f8f4883, and the new head is a merge commit that brings in #129's branch. Verified by ancestry: 1922c0f (#129's head) IS an ancestor of f8f4883 (#132's head); the reverse does not hold. Both target master. Consequence: landing #132 now lands #129 too. The standing advice "split #129: land the rustfmt half, revert the env! half" is obsolete — that split has already happened inside #132. The operator's real choice is #127 plus ONE combined #132+#129 PR. Operator-call section updated; the old bullet kept struck through. Pass-5's results are therefore incomplete rather than wrong (the old head is a strict ancestor). Re-verified at the CURRENT heads: - isolation re-proven by file-set equality: #132 13/13, #129 10/10 exact match - attribution holds: build_resume_command tests 0 passed/2 failed on base, 2 passed on current #132 (EXIT 0). kitty_ test + #129 control still running. - #124 stat 524/352/66 confirmed twice AND the recorded command fixed: my pass-5 text used --json changed_files (not a real field; it is changedFiles) and claimed `changes` came from `gh pr view --json files` (it does not exist there, REST only). Numbers right, method wrong, now corrected. - #124 ci.yml re-parsed with yaml.safe_load (independent of my hand-rolled walker): 9 jobs, 3 if:false, 7 desk-routed. Refinement: only 6 of the 7 desk jobs are ENABLED (setup-friction is desk-routed and disabled), so 6 enabled jobs would queue forever on the offline runner, not 7. Non-desk enabled: none. - runner desk-kcode-1 still status=offline, busy=true, desk-linux label present, identical on two consecutive queries. Also recorded: worktree state (57 total, 54 baseline + 3 audit trees; zero prunable/locked/missing) and the fact that the main repo is NOT on master and moved twice mid-session (other agents switching branches), so it is not a reliable read-only baseline. Method lesson recorded: hardlink-cloning a warm target (cp -al) does NOT give parallel builds — all clones share one .cargo-lock inode (verified 958582255), so cargo serialises them. Safe but not parallel. tx-agent: jcode tx-validated: manual tx-scope: docs/sessions/2026-10-18-resume-reland tx-intent: Correct the landing advice now that #132 contains #129 tx-task: KCode open-PR landing audit
crates/jcode-app-core/src/update_product.rs had a single-line content conflict: both sides carry #[allow(dead_code)] on fn log_disabled but with different trailing comments. Took the branch comment, which is the accurate one -- log_disabled is called from update_repo_for (line 41), not from 'the gated resolver surface'. The attribute itself is unchanged and the other seven allow(dead_code) attributes on the fork-decollision public API surface are intact, so the resolved file is byte-identical to the branch's version. tx-agent: jcode tx-validated: manual tx-scope: crates/jcode-app-core/src/update_product.rs tx-intent: Keep the accurate log_disabled comment 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
fix(jcode-app-core): suppress 7 dead_code warnings on
update_productpublic APISummary
The prior audit reported 7 compiler warnings in
crates/jcode-app-core/src/update_product.rs. A fresh build fromorigin/master(6ff8aa2d1) reproduces exactly 7 warnings, all on the same file, with identical compiler text. The audit count is correct.All seven are
dead_code(#[warn(unused)]) onpubitems inside a private submodule (update_productis declaredmod update_product;incrates/jcode-app-core/src/update.rs:27) that have no external callers in the non-test build.Fix approach
Each warning is on a documented part of the module's product-identity public API. The same pattern (
#[allow(dead_code)] // Public API surface for fork decollision; not all builds call it.) is already in use onis_fork_buildat line 46. I extended that pattern to the other six items rather than deleting the API surface — includingis_inside_git_repo, whichupdate.rshappens to duplicate locally, since fixing the duplication is a separate refactor and out of scope for a warnings-only PR.This is the minimal, surgical fix: 7 lines added (one attribute per item), no behavior change, no signature change, no API removal.
Warnings (before / after)
update_product.rs:23pub const GITHUB_REPOconstant GITHUB_REPO is never usedupdate_product.rs:30pub fn update_repofunction update_repo is never usedupdate_product.rs:36pub fn update_repo_forfunction update_repo_for is never usedupdate_product.rs:112pub fn fork_update_disallowed_errorfunction fork_update_disallowed_error is never usedupdate_product.rs:151pub fn resolve_update_repofunction resolve_update_repo is never usedupdate_product.rs:160pub fn is_inside_git_repofunction is_inside_git_repo is never usedupdate_product.rs:231fn log_disabledfunction log_disabled is never usedupdate_product.rs(warning: jcode-app-core (lib) generated 7 warnings)update_product.rs; crate-wide 0 warningsVerification
cargo check -p jcode-app-core(before)EXITCODE=0, 7 warnings$TMPDIR/logs/before-check.logcargo check -p jcode-app-core(after)EXITCODE=0, 0 warnings$TMPDIR/logs/after-check.logcargo test -p jcode-app-core --libEXITCODE=101, 1509 passed, 17 failed$TMPDIR/logs/after-test.logThe
EXITCODE=101on the test run is from 17 pre-existing failures in unrelated modules:tool::bash,tool::bridge_reload,tool::compile_remote::source,tool::desktop_selfdev,tool::selfdev,tool::tests, andupdate::testsforsha256sum. None are inupdate_productor in any file I touched. Theupdate_producttest module has 8 tests, and all 8 pass.The repo's CI suite is red on pristine
mastertoo (per operator note), so a red run on this PR is not evidence the change broke anything. Local verification above is the source of truth: 0 warnings, no behavior change, no regressions in scope.Files changed
crates/jcode-app-core/src/update_product.rs— 7 lines added, 0 removed.Independent of
fix/resume-peer-drain-relendis a separate branch.How to reproduce
Linked issues
Closes #142
CodeAnt-AI Description
Clarify the update logging helper’s warning comment
What Changed
update_repo_forand flagged in non-test builds; runtime behavior is unchanged.Impact
✅ Clearer guidance when reviewing the warning suppression💡 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.