Skip to content

Item 41: GUI-app-aware caveat hint for the silent-timeout case - #447

Merged
mixmansoundude merged 1 commit into
mainfrom
claude/batch-crlf-strategy-pdi9h5
Aug 18, 2026
Merged

Item 41: GUI-app-aware caveat hint for the silent-timeout case#447
mixmansoundude merged 1 commit into
mainfrom
claude/batch-crlf-strategy-pdi9h5

Conversation

@mixmansoundude

Copy link
Copy Markdown
Owner

Summary

  • ~exe_smokerun.ps1's activity-aware kill only force-stops a verification run that produced
    ZERO stdout/stderr bytes by the ~30s deadline -- exactly the intended behavior for a genuinely
    hung process, but also exactly the shape a correctly-behaving GUI app (tkinter/PyQt, a
    mainloop() with no console output) produces. It gets killed, HP_EXE_EXIT=-1,
    [STATUS] Run Status: TIMED OUT, and the postflight panel reads "SETUP COMPLETE -- WITH A
    CAVEAT" with nothing anywhere explaining that this specific shape is expected and does not mean
    something is broken.
  • No new runtime signal was needed: ~exe_smokerun.ps1's own $killed only ever becomes true
    when $sawOutput was still false at the kill decision, so HP_EXE_EXIT=="-1" at the point
    run_setup.bat already checks it already implies zero output was observed. A new
    HP_EXE_TIMEDOUT_SILENT flag is set at that exact point (alongside the existing
    HP_EXE_VERIFY_FAILED=1), reset once per fresh build attempt alongside HP_DLL_HINT_STATE's
    own reset (same cascaded-away-provider-must-not-leak-a-stale-hint reasoning).
  • :print_postflight_briefing's :pfb_caveat branch now calls a new :pfb_gui_hint subroutine
    when the flag is defined, mirroring :pfb_dll_hint's existing dispatch shape -- prints a note
    distinguishing "this can happen for a GUI app that opens its own window and prints nothing to
    the console" from a genuine crash/hang, right in the caveat panel text itself, not just the
    pre-launch warning :warn_user_code_launch already gives.

Test plan

  • New tests/selfapps_gui_timeout_hint.ps1 (uv lane, non-gating) does not launch a real GUI
    (no display on a headless Windows CI runner) -- it reproduces the exact signal instead: a
    real PyInstaller-built EXE (import time; time.sleep(600), zero output) verified with
    HP_SMOKERUN_KILL_MS shortened to 12000ms via its pre-existing test-only override (already
    used the same way by tests/test_exe_smokerun.py at the Python-unit-test level -- no
    run_setup.bat code change needed to support it).
  • Asserts [STATUS] Run Status: TIMED OUT, the caveat panel header, the new GUI-hint text,
    and that dist\ genuinely exists (proving the EXE was really built, not the unrelated
    :print_no_exe_briefing no-EXE path).
  • docs/agent-ndjson.md and docs/agent-closed-backlog.md updated with the new row and a
    full Item 41 closure entry; removed from CLAUDE.md's Active Backlog.
  • python tools/check_delimiters.py run_setup.bat -- clean.
  • python -m yamllint .github/workflows/ and actionlint -- clean.
  • Full local sanity sweep (tools/run_sanity_sweep.sh): compileall, pyflakes, delimiter
    check, CRLF check, markdownlint, yamllint, actionlint, ASCII sweep, PowerShell AST parse
    sweep, and the full pytest suite (530 passed, 3 skipped) -- all green.
  • python tools/check_ndjson_registry.py -- PASS, no doc/code registry mismatches.
  • Full CI matrix (real/conda-full gating lanes, plus the new uv-lane step) to confirm on
    real Windows runners.

Co-Authored-By: Claude Sonnet 5

https://claude.ai/code/session_017SQ1rvJxDbE71pTXJ4QvLV


Generated by Claude Code

~exe_smokerun.ps1's activity-aware kill only force-stops a verification
run that produced zero stdout/stderr bytes by the ~30s deadline -- the
same shape a correctly-behaving GUI app (tkinter/PyQt, a mainloop with
no console output) produces. HP_EXE_EXIT=="-1" already implies this
(the kill is gated on $sawOutput being false), so no new runtime signal
was needed: record HP_EXE_TIMEDOUT_SILENT at the same point
HP_EXE_VERIFY_FAILED is set, reset once per fresh build attempt
alongside HP_DLL_HINT_STATE's own reset, and print a distinguishing
note from the postflight caveat panel via a new :pfb_gui_hint
subroutine, mirroring :pfb_dll_hint's existing dispatch shape.

New tests/selfapps_gui_timeout_hint.ps1 (uv lane, non-gating)
reproduces the signal directly: a real PyInstaller-built EXE that
sleeps with zero output, verified with HP_SMOKERUN_KILL_MS shortened
via its pre-existing test-only override.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017SQ1rvJxDbE71pTXJ4QvLV
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown
Owner Author

@coderabbitai review


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mixmansoundude, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c5b68e10-d9d1-4d85-8622-a1f167c55c87

📥 Commits

Reviewing files that changed from the base of the PR and between b7d7d9a and a041bf0.

📒 Files selected for processing (6)
  • .github/workflows/batch-check.yml
  • CLAUDE.md
  • docs/agent-closed-backlog.md
  • docs/agent-ndjson.md
  • run_setup.bat
  • tests/selfapps_gui_timeout_hint.ps1
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 20576c07-c2f2-4533-acb7-a63eb6da8751

📥 Commits

Reviewing files that changed from the base of the PR and between b7d7d9a and a041bf0.

📒 Files selected for processing (6)
  • .github/workflows/batch-check.yml
  • CLAUDE.md
  • docs/agent-closed-backlog.md
  • docs/agent-ndjson.md
  • run_setup.bat
  • tests/selfapps_gui_timeout_hint.ps1

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Improved post-build timeout guidance for GUI applications that run silently.
    • Clarified when a timeout may indicate expected GUI behavior rather than an unresponsive application.
    • Preserved existing warnings for applications that genuinely appear to be hung.
  • Documentation

    • Added guidance describing GUI-specific timeout scenarios and verification behavior.
  • Tests

    • Added automated coverage for silent GUI applications, timeout handling, build completion, and displayed guidance.

Walkthrough

The bootstrapper now tracks silent executable verification timeouts per build attempt and displays GUI-specific caveat guidance. A Windows PowerShell self-test validates the behavior, and CI runs it as a non-gating uv-lane check. Documentation records the completed backlog item.

Changes

GUI timeout caveat handling

Layer / File(s) Summary
Timeout tracking and GUI hint
run_setup.bat
The bootstrapper resets and records silent executable timeouts, then invokes :pfb_gui_hint to explain that silent GUI applications can trigger the timeout.
Self-test and CI wiring
tests/selfapps_gui_timeout_hint.ps1, docs/agent-ndjson.md, .github/workflows/batch-check.yml
The self-test builds and runs a silent executable with a shortened timeout, validates timeout and caveat signals, reports NDJSON results, and runs as a non-gating uv-lane check.
Backlog and behavior documentation
docs/agent-closed-backlog.md, CLAUDE.md
The closed backlog documentation records the implementation, and the active backlog entry is removed.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SelfTest
  participant Bootstrapper
  participant SilentExecutable
  participant NDJSON
  SelfTest->>Bootstrapper: run with HP_SMOKERUN_KILL_MS
  Bootstrapper->>SilentExecutable: build and verify executable
  SilentExecutable-->>Bootstrapper: remain silent until timeout
  Bootstrapper-->>SelfTest: emit timeout and GUI caveat output
  SelfTest->>NDJSON: record self.exe.timeout_gui_hint result
Loading

Possibly related PRs

Suggested reviewers: claude

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/batch-crlf-strategy-pdi9h5

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

@mixmansoundude I will review pull request #447.

⚠️ Action not completed

Pull request is closed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mixmansoundude
mixmansoundude enabled auto-merge (squash) August 18, 2026 23:29
@mixmansoundude
mixmansoundude merged commit 9b38727 into main Aug 18, 2026
2 of 3 checks passed
@mixmansoundude
mixmansoundude deleted the claude/batch-crlf-strategy-pdi9h5 branch August 18, 2026 23:29

Copy link
Copy Markdown
Owner Author

@coderabbitai review


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

@mixmansoundude I will review pull request #447.

⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

mixmansoundude pushed a commit that referenced this pull request Aug 21, 2026
The workflow's own fallback logic called github.rest.pulls.merge()
directly whenever GraphQL's viewerCanEnableAutoMerge read false,
gated only on pr.mergeable === 'MERGEABLE' -- which means "no git
conflicts with the base branch," not "required checks passed." An
admin-capable AUTOMERGE_TOKEN makes viewerCanEnableAutoMerge read
false immediately on a fresh PR (nothing to queue -- the actor can
already bypass required checks), so this fallback merged PR #447
within ~20 seconds of it opening, before any CI check had even
started. Confirmed directly from the actual workflow run's job log.

Removed both direct-merge fallback branches (in the "Enable
Auto-merge via PAT" and "Enable Auto-merge via GITHUB_TOKEN" steps).
The workflow now only ever queues a merge via enablePullRequestAutoMerge,
which GitHub itself will not complete until required checks and
reviews genuinely pass -- it never calls pulls.merge() directly
under any code path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017SQ1rvJxDbE71pTXJ4QvLV
mixmansoundude added a commit that referenced this pull request Aug 21, 2026
…448)

* pr-automerge.yml: remove the direct-merge fallback, never bypass CI

The workflow's own fallback logic called github.rest.pulls.merge()
directly whenever GraphQL's viewerCanEnableAutoMerge read false,
gated only on pr.mergeable === 'MERGEABLE' -- which means "no git
conflicts with the base branch," not "required checks passed." An
admin-capable AUTOMERGE_TOKEN makes viewerCanEnableAutoMerge read
false immediately on a fresh PR (nothing to queue -- the actor can
already bypass required checks), so this fallback merged PR #447
within ~20 seconds of it opening, before any CI check had even
started. Confirmed directly from the actual workflow run's job log.

Removed both direct-merge fallback branches (in the "Enable
Auto-merge via PAT" and "Enable Auto-merge via GITHUB_TOKEN" steps).
The workflow now only ever queues a merge via enablePullRequestAutoMerge,
which GitHub itself will not complete until required checks and
reviews genuinely pass -- it never calls pulls.merge() directly
under any code path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017SQ1rvJxDbE71pTXJ4QvLV

* pr-automerge.yml: attempt enable regardless of viewerCanEnableAutoMerge

CodeRabbit review finding on PR #448: skipping outright when
viewerCanEnableAutoMerge reads false meant a genuinely still-pending
PR could fail to ever get queued if that client-side hint happened to
read false for an unrelated reason (e.g. before AUTOMERGE_TOKEN is
rescoped off admin/bypass). The GraphQL mutation itself is the real
source of truth -- always attempt it now; a failure is just logged,
never treated as license to merge directly (no pulls.merge() call
was reintroduced).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017SQ1rvJxDbE71pTXJ4QvLV

* Try AUTOMERGE_TOKEN_NONADMIN_NO_BYPASS before the admin-capable legacy token

Adds a new, preferred first step in the auto-merge job that authenticates
with AUTOMERGE_TOKEN_NONADMIN_NO_BYPASS (a fine-grained PAT scoped to
Pull requests: Read and write only). The existing admin-capable
AUTOMERGE_TOKEN step stays wired as a fallback -- its own per-PR
"already armed (REST)" check makes it a safe no-op for anything the new
token already enabled -- until the new token is confirmed working across
several real PRs, at which point AUTOMERGE_TOKEN's own step should be
removed.

The new step never blocks the fallback: every per-PR REST/GraphQL call is
wrapped in try/catch and any failure -- including an outright auth failure
on the very first call -- is logged via core.warning (not core.info) so it
stands out in the Actions UI, and continue-on-error guards against the
action itself failing to initialize (e.g. a malformed token) before the
script body even runs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017SQ1rvJxDbE71pTXJ4QvLV

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants