Skip to content

Remove import-trace/watchdog debugging; set CI timeout to 1m - #2

Merged
shenanigansd merged 2 commits into
mainfrom
claude/sleepy-mccarthy-o6i08h
Jun 20, 2026
Merged

shenanigansd merged 2 commits into
mainfrom
claude/sleepy-mccarthy-o6i08h

Conversation

@shenanigansd

Copy link
Copy Markdown
Member

The hang chased by the debugging in bd79d03 / 60c73cf was fixed at the root in 994e35d (stop importing __main__/dunder submodules that start mainloops). This removes the leftover scaffolding and tightens the CI timeouts.

tools/stdlib_introspect.py

  • Import tracing is now always-on — dropped the TRACE_IMPORTS env-var gate in safe_import; the importing <name> line always prints to stderr.
  • Removed the watchdog — deleted the --watchdog arg, the WATCHDOG_SECONDS default, and the faulthandler.dump_traceback_later(..., exit=True) abort.
  • Reverted the sanity gate to its clean pre-debug sys.exit(...) form. The os._exit(0)/os._exit(1) + manual flush was the watchdog's sibling — a hang-at-exit workaround for the same root cause — so it went too.

.github/workflows/stdlib-introspect.yaml

  • Removed the WATCHDOG_SECONDS: "120" and TRACE_IMPORTS: "1" env vars.
  • Set timeout-minutes: 1 on both the introspect and aggregate jobs (they run ~15s).

The 2-minute watchdog limit is dropped entirely rather than kept in the gate — CI's timeout-minutes is now the backstop.

Verification

  • Script byte-compiles.
  • Full run exits 0 with traces on stderr and 15,950 records (no hang, ~15s).
  • --min-entities gate still exits 1 with its message.
  • Workflow YAML parses. No remaining references to TRACE_IMPORTS, WATCHDOG, faulthandler, or os._exit.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UxZtQYdfoRbgPm93SVDoRn


Generated by Claude Code

The hang that the debugging in bd79d03/60c73cf chased was fixed at the
root in 994e35d (stop importing __main__/dunder submodules that start
mainloops). Clean up the leftover scaffolding:

- Always print the import trace; drop the TRACE_IMPORTS env gate.
- Remove the watchdog (--watchdog / WATCHDOG_SECONDS and its faulthandler
  abort) and the os._exit hang-workaround in the sanity gate. Both were
  mitigations for the now-fixed hang; the gate goes back to a plain
  sys.exit(). CI timeout-minutes is the remaining backstop.
- Drop the WATCHDOG_SECONDS/TRACE_IMPORTS env vars from the workflow and
  set timeout-minutes: 1 for both jobs (they run ~15s).

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UxZtQYdfoRbgPm93SVDoRn

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes prior hang-investigation scaffolding from the stdlib introspection tooling and tightens the GitHub Actions workflow runtime limits, aiming to keep CI failures bounded by workflow timeouts rather than an in-script watchdog.

Changes:

  • Removes the --watchdog/WATCHDOG_SECONDS watchdog mechanism and related faulthandler usage from tools/stdlib_introspect.py.
  • Switches the sanity gate exit path back to sys.exit(...) (removing os._exit(...) and manual flushing).
  • Drops the workflow env vars for watchdog/trace and reduces job timeouts to 1 minute.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
tools/stdlib_introspect.py Removes watchdog/forced-exit debugging code paths and adjusts import tracing / sanity-gate exit behavior.
.github/workflows/stdlib-introspect.yaml Removes watchdog/trace env vars and lowers CI job timeouts for introspection and aggregation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tools/stdlib_introspect.py Outdated
Comment thread .github/workflows/stdlib-introspect.yaml
Comment thread .github/workflows/stdlib-introspect.yaml
The trace is still always printed, but stderr now stays quiet on a normal
run so consumers that treat stderr output as an error signal aren't
tripped by progress lines. The sanity-gate failure still goes to stderr
(via sys.exit), where an actual error belongs.

Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UxZtQYdfoRbgPm93SVDoRn

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread tools/stdlib_introspect.py
Comment thread .github/workflows/stdlib-introspect.yaml
Comment thread .github/workflows/stdlib-introspect.yaml
@shenanigansd
shenanigansd merged commit 3245113 into main Jun 20, 2026
5 checks passed
@shenanigansd
shenanigansd deleted the claude/sleepy-mccarthy-o6i08h branch June 20, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants