Skip to content

cli: a hard kill or Ctrl+C during the os skills swap phase can leave mixed skill directories that only --force repairs, and the next write deletes the stranded old copies #35502

Open

Description

@objectstack-fleet

repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt

Status 2026-11-19 21:10Z (seat edit): PR #35495 was reverted by PR #35616 (ae2a67de, p0 #35588), so the staged swap this card describes is not on main, and #35079 is open again. This card's premise returns only when #35079 re-lands that swap; how it re-lands waits on the decision routed from #35611. Read "After PR #35495" below as "after #35079 re-lands".

Blocked-by: #35079

Filing gate: ① product defect · Source: fleet · out-of-scope finding of PR #35495 (card #35079), named in its Acceptance notes and os-dev-report 7008338749; L1 ACCEPT 7008910233 ruled a card owed. ⛔ Not a claim.

Grade: area:build · Bug · Impeded · rare (a kill inside a millisecond rename window) · read from the code → p3.

Business reason

A user who presses Ctrl+C (or whose machine loses power) while os skills install / update is swapping directories can be left with some skills at the new version and some at the old, under a record that matches neither. The only way out is --force, the flag PR #35495 removed the need for on every failure the process survives.

What happens

After PR #35495, applySkillsWrite (packages/cli/src/utils/skills-install-state.ts) stages new skills in a hidden sibling, renames each old directory aside into <staging>/old, renames the staged copy into place, and renames the record last; a thrown error undoes the renames. A hard kill (SIGKILL, power loss) or Node's default SIGINT exits without running that undo. The next write's removeStagingLeftovers then deletes the leftover staging directory, including the old/ copies the kill stranded, so the old versions cannot be recovered either.

Expected

An interrupted swap is detected and completed or rolled back by the next run: for example a small journal written before the first rename, read and replayed in runSkillsWrite (packages/cli/src/utils/skills-command.ts) before the plan is computed, so leftovers are restored rather than deleted.

Done when

A pin that stops a write after the first skill's swap and before the record rename (simulating the kill) shows that the next plain os skills update ends with every skill and the record at one version, without --force.

Who acts: the area that owns packages/cli (area:build, CLI area).
Dedupe: repo:objectstack-ai/objectstack is:issue skills staging swap interrupted → 6 hits; the only related one is #35079 (the parent card; fixed by PR #35495, which was later reverted by PR #35616); none covers the kill window.

Activity

  1. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:devx · pm:queue; rationale: area:build · Bug · Impeded (a kill inside the os skills swap window leaves mixed skill directories that only --force repairs) · rare → p3 as graded; kept open because the damage needs a manual repair.

  2. added
    domain:devx
    pm:queue
    on Nov 19, 2026
  3. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt

    Note 2026-11-19T19:02Z: PR #35495 was reverted by PR #35616 (ae2a67d, p0 #35588), so the code this card's premise reads is no longer on main. This card waits with #35611, the gate-side ruling, together with #35079 (now pm:blocked, Blocked-by: #35611). Re-read the premise after #35611 rules and #35079 re-lands; it stays in pm:queue until then.

  4. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgTyMahdAdhXSzgy2nt

    State 2026-11-19T21:07Z: pm:queue → pm:blocked, with Blocked-by: #35079 in the body. This card's premise, the staged swap of PR #35495, left main with the revert in PR #35616 (ae2a67de). It returns only when #35079 re-lands it. #35079 is itself blocked on #35611, whose shape is now a maintainer decision. The body gained a status paragraph and a corrected Dedupe line; nothing else changed. The grade is unchanged.

  5. added
    pm:blocked
    and removed
    pm:queue
    on Nov 19, 2026
  6. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: unblocked → pm:queue. Its only Blocked-by:, #35079 (atomic os skills writes), closed; the grade (p3) and area (build) are unchanged.

  7. added
    pm:queue
    and removed
    pm:blocked
    on Nov 22, 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

    area:buildbugdomain:devxpm:queuepriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions