@windyroad/jtbd 0.12.8 → 0.12.9-preview.813
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -175,6 +175,23 @@ mk_existing_artefact() {
|
|
|
175
175
|
[[ "$output" != *"BLOCKED"* ]]
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
# P380: on macOS SESSION_MARKER_DIR defaults to /tmp, a symlink to /private/tmp.
|
|
179
|
+
# `find <symlink> -maxdepth 1` in default (-P) mode refuses to descend the
|
|
180
|
+
# start-point symlink, so candidate enumeration returns empty and the script
|
|
181
|
+
# writes ZERO markers (silent cold-path exit 0). The `-L` flag follows it. This
|
|
182
|
+
# test points SESSION_MARKER_DIR at a SYMLINK to the marker dir (reproducing the
|
|
183
|
+
# macOS /tmp shape on any platform); RED without `-L`, GREEN with it.
|
|
184
|
+
@test "mark-oversight-confirmed.sh enumerates candidates when SESSION_MARKER_DIR is a symlink (P380)" {
|
|
185
|
+
mk_existing_artefact "developer/JTBD-341-symlink.proposed.md"
|
|
186
|
+
art="$DIR/docs/jtbd/developer/JTBD-341-symlink.proposed.md"
|
|
187
|
+
: > "$MARK_DIR/jtbd-announced-$SID"
|
|
188
|
+
link_dir="${MARK_DIR}.link"
|
|
189
|
+
ln -s "$MARK_DIR" "$link_dir"
|
|
190
|
+
SESSION_MARKER_DIR="$link_dir" bash "$MARK_SCRIPT" "$art"
|
|
191
|
+
rm -f "$link_dir"
|
|
192
|
+
[ -f "$(expected_marker "$art")" ]
|
|
193
|
+
}
|
|
194
|
+
|
|
178
195
|
@test "tool_name=Bash exits 0 silently regardless of file path" {
|
|
179
196
|
json=$(jq -nc --arg s "$SID" \
|
|
180
197
|
'{tool_name:"Bash",session_id:$s,tool_input:{command:"echo human-oversight: confirmed"}}')
|
package/package.json
CHANGED
|
@@ -85,7 +85,10 @@ candidates=$(
|
|
|
85
85
|
if [ -n "${CLAUDE_SESSION_ID:-}" ]; then
|
|
86
86
|
echo "$CLAUDE_SESSION_ID"
|
|
87
87
|
fi
|
|
88
|
-
|
|
88
|
+
# `-L` follows the start-point symlink — on macOS MARKER_DIR defaults to /tmp,
|
|
89
|
+
# a symlink to /private/tmp, which `find` would otherwise refuse to descend
|
|
90
|
+
# (no-op on Linux where /tmp is a real dir). P380.
|
|
91
|
+
find -L "$MARKER_DIR" -maxdepth 1 -name '*-announced-*' -mmin "-${WINDOW_MINS}" 2>/dev/null \
|
|
89
92
|
| sed 's|.*/||; s/.*-announced-//'
|
|
90
93
|
} | awk 'NF && !seen[$0]++'
|
|
91
94
|
)
|