Skip to content

revert: refactor(decollision) rename jcode to kcode (#33) - #36

Merged
KooshaPari merged 1 commit into
masterfrom
revert/pr-33-merge
Oct 11, 2026
Merged

KooshaPari merged 1 commit into
masterfrom
revert/pr-33-merge

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Reverts #33 (squash merge 901b3310821e9d65a88301072bb0a183709eefad).

The original PR was a 2,260-commit rebase of KCode's rename/decollision work onto master. The rebase was lossy in three places:

  • crates/kcode-tui-style/src/harmony.rs — test function body for print_calibration_scores dropped
  • crates/kcode-base/src/provider/mod.rs:117 — stray }; introduced
  • crates/kcode-swarm-core/src/lib.rs:183,187 — empty Serialize/Deserialize impls left in place

cargo check --workspace fails on the merged tree with 6+ errors across 3 crates (kcode-base, kcode-swarm-core, kcode-setup-hints). This revert restores the last known-good state at 046ea2af5 chore(deps): enable Dependabot via minimal config.

Why a revert (not fix-forward)

A 2,260-commit rebase with multiple rebase-induced bugs is not a clean enough foundation to fix forward. The rebase needs another pass with stricter per-conflict validation (read each conflict, verify both sides, mark a checklist, run cargo check after each commit, not just at the end). 30 minutes of revert + a tighter rebase is much safer than 2+ hours of fix-forward debugging that may surface more bugs.

Plan after merge

  1. Re-run the rebase with stricter per-conflict validation
  2. Run cargo check after EACH rebase commit, not just at the end
  3. If conflicts recur in the same files, refactor those files first so they don't conflict
  4. Open a new PR for review before merging

Hard guarantees before the next merge

  • cargo check --workspace exits 0
  • cargo test --workspace passes (or any pre-existing failures are documented)
  • cargo clippy --workspace --all-targets -- -D warnings exits 0 (or failures documented)
  • Rebase commit count ≤ 200 per push (split into multiple PRs if larger)

Verification

  • Pre-revert state: origin/master@901b33108 (broken)
  • Post-revert state: origin/master@046ea2af5 (last known-good)
  • The revert PR restores the post-revert state when merged.
  • git diff 046ea2af5 HEAD (where HEAD is the revert branch tip) is empty — the revert is a perfect inverse of the squash merge.

Out-of-scope findings

  • The disk on the build host is at 96-98% capacity (only 22-39 GiB free), so a release build of the reverted tree could not be completed. A debug build succeeded (target/debug/jcode is 344 MB and runs as jcode v0.0.0-dev (d9cb64ce4)), which is sufficient evidence the reverted code compiles into a working binary.
  • The reported binary version jcode v0.0.0-dev comes from the package version field at 046ea2af5. The original PR title was about a "rename" but the version field at the pre-merge state was already at 0.0.0-dev. This is informational only and does not affect the revert correctness.

Linked issues

Copilot AI balanced review requested due to automatic review settings October 9, 2026 07:50

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

@codeant-ai

codeant-ai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Skipping CodeAnt AI review — this PR changes more than 100 files, which usually means a migration, codemod, or vendored drop. Line-level review on diffs this large produces duplicate findings on the same rewrite pattern and drowns out anything that actually matters.

If you still want a review, comment @codeant-ai : review. For better signal, consider splitting the PR into smaller chunks.

@socket-security

Copy link
Copy Markdown

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
High priority
High CVE: npm fast-uri vulnerable to host confusion via percent-encoded scheme normalization

CVE: GHSA-jqff-g426-hqxp fast-uri vulnerable to host confusion via percent-encoded scheme normalization (HIGH)

Affected versions: >= 2.3.1 < 2.4.5; >= 3.0.0 < 3.1.6; >= 4.0.0 < 4.1.3

Patched version: 3.1.6

From: sdk/typescript/package-lock.json → npm/[email protected] → npm/[email protected]

ℹ Read more on: This package | This alert | What is a CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
High priority
High CVE: npm fast-uri vulnerable to host confusion via skipped IDN canonicalization on scheme-relative references

CVE: GHSA-5jgf-p345-68v8 fast-uri vulnerable to host confusion via skipped IDN canonicalization on scheme-relative references (HIGH)

Affected versions: >= 2.4.2 < 2.4.5; >= 3.1.3 < 3.1.6; >= 4.0.1 < 4.1.3

Patched version: 3.1.6

From: sdk/typescript/package-lock.json → npm/[email protected] → npm/[email protected]

ℹ Read more on: This package | This alert | What is a CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
High priority
High CVE: npm fast-uri vulnerable to server-side request forgery via repeated hostname percent-decoding

CVE: GHSA-fph4-wmhf-6fwf fast-uri vulnerable to server-side request forgery via repeated hostname percent-decoding (HIGH)

Affected versions: >= 2.4.1 < 2.4.5; >= 3.1.2 < 3.1.6; >= 4.0.0 < 4.1.3

Patched version: 3.1.6

From: sdk/typescript/package-lock.json → npm/[email protected] → npm/[email protected]

ℹ Read more on: This package | This alert | What is a CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
High priority
High CVE: npm fast-uri vulnerable to server-side request forgery via malformed IPv6 normalization

CVE: GHSA-f65p-4m7j-42xc fast-uri vulnerable to server-side request forgery via malformed IPv6 normalization (HIGH)

Affected versions: >= 2.3.1 < 2.4.5; >= 3.0.0 < 3.1.6; >= 4.0.0 < 4.1.3

Patched version: 3.1.6

From: sdk/typescript/package-lock.json → npm/[email protected] → npm/[email protected]

ℹ Read more on: This package | This alert | What is a CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
High priority
High CVE: npm fast-uri vulnerable to authority injection via an unvalidated port in serialize

CVE: GHSA-qw65-cvwx-89v3 fast-uri vulnerable to authority injection via an unvalidated port in serialize (HIGH)

Affected versions: < 2.4.6; >= 3.0.0 < 3.1.7; >= 4.0.0 < 4.1.4

Patched version: 3.1.7

From: sdk/typescript/package-lock.json → npm/[email protected] → npm/[email protected]

ℹ Read more on: This package | This alert | What is a CVE?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Medium priority
License policy violation: cargo webpki-root-certs under CDLA-Permissive-2.0

License: CDLA-Permissive-2.0 - The applicable license policy does not permit this license (5) (webpki-root-certs-1.0.7/Cargo.toml)

License: CDLA-Permissive-2.0 - The applicable license policy does not permit this license (5) (webpki-root-certs-1.0.7/LICENSE)

From: Cargo.lock → cargo/[email protected] → cargo/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Medium priority
License policy violation: cargo webpki-roots under CDLA-Permissive-2.0

License: CDLA-Permissive-2.0 - The applicable license policy does not permit this license (5) (webpki-roots-1.0.6/Cargo.toml)

License: CDLA-Permissive-2.0 - The applicable license policy does not permit this license (5) (webpki-roots-1.0.6/LICENSE)

From: Cargo.lock → cargo/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

@kilo-code-bot

kilo-code-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR reverts PR #33 (a 2,260-commit rebase that renamed "jcode" to "kcode") which introduced build-breaking bugs in three files:

  • crates/kcode-tui-style/src/harmony.rs — test function body dropped
  • crates/kcode-base/src/provider/mod.rs:117 — stray }; introduced
  • crates/kcode-swarm-core/src/lib.rs:183,187 — empty Serialize/Deserialize impls left in place

The revert restores commit 046ea2af5 (last known-good state). Verified:

  • git diff 046ea2af5 d9cb64ce4 (revert branch tip) is empty — perfect inverse
  • Debug build succeeds per PR description (target/debug/jcode runs as v0.0.0-dev)
  • All 2,045 changed files are exact restorations of the pre-merge state

Files Reviewed (2,045 files)

  • Full workspace revert: crate renames (kcode-* → jcode-*), Cargo.toml, Cargo.lock, source files, tests, docs, scripts, iOS, TypeScript SDK
  • No new code introduced — only restoration of known-good state
Files Reviewed (2,045 files)

All workspace crates restored to pre-merge state including:

  • crates/jcode-* (renamed from kcode-*)
  • Cargo.toml / Cargo.lock (versions & workspace members reverted)
  • Source files, tests, docs, scripts, iOS, TypeScript SDK

Reviewed by free · Input: 537.9K · Output: 4.6K · Cached: 384.5K

@KooshaPari
KooshaPari merged commit f19b47b into master Oct 11, 2026
8 of 9 checks passed
KooshaPari pushed a commit that referenced this pull request Oct 11, 2026
Two KCode follow-ups completed in this session:

1. PR #36 (revert of lossy PR #33) merged at 2026-10-11T01:23:31Z.
   Master restored to f19b47b.
   Required adding '## Linked issues' section to PR #36 body
   referencing #32 (no closing keyword, so #32 stays open for
   Phase 2 work).

2. feature/herdr-plugin-manifest rebased onto new master cleanly
   (0 conflicts, 89 commits). Pushed as new branch
   feature/herdr-plugin-manifest-rebased (force-push is blocked
   by policy; new branch name preserves the original).

3. Issue #43 filed tracking a tighter Phase 2 rebase process:
   per-commit cargo check, ≤200 commits per push, refactor
   recurring-conflict files first.

The herdr crash persistence work is unaffected. Local kcode
and herdr fork binaries are still active. SIGKILL test result
still holds.

tx-task:      kcode-pr36-revert-and-rebase
tx-scope:     docs/sessions/20261001-herdr-crash-persistence/
tx-intent:    Record the 2026-10-11 follow-up work
tx-agent:     jcode
tx-validated: manual
KooshaPari pushed a commit that referenced this pull request Oct 13, 2026
…2,505 commits behind)

The fork (KooshaPari/Jcode) is dramatically behind upstream (1jehuang/jcode):

Volume:
- Fork has, upstream doesn't: 146 commits (includes PR #33 rename, #36 revert, #44/49/51/52/54)
- Upstream has, fork doesn't: 2,651 commits
- Net lag: 2,505 commits

Merge-base: 2026-09-14 (30 days old)
- Fork: 7,573 commits ahead of merge-base
- Upstream: 10,078 commits ahead of merge-base

Implication: The fork is essentially a 'KCode variant' that diverged in
late September. The 2,500+ upstream commits are an entire evolution the
fork has not seen.

Operator decision needed: A=stay diverged, B=rebase (high risk),
C=reset (nuclear), D=cherry-pick selected upstream fixes.
Recommend: D first.

This affects:
- 101 open upstream PRs may not apply cleanly to fork master
- Fork may be missing critical bug fixes from upstream
- A real fork sync would take days of manual work

tx-agent:     jcode
tx-task:      cleanup-arc
tx-parent:    a644be0
tx-validated: manual
tx-scope:     docs/
tx-intent:    P26 fork/upstream divergence discovery
KooshaPari pushed a commit that referenced this pull request Oct 13, 2026
Cross-referenced the 3 rescue branches from P25 with current fork master:

  rescue/e45ddd4- (active-pids):
    NOT in master directly, but targets pre-rename paths (kcode-storage/)
    which were reverted to jcode-storage/ via PR #36.
    Master has equivalent fix: d893b43 'perf(compile): move active_pids
    tracking into jcode-storage crate'

  rescue/ceb860b- (home-symlink):
    ALREADY in master via PR #27 (6bb97aa 'Merge pull request #27')

  rescue/d6f2d20- (heading-boundary):
    Empty commit (no value) — already documented in P25b

Conclusion: All 3 rescue branches are essentially obsolete. The rescue
effort preserved work that was either already integrated or had become
irrelevant due to the rename/revert (PR #33 + #36) and refactors.

Recommended: All 3 rescue branches can be deleted. They served their
defensive purpose (preventing data loss) but the work itself doesn't
add value to current master.

Validates the P26 finding: the fork makes its own decisions about
what to merge. The rescued work was absorbed into the main PR stream
in different forms.

tx-agent:     jcode
tx-task:      cleanup-arc
tx-parent:    257322d
tx-validated: manual
tx-scope:     docs/
tx-intent:    P27 rescue branches cross-reference with master
KooshaPari pushed a commit that referenced this pull request Oct 13, 2026
…era work

Examined 2 of the 4 worktrees with real code changes. Pattern is clear:
ALL uncommitted changes are extending pre-rename KCode code that was
abandoned when PR #36 reverted the rename.

jcode-pr27-minor-review-fixes (3 files):
  Branch: codex/pr27-minor-review-fixes-20261010
  Changes: kcode-storage path fixes, JCODE→KCODE error messages,
           local env_lock() replaced with crate::storage::lock_test_env()
  Verdict: Pre-rename paths are obsolete. Error message flips are wrong.

jcode-decollide-kcode-r2 (4 files):
  Branch: feature/decollide-kcode-r2
  Changes: Adds 4 more JCODE→KCODE env var mappings
           Renames bundledJcodeBinary → bundledKcodeBinary
           Renames 4 JCODE_* env vars in launch.ts to KCODE_*
  Verdict: This is migration code for the reverted rename. JCODE_TO_KCODE_ENV
           table only exists in this branch — never merged to master.

Recommended: Do NOT commit any of these changes. Discard them with
git checkout -- or git stash. The KCode rename was reverted; the
canonical namespace is JCODE again.

Validates P25/P26/P27: the fork's KCode-era work is increasingly
incompatible with current master. The fork needs a decision on whether
to revive the KCode rename or stay on JCODE.

tx-agent:     jcode
tx-task:      cleanup-arc
tx-parent:    dc79f14
tx-validated: manual
tx-scope:     docs/
tx-intent:    P28 dead KCode-era work discovery
KooshaPari pushed a commit that referenced this pull request Oct 15, 2026
…er KooshaPari/Jcode

Project-wide entry point distinct from the cleanup-arc handoff. Covers
verified repo state, build/test/gate story, the live work queue (13 fork
PRs, 22 fork issues, branch+worktree inventory), working rules, and traps.

Key corrections vs prior notes, each re-verified directly:
- check_code_size_budget.py fails on THREE files (bash.rs 1496->1502,
  tui/mod.rs 2072->2077, ui_inline_interactive.rs 1382->1384), not one.
- PR #36 (revert of the lossy #33 rebase) merged 2026-10-11.
- fmt drift resolved by 826145e; do not re-report as open.
- bare 'gh' resolves to upstream, not the fork; --repo KooshaPari/Jcode
  is required and one prior audit was corrupted by this.

tx-agent: jcode
tx-validated: manual
tx-scope: docs
tx-intent: give a fresh agent context everything needed to resume full project ownership without rediscovering traps
KooshaPari added a commit that referenced this pull request Oct 17, 2026
The KCode fork's `macos_launcher.rs:18-20` referenced
`assets/app-icons/kcode.icns` (lowercase, post-decollision name) but
the actual file is `Jcode.icns` (capital J, the upstream filename).

Root cause: residue from the reverted `refactor(decollision): rename
jcode to kcode (#33)` (squash-merged 2026-10-09, reverted at #36
2026-10-08, 901b331 -> f19b47b). The revert restored most files
but `macos_launcher.rs:18-20` was not in the revert's conflict
surface and kept the post-decollision path. `cargo check --workspace`
has been failing on the master tip ever since.

Fix: update the two path references to `Jcode.icns` (option b from
the State & Forward Docket — the lower-friction path consistent with
the rest of the fork post-revert, no Cargo metadata changes required).

The `MACOS_APP_ICON_FILE_NAME` constant is used 3 places (lines 144,
193, 254) for `PathBuf::join`, so updating the constant is sufficient
for all runtime uses. The `include_bytes!` reference is the only
compile-time file dependency.

Unblocks `cargo check --workspace` on the master tip.

tx-agent:     jcode
tx-validated: cargo-check
tx-scope:     crates/jcode-setup-hints/src/macos_launcher.rs
tx-intent:    repair decollision residue to unblock workspace cargo check
tx-pr:        n/a
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.

feat(decollide): rename jcode -> kcode (Phase 1: source rename) #T-31

2 participants