Skip to content

fix(harness-ops): an interrupted plugins sync ask run leaves a pick installed but off and unreported #6212

Closed

Description

@kyle-sexton

This was generated by AI during work-loop.

Context

Found by the Codex review on PR #6209 (closes #6187). With #6187, plugins sync's ask policy installs a pick and then enables it at user scope when the CLI installed it disabled. If the run is interrupted between the install and the enable, the pick is left installed with a user-scope enabledPlugins: false. That entry is indistinguishable from a deliberate opt-out, so no later sync reports or repairs it.

This is not a regression. Before #6187, ask picks were never enabled, so the pick ended in the same off state. The gap is that #6187's intent ("enable what the user picks") is not crash-safe.

Proposed work

Decide the recovery shape, then implement it:
(a) persist a pending-enable record before the install and clear it after the enable, so the next sync completes or reports it, or
(b) report user-scope false keys that sync itself wrote and never cleared.

Acceptance criteria

  • An interruption between install and enable (simulated in the stub suite) is completed or reported on the next sync run.
  • A deliberate user opt-out (false the user set) is never re-enabled.

References

Metadata

Filed by the work-loop lane (instance melo-worker-1) per the self-observation contract; not self-triaged.

Activity

  1. added
    needs-triage
    on Oct 4, 2026
  2. github-actions commented on Oct 4, 2026

    @github-actions
    Contributor

    Thanks for the detailed report. As I understand it: plugins sync's ask policy (added in #6187) installs a user-picked plugin and then enables it at user scope, but if the run is interrupted between those two steps, the plugin is left installed with enabledPlugins: false — indistinguishable from a deliberate opt-out, so no later sync fixes or flags it. You've proposed two possible fixes (a pending-enable record, or detecting sync-written false keys) and listed acceptance criteria covering both the crash-recovery case and preserving a real user opt-out.

    This looks like a real, well-scoped gap rather than a duplicate of the related harness-ops plugins-sync issues I found (#6187, #6183, #5941, #6054), none of which cover this specific interrupted-run scenario. Nothing appears missing from the report itself; the remaining work is picking between the two recovery shapes you outlined.

    Automated triage. A maintainer reviews it.

  3. kyle-sexton commented on Oct 4, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during triage.

    Triage verdict: the gap is real on PR #6209's head, but the code is not on main yet. Needs an operator decision on where the fix lands.

    Evidence

    Open question for the operator

    1. Fold a pending-enable journal (option a: persist the pick before install, clear it after enable, and complete or report a leftover on the next sync) into PR feat(harness-ops): enable the plugins sync ask picks the CLI installed disabled #6209 before it merges, then close fix(harness-ops): an interrupted plugins sync ask run leaves a pick installed but off and unreported #6212. Recommended.
    2. Merge feat(harness-ops): enable the plugins sync ask picks the CLI installed disabled #6209 as is and keep fix(harness-ops): an interrupted plugins sync ask run leaves a pick installed but off and unreported #6212 as a follow-up, which becomes delegable (option a, scoped bug fix) once feat(harness-ops): enable the plugins sync ask picks the CLI installed disabled #6209 merges.

    Acceptance criteria either way: an interruption between install and enable (simulated in the stub suite) is completed or reported on the next sync; a user-set false is never re-enabled.

    Routing: human-gated, needs a decision. Priority low (interrupted-run edge case, not a regression). Work class scoped.

  4. added
    needs-human
    needs-owner-decision
    and removed
    needs-triage
    on Oct 4, 2026
  5. kyle-sexton commented on Oct 4, 2026

    @kyle-sexton
    MemberAuthor

    This was generated by AI during work-loop.

    Operator decision (2026-10-04): keep this issue as a follow-up (option a). #6209 has merged without it. The recovery shape is still open between the two options in the body: persist a pending-enable record before the install, or report the user-scope false entries sync wrote itself and never cleared. Triage records the recommendation; it is dispatched after the remaining harness-ops items (#6183, #6195, #6196) to avoid version and CHANGELOG collisions.

  6. removed
    needs-owner-decision
    on Oct 4, 2026
  7. kyle-sexton commented on Oct 11, 2026

    @kyle-sexton
    MemberAuthor

    Owner decision (2026-10-11): Option (a): a pending-enable record, so an interrupted sync run finishes or reports the pick on the next run.

    Recorded by the coordinating agent session with the owner's approval. Removing needs-human; implementation is queued and will link its branch here.

  8. removed
    needs-human
    on Oct 11, 2026
  9. kyle-sexton commented on Oct 13, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. The owner approved going with independently verified recommendations on 2026-10-13. Two researchers worked this issue separately (code and history; upstream docs and owner intent), and a judge reconciled them.

    Recommendation: Dispatch an agent to implement the pending-enable record per the owner's 2026-10-11 choice, with stub-suite tests for crash recovery and for preserving a deliberate opt-out.

    Where sources disagreed, decided by: Rule 2: the owner's newest explicit decision (2026-10-11) chose option (a), and the 2026-10-04 sequencing condition is met.

    Admission to an agent lane stays with the work-class rules and owner ratification.

    This was generated by AI.

  10. kyle-sexton commented on Oct 13, 2026

    @kyle-sexton
    MemberAuthor

    Owner batch-ratified this admission in an attended session on 2026-10-12: work-class: scoped. Rule: class C1-C3, no trust surface, the independent check confirmed the recorded decision, and no owner step remains.

  11. added
    agent-ready
    on Oct 13, 2026
  12. 1 remaining item

  13. added theissue type on Oct 15, 2026
  14. kyle-sexton commented on Oct 18, 2026

    @kyle-sexton
    MemberAuthor

    Agent Brief

    Type: Bug
    Summary: Make plugins sync's ask-pick install-then-enable crash-safe with a pending-enable record.

    Current behavior:
    The ask policy installs a pick and then enables it at user scope when the CLI installed it disabled. An interruption between the two leaves a user-scope enabledPlugins: false that no later sync can tell from a deliberate opt-out, so it is never reported or repaired.

    Desired behavior:

    • Before installing a pick, sync writes a pending-enable record naming it; after the enable succeeds it clears the record.
    • The next sync run that finds a leftover record finishes the enable or reports it in its output, then clears the record.
    • A false entry with no pending record (a user's own opt-out) is never re-enabled.

    Key interfaces:

    • Pending-enable record: location under the plugin's data dir and its shape.
    • Sync report: a line for a completed or reported leftover pick.

    Acceptance criteria:

    • A stub-suite test interrupts between install and enable and shows the next run completes or reports the pick.
    • A stub-suite test shows a user-set false with no record is left unchanged.
    • scripts/run-test-file.sh on the sync-run test file passes.
    • A changelog entry or fragment for harness-ops passes scripts/check-changelog-fragments.sh.

    Out of scope:


    This was generated by AI during backlog shaping. The owner approved this in an attended backlog-shaping session on 2026-10-17.

  15. added
    agent-ready
    on Oct 18, 2026
  16. melodic-automation-lanes commented on Oct 18, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue run that agent-ready started failed before it reported, or the token broker refused it because its workflow files differ from main's. work-unblock removed and added agent-ready back to start a fresh run on main's workflow files. It does this once per version of those files, so if this run fails the same way, a person looks at it.

  17. added
    agent-ready
    needs-human
    and removed
    agent-ready
    on Oct 18, 2026
  18. melodic-automation-lanes commented on Oct 18, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped partway through this issue and needs a person.

    Why, in the run's own words:

    The run wrote no readable outcome file, so it stopped before it finished.

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/39095227358

    To retry, remove needs-human and add agent-ready again.

  19. added
    agent-ready
    and removed
    needs-human
    on Oct 18, 2026
  20. melodic-automation-lanes commented on Oct 18, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue run that agent-ready started failed before it reported, or the token broker refused it because its workflow files differ from main's. work-unblock removed and added agent-ready back to start a fresh run on main's workflow files. It does this once per version of those files, so if this run fails the same way, a person looks at it.

  21. added
    agent-ready
    and removed
    agent-ready
    on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-ready

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions