Skip to content

bug(upgrade): EPERM crash on read-only .gitattributes #550

Closed

Description

@bradygaster

Description

During cross-testing of the upgrade path across 23 repos, we found that ensureGitattributes() throws a raw EPERM stack trace when the file is read-only (e.g., on some CI/cloud environments or checked-out repos with restrictive permissions).

Steps to Reproduce

  1. Set .gitattributes to read-only
  2. Run squad upgrade
  3. Observe unhandled EPERM error

Expected Behavior

Graceful error with actionable message telling the user to make the file writable.

Location

packages/squad-cli/src/cli/core/upgrade.ts ~line 268 (ensureGitattributes)

Priority

P2 - affects CI/cloud environments

Found By

Cross-testing agent EECOM during 23-repo upgrade validation

Activity

  1. added
    bugSomething isn't working
    squadSquad triage inbox — Lead will assign to a member
    on Mar 23, 2026
  2. github-actions commented on Mar 24, 2026

    @github-actions
    Contributor

    🏗️ Squad Triage — Flight (Lead)

    Issue: #550 — bug(upgrade): EPERM crash on read-only .gitattributes
    Assigned to: FIDO (Quality Owner)
    Reason: Issue relates to testing/quality work

    @copilot evaluation: No strong capability match — routed to squad member.

    Team roster:

    • Flight (Lead) → label: squad:flight
    • Procedures (Prompt Engineer) → label: squad:procedures
    • EECOM (Core Dev) → label: squad:eecom
    • FIDO (Quality Owner) → label: squad:fido
    • PAO (DevRel) → label: squad:pao
    • CAPCOM (SDK Expert) → label: squad:capcom
    • CONTROL (TypeScript Engineer) → label: squad:control
    • Surgeon (Release Manager) → label: squad:surgeon
    • Booster (CI/CD Engineer) → label: squad:booster
    • GNC (Node.js Runtime) → label: squad:gnc
    • Network (Distribution) → label: squad:network
    • RETRO (Security) → label: squad:retro
    • INCO (CLI UX & Visual Design) → label: squad:inco
    • GUIDO (VS Code Extension) → label: squad:guido
    • Telemetry (Aspire & Observability) → label: squad:telemetry
    • VOX (REPL & Interactive Shell) → label: squad:vox
    • DSKY (TUI Engineer) → label: squad:dsky
    • Sims (E2E Test Engineer) → label: squad:sims
    • Handbook (SDK Usability) → label: squad:handbook
    • Ralph (Work Monitor) → label: squad:ralph
    • @copilot (Coding Agent) → label: squad:copilot

    To reassign, remove the current squad:* label and add the correct one.

  3. github-actions commented on Mar 24, 2026

    @github-actions
    Contributor

    📋 Assigned to EECOM (Core Dev)

    Issue: #550 — bug(upgrade): EPERM crash on read-only .gitattributes

    EECOM will pick this up in the next Copilot session.

    For Copilot coding agent: If enabled, this issue will be worked automatically.
    Otherwise, start a Copilot session and say:
    EECOM, work on issue #550

  4. bradygaster commented on Mar 24, 2026

    @bradygaster
    CollaboratorAuthor

    Already fixed in dev — ensureGitattributes() now catches EPERM/EACCES and warns gracefully (upgrade.ts lines 294-300).

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 workinggo:needs-researchNeeds investigationsquadSquad triage inbox — Lead will assign to a member

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions