Skip to content

Commit fe537cf

Browse files
committed
ci: authorize Plan v1 cleanup deletions
1 parent 40c3831 commit fe537cf

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

‎scripts/check-no-main-deletions.mjs‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,37 @@ const RETIRED_ROUTING_FILES = [
740740
const FALLOW_PRUNE_REASON =
741741
"fallow 3 reuses one audit snapshot per checkout and the hook prunes with `fallow audit-cache prune`, replacing this script";
742742

743+
const PLAN_V1_SAMPLE_REASON =
744+
"Plan v1 is no longer a supported cloud transport; the adapters, workflows and smoke tests now accept Plan v2 only";
745+
746+
const PLAN_V1_SAMPLE_FILES = [
747+
"examples/aws-lambda/sample-events/assemble-v1.json",
748+
"examples/aws-lambda/sample-events/plan-v1.json",
749+
"examples/aws-lambda/sample-events/render-chunk-v1.json",
750+
"examples/gcp-cloud-run/sample-events/assemble-v1.json",
751+
"examples/gcp-cloud-run/sample-events/plan-v1.json",
752+
"examples/gcp-cloud-run/sample-events/render-chunk-v1.json",
753+
];
754+
755+
const PLAN_PARITY_HARNESS_REASON =
756+
"the completed Plan v1-to-v2 rollout harness has no supported v1 cloud path left to exercise";
757+
758+
const PLAN_PARITY_HARNESS_FILES = [
759+
"packages/producer/fixtures/plan-parity-size-pressure/.plan-parity-fixture.json",
760+
"packages/producer/fixtures/plan-parity-size-pressure/index.html",
761+
"packages/producer/fixtures/plan-parity-visual-audio/.plan-parity-fixture.json",
762+
"packages/producer/fixtures/plan-parity-visual-audio/index.html",
763+
"packages/producer/src/plan-parity-analysis.test.ts",
764+
"packages/producer/src/plan-parity-analysis.ts",
765+
"packages/producer/src/plan-parity-contract.test.ts",
766+
"packages/producer/src/plan-parity-contract.ts",
767+
"packages/producer/src/plan-parity-fixture.test.ts",
768+
"packages/producer/src/plan-parity-fixture.ts",
769+
"packages/producer/src/plan-parity-harness.test.ts",
770+
"packages/producer/src/plan-parity-harness.ts",
771+
"packages/producer/src/plan-parity-lambda-local-driver.ts",
772+
];
773+
743774
export const ALLOWED_DELETIONS = new Map([
744775
// Prompt Guide as six topic pages
745776
[
@@ -2072,6 +2103,8 @@ export const ALLOWED_DELETIONS = new Map([
20722103
],
20732104
["scripts/prune-fallow-audit-caches.mjs", FALLOW_PRUNE_REASON],
20742105
["scripts/prune-fallow-audit-caches.test.mjs", FALLOW_PRUNE_REASON],
2106+
...PLAN_V1_SAMPLE_FILES.map((path) => [path, PLAN_V1_SAMPLE_REASON]),
2107+
...PLAN_PARITY_HARNESS_FILES.map((path) => [path, PLAN_PARITY_HARNESS_REASON]),
20752108
[
20762109
"packages/engine/src/services/frameCapture-releaseInjectedVideoMedia.browser.test.ts",
20772110
"the revert of #5795 removes releaseInjectedVideoMedia, the only code this file tested",

‎scripts/check-no-main-deletions.test.mjs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,17 @@ test("the Chrome beat analyzer removal is explicitly scoped", () => {
6868
assert.match(ALLOWED_DELETIONS.get(path) ?? "", /TypeScript beat tracker/);
6969
assert.equal(ALLOWED_DELETIONS.has("packages/core/src/beats/beatDetection.ts"), false);
7070
});
71+
72+
test("the Plan v1 cleanup allowlist is limited to samples and the rollout harness", () => {
73+
for (const path of [
74+
"examples/aws-lambda/sample-events/plan-v1.json",
75+
"examples/gcp-cloud-run/sample-events/plan-v1.json",
76+
])
77+
assert.match(ALLOWED_DELETIONS.get(path) ?? "", /no longer a supported cloud transport/);
78+
79+
assert.match(
80+
ALLOWED_DELETIONS.get("packages/producer/src/plan-parity-harness.ts") ?? "",
81+
/completed Plan v1-to-v2 rollout harness/,
82+
);
83+
assert.equal(ALLOWED_DELETIONS.has("packages/producer/src/services/distributed/plan.ts"), false);
84+
});

0 commit comments

Comments
 (0)