Skip to content

feat(ats): freeze the agent-browser-ats-order/1 browser order contract - #164

Merged
AetherAI3 merged 2 commits into
mainfrom
feat/ats-browser-order-contract
Sep 23, 2026
Merged

AetherAI3 merged 2 commits into
mainfrom
feat/ats-browser-order-contract

Conversation

@AetherAI3

@AetherAI3 AetherAI3 commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Summary

Freezes agent-browser-ats-order/1, the typed wire through which ATSv2 will check and execute a bounded order on the user's own signed-in trading site in Agent Browser — no broker picker, no broker API. P0 of the Agent Browser order path: it authorizes no order and registers no tool. ATSv2 lifts the Python mirror and pins the fixture in its companion PR, AetherAI3/ATSv2#444; #162's API-only live routing is superseded for this mission (spec §7).

Key Changes

  • Ten semantic operations, no raw browser control — Selectors, coordinates, URLs, scripts and free text are unrepresentable, so neither a model nor a hostile page can steer an order.
  • Paper and live cannot cross — A paper binding can never be live capital, and ATS-simulated paper never reaches a browser.
  • Unknown stays unknown — Ambiguous and duplicate commits force reconciliation from site history; a confirmation screen can never claim a fill.
  • Answers must match their call — Wrong call, session generation, principal, adapter digest or account, and stale or replayed answers are refused.
  • Cross-language proof — 189 single-cause vectors and an independent Python mirror agree on every digest and refusal message in CI on Linux and Windows.

Verification

  • Full suite 2717 pass / 13 skipped / 1 unrelated Windows job-object timeout (green on main CI); ATS suites 88/88 after the final module split.
  • Python mirrors 189 + 18 checks; 37-case timestamp differential agreed.
  • Each of 24 guards removed in turn: every suite failed for its stated reason.
  • verify:production ok at 4,844,612 / 5,000,000 bytes.

Risk / Follow-ups

  • Spec 1's frozen label and ticker shapes share two weaknesses fixed here; tracked separately.

P0 of the Agent Browser order path
(docs/specs/2026-09-23-ats-agent-browser-orders.md): the closed wire between
ATSv2's future browser order-ticket port and a qualified site adapter beside
the user's signed-in Agent Browser session. No broker picker and no broker
API are prerequisites; unsupported sites stay observation-only.

Ten semantic operations. No caller-supplied selector, coordinate, URL,
script or free text is representable, and tickers are equity-shaped so an
all-caps URL cannot pass as one. Results carry no page content, and the
masked account label comes from a closed character set. ATS simulated paper
can never reach a browser and a paper binding can never be live capital. A
commit is never a fill. Ambiguous and duplicate_commit results always require
reconciliation from site history. Every result must answer exactly its call,
session generation, principal and pinned adapter digest, observed no earlier
than the call less 5 s of clock skew.

- src/core/ats_contracts/browser_order{,_result,_gate,_values}.ts:
  validators, the result gate and derivations; no I/O
- test/fixtures/ats_browser_order_golden.json: 189 single-cause vectors
  (28 exchanges, 69 call rejects, 58 result rejects, 34 gate mismatches),
  each naming the exact refusal it must trigger; stored as pure ASCII
- test/fixtures/ats_browser_order_{wire,gate,verify}.py: an independent
  Python mirror with identical digests and refusal messages, emulating V8
  Date.parse; run in CI on Linux and Windows
- docs: CONTRACTS.md section 4, and the spec with the session, ownership and
  capability diagram, the deployment decision and the supersession of
  API-only language; section 3's stale profile name corrected

Independent TypeScript, security and Python-parity reviews found a
fullwidth-digit label bypass, a URL-shaped ticker, a replay gap and a
year-0000 divergence; all are fixed and pinned by vectors. Each of 24 guards
was removed in turn and every suite failed for its stated reason.

Local: full suite 2717 pass, 13 skipped, 1 fail (win32 Job Object warden
ping timeout in device_runtime_containment, unrelated and green on main CI
windows-latest); ATS suites 88/88 after the final module split; Python
mirrors 189 + 18 checks; verify:production ok at 4,844,612 bytes.

No order tool is registered and nothing here authorizes an order.
AetherAI3 added a commit that referenced this pull request Sep 23, 2026
… mission

G7 and G8 described provider sandbox and live capital as reachable only
through a broker's documented API and ruled out any browser route. For the
Agent Browser mission — a trading site the user signs in to, driven by a
qualified site adapter — that routing is superseded by
docs/specs/2026-09-23-ats-agent-browser-orders.md and the frozen
agent-browser-ats-order/1 contract (#164).

Adds a supersession note under the header, lets G7 qualify either the API
route or the browser route (acceptance by the site's own order history), and
narrows G8's prohibition to generic browser clicks, raw VNC, raw shell, MCP
pass-through and free-text endpoints. Nothing else changes; everything that
forbids generic browser control or screenshot evidence still stands.
@AetherAI3
AetherAI3 merged commit c105fd4 into main Sep 23, 2026
9 checks passed
@AetherAI3
AetherAI3 deleted the feat/ats-browser-order-contract branch September 23, 2026 15:38
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.

1 participant