From 4c7a897ce3afe8cfdcac5217164a8be60f4b03d6 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN Date: Tue, 20 Oct 2026 09:40:26 -0400 Subject: [PATCH] dispatch-2 storage-cors-1: route independently reproduced CORS preservation fix --- docs/agents/prompts/storage-cors.md | 8 +++++++- fleet/LOG.md | 4 ++++ fleet/RULE-CHANGES.md | 3 +++ ...G_2026-10-20_13-40-00_dispatch-storage-reproduction.md | 5 +++++ 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 test_logs/TEST_LOG_2026-10-20_13-40-00_dispatch-storage-reproduction.md diff --git a/docs/agents/prompts/storage-cors.md b/docs/agents/prompts/storage-cors.md index ed435720..e43486b1 100644 --- a/docs/agents/prompts/storage-cors.md +++ b/docs/agents/prompts/storage-cors.md @@ -1,6 +1,12 @@ # Area: Storage CORS reliability (storage-cors) -## Assignment: storage-cors-1 +## Assignment: storage-cors-1 — preservation fix routed + +Implementation routed after worker and independent dispatch offline reproduction: adding second origin replaces the entire existing rule, existingRulesPreserved0/1. Dispatch command env -u NODE_TEST_CONTEXT node /tmp/bitvid-dispatch-storage-cors-reproduce.mjs exits1 at strict false!==true after all5 characterization controls. No cloud IO. + +Now implement only s3-multipart.js plus GetBucketCorsCommand export in s3-client.js and new storage-cors-preservation test/integrity note. Preserve every existing rule and all fields verbatim; add a separate existing-default-shaped rule for uncovered requested origins without broadening arbitrary rules. Idempotence: no PUT when existing equivalent default rule already covers all requested origins; explicitly test equivalent-rule detection and repeated calls. Missing config only on NoSuchCORSConfiguration; other read failures propagate with no PUT. Do not guess wildcard equivalence or merge restrictive/custom rule semantics. Preserve empty-origin no-op. Tests must use actual helper/command export, fake transport only, cover existing rules/wildcards/duplicates/no-config/read-denied/idempotence and bounded provider errors; do not silently replace on read failure. Do not change current default methods/headers/TTL as unrelated policy; if SDK/provider limits make safe preservation impossible, report before broadening. Offline mutants for every new scenario; preserve normal assertions/gates. Relevant focused storage suites/lint/build; request full-suite slot (client ahead), no browser/cloud need. CLI/test/lander launches clear NODE_TEST_CONTEXT. Commit item1, merge unstable, normal queue/durable ancestry before close; no premature qualification of real S3. + +Historical investigation context follows; its before-product restriction is superseded by the routed scope above. Bounded parallel trial: validate todo/TODO_2026-06-16_r2-followups.md CORS replace-not-merge report at current HEAD. Dispatch inspected ensureBucketCors in js/storage/s3-multipart.js: constructs PutBucketCors with requested origins only, no GetBucketCors. This is evidence for investigation, not proof every caller loses policy. Trace actual callers and required existing-origin behavior. Reproduce offline via real helper and fake S3 transport/SDK boundary: an existing origin/rule, adding a second origin, idempotent repeated call, missing config and read-failure cases. No cloud credentials/network/bucket mutation. diff --git a/fleet/LOG.md b/fleet/LOG.md index bc699e62..40e172ee 100644 --- a/fleet/LOG.md +++ b/fleet/LOG.md @@ -70,3 +70,7 @@ - Trial intervention: original roster47953970 gate rejected13:28:15 at118th file,1047831-byte log with8877 binary0xff markers. Inherited NODE_TEST_CONTEXT=child-v8 emits Node test protocol; spawnSync default capture cap reproduced as ENOBUFS/SIGTERM. Clean diagnostic reached101 file starts with no failure markers then was intentionally stopped(exit143) to avoid overlapping full gates. Resubmitted unchanged roster13:30:35 with NODE_TEST_CONTEXT unset; log now plain text/no binary markers, normal gate unchanged. Original rejection evidence retained in trial notes. MCP deadline/read fallback and worker wake/claim delay also observed; item5 pickup confirmed13:27:49. - Item5 independently reproduced disposed active error starting1 obsolete mirror HEAD(expected0); shared-owner control exit0/healthy/resources0. Route same worker to controller-only mirror-continuation guard and focused regression; no active abort or policy changes. Waiting for first roster gate before new worker launch; no launch claimed yet. + +- Clean roster47953970 durable landedbbc1be79 at13:37:27, normal gate exit0; initial submission13:26:20, rejection13:28:15, environment-corrected retry13:30:35 (full gate~6m53s). No gate/test/kit change. Created worktrees bitvid-storage-cors/bitvid-playback-qa and launched clean-env windows pid249026/pid249041 ~13:38UTC. Host status confirms4 alive windows; storage read/next-action13:38:24 verified, QA acknowledgment pending. Current routingf3c0ffd3 second conservative admin full gate adds serial resource delay; item5 full request13:32:54 remains queued. + +- storage-cors pickup13:38:24, concrete offline loss report13:39:21 (~57s later). Independent dispatch strict reproduction exits1 existing origin false!=true,5 characterization controls complete, no network. Routed preserve-verbatim rules/new default uncovered-origins/no-read-failure overwrite/idempotence to owned helper+SDK export/new test. QA .task records local fallback investigation start13:38:36, mailbox read/next-action event still pending; no browser opened. diff --git a/fleet/RULE-CHANGES.md b/fleet/RULE-CHANGES.md index b1e920d0..abe439fe 100644 --- a/fleet/RULE-CHANGES.md +++ b/fleet/RULE-CHANGES.md @@ -9,6 +9,9 @@ a landing rule changes. ## 2026-10-20 +- storage-cors-1 fix routed after worker+dispatch offline reproduction: preserve existing bucket CORS rules/fields; append default rule only for uncovered origins, idempotent no-PUT for equivalent coverage, only NoSuchCORSConfiguration permits absent config, other read errors no PUT. Own s3-multipart.js/s3-client.js+focused new test/integrity. No real cloud/credential operations or unrelated policy change; full gate slot follows client. + + - Item5 narrow fix routed after worker+dispatch reproduction: prevent fresh mirror HEAD after disposed last-owner active-media error; controller+focused URL lifecycle tests only. Preserve bounded active/cache/shared/rejoin/timeout semantics, no active abort. Parallel trial CLI/agent/lander launches clear inherited NODE_TEST_CONTEXT transport; exact gate/assertions unchanged. Original roster gate hit binary capture cap, not identified product assertion. No kit patch. diff --git a/test_logs/TEST_LOG_2026-10-20_13-40-00_dispatch-storage-reproduction.md b/test_logs/TEST_LOG_2026-10-20_13-40-00_dispatch-storage-reproduction.md new file mode 100644 index 00000000..c73115d8 --- /dev/null +++ b/test_logs/TEST_LOG_2026-10-20_13-40-00_dispatch-storage-reproduction.md @@ -0,0 +1,5 @@ +# Storage CORS independent reproduction + +- Code matches rosterbbc1be79; dispatch administrative branch has no storage code delta. +- env -u NODE_TEST_CONTEXT node /tmp/bitvid-dispatch-storage-cors-reproduce.mjs: exit1 strict existing-origin false!==true after5 characterization controls. Actual helper+SDK wrapper, offline SDK module and transport only. ExistingRulesPreserved0/1; repeated calls2PUTs,missing-config1PUT,read-denied fixture1PUT/read0,empty origins0IO. +- Scoped preservation semantics routed; no lint/full/build/cloud qualification yet. No live bucket/credentials used.