Problem
Backend tests can be created and updated individually, but a repository cannot currently declare an entire dependency-aware TestSprite suite as reviewable source. Teams must manually keep remote test metadata, Python code, and produces/consumes relationships aligned. That makes drift, accidental duplication, and unsafe bulk maintenance difficult to detect before mutation.
Proposed CLI surface
Add a versioned backend Suitefile and four commands:
testsprite suite validate <manifest> validates the manifest, referenced Python files, and dependency graph locally.
testsprite suite graph <manifest> emits deterministic execution waves compiled from produces/consumes declarations.
testsprite suite plan <manifest> compares desired state with the remote project without mutation.
testsprite suite apply <manifest> --confirm creates or updates the reviewed changes.
An adjacent lockfile records stable suite-key to remote-test identity, code version, desired-state hash, and any pending idempotent create request.
Safety boundaries
- Schema v1 manages backend tests only.
- Unknown fields, cycles, ambiguous or missing producers, duplicate identities, oversized code, and lexical/symlink path escapes fail locally.
- Existing remote tests are adopted only by explicit
testId or lockfile identity; same-name tests are conflicts.
- Unmanaged remote tests are reported and never deleted.
- Mutations require
--confirm, use deterministic idempotency keys, and retain interrupted-create identity for safe replay.
- Optimistic concurrency protects code updates.
- No new runtime dependencies or outbound services are introduced.
Relationship to #125 / PR #265
PR #265 round-trips one test definition at a time. This proposal is complementary: it compiles a multi-test dependency graph and reconciles a repository-owned desired state against a project. It does not depend on or replace test export / test import.
Acceptance criteria
- Local validation and graph compilation require no credentials or network.
- Plan output classifies each managed test as create, update, unchanged, or conflict.
- Apply refuses conflicts and unconfirmed mutations.
- Lockfile writes are atomic and interrupted creates are replay-safe.
- CLI help, documentation, unit tests, and package output include the new command group.
A tested implementation is ready on a contributor branch; I am opening this issue to satisfy the repository's feature workflow and am happy to adjust the contract during review.
Problem
Backend tests can be created and updated individually, but a repository cannot currently declare an entire dependency-aware TestSprite suite as reviewable source. Teams must manually keep remote test metadata, Python code, and
produces/consumesrelationships aligned. That makes drift, accidental duplication, and unsafe bulk maintenance difficult to detect before mutation.Proposed CLI surface
Add a versioned backend Suitefile and four commands:
testsprite suite validate <manifest>validates the manifest, referenced Python files, and dependency graph locally.testsprite suite graph <manifest>emits deterministic execution waves compiled fromproduces/consumesdeclarations.testsprite suite plan <manifest>compares desired state with the remote project without mutation.testsprite suite apply <manifest> --confirmcreates or updates the reviewed changes.An adjacent lockfile records stable suite-key to remote-test identity, code version, desired-state hash, and any pending idempotent create request.
Safety boundaries
testIdor lockfile identity; same-name tests are conflicts.--confirm, use deterministic idempotency keys, and retain interrupted-create identity for safe replay.Relationship to #125 / PR #265
PR #265 round-trips one test definition at a time. This proposal is complementary: it compiles a multi-test dependency graph and reconciles a repository-owned desired state against a project. It does not depend on or replace
test export/test import.Acceptance criteria
A tested implementation is ready on a contributor branch; I am opening this issue to satisfy the repository's feature workflow and am happy to adjust the contract during review.