Repository navigation
test(ccv2): add isolated build cleanup fixtures and races - #16
Merged
Merged
Conversation
This was referenced Nov 14, 2026
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.
CCv2 build cleanup needs deterministic inventories and races that cannot be created through normal build operations. Add an authenticated, run-isolated cleanup fixture control endpoint with bounded build/deployment seeds, internal modification metadata, deterministic record changes, and accepted deletion followed by an ambiguous response. SAP-shaped responses remain unchanged; deletion initiation retains the build record with
DELETEDstatus.The deletion simulation now rejects snapshot-backed, unknown/non-terminal, deployed, or operationally referenced builds. State counters observe every operation so cleanup tests can distinguish target API mutations from fixture setup and run teardown. Update the control OpenAPI and focused tests accordingly.
Validation: 63 sandbox tests passed across 14 files at
5ded738ccab77f640ce40714d1d3bec77b1285c8; formatting, ESLint, main/test TypeScript, OpenAPI validation, generated-type consistency, and local dry-run bundling passed. The actual cleanup bundles also passed local sandbox integration, including OAuth refresh, paginated discovery, protections, deployment references, report/event validation, and zero target mutations while eligibility is unverified. The canonicalpnpm run ciattempt was blocked by the temporary checkout's symlinked dependency setup; its constituent checks were executed directly.Draft validation gate: sandbox metadata does not establish that SAP exposes a build modification timestamp or enforces the four-hour deletion rule at the API. Production eligibility and destructive bundled scenarios remain blocked. Hosted/live SAP validation, slow-request timeout/cancellation/deadline scenarios, actual token expiry, and a snapshot appearing during final revalidation were not run against the sandbox. Separate cleanup orchestration tests cover injected safety evidence; they do not prove SAP guarantees.
No Cloudflare configuration change or deployment is included. This draft does not authorize merging, package/action publication, tagging, production enablement, or real SAP deletion.
Base:
a787e4b07c487a8a4833541f7f7d8bd4afd9fef4. This candidate was rebased without conflicts onto current main; current main’s source tree is identical to the auditedec545e81f0d3f7151572d925905ebdabe84d8f47baseline (both treea8ed92a1187f750f4d47605e24af956219b94ffa). The focused cleanup patch is unchanged.Security note: the push reported five existing default-branch Dependabot alerts (four moderate, one low). These were not resolved by the cleanup-fixture changes; review the repository security dashboard independently.
Companion draft PRs
These are coordinated draft changes. No merge, publication, tagging, deployment, production enablement, or real SAP deletion is authorized by this review. Keep the dependency-publication and SAP eligibility gates explicit.
Hosted validation snapshot — 2026-11-14
PASS: sandbox validate completed successfully on rebased head
5ded738ccab77f640ce40714d1d3bec77b1285c8. Existing default-branch advisory findings, documented unexecuted scenarios, and lack of authoritative SAP eligibility evidence remain separate review gates. No deployment was triggered by this draft.