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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
bump: patch
---

### Fixed

- `feedback-thread.sh record` no longer refuses a VALID reply because the lane's sandbox masks a dotfile in the checkout (such as `.bash_profile`) with `/dev/null`. It skips a character device that is not a symlink, as `check-affected.sh` does. An untracked symlink to `/dev/null` is still refused. This was why address-feedback stopped with `feedback-invalid` or `feedback-incomplete` on lane PRs whose findings it had fixed.
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ cmd_record() {
mapfile -d '' -t untracked < <(git_tree ls-files --others --exclude-standard -z)
wait "$!" || die 1 "cannot read the working tree's untracked files"
for path in "${untracked[@]}"; do
# The lane's sandbox masks a dotfile with /dev/null, a device git will not add.
[[ -L $workspace/$path || ! -c $workspace/$path ]] || continue
is_stub "$path" || paths+=("$path")
done
((${#paths[@]} < 300)) || die 1 "the working tree changes too many files to check"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,25 @@ echo 'guarded' >"$STUB/ws/src/a.js"
mkdir -p "$STUB/ws/src/nested" && : >"$STUB/ws/src/nested/package.json"
run record PRRT_a "$STUB/scratch/d.json" >/dev/null 2>&1
assert_exit "an empty stub name below the top of the checkout refuses the VALID record" 1 "$?"
# The lane's sandbox masks a dotfile in the checkout with /dev/null, a device git
# will not add: it is no fix, while a symlink to /dev/null still is one.
if bwrap --bind / / --dev /dev true 2>/dev/null; then
setup
echo 'guarded' >"$STUB/ws/src/a.js"
: >"$STUB/ws/.bash_profile"
disposition '{"disposition":"VALID","evidence":["src/a.js:3"],"fix_sha":"","note":"fixed"}'
PATH="$TEST_TMPDIR/bin:$PATH" FEEDBACK_THREADS="$STUB/threads.json" FEEDBACK_LOG="$STUB/replies.jsonl" \
FEEDBACK_SCRATCH="$STUB/scratch" FEEDBACK_WORKSPACE="$STUB/ws" \
bwrap --bind / / --dev /dev --ro-bind /dev/null "$STUB/ws/.bash_profile" \
bash "$SCRIPT" record PRRT_a "$STUB/scratch/d.json" >/dev/null 2>&1
assert_exit "a sandbox /dev/null mask over a dotfile does not refuse the VALID record" 0 "$?"
fi
setup
echo 'guarded' >"$STUB/ws/src/a.js"
ln -s /dev/null "$STUB/ws/.bash_profile"
disposition '{"disposition":"VALID","evidence":["src/a.js:3"],"fix_sha":"","note":"fixed"}'
run record PRRT_a "$STUB/scratch/d.json" >/dev/null 2>&1
assert_exit "an untracked symlink to /dev/null refuses the VALID record" 1 "$?"

setup
disposition '{"disposition":"VALID","evidence":["src/a.js:3"],"note":"fix_sha left out"}'
Expand Down
Loading