Skip to content

fix(cli): keep init templates in sync - #483

Merged
alongubkin merged 1 commit into
mainfrom
alon/alien-41-init-template-catalog
Aug 24, 2026
Merged

fix(cli): keep init templates in sync#483
alongubkin merged 1 commit into
mainfrom
alon/alien-41-init-template-catalog

Conversation

@alongubkin

Copy link
Copy Markdown
Member

Summary

Validation

  • cargo fmt --all -- --check
  • cargo test -p alien-cli commands::init::tests --lib

Supersedes the remaining unmerged part of #271. The chatbot example itself already landed in #428.

ALIEN-41

@alongubkin
alongubkin merged commit 79adf50 into mainAug 24, 2026
41 of 44 checks passed
@alongubkin
alongubkin deleted the alon/alien-41-init-template-catalog branch August 24, 2026 07:32
@greptile-apps

Copy link
Copy Markdown

Greptile Summary

The PR restores seven scaffoldable examples to the versioned alien init catalog and adds a regression test intended to keep that catalog synchronized with example metadata.

  • Adds the missing AI, storage, customer-key, customer-model, GitHub-agent, and Next.js templates.
  • Compares catalog entries with examples containing template.toml.
  • The new comparison does not fully enforce the directory-slug invariant used by archive extraction.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking gap in the new catalog regression test.

The restored entries currently match their example directories, but the new set-based assertion can miss duplicate metadata names or metadata-to-directory mismatches and therefore does not fully prevent future catalog drift.

Files Needing Attention: crates/alien-cli/src/commands/init.rs

Important Files Changed

FilenameOverview
crates/alien-cli/src/commands/init.rsRestores missing template entries and adds a useful synchronization test, but the test compares deduplicated metadata names rather than uniquely validating the directory slugs used at runtime.

Fix all with GreploopFix All in Codex

Prompt To Fix All With AI
### Issue 1
crates/alien-cli/src/commands/init.rs:658-662
**Catalog test ignores directory identity**
The test compares deduplicated metadata names rather than each example’s directory slug, even though archive extraction routes by that slug. Duplicate metadata names or a metadata-to-directory mismatch therefore pass this check while leaving a scaffoldable example unreachable.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix(cli): keep init templates in sync" | Re-trigger Greptile

Comment on lines +658 to +662
let name = metadata
.get("name")
.and_then(toml::Value::as_str)
.expect("template name");
metadata_templates.insert(name.to_string());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2Catalog test ignores directory identity

The test compares deduplicated metadata names rather than each example’s directory slug, even though archive extraction routes by that slug. Duplicate metadata names or a metadata-to-directory mismatch therefore pass this check while leaving a scaffoldable example unreachable.

Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/alien-cli/src/commands/init.rs
Line: 658-662
Comment:
**Catalog test ignores directory identity**
The test compares deduplicated metadata names rather than each example’s directory slug, even though archive extraction routes by that slug. Duplicate metadata names or a metadata-to-directory mismatch therefore pass this check while leaving a scaffoldable example unreachable.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex

Sign up for freeto 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

@alongubkin