Files
Jeffrey Emanuel b2ce17b317 feat(audit-2026-05-09): foundational beads cuu3f/yvv7r/waijq/8tgic + concurrent updates
Implements the first batch of audit-2026-05-09 completion-debt epic (vz9t8) work:

cuu3f (P3) — bead-ID commit-message convention:
- AGENTS.md gains "Commit-Message Convention" subsection documenting the
  (coding_agent_session_search-<id>) format.
- scripts/git-hooks/{pre-push.sh,install.sh} provides an opt-in warning hook.
- tests/agents_md_documents_commit_convention.rs (4 tests) pins the contract.
- scripts/tests/cuu3f_prepush_hook_e2e.sh exercises 4 hook scenarios.

yvv7r (P2 bug) — CASS_SIMD_DOT + CASS_PARALLEL_SEARCH rollback env vars:
- src/search/runtime_optimizations.rs introduces the OnceLock-cached toggle
  infrastructure with shared semantics for CASS_SIMD_DOT / CASS_PARALLEL_SEARCH /
  CASS_F16_PRECONVERT. Reads via dotenvy per AGENTS.md contract.
- src/lib.rs run_health surfaces runtime_optimizations object with simd_dot,
  parallel_search, preconvert_f16, config_source fields.
- tests/runtime_optimizations.rs (6 tests) verifies happy/error/edge paths
  via assert_cmd-spawned cass health --json.
- scripts/tests/yvv7r_rollback_envvars_e2e.sh (7 scenarios).

waijq (P2 bug) — CASS_F16_PRECONVERT env-toggle:
- Implementation shares the runtime_optimizations.rs module added by yvv7r.
- scripts/tests/waijq_f16_preconvert_e2e.sh (10 scenarios) verifies env-var
  parsing through cass health.

8tgic (P2 bug) — SIMD dot-product test suite:
- tests/simd_tests.rs (10 tests) covers FP-tolerance, random inputs (1000
  trials), and 7 edge cases (zeros, unit vectors, denormals, NaN, infinity,
  mismatched lengths, f16 variants).
- scripts/tests/8tgic_simd_tests_e2e.sh runs each test in isolation.

Concurrent-agent work in this commit (per AGENTS.md "treat changes from
parallel agents as your own"):
- src/lib.rs adds --max-results / --num-results / --top-k / -n flag-alias
  normalization (search/pack/sessions/context/analytics tools).
- README.md, docs/ROBOT_MODE.md, tests/cli_robot.rs, tests/golden/ updated
  to match the new alias surface.

(coding_agent_session_search-cuu3f)
(coding_agent_session_search-yvv7r)
(coding_agent_session_search-waijq)
(coding_agent_session_search-8tgic)
2026-05-09 03:38:20 -04:00

39 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# install.sh — symlink the project's git hooks into .git/hooks/.
#
# Per coding_agent_session_search-cuu3f. The hook is opt-in (not auto-installed);
# operators run this script once after clone if they want the bead-ID
# pre-push warning.
set -euo pipefail
PROJECT_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
GIT_HOOKS="$PROJECT_ROOT/.git/hooks"
SRC_HOOKS="$PROJECT_ROOT/scripts/git-hooks"
[ -d "$PROJECT_ROOT/.git" ] || {
echo "ERROR: $PROJECT_ROOT is not a git repo (no .git/ directory)." >&2
exit 1
}
mkdir -p "$GIT_HOOKS"
for hook in pre-push; do
src="$SRC_HOOKS/${hook}.sh"
dst="$GIT_HOOKS/$hook"
[ -x "$src" ] || chmod +x "$src"
if [ -L "$dst" ]; then
rm "$dst"
elif [ -e "$dst" ]; then
echo "WARN: $dst already exists and is not a symlink. Backing up to ${dst}.bak.${RANDOM}." >&2
mv "$dst" "${dst}.bak.${RANDOM}"
fi
ln -s "$src" "$dst"
echo "Installed: $dst -> $src"
done
echo ""
echo "Pre-push hook installed. It warns (does not block) when pushing to main"
echo "without any bead-ID reference in the commits. To uninstall:"
echo " rm $GIT_HOOKS/pre-push"