GSD pipeline writes to tracked .gsd/gate-state.json, causing commit gate to fail when pre-commit hook modifies it #60

Closed
opened 2026-05-13 04:44:02 +00:00 by Mark · 0 comments
Owner

Description

The GSD pipeline writes runtime state to .gsd/gate-state.json during gate execution. When the commit gate runs, git stash stashes working-tree changes, then pre-commit's end-of-file-fixer sees the tracked (but modified by the pipeline) gate-state.json, adds a trailing newline, and this conflicts with the stashed changes, aborting the commit.

Pipeline Symptom

commit: fail

With no commit SHA created, despite implementation being staged and ready. The issue needs gate-retry after the root cause is fixed.

Root Cause

.gsd/gate-state.json is tracked by git in affected repos (devforge, and potentially others) because .gsd/ contains committed milestone plans. The pipeline's runtime writes modify a tracked file, which pre-commit hooks then try to "fix" (trailing newline), colliding with the stash/unstash flow.

Affected Issues

  • devforge#3 — commit failed with this exact symptom
    • Implementation (encryption.py refactored with per-call random salt + salt-prefixed ciphertext) is staged and ready
    • Needs: either manual git commit --no-verify to push the staged changes, or the bootstrap gitignore fix + gate-retry

Suggested Fix (Pipeline Side)

The pipeline bootstrap phase should ensure .gsd/gate-state.json (and verification-last.json) are gitignored in every repo it works on. The skill documents this expect bug but doesn't enforce it.

Error Type

pipeline-gitignore-gate-state

Revert Safety

N/A — this is a missing safeguard, not a code change.

## Description The GSD pipeline writes runtime state to `.gsd/gate-state.json` during gate execution. When the commit gate runs, `git stash` stashes working-tree changes, then pre-commit's `end-of-file-fixer` sees the tracked (but modified by the pipeline) `gate-state.json`, adds a trailing newline, and this conflicts with the stashed changes, aborting the commit. ## Pipeline Symptom ``` commit: fail ``` With no commit SHA created, despite implementation being staged and ready. The issue needs `gate-retry` after the root cause is fixed. ## Root Cause `.gsd/gate-state.json` is tracked by git in affected repos (devforge, and potentially others) because `.gsd/` contains committed milestone plans. The pipeline's runtime writes modify a tracked file, which pre-commit hooks then try to "fix" (trailing newline), colliding with the stash/unstash flow. ## Affected Issues - **devforge#3** — commit failed with this exact symptom - Implementation (encryption.py refactored with per-call random salt + salt-prefixed ciphertext) is staged and ready - Needs: either manual `git commit --no-verify` to push the staged changes, or the bootstrap gitignore fix + gate-retry ## Suggested Fix (Pipeline Side) The pipeline bootstrap phase should ensure `.gsd/gate-state.json` (and `verification-last.json`) are gitignored in every repo it works on. The skill documents this expect bug but doesn't enforce it. ## Error Type `pipeline-gitignore-gate-state` ## Revert Safety N/A — this is a missing safeguard, not a code change.
Mark closed this issue 2026-05-15 16:19:58 +00:00
Sign in to join this conversation.
No description provided.