Skip to content

Four derived names use hyphen joins the naming contract forbids #56

Description

@vishr

internal/app/names.go

The header comment at names.go:15-20 explains that hyphen joins are ambiguous — ob-<app>-<service> maps both (a-b, c) and (a, b-c) to ob-a-b-c — and that this is why persistent names use join (underscore) and runtime names use runtimeName (authored - escaped to --).

Four functions bypass both:

  • names.go:176 ProtectionTimer
  • names.go:180 ProtectionTimerForEnvironment
  • names.go:103 ProtectionCredentialFile
  • names.go:123 ProtectionEnvelopePath

gIdent permits hyphens (^[a-z]([a-z0-9-]{0,38}[a-z0-9])?$), so the collision is reachable. Systemd unit names are host-global, which makes the two timer functions the ones that matter most.

ProtectionTimer has no callers and can simply be deleted; see item 8.


Split out of #50 as item 4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions