Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Hotfix revert last two#56

Merged
igor-susic1 merged 2 commits into
mainfrom
hotfix-revert-last-two
May 6, 2026
Merged

Hotfix revert last two#56
igor-susic1 merged 2 commits into
mainfrom
hotfix-revert-last-two

Conversation

@igor-susic1
Copy link
Copy Markdown
Contributor

@igor-susic1 igor-susic1 commented May 6, 2026


Kimchi Summary

What changed

Changes the harness binary name from kimchi to kimchi-code and installs it alongside the CLI executable instead of the user's data directory. Removes the guardAgainstSelfExec safety check that was required when both binaries shared the same name.

Why

Having both the CLI and harness named identically required fragile path resolution logic to prevent accidentally launching the CLI as its own harness. Using distinct names eliminates this ambiguity and the risk of infinite execution loops.

Key changes

  • cmd/harness.go: Removed guardAgainstSelfExec function and its two call sites in runHarness.
  • internal/update/github_client.go: Changed kimchiDevRepo.Binary from "kimchi" to "kimchi-code".
  • internal/update/harness.go: Updated ResolveHarnessPath to derive the harness path from the CLI's directory (installing kimchi-code next to kimchi) instead of the data directory.
  • internal/update/extract_test.go, harness_test.go, workflow_test.go: Updated test assertions to expect the kimchi-code binary name.

Impact

  • Breaking: The harness is now installed as kimchi-code in the same directory as the CLI. Existing harness installations at the previous data directory location will be ignored until kimchi update is run.
  • Simplifies installation logic by removing the need for self-referential path checks.

@kimchi-review
Copy link
Copy Markdown

kimchi-review Bot commented May 6, 2026

Kimchi Code Review

Property Value
Commit b8d3a9c
Author @igor-susic1
Files changed 0
Review status Completed
Comments 1 (1 info)
Duration 55s

Summary

📊 Review Score: 88/100 (overall code quality — 0 lowest, 100 highest)
⏱️ Estimated effort to review: 2/5 (1 = trivial, 5 = very complex)

🧪 Tests: yes — Test files updated to reflect the binary rename from kimchi to kimchi-code and the new path resolution logic. Tests cover archive extraction, file permissions, path traversal protection, and harness installation detection.

📝 Found 1 issue(s). See inline comments for details.

What to expect

Kimchi will analyze the changes in this pull request and post:

  • A summary of the overall changes
  • Inline comments on specific lines with findings categorized by issue type

The review typically completes within a few minutes. This comment will be updated once the review is ready.

Interact with Kimchi
  • @kimchi review — re-trigger a full review on the latest commit
  • @kimchi summary — regenerate the PR summary
  • @kimchi ignore — skip this PR (no review will be posted)
  • Reply to any inline comment to ask follow-up questions or request clarification
Configuration

Reviews are configured by your organization admin.
Review instructions, excluded directories, and severity thresholds can be adjusted per repository in the Kimchi dashboard.


Powered by Kimchi — AI-powered code review by CAST AI

Copy link
Copy Markdown

@kimchi-review kimchi-review Bot left a comment

Choose a reason for hiding this comment

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

📊 Review Score: 88/100 (overall code quality — 0 lowest, 100 highest)
⏱️ Estimated effort to review: 2/5 (1 = trivial, 5 = very complex)

🧪 Tests: yes — Test files updated to reflect the binary rename from kimchi to kimchi-code and the new path resolution logic. Tests cover archive extraction, file permissions, path traversal protection, and harness installation detection.

📝 Found 1 issue(s). See inline comments for details.

// ResolveHarnessPath returns the path where the harness binary lives.
// It is placed inside the harness data directory so it does not collide
// with the Go CLI binary (both are now named "kimchi" after the merge).
// ResolveHarnessPath derives the harness binary path from the kimchi executable's
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ℹ️🏗️ Design

The ResolveHarnessPath function now places the harness binary in the same directory as the CLI executable (e.g., /usr/local/bin/kimchi-code alongside /usr/local/bin/kimchi), rather than in the user-writable data directory (~/.local/share/kimchi/bin). This change may cause permission issues if the CLI is installed in a system directory, as updating the harness will now require write access to that system directory.

💡 Suggestion: Consider documenting this requirement or ensuring the installer handles permission elevation when the CLI is installed in a system path. Alternatively, fall back to the data directory if the binary directory is not writable.

@igor-susic1 igor-susic1 merged commit a82d3b1 into main May 6, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants