Skip to content

fix(tests): pin new-overlay bare-repo fixture HEAD to main (fixes red CI) - #1

Merged
flopperj merged 1 commit into
mainfrom
fix/new-overlay-ci-bare-repo-head
Jun 9, 2026
Merged

fix(tests): pin new-overlay bare-repo fixture HEAD to main (fixes red CI)#1
flopperj merged 1 commit into
mainfrom
fix/new-overlay-ci-bare-repo-head

Conversation

@flopperj

@flopperj flopperj commented Jun 9, 2026

Copy link
Copy Markdown
Owner

What

One-line fix to tests/new-overlay.bats setup(): pin the hermetic bare-repo fixture's default branch with git init --bare -q -b main.

Why CI is red

new-overlay.bats builds a throwaway bare repo as a submodule source, then pushes its only commit to main. The bare repo was created with git init --bare (no -b), so its HEAD followed the ambient init.defaultBranch:

  • Locally: dev's global init.defaultBranch=main → HEAD=main → has the commit → green.
  • CI (Ubuntu): git defaults to master → HEAD=master, empty → git submodule add hits fatal: unable to checkout submodule '.claude/dotfiles-core' ("branch yet to be born") → .gitmodules never written.

That broke two tests:

  • new-overlay: --core-url overrides URL and .gitmodules references it
  • new-overlay: --force re-run is idempotent (no duplicate submodule, no error)

This is a latent fixture bug from #12 (32a4bc0, which added these tests) — the failing run was simply the first CI to include them. Not caused by recent changes.

The fix

-b main pins the bare HEAD to match the push target, removing the environment dependency.

Verification

Reproduced the failure under a simulated CI env (init.defaultBranch=master), then confirmed the fix is environment-independent:

Environment both tests full new-overlay.bats
master default (simulated CI — was red) ✅ pass 9/9
main default (dev) ✅ pass 9/9

Test assertions are unchanged — only the fixture. Diff is 1 file, +5/−1 (the change plus an explanatory comment).

🤖 Generated with Claude Code

The new-overlay.bats setup() built its hermetic submodule source with
`git init --bare` (no -b), so the bare repo's HEAD followed the ambient
init.defaultBranch. The fixture pushes its only commit to `main`, but
Ubuntu CI's git defaults to `master`, leaving HEAD on an empty branch.
`git submodule add` then hit "fatal: unable to checkout submodule
'.claude/dotfiles-core'" (branch yet to be born), failing tests 190 and
191. It passed locally only because the dev's global init.defaultBranch
happened to be `main`.

Pin the bare HEAD with `-b main` so it matches the push target, making
the fixture environment-independent. Verified green under both
init.defaultBranch=master (simulated CI) and =main (dev): 9/9 in
new-overlay.bats, full suite unaffected.

Latent fixture bug from #12 (32a4bc0); today's run was the first CI to
include these tests. Test assertions unchanged — only the fixture.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@flopperj
flopperj merged commit 762c0a9 into main Jun 9, 2026
1 check passed
@flopperj
flopperj deleted the fix/new-overlay-ci-bare-repo-head branch June 9, 2026 23:35
flopperj pushed a commit that referenced this pull request Jun 10, 2026
The new-overlay CI fix landed independently on each remote with different
SHAs (8822cd4 via Intuit PR #14, 2e0a855/762c0a9 via mirror PR #1) — same
commit message, identical patch. This merge unifies the two graphs without
discarding the mirror's PR #1 merge history.
flopperj pushed a commit that referenced this pull request Jul 30, 2026
#1)

Tests 6a/6b previously mv'd $CORE_DIR/plugins.txt into a .disabled
sibling, restoring it inside the test body rather than teardown().  A
SIGKILL between the two mv calls would leave the live repo without
plugins.txt, breaking every subsequent test with no clear diagnostic.

Switch to calling _install_cli_and_plugins directly against a $SCRATCH
scratch tree (no plugins.txt present), matching the same pattern used by
test 14 for the overlay fallback case. teardown() already removes $SCRATCH
unconditionally, so interrupted tests are now safe.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
flopperj pushed a commit that referenced this pull request Jul 30, 2026
feat: ship frontend-design + playwright as universal core plugins
flopperj pushed a commit that referenced this pull request Jul 30, 2026
…skills (#2)

* feat(overlay-context): add runtime consult-instruction to 6 affected skills

Each of the 6 skills that previously relied on sentinel-injection
(briefing, doctor, obligations, pr-create-from-commits, ticket-pickup,
ticket-swarm) now carries a one-line instruction pointing agents to
~/.claude/overlay-context.md for company-specific behavior.

The empty OVERLAY-FRAGMENT sentinels are left intact for one coexistence
cycle — they become inert no-ops while the overlay migrates to the new
runtime-consult path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(overlay-context): graceful-degradation parity in doctor + verb consistency

Addresses Ranger findings #1 and #2 on PR #2: (1) appends the "If that file is absent, proceed with the primary log message only" fallback to doctor's consult-instruction so it has the same degradation contract as the other 5 sites; (2) standardizes verb to "consult" across all 6 sites (was "see" only in doctor).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
flopperj added a commit that referenced this pull request Jul 30, 2026
fix(tests): pin new-overlay bare-repo fixture HEAD to main (fixes red CI)
flopperj pushed a commit that referenced this pull request Jul 30, 2026
The new-overlay CI fix landed independently on each remote with different
SHAs (e5d13df via Intuit PR #14, 674d625/85aba5b via mirror PR #1) — same
commit message, identical patch. This merge unifies the two graphs without
discarding the mirror's PR #1 merge history.
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