Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[![Claude Code plugin](https://img.shields.io/badge/Claude%20Code-plugin-orange.svg)](https://docs.claude.com/en/docs/claude-code/plugins)
[![Codex plugin](https://img.shields.io/badge/Codex-plugin-black.svg)](AGENTS.md#installing-for-codex)

**7 lifecycle hooks · 14 slash commands · 2055 tests on Linux/macOS · zero manual bookkeeping**
**7 lifecycle hooks · 14 slash commands · 2058 tests on Linux/macOS · zero manual bookkeeping**

![demo](hero.gif)

Expand Down
2 changes: 1 addition & 1 deletion docs/found-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ Maintained automatically by Claude. See <https://github.com/AltDoug/found-issues
- [fixed] 2026-10-27 tests/autofix-sweep.bats:1067 — 'a continuation's PR leaves the PR branch ledger alone' flaked on the Mac 2026-10-27 with status 141: git log ... | grep -q under pipefail, grep -q exits on the first match and git log dies of SIGPIPE (suggested: capture the log into a variable first, then grep it, as other tests do) (fix: small) (PR: AltDoug/found-issues#292) (fixed: 2026-10-27)
- [fixed] 2026-10-29 lib/sync.sh:770 — SessionStart sync still writes the ledger on a pull-only clone through auto-archive (and merged-PR closures): measured 2026-10-29 on a main-only agent-config clone, sync moved 5 [fixed] entries to found-issues-archive.md; git refuses a later pull --ff-only even when upstream made the byte-identical edit, so the clone's update path breaks whenever upstream commits the same archive (suggested: read-only sync mode for consumer clones) (decided: build the read-only sync mode: a per-clone git config key plus an env override; picked over keeping the deploy workaround and over doing both [operator, 2026-10-29, via agent-config: Mods Dougstation]) (PR: AltDoug/found-issues#295) (fixed: 2026-10-30)
- [fixed] 2026-10-29 tests/autofix-sweep.bats — full bats suite runs serially and keeps growing: 24m08s on 2026-10-07, ~40 min on 2026-10-11, 48 min for 2048 tests on 2026-10-29 (this Mac); each autofix-* test builds a real repo + bare remote + worktree and runs the pipeline (measured 3.5-7.2 s per sweep test), and the fix-ship gate is 60 min (FOUND_ISSUES_FIX_SHIP_TIMEOUT_SECS), so headroom fell from ~20 to ~12 min (suggested: run bats --jobs N with GNU parallel, each test already uses its own mktemp dir; then cache per-file fixtures if still slow) (decided: fix it after 3.11.0 ships: run the suite in parallel with bats --jobs [GNU parallel as dev + CI dependency], then per-file fixture caching if still slow [operator, 2026-10-29]) (PR: AltDoug/found-issues#296) (fixed: 2026-10-30)
- [open] 2026-10-29 tests/helpers.bash:25 — tests that keep the real HOME write the operator's real ~/.cache/found-issues: measured 2026-10-29, ~/.cache/found-issues/mode_foo_bar was rewritten at 23:11 by a suite run (foo/bar is only a test fixture slug); one shared file across tests that run side by side under bats --jobs can also hand one test another's cached mode (suggested: per-test HOME in helpers, with git identity via GIT_AUTHOR_*/GIT_COMMITTER_* env so commits still work, or point XDG_CACHE_HOME at $BATS_TEST_TMPDIR in the files that do not set HOME) (fix: medium)
- [open] 2026-10-29 tests/helpers.bash:25 — tests that keep the real HOME write the operator's real ~/.cache/found-issues: measured 2026-10-29, ~/.cache/found-issues/mode_foo_bar was rewritten at 23:11 by a suite run (foo/bar is only a test fixture slug); one shared file across tests that run side by side under bats --jobs can also hand one test another's cached mode (suggested: per-test HOME in helpers, with git identity via GIT_AUTHOR_*/GIT_COMMITTER_* env so commits still work, or point XDG_CACHE_HOME at $BATS_TEST_TMPDIR in the files that do not set HOME) (fix: medium) (PR: AltDoug/found-issues#298)
12 changes: 12 additions & 0 deletions tests/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ export FOUND_ISSUES_SEGMENT_AUTOSYNC=off
# --jobs) shared and mixed one another's logs.
export FOUND_ISSUES_CACHE_DIR="${BATS_TEST_TMPDIR:-${BATS_RUN_TMPDIR:-${TMPDIR:-/tmp}}}/fi-test-cache"

# A HOME of its own for every test (ledger tests/helpers.bash:25): tests that
# kept the real one wrote the CLI's caches into the operator's ~/.cache, and
# shared them with every test running beside them. The XDG variables would
# point back outside it, so they go too; tests that need one set their own.
# Git identity for commits made without fi_init_git comes from this HOME's
# own .gitconfig (CI's global identity lived in the old HOME).
export HOME="${BATS_TEST_TMPDIR:-${BATS_RUN_TMPDIR:-${TMPDIR:-/tmp}}}/home"
mkdir -p "$HOME"
[[ -f "$HOME/.gitconfig" ]] \
|| printf '[user]\n\tname = Test\n\temail = test@example.com\n' > "$HOME/.gitconfig"
unset XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_STATE_HOME

# A suite started inside an auto-fix run inherits FOUND_ISSUES_AUTOFIX_CHILD=1,
# which makes session-start take its headless path and fails every test of
# the interactive one, and FI_AF_PID, which a test's claim records and its
Expand Down
47 changes: 47 additions & 0 deletions tests/test-isolation.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env bats
# Tests never touch the real home directory (ledger tests/helpers.bash:25).
# A suite run on 2026-10-29 rewrote the operator's ~/.cache/found-issues/
# mode_foo_bar: tests that kept the real HOME wrote the CLI's caches there,
# and under bats --jobs those files were shared between tests running side
# by side.

load 'helpers'

# The account's home from the password database, whatever $HOME says.
real_home() { eval printf '%s' "~$(id -un)"; }

setup() {
fi_setup_tmp
fi_init_git
LEAK_SLUG="fileakcheck/t$$"
LEAK_FILE="$(real_home)/.cache/found-issues/mode_fileakcheck_t$$"
}

teardown() {
# Only this test's own uniquely named file, if a leak put it there.
rm -f "$LEAK_FILE"
fi_teardown_tmp
}

@test "isolation: HOME is a per-test directory, not the real home" {
[ "$HOME" != "$(real_home)" ]
[[ "$HOME" == "$BATS_TEST_TMPDIR"/* ]]
}

@test "isolation: a CLI cache write lands in the test HOME, not the real one" {
fi_source_lib detect-mode
fi_use_gh_shim
git remote add origin "https://github.com/$LEAK_SLUG.git"
export GH_MOCK_PR_LIST='[]'
unset FOUND_ISSUES_MODE
fi_detect_mode >/dev/null
[ -f "$HOME/.cache/found-issues/mode_fileakcheck_t$$" ]
[ ! -e "$LEAK_FILE" ]
}

@test "isolation: git commits still work in the per-test HOME" {
git config --unset user.name
git config --unset user.email
git commit --allow-empty -q -m "no local identity"
[ "$(git log -1 --format=%ae)" = "test@example.com" ]
}
Loading