release: safely consolidate duplicate draft releases - #531
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
🟡 Changes recommended
There are internal inconsistencies in newly added tests/docs (e.g., confirmation string format and spec status) that should be corrected to keep the safety workflow accurately specified and exercised.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a dedicated, fail-closed operator workflow to consolidate the known duplicate v0.8.22 GitHub draft releases into a single preserved survivor, with durable journaling/receipts and extensive rehearsal + recovery testing to ensure the process is resumable and verifiable.
Changes:
- Introduce a strict, incident-scoped
duplicate-draft-consolidationCLI withinspect/perform/verifymodes and bounded output/error handling. - Add canonical journal + receipt mechanics and test harnesses that simulate crashes, lost responses, SIGKILL, and output flooding.
- Document the consolidation design/spec and wire a
release:consolidate-draftspackage script for local operator use.
File summaries
| File | Description |
|---|---|
| scripts/release/test/support/duplicate-draft-consolidation-process-loss-child.mjs | Child-process helper to simulate hangs/flooding/SIGKILL boundaries for crash-recovery rehearsal. |
| scripts/release/test/support/duplicate-draft-consolidation-fixture.mjs | Deterministic fixture for 3 equivalent draft releases, assets, and attestation verification behavior. |
| scripts/release/test/support/duplicate-draft-consolidation-authorized-delete.mjs | Harness for exercising delete authorization/permits/journal integration around a single target delete. |
| scripts/release/test/duplicate-draft-consolidation-rehearsal.test.mjs | End-to-end rehearsal covering inspect/perform/verify plus process-loss and bounded-output behavior. |
| scripts/release/test/duplicate-draft-consolidation-journal.test.mjs | Journal schema/state machine tests, hash-chain integrity, replay/resume legality rules. |
| scripts/release/test/duplicate-draft-consolidation-files.test.mjs | File safety/atomicity tests for private envelopes, locks/quarantine, tracked receipts, and bounds. |
| scripts/release/test/duplicate-draft-consolidation-evidence.test.mjs | Evidence capture/parity validation tests for releases/assets/timestamps/bounds and hostile shapes. |
| scripts/release/test/duplicate-draft-consolidation-cli.test.mjs | CLI contract tests for exact argv acceptance, safe summaries, and stderr/stdout failure containment. |
| scripts/release/duplicate-draft-consolidation-release-classifier.mjs | Classifier for selecting only the approved managed releases per authority stage and incident identity. |
| scripts/release/duplicate-draft-consolidation-journal.mjs | Production journal creation/parsing/replay + resume decision logic and final receipt construction. |
| scripts/release/duplicate-draft-consolidation-cli.mjs | Incident-scoped operator CLI entrypoint with strict argv parsing and hardened sink writing. |
| scripts/release/duplicate-draft-consolidation-authority.mjs | Safe wrapper around adapter-provided authority capture entrypoint (descriptor/frozen/proxy checks). |
| package.json | Adds release:consolidate-drafts script to run the consolidation CLI. |
| docs/superpowers/specs/2026-09-01-duplicate-draft-consolidation-design.md | Design/spec writeup describing safety model, evidence/journal/receipt formats, and live procedure. |
Review details
- Files reviewed: 19/26 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🔵 Needs a closer look
Token-shaped placeholder strings (e.g. ghp_...) and a related doc claim mismatch can trigger secret-scanning and make the documentation factually inaccurate.
Review details
Suppressed comments (2)
Previously missed (2) — in code that hasn't changed since the last review.
docs/superpowers/specs/2026-09-01-duplicate-draft-consolidation-design.md:149
- The design doc says “tokens never appear in … source files”, but this PR’s test fixtures include token-shaped placeholders (e.g.
ghp_…). Either avoid token-shaped strings in tests or clarify that the restriction applies to real credentials / production surfaces only, to keep the doc accurate.
scripts/release/test/duplicate-draft-consolidation-rehearsal.test.mjs:617 - This test fixture token uses the
ghp_prefix, which may be detected as a GitHub PAT by secret-scanning and contradicts the doc claim that tokens never appear in source files. Prefer a neutral placeholder token string that doesn’t match real token prefixes.
- Files reviewed: 19/26 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
It introduces a large, incident-critical release-deletion workflow (plus extensive safety logic) where a final human review is warranted due to operational blast radius.
Review details
- Files reviewed: 19/26 changed files
- Comments generated: 0 new
- Review effort level: Lite
Summary
Verification
DAWN_REQUIRE_DOCKER=1 pnpm ci:validateNo live receipt is included in this pull request.