Uh oh!
There was an error while loading. Please reload this page.
fix(cli): keep init templates in sync - #483
Conversation
Greptile SummaryThe PR restores seven scaffoldable examples to the versioned
Confidence Score: 4/5The 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
|
| Filename | Overview |
|---|---|
| crates/alien-cli/src/commands/init.rs | Restores 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. |
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
| let name = metadata | ||
| .get("name") | ||
| .and_then(toml::Value::as_str) | ||
| .expect("template name"); | ||
| metadata_templates.insert(name.to_string()); |
There was a problem hiding this 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.
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.
Summary
template.tomlto the versionedalien initcatalogai-quickstart-tsandai-chatbot-ts, which were added in feat(examples): add an AI chatbot example over a private Postgres #271 but dropped when the catalog was made deterministic in feat: improve framework examples and operator packaging #428Validation
cargo fmt --all -- --checkcargo test -p alien-cli commands::init::tests --libSupersedes the remaining unmerged part of #271. The chatbot example itself already landed in #428.
ALIEN-41