Skip to content

Remove hardcoded transport URLs from entity schemas; inject base URL via serialiser #2

Description

@coderabbitai

Background

Raised during review of PR #1 (Initial repo structure) by @leynos.

The inherited githubRepositorySchema transform in src/store/entities/repository.ts embeds a hardcoded localhost:3300 host directly in domain entity URLs (e.g. url, html_url, clone_url, and the full set of GitHub template URLs). This pattern must not be replicated in new DigitalOcean entity schemas introduced as part of DigitalPuddle.

ADR 0005 (transitional Simulacat boundaries) records the architectural rule: transport URLs must not live in domain entities; they must be produced at the serialisation layer.

Required work

  • Ensure all new DigitalOcean entity schemas (DOKS clusters, SSH keys, projects, node pools, etc.) contain no hardcoded hostnames or port numbers.
  • Inject the base URL via a constructor parameter or serialiser adapter when constructing response payloads.
  • Add a contract test or lint rule that rejects any new entity schema that embeds a http:// or https:// literal outside of the serialisation layer.

References

/cc @leynos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions