Skip to content

refactor: replace KORTEX_CLI_ environment variable names to KDN_#204

Merged
feloy merged 1 commit intoopenkaiden:mainfrom
feloy:kdn-envvars
Apr 8, 2026
Merged

refactor: replace KORTEX_CLI_ environment variable names to KDN_#204
feloy merged 1 commit intoopenkaiden:mainfrom
feloy:kdn-envvars

Conversation

@feloy
Copy link
Copy Markdown
Contributor

@feloy feloy commented Apr 8, 2026

Fixes #202

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@feloy feloy requested review from benoitf and jeffmaury April 8, 2026 06:20
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 00ac9e84-6be1-4b76-b7b9-030e3db7ded3

📥 Commits

Reviewing files that changed from the base of the PR and between 3c6171c and d06d4ba.

📒 Files selected for processing (9)
  • AGENTS.md
  • README.md
  • pkg/cmd/init.go
  • pkg/cmd/init_test.go
  • pkg/cmd/root.go
  • pkg/cmd/root_test.go
  • skills/commit/SKILL.md
  • skills/implementing-command-patterns/SKILL.md
  • skills/working-with-config-system/SKILL.md
✅ Files skipped from review due to trivial changes (8)
  • skills/working-with-config-system/SKILL.md
  • AGENTS.md
  • pkg/cmd/root.go
  • skills/commit/SKILL.md
  • pkg/cmd/root_test.go
  • pkg/cmd/init.go
  • skills/implementing-command-patterns/SKILL.md
  • pkg/cmd/init_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.md

📝 Walkthrough

Walkthrough

Replaced KORTEX_CLI_* environment-variable names with KDN_* equivalents across CLI code, tests, and documentation (storage, default runtime/agent, and init auto-start). No API signatures or runtime control flow besides env-var sourcing changed.

Changes

Cohort / File(s) Summary
Core Command Implementation
pkg/cmd/init.go, pkg/cmd/root.go
Swapped env var lookups from KORTEX_CLI_*KDN_*; updated flag help text and default --storage sourcing to use KDN_STORAGE.
Command Tests
pkg/cmd/init_test.go, pkg/cmd/root_test.go
Updated tests to set/assert KDN_* env vars instead of KORTEX_CLI_*; test behavior and assertions unchanged.
Primary Documentation
README.md, AGENTS.md
Renamed examples, headings, and precedence notes to use KDN_* (e.g., KDN_DEFAULT_RUNTIME, KDN_STORAGE, KDN_INIT_AUTO_START).
Skill Documentation
skills/commit/SKILL.md, skills/implementing-command-patterns/SKILL.md, skills/working-with-config-system/SKILL.md
Updated examples, embedded test snippets, and explanatory text to reference KDN_* env var names.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and accurately describes the main change: replacing KORTEX_CLI_ environment variable names with KDN_ prefix throughout the codebase.
Description check ✅ Passed The PR description references the linked issue #202, which is related to the changeset. While brief, it connects to the change objective.
Linked Issues check ✅ Passed The PR fully implements the requirement from issue #202: replacing all KORTEX_CLI_* environment variables with KDN_* across documentation, code, and tests.
Out of Scope Changes check ✅ Passed All changes are directly scoped to environment variable name replacements from KORTEX_CLI_* to KDN_* in relevant files, with no unrelated modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
skills/implementing-command-patterns/SKILL.md (1)

1-5: ⚠️ Potential issue | 🟠 Major

Add required Apache 2.0 + Red Hat (2026) copyright header.

This Markdown source file is missing the required copyright/license header.

As per coding guidelines, "**/*.{go,md}: All source files must include Apache License 2.0 copyright headers with Red Hat copyright (current year 2026) - use the /copyright-headers skill for automation".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/implementing-command-patterns/SKILL.md` around lines 1 - 5, The file
implementing-command-patterns (YAML front-matter in SKILL.md) is missing the
required Apache-2.0 + Red Hat (2026) copyright header; add the standard
copyright/license header at the top of SKILL.md (above the existing
front-matter) with the Apache License 2.0 text and Red Hat (2026) copyright line
so the file meets the "**/*.{go,md}" header policy.
🧹 Nitpick comments (1)
README.md (1)

957-1123: Consider adding a short migration note for users of KORTEX_CLI_*.

This is a breaking rename for shell profiles/CI scripts; a one-paragraph note can reduce upgrade friction.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 957 - 1123, Add a short migration note under the
Environment Variables heading stating that environment variables formerly
prefixed with KORTEX_CLI_ were renamed to KDN_ (e.g., KORTEX_CLI_DEFAULT_RUNTIME
-> KDN_DEFAULT_RUNTIME, KORTEX_CLI_DEFAULT_AGENT -> KDN_DEFAULT_AGENT,
KORTEX_CLI_STORAGE -> KDN_STORAGE, KORTEX_CLI_INIT_AUTO_START ->
KDN_INIT_AUTO_START), show a one-line example of exporting the new name and a
brief instruction to update shell profiles/CI scripts or create
backwards-compatible exports if needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@skills/implementing-command-patterns/SKILL.md`:
- Around line 1-5: The file implementing-command-patterns (YAML front-matter in
SKILL.md) is missing the required Apache-2.0 + Red Hat (2026) copyright header;
add the standard copyright/license header at the top of SKILL.md (above the
existing front-matter) with the Apache License 2.0 text and Red Hat (2026)
copyright line so the file meets the "**/*.{go,md}" header policy.

---

Nitpick comments:
In `@README.md`:
- Around line 957-1123: Add a short migration note under the Environment
Variables heading stating that environment variables formerly prefixed with
KORTEX_CLI_ were renamed to KDN_ (e.g., KORTEX_CLI_DEFAULT_RUNTIME ->
KDN_DEFAULT_RUNTIME, KORTEX_CLI_DEFAULT_AGENT -> KDN_DEFAULT_AGENT,
KORTEX_CLI_STORAGE -> KDN_STORAGE, KORTEX_CLI_INIT_AUTO_START ->
KDN_INIT_AUTO_START), show a one-line example of exporting the new name and a
brief instruction to update shell profiles/CI scripts or create
backwards-compatible exports if needed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2532bf18-3fb9-4e36-8124-c72527814eb0

📥 Commits

Reviewing files that changed from the base of the PR and between e9d481c and c2271ec.

📒 Files selected for processing (9)
  • AGENTS.md
  • README.md
  • pkg/cmd/init.go
  • pkg/cmd/init_test.go
  • pkg/cmd/root.go
  • pkg/cmd/root_test.go
  • skills/commit/SKILL.md
  • skills/implementing-command-patterns/SKILL.md
  • skills/working-with-config-system/SKILL.md

Copy link
Copy Markdown
Contributor

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

why KDN_ and not KAIDEN_ ?

if I use az cli, env variables are AZURE_CONFIG_DIR
if I use maven, cli is called mvn but env variables are MAVEN_OPTS

@feloy
Copy link
Copy Markdown
Contributor Author

feloy commented Apr 8, 2026

why KDN_ and not KAIDEN_ ?

if I use az cli, env variables are AZURE_CONFIG_DIR if I use maven, cli is called mvn but env variables are MAVEN_OPTS

Same reason as in #205 (comment)

I supposed that KAIDEN_ is related to the project, not the the cli specifically. We had chosen KORTEX_CLI to be cli-specific.

But we can change to another approach, I don't mind

@feloy feloy requested a review from benoitf April 8, 2026 09:20
Signed-off-by: Philippe Martin <phmartin@redhat.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@feloy feloy merged commit 4ac16f0 into openkaiden:main Apr 8, 2026
7 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.

change environment variable names

4 participants