Skip to content

[codex] Add run-scoped isolation - #58

Merged
midagedev merged 4 commits into
mainfrom
feature/multi-workspace-support
May 26, 2026
Merged

[codex] Add run-scoped isolation#58
midagedev merged 4 commits into
mainfrom
feature/multi-workspace-support

Conversation

@midagedev

Copy link
Copy Markdown
Owner

Summary

  • add /runs/<runId>/v1 and /runs/<runId>/api routing for isolated parallel billing runs
  • add run cleanup, admin row-count summaries, hosted URL prefix handling, fixture run propagation, and billtap seed
  • document the physical per-run SQLite store decision and update compatibility/spec docs

Scope

  • This change stays within Billtap sandbox boundary and does not add real payment processing.
  • This change does not introduce live credentials, real card data, production customer data, or production payment payloads.
  • I updated documentation when behavior, compatibility, support, or security expectations changed.

Verification

  • go test ./internal/server ./cmd/billtap
  • go test ./internal/api
  • go test ./...
  • go run ./cmd/billtap compatibility scorecard --output-dir /tmp/billtap-compatibility-run-scope

Compatibility And Boundary Notes

Run-scoped routing reuses the existing isolated workspace store mechanism: unscoped calls use default; /runs/<runId> maps to an isolated SQLite store, so duplicate Stripe object IDs, webhooks, test clocks, fixture state, and diagnostics stay separated. A future single-file row-level run_id schema migration remains possible and is documented in ADR 0004.

Screenshots Or Evidence

No UI screenshots; this is server/API/CLI behavior covered by automated tests.

midagedev and others added 4 commits May 22, 2026 17:07
Allow one running server to hold several fully isolated billing datasets
so parallel test suites no longer have to restart the server or reset
shared state between runs.

Requests select a workspace with the X-Billtap-Workspace header or the
workspace query parameter; unselected requests keep using the
backward-compatible default workspace backed by the configured
database_url. Named workspaces open their own SQLite database lazily
under a workspaces/ directory and get an independent API handler, so
customers, invoices, webhooks, idempotency keys, and test clocks are all
isolated. GET /workspaces lists the known workspaces.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reflect the new isolated-workspace feature across the design docs and the
product spec: testing isolation guidance, the storage architecture note,
functional requirement FR-010, non-functional requirement NFR-008, the API
contract Workspaces section, the data-model scoping note, and tasks T147.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@midagedev
midagedev merged commit d1d4e8c into main May 26, 2026
2 of 3 checks passed
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