Skip to content

fix: prevent Scribe from staging runtime state files#232

Merged
bradygaster merged 2 commits intodevfrom
squad/228-fix-squad-guard
Mar 7, 2026
Merged

fix: prevent Scribe from staging runtime state files#232
bradygaster merged 2 commits intodevfrom
squad/228-fix-squad-guard

Conversation

@bradygaster
Copy link
Copy Markdown
Owner

Closes #228

Problem

The \squad-main-guard\ workflow correctly blocks all .squad/\ files from protected branches. However, Scribe's commit step (\git add .squad/) stages runtime state files on feature branches. When PRs target main, the guard catches them — causing CI failures users didn't cause.

Fix (defense in depth)

  1. Scribe commit instruction (squad.agent.md — both template and live): After \git add .squad/, unstage runtime state paths via \git reset HEAD -- .squad/orchestration-log/ .squad/log/ .squad/decisions/inbox/ .squad/sessions/\
  2. init.ts .gitignore entries: Added .squad/decisions/inbox/\ and .squad/sessions/\ to the gitignore entries created by \squad init\ (orchestration-log/ and log/ were already covered)
  3. This repo's .gitignore: Added the same two missing entries so squad's own repo benefits immediately
  4. Test updated: init test now verifies all four runtime state paths are gitignored

Why defense in depth

  • .gitignore\ prevents new runtime state files from being staged
  • \git reset HEAD\ in Scribe's instruction catches already-tracked files that .gitignore can't help with
  • Together they ensure runtime state never leaks into commits, regardless of repo history

Working as Fenster (Core Dev)

bradygaster and others added 2 commits March 6, 2026 16:03
The squad-main-guard workflow correctly blocks .squad/ files from
protected branches. However, Scribe's commit step (git add .squad/)
stages runtime state files (orchestration-log/, log/, decisions/inbox/,
sessions/) on feature branches. When PRs target main, the guard catches
them — causing CI failures users didn't cause.

Fix (defense in depth):
- Update Scribe commit instruction in squad.agent.md to unstage runtime
  state paths after git add (git reset HEAD on forbidden paths)
- Add .squad/decisions/inbox/ and .squad/sessions/ to .gitignore entries
  in init.ts (orchestration-log/ and log/ were already covered)
- Update init test to verify all four runtime state paths are gitignored

Closes #228

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bradygaster bradygaster merged commit 86598f4 into dev Mar 7, 2026
1 check passed
@bradygaster bradygaster deleted the squad/228-fix-squad-guard branch March 7, 2026 01:11
bradygaster added a commit that referenced this pull request Mar 7, 2026
Session: 2026-03-07T01-13-00Z-phase2-complete
Requested by: Brady

Changes:
- Merged 3 inbox decisions (Kobayashi PR merges, Keaton community PRs, Fenster template fix)
- Logged orchestration results for all 3 agents (Kobayashi, Keaton, Hockney)
- Logged Phase 2 session completion
- Appended Phase 2 results to agent history files (cross-agent updates)
- Deduplicated: No duplicate decisions found; all 3 inbox items were new.

Merges completed:
- PR #232: Scribe runtime state fix (86598f4)
- PR #212: Version stamp preservation (0fedcce)
- PR #230: CLI wire-up squad link + squad init --mode remote (6d0bd56)
- PR #217: TUI /init no-args flow fix (20970f9)
- PR #219: Fork contribution workflow docs (157b8c0)

Test results: 130/134 test files passing. 12 pre-existing failures in consult, REPL, status, acceptance modes. Core CLI solid.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant