Skip to content

lang: reject empty name = "" on rest.target (and other targets) #412

Description

@pskry

rest.target { name = "", base_url = "http://localhost/api" } is
accepted silently today. An empty target name is meaningless — it
appears in CLI output, plan reports, and deploy-block resolution
and yields confusing output when blank.

Repro fixture: test/testdata/diagnostics/star-rest-empty-name/.
Currently snapshots abort: false, diagnostics: [].

Likely the same gap exists for local.target, ssh.target, etc.
(empty name = "" should be a field-level validation error across
all target types).

Expected: a step.target.EmptyName or similar typed diagnostic
when a target is constructed with name = "".

Acceptance: re-running SCAMPI_UPDATE_DIAGNOSTICS=1 go test ./test/diagnostics/ after the fix should produce a non-empty
diagnostics array for star-rest-empty-name. Optional: add
fixtures for local/ssh targets with empty names.

Metadata

Metadata

Assignees

No one assigned

    Labels

    impact/lowNice to have, nobody is asking for itkind/bugSomething is not workingpriority/mediumThe priority is medium

    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