Add test-all.sh runner; fix bootstrap idempotency flake and test isolation

- test-all.sh: single entry point running all four test suites (51 checks),
  non-zero exit on any failure, --verbose shows failing suite output.
- repo-bootstrap.sh: write_meta now compares stable fields excluding the
  second-resolution generated_at timestamp, so two runs straddling a second
  boundary no longer rewrite .bootstrap-meta (T02 idempotency flake fixed).
- test-integration.sh: pre-clean memory residue before I01/I02 so checks are
  independent of prior interrupted-run state.
- README.md: document test-all.sh as the top-level test entry point.
This commit is contained in:
Your Name
2026-09-08 06:04:47 -04:00
parent 4465cb24b7
commit 03be6211ed
4 changed files with 101 additions and 13 deletions
+6
View File
@@ -56,6 +56,10 @@ SC_OK=0
# into `grep -q`. grep -q closes the pipe early (SIGPIPE, rc=141), which fails
# the pipeline under `pipefail`.
STORE_OK=0
# Test isolation: remove any residue a previous interrupted/crashed run may have
# left behind before storing. Writing a fresh entry makes the check independent
# of the memory directory's pre-existing state.
rm -f "$MEMORY/lessons/"*integration-test* 2>/dev/null || true
if bash "$LS" store lessons "$LESSON_FILE" >/dev/null 2>&1; then
STORE_OK=1
fi
@@ -80,6 +84,8 @@ fi
# TEST I02: Session lifecycle — create, list, cleanup
# ======================================================================== #
Sess="$MEMORY/sessions/2026-09-08_integration-session-test.md"
# Test isolation: remove any residue a previous interrupted/crashed run left.
rm -f "$Sess" 2>/dev/null || true
printf -- '%s\n' "Status: active" "# Integration session test" "## State" "in progress" > "$Sess"
SESS_OUT="$(bash "$LS" sessions 2>&1 || true)"
SESS_OK=0