fix(evolution): allow backlog re-queue after executed - #136
Draft
cursor[bot] wants to merge 2 commits into
Draft
Conversation
Drop the global UNIQUE on evolution_backlog.dedupe_key (with migration), upsert active rows or insert when only executed history remains, and attach coordinator status updates to the persisted proposal id so authorized re-evolution no longer returns a phantom id / NoScope. Co-authored-by: EXboy <EXboys@users.noreply.github.com>
Co-authored-by: EXboy <EXboys@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
executed, the samededupe_keycould never re-enterevolution_backlogbecausededupe_keywas globally UNIQUE while upsert only updated non-executed rows.executed) → authorize the same gap again → enqueue returns a phantomproposal_id→ forcedevolution runlogsevolution_proposal_missingand returnsNoScope.Bug and Impact
Root Cause
evolution_backlog.dedupe_key TEXT NOT NULL UNIQUE+INSERT OR IGNORE+UPDATE ... WHERE status != 'executed'→ both arms no-op once an executed row exists.Task Linkage
TASK-2026-084tasks/TASK-2026-084-evolution-backlog-requeue-after-executed/Injected Specs
spec/verification-integrity.mdspec/task-artifact-language.mdspec/architecture-boundaries.mdspec/structured-signal-first.mdspec/capability-gap-evolution.mdspec/rust-conventions.mdspec/testing-policy.mdspec/security-nonnegotiables.md(N/A)spec/docs-sync.md(N/A: no user-facing docs/command/env change)Validation Evidence
cargo test -p skilllite-evolution --lib→ 97 passedcargo clippy -p skilllite-evolution --all-targets -- -D warnings→ cleanpython3 scripts/validate_tasks.py→ 71 task directories passedenqueue_user_capability_evolution_requeues_after_executedokmigrate_evolution_backlog_allows_requeue_with_legacy_unique_dedupeokcoordinate_attaches_status_to_persisted_id_after_requeueokRegression Scope
feedback.sqliteDBs (one-time table rebuild when UNIQUE present)sessions.jsonconcurrent write mergeDocs Sync (EN/ZH)
Review Checklist
tasks/TASK-2026-084-evolution-backlog-requeue-after-executed/TASK.mdsatisfiedSTATUS.mdupdatedREVIEW.mdincludes merge readiness decisiontasks/board.mdstatus is up to date