fix(hooks): private code-limits state dir, bounded session start without timeout, pre-commit fails closed

code-limits: mkdir -m 700 without -p as the atomic proof, else one
find test (ours, dir, 700). session-start: one runner, timeout then
gtimeout then perl alarm (exec, no shell). pre-commit (generator +
both copies): a git diff or grep error blocks. memory.sh line rewrap;
claude-stub reads its log path from the env. Tests T16, SD19, PC1-4.
This commit is contained in:
bchanot committed 2026-11-13 18:25:33 +01:00
1 parent 27946d5280
commit 1f107c3c45
10 files changed
+159 -27

No files matched your search

+5 -1
View File
@@ -435,7 +435,11 @@ _mem_add_locked() { # <file> <PREFIX> <entry-file> <supersedes>
_mem_path_safe() { # <path> → path, ./-prefixed when awk would take it for
# a `var=value` assignment operand and read stdin instead
if [[ "$1" =~ ^[A-Za-z_][A-Za-z0-9_]*= ]]; then printf '%s\n' "./$1"; else printf '%s\n' "$1"; fi
if [[ "$1" =~ ^[A-Za-z_][A-Za-z0-9_]*= ]]; then
printf '%s\n' "./$1"
else
printf '%s\n' "$1"
fi
}
memory_add() { # <kind> <title> <body-file> <status> <supersedes>