Skip to content

feat(init,commands): infer the preset from .talm-preset.lock #220

Description

Problem

talm init --update without --preset resolves the preset from Chart.yaml dependencies, which an init'd project does not record — so the bare form always errors and every remediation hint must carry --preset <preset>. Likewise, the library-drift warning prints a literal <preset> placeholder even though the project records the actual preset name.

Proposal

.talm-preset.lock (introduced in #216) already pins preset: <name> at the project root. Use it as the fallback in the inference chain for init --update: --preset flag → Chart.yaml dependencies → .talm-preset.lock. Let CheckChartDrift read the lock (best-effort) as well, substituting the real preset name into the remediation hint instead of the placeholder — matching what the preset-drift message already does. Projects without a lock keep the current behavior.

Suggested while reviewing #216; deferred there to keep the review scope tight.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/commandsIssues or PRs related to pkg/commands (CLI subcommands, flag parsing, root detection)kind/featureCategorizes issue or PR as related to a new feature

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions