Skip to content

Factory skill linking acts only inside the Run's own worktree #670

Closed

Description

@JacobStephens2

This was generated by AI during triage.

Private record: https://github.com/JacobStephens2/thirdshift/security/advisories/GHSA-r5wj-xc34-hpvm

What to change

Before skills::link_into creates, removes or links anything, it checks that the Adapter's project skills directory (Adapter::project_skills()), and every directory between it and the worktree root, is an ordinary directory inside the Run's acquired worktree. It then creates and replaces each Factory skill link relative to that checked directory, without looking up the joined path a second time. If the check fails, it refuses with an error naming the directory and changes nothing.

Acceptance criteria

  • When every directory on the project skills path is an ordinary directory inside the worktree, or doesn't exist yet, linking works as it does today for every Adapter.
  • When any directory on that path is not an ordinary directory inside the worktree, link_into returns an error and creates, removes or replaces nothing, inside or outside the worktree.
  • Replacing an existing Factory skill entry and creating its link both act on the checked directory, with no second lookup of the path.
  • Sessions::within reports the refusal as a session start failure, and the Harness is never started.
  • In-process tests use scratch worktrees to cover both outcomes for each Adapter's project skills path.

Out of scope

  • The shared exclude-file update (skills::exclude).
  • Harness trust (ADR 0013) and anything a session does after it starts.
  • The checks made when a worktree is acquired.

Activity

  1. added
    bugSomething isn't working
    ready-for-agentFully specified, ready for an AFK agent
    in-progressA Claim: thirdshift has taken this issue
    and removed
    ready-for-agentFully specified, ready for an AFK agent
    on Oct 12, 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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions