Skip to content

test(contract): point shared test domain at agents.localhost - #1016

Open
AmirF194 wants to merge 3 commits into
tokencanopy:mainfrom
AmirF194:fix/829-shared-domain-agents-localhost
Open

test(contract): point shared test domain at agents.localhost#1016
AmirF194 wants to merge 3 commits into
tokencanopy:mainfrom
AmirF194:fix/829-shared-domain-agents-localhost

Conversation

@AmirF194

Copy link
Copy Markdown
Contributor

Swapped agents.e2a.dev for agents.localhost as the contract harness's SharedDomain in contract_server.go and server.go, and updated the 17 scenario addresses in scenarios.yaml that depend on it. Also caught one more literal in contract_server.go's over-cap fixture (overcap-bot-%d@agents.e2a.dev) that uses the same domain outside the SharedDomain wiring.

Checked server.go and the prober seed like the issue asked. server.go only had the same two SharedDomain lines, already covered above. The prober's agent email comes from E2A_PROBE_AGENT_EMAIL with no hardcoded domain, so nothing there needed a change.

Added a test that reads the three files and fails if agents.e2a.dev shows up again. It fails without the change.

Fixes #829

agents.e2a.dev is a customer identifier per AGENTS.md's public data
boundary, not a safe value for test fixtures. Point the contract
harness's SharedDomain at agents.localhost instead, update the
scenario addresses and the over-cap fixture that depended on it, and
add a test that fails if the old domain reappears.

Fixes tokencanopy#829
@AmirF194
AmirF194 requested a review from jiashuoz as a code owner September 11, 2026 06:39
…rnesses

StartContractServer and TestServer both pass SharedDomain "agents.localhost"
to the API but never call store.EnsureSharedDomain for it, so the domains
table only carries the migration-seeded agents.e2a.dev row. Any scenario
that creates an agent on the shared domain (register_agent in
tests/contract/scenarios.yaml, the Go e2e suite) hits the FK on
agent_identities.registered_domain: exactly the failure EnsureSharedDomain's
own doc comment describes for a deployment whose shared_domain diverges from
that hardcoded seed.

Mirrors the boot-time call cmd/e2a/main.go already makes for production.
…alhost

Three more places hardcoded the pre-move shared domain and only surfaced
once EnsureSharedDomain made contract-server agent creation actually work:
the Python and TypeScript SDK contract-test fixtures asserted or registered
agents on agents.e2a.dev (now unverified, so every one of them 400s), and
the Go max_agents race e2e test registered its race agents on the same
stale domain for the same reason.
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.

testutil: contract server uses agents.e2a.dev as its shared domain, against the public data boundary

1 participant