Repository navigation
fix: safely replace unpublished release and hotfix candidates - #755
Conversation
…omotion-pr-ci-requires-a-source-fix: support safe replacement of unpublished deployment candidates
|
To preview the documentation for this pull request, visit the following URL:
|
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled one4273e1. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 1 potential problem when commit 43a1b70 was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.
Findings
- low: Recovery performs the same full native inspection twice —
src/application/usecases/actions/deployment_handlers/replace_candidate_handler.ts:38
Bugbot: review complete
|
Copilot approval · Human review neededStatus: A protected workflow, policy, or trust-boundary file changed. Technical evidenceRevision: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #755 +/- ##
===========================================
+ Coverage 94.50% 94.78% +0.28%
===========================================
Files 1035 1078 +43
Lines 33299 34856 +1557
Branches 9824 10354 +530
===========================================
+ Hits 31468 33040 +1572
+ Misses 699 684 -15
Partials 1132 1132
🚀 New features to boost your workflow:
|
…omotion-pr-ci-requires-a-source-fix: avoid duplicate native inspection on recorded candidate recovery
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled one4273e1. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 2 potential problems when commit 37143dd was analyzed. This snapshot is historical; use the status block above for current state. 2 findings are linked to changed code.
Findings
- high: Candidate preflight executes code from the supplied source SHA —
.github/workflows/release_workflow.yml:128 - medium: Replacement mode always fails fresh verification —
setup/workflows/release_workflow.yml:168
…omotion-pr-ci-requires-a-source-fix: pin candidate inspection runtime and require explicit verifier activation
There was a problem hiding this comment.
Current status: All findings originating in this review are resolved.
Last reconciled one4273e1. See aggregate Bugbot status.
🤖 Bugbot review snapshot
Bugbot reported 1 potential problem when commit 47cd2d3 was analyzed. This snapshot is historical; use the status block above for current state. 1 finding is linked to changed code.
Findings
- low: Preflight links the reviewed source as a prepared candidate —
src/application/policies/deployment_candidate_preflight_presentation.ts:25
…omotion-pr-ci-requires-a-source-fix: distinguish reviewed input from prepared candidate in preflight summary
A promotion-only CI failure can require a legitimate source fix after a release/hotfix candidate has already frozen its SHA. Ordinary prepare then rejects the changed source, and publication/reconciliation recovery cannot safely replace that unpublished candidate.
Adds an explicit
replaceworkflow mode: native read-only preflight → complete fresh project preparation and validation → exact candidate/production-base/run/attempt/revision checks → a new durable operation and ordinary protected promotion PR. The old PR must be closed unmerged, and its identity and evidence remain in a bounded audit history. Version, managed branch, origin, title/changelog, locale and policy are preserved. Old callbacks cannot advance the successor; exact replay recovers only the recorded candidate, with no repeated preparation or publication.Replacement blocks on acceptance/publication effects, any matching native tag or Release (including drafts with proven visibility), foreign/open/queued promotions, stale heads/base/revisions and unavailable authority. The maintainer must independently inspect every project registry and explicitly confirm vacancy. Preflight runtime code is selected by the trusted workflow commit (
github.workflow_shain this repository) or the released standalone subaction in consumers; the supplied source SHA is data. The final native adapter requires successful prerequisite jobs and named verification/identity steps from this exact workflow attempt; generic JSON input overlays cannot synthesize or overwrite replacement proofs. Each path performs one complete native inspection, followed by cheap final source/base ref reads that reject movement during inventory work. Preflight summaries call the unprepared input “Reviewed source” and reserve “Prepared source” for the recorded final candidate, consistently in EN/ES/static fallback. Consumer templates keep replacement disabled in both mode choices and the permissionless validator. Maintainers configure all project validators, enable the workflow-owned literal and then add the replace choice; the failing verifier cannot be skipped. Existing prepare/publish/resume paths and merge protections remain in force; local deployment is rejected.Validation: complete final coverage passed 772 root Jest suites / 14,091 tests, with 35 existing skips; all global/module budgets and setup acceptance passed. All nine new modules have 100% in four metrics. The final patch audit has 433 executable modified lines covered, zero misses and zero uncovered changed branches. All 267 extension tests pass with 100% in four metrics. Types, lint, architecture, specifications/catalog/ledger, docs/agent docs, workflow contracts and Graphify pass. The real npm package contains 87 files and passes CLI, typed API and isolated local web smoke. Three real standalone-bundle HTTP fixture scenarios verify read-only execution, no profile creation, publication conflict refusal and invalid-intent refusal before native reads. Failing-before regressions cover the original source-correction failure, duplicate inspection, untrusted runtime selection and unconfigured consumer activation. Dedicated native adapter regressions reject either pinned ref moving during inspection. Normal commit hooks repeat full build, Jest and lint.
The automatic preflight token has read-only repository permissions; the existing product token supplies native reads and no new agent capabilities. This change does not deploy a consumer, publish a version or claim live adoption. The SDD and operator documentation include compatible-runtime/workflow setup, complete project verifier requirements, exact dispatch inputs, interrupted preparation and replay recovery.
Closes #732.