Skip to content

non-interactive flags and ai context#14

Merged
alexphelps merged 3 commits into
mainfrom
non-interactive-flags-ai-context
May 7, 2026
Merged

non-interactive flags and ai context#14
alexphelps merged 3 commits into
mainfrom
non-interactive-flags-ai-context

Conversation

@alexphelps
Copy link
Copy Markdown
Member

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread lib/actions/init.js
const buf = await fetchBuffer(AI_CONTEXT_DOC_URL);
upstreamBody = buf.toString('utf8');
} catch (err) {
const wrapped = new Error(`could not fetch AI context doc: ${err.message}`);
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: Error wrapping uses UPSTREAM_FETCH_FAILED for all fetch failures, including the AI context doc fetch at line 459. If tarball/template fetching fails elsewhere (e.g., at line 724), the error code will misleadingly say "could not fetch AI context doc" instead of the actual operation that failed. Consider using distinct error codes or including the URL that failed in the error message.

Comment thread lib/actions/init.js
template: templateSlug,
sdk_version: (upstreamEntry && upstreamEntry.sdk_version) || null,
};
result.writes.campaigns_json_entry = finalSlug;
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: result.writes.campaigns_json_entry is set to finalSlug (user-provided or default slug), but when the template is looked up in the upstream registry at line 674, the key used is templateSlug (the --template flag value). These can differ when --template and --slug have different values. The campaigns.json entry is correctly keyed by finalSlug, but the upstream SDK version lookup uses templateSlug. If templateSlug differs from finalSlug, the SDK version from the wrong template could be used. Consider validating templateSlug against the manifest when provided via flag.

@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot Bot commented May 7, 2026

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0

Incremental Review (commit f20aee3)

  • README.md updated: expanded AI context feature documentation and added --ai-context claude to example command
  • Documentation-only changes — no new code issues
  • Previous issues still present
Issue Details (click to expand)

WARNING

File Line Issue
lib/actions/init.js 462 Error code UPSTREAM_FETCH_FAILED used for AI context fetch failure is also used for tarball/template fetch failures elsewhere — error messages may reference the wrong URL/operation
lib/actions/init.js 694 Upstream SDK version lookup uses templateSlug instead of finalSlug — could fetch wrong SDK version when --template and --slug differ
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
lib/actions/init.js 234 applyApiKey uses a regex that only replaces the first apiKey: occurrence — if config.js has multiple apiKey fields, only the first would be updated (low probability but worth noting)
Files Reviewed (4 files)
  • AGENTS.md - deleted in earlier commit (cleanup)
  • README.md - documentation update only (f20aee3)
  • lib/actions/init.js - 2 issues (unchanged)
  • test/init.test.js - test coverage for new functions

Fix these issues in Kilo Cloud


Reviewed by minimax-m2.7 · incremental review at f20aee3


Reviewed by minimax-m2.7 · 256,051 tokens

@alexphelps alexphelps merged commit 316a620 into main May 7, 2026
6 checks passed
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.

1 participant