Skip to content

Commit 0aa5642

Browse files
committed
refactor(cloud-shared): drop milady.ai + shad0w.xyz from pairing alias group
Audit of agent_pairing_tokens (90d) and agent_sandboxes.bridge_url shows 0 prod rows under .milady.ai or .shad0w.xyz. Both were 0xSolace- era domains: - .milady.ai resolves to GitHub Pages (static front, never served sandbox HTTP infra) - .shad0w.xyz was a personal-handle dev convenience Keeping them in the alias group would silently keep "0 legacy" from being true. Drop both. Old bookmarks under those domains now fail Origin validation, which is the intended outcome. The remaining group is the three Eliza brands [waifu.fun, eliza.ai, elizacloud.ai]. .elizacloud.ai is the post-2026-05 canonical; the others ride along during the rebrand grace period.
1 parent 674ad40 commit 0aa5642

3 files changed

Lines changed: 26 additions & 19 deletions

File tree

packages/cloud-shared/src/lib/services/pairing-token-domains.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,24 @@
44
// `<uuid>.elizacloud.ai` link but the agent was originally provisioned with
55
// an `<uuid>.waifu.fun` Origin), so token validation tries every alias.
66
//
7-
// `.elizacloud.ai` is the canonical post-2026-05 brand; the others are
8-
// kept during the rebrand grace period and can be retired one by one once
9-
// no DB rows reference them.
7+
// `.elizacloud.ai` is the canonical post-2026-05 brand; `.waifu.fun` and
8+
// `.eliza.ai` are kept during the rebrand grace period and can be retired
9+
// once no DB rows reference them.
10+
//
11+
// Intentionally NOT in this list:
12+
// - `.milady.ai` — resolves to GitHub Pages (static front, no agent
13+
// sandbox infra was ever served from this domain)
14+
// - `.shad0w.xyz` — personal handle from the 0xSolace stack, never
15+
// served real production sandbox URLs
16+
// Both are part of the "0 legacy" cleanup goal; old bookmarks under those
17+
// domains will fail Origin validation, which is the intended outcome.
1018
//
1119
// Pure data + pure function — extracted from `pairing-token.ts` so the
1220
// alias logic stays unit-testable without pulling the Postgres repository
1321
// import chain.
1422

1523
export const DOMAIN_ALIAS_GROUPS: readonly (readonly string[])[] = [
16-
[".waifu.fun", ".eliza.ai", ".elizacloud.ai", ".milady.ai", ".shad0w.xyz"],
24+
[".waifu.fun", ".eliza.ai", ".elizacloud.ai"],
1725
];
1826

1927
/**

packages/cloud-shared/src/lib/services/pairing-token.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,13 @@ import { DOMAIN_ALIAS_GROUPS, getAlternateDomainOrigins } from "./pairing-token-
33

44
describe("getAlternateDomainOrigins", () => {
55
it("returns every other suffix in the same alias group", () => {
6-
// The canonical group is the first entry. Verify all five domains
7-
// produce four alternates each (the matched suffix is excluded).
8-
const inputs = [
9-
"https://abc.waifu.fun",
10-
"https://abc.eliza.ai",
11-
"https://abc.elizacloud.ai",
12-
"https://abc.milady.ai",
13-
"https://abc.shad0w.xyz",
14-
];
6+
// The canonical group is the first entry. Verify each domain produces
7+
// (group.length - 1) alternates — the matched suffix is excluded.
8+
const inputs = ["https://abc.waifu.fun", "https://abc.eliza.ai", "https://abc.elizacloud.ai"];
159

1610
for (const origin of inputs) {
1711
const alts = getAlternateDomainOrigins(origin);
18-
expect(alts).toHaveLength(4);
12+
expect(alts).toHaveLength(2);
1913
expect(alts).not.toContain(origin);
2014
const hostnames = alts.map((url) => new URL(url).hostname);
2115
for (const hostname of hostnames) {
@@ -33,12 +27,18 @@ describe("getAlternateDomainOrigins", () => {
3327
[
3428
"9d77d8b5-1d63-4b4c-9bd1-ec1b5deb4dc8.eliza.ai",
3529
"9d77d8b5-1d63-4b4c-9bd1-ec1b5deb4dc8.elizacloud.ai",
36-
"9d77d8b5-1d63-4b4c-9bd1-ec1b5deb4dc8.milady.ai",
37-
"9d77d8b5-1d63-4b4c-9bd1-ec1b5deb4dc8.shad0w.xyz",
3830
].sort(),
3931
);
4032
});
4133

34+
it("rejects retired 0xSolace-era domains (milady.ai, shad0w.xyz)", () => {
35+
// These domains were intentionally dropped from the alias group to
36+
// close the "0 legacy" cleanup. A leftover bookmark must fail Origin
37+
// validation rather than silently aliasing into a live brand.
38+
expect(getAlternateDomainOrigins("https://abc.milady.ai")).toEqual([]);
39+
expect(getAlternateDomainOrigins("https://abc.shad0w.xyz")).toEqual([]);
40+
});
41+
4242
it("preserves the URL port when an origin includes one", () => {
4343
// `URL.origin` keeps non-default ports — the alternate origins must
4444
// round-trip them so a sandbox served on :8443 still matches its alias.

packages/cloud-shared/src/lib/services/pairing-token.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,8 @@ class PairingTokenService {
9494

9595
// If no match, try each alternate domain in the same alias group. The
9696
// dashboard may rewrite the agent URL between any two aliased domains
97-
// (waifu.fun ↔ eliza.ai ↔ elizacloud.ai ↔ milady.ai ↔ shad0w.xyz), and
98-
// we cannot predict which one is stored as `expected_origin` for a
99-
// given token row.
97+
// (waifu.fun ↔ eliza.ai ↔ elizacloud.ai), and we cannot predict which
98+
// one is stored as `expected_origin` for a given token row.
10099
if (!row) {
101100
for (const alternateOrigin of getAlternateDomainOrigins(normalizedOrigin)) {
102101
row = await agentPairingTokensRepository.consumeValidToken(

0 commit comments

Comments
 (0)