Repository navigation
fix(ci): validate all test manifests before relocation - #20229
Conversation
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Codex <codex@openai.com>
|
All contributors have signed the CLA ✍️ ✅ |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Probably yours: CI failed on
Matched log linesNot re-run automatically: Written by |
|
Agents: |
teamleaderleo
left a comment
There was a problem hiding this comment.
@BlueRaddish the test with a bad later manifest makes this convincing. Thanks!
|
Merging at fdd01f6 (independent review SHIP). The only failing step is lint-feature-flags on an expired reviewBy date in Sources/FeatureFlags.swift ('agent-inbox-quick-view-enabled-release'), which failed on main for every PR until it was extended there. linux-preflight and ci-status fail only as its rollups. This PR doesn't touch that file. |
|
Merge receipt for
Labeled |
…re; drop a stale fast-guard step reference tests/test_app_host_test_products.py: main's #20229 test breaks a cmux-cli-tests manifest, which the cmux-next profile does not have; it now breaks the fixture scheme's only manifest. ci-guards.yml: the golden interactions judge step read steps.fast-guard, a step this job does not have (base red in tests/test_ci_guard_workflow_structure.py on feat-cmux-next b9429af).
…cx-q1lnl) 37 main commits since 5da8121. Conflict choices: - modify/delete (36 files: legacy CLI/, Sources/, cmuxTests/, CmuxCloud, CmuxControlSocket, CmuxSettings RightSidebarWidth, CmuxTextActions, CmuxMobileShell test, Resources/Localizable.xcstrings, tmux wait-for fixture and test): kept deleted. - cmux.xcodeproj/project.pbxproj, tests/test-execution.toml, docs/cli-contract.md: feat-cmux-next's side (main's `vm clean` contract rows not ported; the legacy Swift CLI is gone). - scripts/gh-merge-green, tests/test_gh_merge_green.py: main's logic (manaflow-ai#21957 merge-freeze issues replace the WINDOW read). feat's manaflow-ai#21309 WINDOW freeze metadata is superseded by it; feat's Swift canary check name and the god-file path canonicalization stay. - .github/workflows/ci-guards.yml: added main's review-date flag test and the stale agent PR step; dropped test_cloud_upgrade_rollout_retirement.py and the main full-suite steps (files absent on feat-cmux-next). - scripts/ci/classify_failures.py: main's imports minus ui_tests_dispatch (module deleted on feat-cmux-next). - scripts/ci/app_host_test_products.py: main's validate-then-write (manaflow-ai#20229), without the numeric-locale alias block feat-cmux-next removed. - tests/test_ci_production_secrets_protected_env.py: feat-cmux-next's nightly track environment rule. - skills/cmux-cloud-vm/references/commands.md: feat-cmux-next's side (no `vm clean` on the cmux-next CLI). skills/cmux-testing/SKILL.md: feat's rows plus main's web test verdict row. - Run API: main's range has no Run API or staging dogfood/journey change; feat's manaflow-ai#21337 Run API stays as is.
Summary
Restoring an app-host test product rewrites each manifest as it goes. If a later manifest references a missing bundle, the restore fails after earlier manifests have already been relocated. Restore now validates and serializes every manifest before writing any of them, so a later validation failure leaves the downloaded product unchanged.
This protects against validation and serialization failures; it does not make multiple filesystem writes an atomic transaction.
Testing
4e81fbcfand passes onfdd01f61with the same command:python3 tests/test_app_host_test_products.py TestProductHandoff.test_invalid_later_manifest_does_not_rewrite_earlier_productspython3 tests/test_app_host_test_products.py: all 15 tests pass on Linux using an exact source export. The new regression also passes on Windows. Two existing relocation fixtures assume POSIX path separators and fail identically on the original source on Windows.verify-local.py --affected HEAD^ --listwas used to inspect scope selection; it is a preview, not an executed static-check suite.These checks exercise the portable product handoff code with real plist files. No Xcode build or macOS app execution was performed.
Changelog
none
Proof
CI tooling only; the regression compares all manifest bytes before and after the rejected restore.
Checklist
AI assistance: Codex helped investigate, implement, and verify this change.
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes a bug in CI product restore where a later invalid manifest could leave earlier manifests already relocated. Restore now validates and serializes every manifest before writing any, so a validation failure leaves the downloaded product unchanged. Adds a regression test that fails on the old behavior.
Written for commit fdd01f6. Summary will update on new commits.
Summary by CodeRabbit