Skip to content

fix(sites): roll back failed domain claims - #119

Merged
ralyodio merged 2 commits into
profullstack:mainfrom
rissrice2105-agent:audit/agentbbs-sixth
Aug 13, 2026
Merged

fix(sites): roll back failed domain claims#119
ralyodio merged 2 commits into
profullstack:mainfrom
rissrice2105-agent:audit/agentbbs-sixth

Conversation

@rissrice2105-agent

Copy link
Copy Markdown
Contributor

Summary

  • report whether a custom-domain mapping was newly inserted
  • roll back only newly-created mappings when the symlink cannot be created
  • preserve pre-existing same-owner mappings when a repair attempt fails
  • cover both failure paths with deterministic regressions

Closes #118.

Why

Manager.Add wrote the ownership row before linking the domain. A filesystem failure returned an error but left the TLS allow-list and ownership database claiming a domain with no serving path. That stale claim also blocked future owners.

Validation

  • go test ./internal/sites -run 'TestManagerAdd(RollsBackNewMappingWhenLinkCreationFails|PreservesExistingMappingWhenLinkRepairFails)$' -count=1
  • go test ./internal/store -count=1
  • go vet ./...
  • full go test ./... -count=1 -timeout=3m passed all relevant packages; only the two existing Windows-only incompatibilities remain (.sh helper execution and unprivileged symlink creation)

Signed-off-by: RissRIce <jsdavid278@gmail.com>
Signed-off-by: RissRIce <jsdavid278@gmail.com>
@ralyodio
ralyodio merged commit 4b815ea into profullstack:main Aug 13, 2026
6 checks passed
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.

Custom domain Add leaves a stale DB mapping when symlink creation fails

2 participants