Repository navigation
Remove import-trace/watchdog debugging; set CI timeout to 1m - #2
Merged
Merged
Conversation
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
There was a problem hiding this comment.
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_SECONDSwatchdog mechanism and relatedfaulthandlerusage fromtools/stdlib_introspect.py. - Switches the sanity gate exit path back to
sys.exit(...)(removingos._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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.pyTRACE_IMPORTSenv-var gate insafe_import; theimporting <name>line always prints to stderr.--watchdogarg, theWATCHDOG_SECONDSdefault, and thefaulthandler.dump_traceback_later(..., exit=True)abort.sys.exit(...)form. Theos._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.yamlWATCHDOG_SECONDS: "120"andTRACE_IMPORTS: "1"env vars.timeout-minutes: 1on both theintrospectandaggregatejobs (they run ~15s).The 2-minute watchdog limit is dropped entirely rather than kept in the gate — CI's
timeout-minutesis now the backstop.Verification
0with traces on stderr and 15,950 records (no hang, ~15s).--min-entitiesgate still exits1with its message.TRACE_IMPORTS,WATCHDOG,faulthandler, oros._exit.🤖 Generated with Claude Code
https://claude.ai/code/session_01UxZtQYdfoRbgPm93SVDoRn
Generated by Claude Code