Skip to content

fix(contract): discover service names through the go/ subdir convention - #24

Merged
Snider merged 1 commit into
mainfrom
fix/service-name-go-subdir
Nov 18, 2026
Merged

Snider merged 1 commit into
mainfrom
fix/service-name-go-subdir

Conversation

@Snider

@Snider Snider commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

After the path move, every github.com/dappcore/<repo>/go root package was discovered as the service \"go\", which breaks lookups in ansible, config, forge, proxy, webview and lns.

discoverServiceName: a go last element means "use the repo name minus go-", so go-ansible/go → \"ansible\", the same as dappco.re/go/ansible. Subpackages are unchanged. Covered by a Good/Bad/Ugly triplet.

Gates (GOWORK=off): vet and go test ./... pass. Tag v0.14.0 after merge.

🤖 Generated with Claude Code
Co-Authored-By: Virgil virgil@lethean.io

WithService names a service after the last element of its package path.
Once modules moved from dappco.re/go/<name> to
github.com/dappcore/<repo>/go, every subdir module's root package was
discovered as "go", so lookups by the real name failed: "ansible not found",
and config, forge, proxy, webview and lns the same.

discoverServiceName treats a `go` last element as the subdir-module
convention and uses the repo name minus any `go-` prefix:
github.com/dappcore/go-ansible/go → "ansible", the same as dappco.re/go/ansible.
Subpackages keep their own name. A bare or rootless "go" stays "go".

TestContract_discoverServiceName_{Good,Bad,Ugly} cover both path styles, the
empty path, subpackages and the edge cases.

Gates (GOWORK=off): go vet and go test ./... -count=1 pass.

Co-Authored-By: Virgil <virgil@lethean.io>
@Snider
Snider merged commit a85554e into main Nov 18, 2026
@Snider
Snider deleted the fix/service-name-go-subdir branch November 18, 2026 17:19
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to 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