test(contract): point shared test domain at agents.localhost - #1016
Open
AmirF194 wants to merge 3 commits into
Open
test(contract): point shared test domain at agents.localhost#1016AmirF194 wants to merge 3 commits into
AmirF194 wants to merge 3 commits into
Conversation
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
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Swapped
agents.e2a.devforagents.localhostas the contract harness's SharedDomain incontract_server.goandserver.go, and updated the 17 scenario addresses inscenarios.yamlthat depend on it. Also caught one more literal incontract_server.go's over-cap fixture (overcap-bot-%d@agents.e2a.dev) that uses the same domain outside the SharedDomain wiring.Checked
server.goand the prober seed like the issue asked.server.goonly had the same two SharedDomain lines, already covered above. The prober's agent email comes fromE2A_PROBE_AGENT_EMAILwith no hardcoded domain, so nothing there needed a change.Added a test that reads the three files and fails if
agents.e2a.devshows up again. It fails without the change.Fixes #829