Skip to content

Build hosted Agent Replay service foundation - #9

Open
altrudev wants to merge 28 commits into
mainfrom
feature/hosted-service-v0.1
Open

altrudev wants to merge 28 commits into
mainfrom
feature/hosted-service-v0.1

Conversation

@altrudev

Copy link
Copy Markdown
Owner

Purpose

Implement the first production-shaped hosted-service slice on top of Agent Replay 0.5.0 without coupling billing/account state to forensic logic.

Included

  • separate service/ package; standalone core remains unchanged
  • versioned Free / Pro / Internal plan definitions
  • verified-identity boundary for ADMIN/TESTER access
  • SQLite control plane for accounts, entitlements, usage, reservations and future webhook IDs
  • atomic quota reservation / commit / release flow
  • retries do not double-charge quota
  • infrastructure/worker failures do not consume usage
  • plain-language limit and failure messages
  • short-lived replay subprocess seam; no billing/account metadata is passed to the worker
  • local HTTP test server so the service can be exercised without ChatGPT MCP access
  • admin CLI for adding/removing ADMIN and TESTER emails without redeploying code
  • hosted-service implementation contract in docs/HOSTED_SERVICE.md

Verification

The service package was compiled locally and its initial regression suite passed: 5/5 tests.

Covered cases:

  • unverified email cannot obtain tester/admin access
  • expired tester access falls back to normal plan
  • concurrent quota reservations cannot exceed a plan limit
  • failed replay releases usage and retry can proceed
  • identical successful replay does not consume a second quota unit
  • tampered test identity tokens are rejected

Deliberate boundaries

This PR does not expose the service publicly or change DSR. The local server binds to 127.0.0.1:8791 by default. Public MCP/OAuth/Stripe adapters are the next thin layers and must use this control-plane contract rather than duplicate forensic logic.

OpenAI's current developer surface continues to use MCP for third-party tool/app integration, so the ChatGPT adapter will be built as a thin MCP layer over this service rather than embedding Agent Replay semantics in the platform adapter.

Governing invariant

Plan, payment and role determine what may be used. Evidence alone determines what Agent Replay concludes.

This branch has not been deployed

No deployments
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