Skip to content

Make test-product retention configurable - #532

Draft
ianrahman wants to merge 1 commit into
getsentry:mainfrom
ianrahman:codex/configurable-test-products-retention
Draft

Make test-product retention configurable#532
ianrahman wants to merge 1 commit into
getsentry:mainfrom
ianrahman:codex/configurable-test-products-retention

Conversation

@ianrahman

Copy link
Copy Markdown

What changed

  • add testProductsMaxCount and testProductsMaxAgeDays project configuration, with XCODEBUILDMCP_TEST_PRODUCTS_MAX_COUNT and XCODEBUILDMCP_TEST_PRODUCTS_MAX_AGE_DAYS environment overrides
  • pass dedicated test-product retention limits through the workspace filesystem lifecycle
  • lower managed .xctestproducts retention from 100 bundles / 3 days to 3 bundles / 1 day
  • preserve the existing safety boundary: only XcodeBuildMCP-managed paths are pruned; caller-provided prepared-test paths are untouched
  • cover defaults, configuration precedence, schema validation, and lifecycle pruning

Why

Source-based test runs stage a full .xctestproducts bundle under the workspace storage directory. For multi-gigabyte test products, the previous 100-bundle default permits hundreds of gigabytes of retained data before count-based cleanup applies.

Validation

  • TypeScript syntax checks for all changed source and test files
  • direct retention-pruning smoke test
  • configuration default and precedence smoke test
  • workspace lifecycle integration smoke test (3 scanned, 2 deleted, newest retained)
  • git diff --check

Fixes #524.

AI assistance: Codex helped trace the retention lifecycle, implement the configuration surface, and run the available validation. The resulting diff and test evidence were reviewed before submission. (Though tbh I'm not a Typescript guy and this could use more experienced review for that reason.)

@ianrahman
ianrahman marked this pull request as draft September 11, 2026 21:01
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.

Test-products retention is unbounded in practice (100 bundles / 3 days, no config knob) — can fill a disk

1 participant