-
Notifications
You must be signed in to change notification settings - Fork 0
Pipeline Design inline
Now I have full context. Here is the ADR:
Issue #45 tracks the completion of an autonomous delivery pipeline cycle. The branch ci/chore-close-issue-45-merge-goal-complete accumulated 5 commits across autonomous iterations 3–5, producing a net delta of +18/−14 lines across 10 files. The changes address two concrete bugs discovered during autonomous pipeline execution:
-
Git credential blocking —
git fetchinsw-pipeline.sh:auto_rebase()could hang indefinitely in CI/headless environments when HTTPS credential prompts fired. -
Chaos test HEAD corruption —
sw-chaos-test.sh(Chaos Test 8) wrote a fake.git/HEADinto$REPO_DIR, which could be the real test repo directory, corrupting its git state and causing cascading test failures.
Secondary changes include GIT_TERMINAL_PROMPT=0 propagation to sw-pipeline-test.sh, stdin redirection (< /dev/null) in sw-e2e-smoke-test.sh, silent cleanup failure tolerance, documentation auto-sync, and updated AI agent standard configs.
No new features or architectural changes are introduced. This is a stabilization and merge task.
Squash-merge the 5-commit branch into main via a single PR, then close issue #45 with a merge reference.
Specific patterns applied in the changeset:
-
Credential prompt prevention: Set
GIT_TERMINAL_PROMPT=0at call site (sw-pipeline.sh:1297) rather than globally, scoping the fix to the onegit fetchthat can block. This avoids masking legitimate credential failures elsewhere. -
Test isolation via separate directory: Chaos Test 8 now uses
$TEST_TEMP_DIR/chaos-clone(sw-chaos-test.sh:281) instead of$REPO_DIRfor fake.gitcreation. This eliminates the class of bug where test setup destroys the repo under test. -
Stdin redirection:
sw-e2e-smoke-test.sh:348pipes/dev/nullto stdin when invoking the pipeline subprocess, preventing interactive prompts from blocking CI. -
Cleanup hardening:
sw-pipeline-test.sh:374usesrm -rf ... 2>/dev/null || trueto avoidset -eexits when temp directories are already removed or locked. -
Squash merge strategy: Collapses 5 incremental "loop: iteration N" commits into a single coherent commit on
main, keeping history clean. The individual iteration history is preserved on the branch (and in the PR body) for audit.
-
Rebase-merge (preserve individual commits) — Pros: full iteration history on
main; easier bisect if a regression surfaces. Cons: 3 of 5 commits are "loop: iteration N" with mixed changes — poor signal-to-noise onmain; cluttersgit log. -
Cherry-pick only the bug fixes — Pros: smallest possible diff on
main. Cons: leaves docs/config updates orphaned on the branch; issue #45 scope includes the full pipeline cycle, not just bug fixes; creates drift between branch and main. - Manual merge commit (no squash) — Pros: preserves branch topology. Cons: merge commit + 5 parent commits is noisier than a single squashed commit for a chore task of this size.
- Files to create: None
- Files to modify: None — all code changes are already committed on the branch
- Dependencies: None — no new packages or version bumps
-
Risk areas:
-
sw-chaos-test.shchanges the variable used in Chaos Test 8; if other tests reference$REPO_DIR/.gitstate created by Test 8, they could break. Mitigated:$CHAOS_CLONE_DIRis fully isolated under$TEST_TEMP_DIR. -
GIT_TERMINAL_PROMPT=0ongit fetchinsw-pipeline.shsuppresses credential prompts. If a legitimate credential flow is needed (e.g., private fork), the fetch will fail silently and fall through to thewarn+return 0path. This is the existing fallback behavior — no new failure mode introduced. - Squash merge loses individual commit SHAs. If future debugging needs to trace a specific iteration, the PR body and branch (if retained) are the reference.
-
-
git diff origin/main...HEADshows exactly 10 files, +18/−14 lines — no unintended changes - Working tree is clean (only
.claude/pipeline-tasks.mdand.claude/tasks.mdare modified, neither tracked by the PR) - PR targets
mainfromci/chore-close-issue-45-merge-goal-completewithCloses #45in the body - GitHub Actions status checks pass on the PR (CI green)
- Squash merge produces a single commit on
mainwith the chore prefix - Issue #45 transitions to closed state after merge
- Post-merge:
git log --oneline -1onmainshows the squashed commit - Post-merge:
scripts/sw-chaos-test.shruns without corrupting the test repo's.gitdirectory - Post-merge:
scripts/sw-pipeline-test.shcompletes without hanging on credential prompts