Files
local-deep-research/scripts
LearningCircuit bc45bbf2e7 fix(ci): make LDR research workflow honestly fail on Python crash (#4226)
* fix(ci): make LDR research workflow honestly fail on Python crash

A real run (job 77511717371, PR #4225) crashed with glibc 'double free or
corruption (!prev)' but the workflow reported success and the caller posted
a hollow PR comment. Two cooperating defects: the script's exit code was
discarded inside set +e / set -e, and `jq .` exits 0 on a zero-byte
response.json so the JSON-shape check passed on empty input.

Capture the exit code, harden the validation order (exit -> non-empty ->
jq -e shape -> .error -> .research non-empty), tee stderr to a log surfaced
in the ::error:: annotation, upload the artifact with if: always() so failed
runs leave debuggable evidence, and flush stdout in a finally block in the
script so a SIGABRT during interpreter shutdown after json.dumps can't drop
the otherwise-completed output. Matches the house pattern from dockle.yml
and the jq -e idiom from release-gate.yml.

* chore(ci): enable faulthandler in ldr-research.py

Dumps a Python traceback to stderr on SIGABRT/SIGSEGV/SIGFPE/SIGBUS/SIGILL
before the signal re-fires. Pairs with the stderr-capture plumbing earlier
in this PR: on the next glibc abort the ::error:: annotation will show
"Fatal Python error: Aborted" plus the actual Python stack frame, making
the deps-level investigation possible without a re-run.

Verified locally: a deliberately aborted child process emits its frame
through faulthandler before exiting on signal 6.
2026-05-24 09:45:14 +02:00
..