Skip to content

Fix the 3 CodeQL alerts: slow failing-test regex, workflow permissions - #198

Merged
connabyss merged 1 commit into
mainfrom
claude/project-thread-95sjna
Nov 5, 2026
Merged

connabyss merged 1 commit into
mainfrom
claude/project-thread-95sjna

Conversation

@connabyss

Copy link
Copy Markdown
Owner

Requested by CH · project thread

What was wrong, what you changed, how you checked:

The first CodeQL scan (#196) found 3 alerts on main. All three are real; this fixes them.

Test: tests/test_failed_test_names_fast.py runs the slow line in a separate process with a 10 s limit. It fails without the fix (timed out) and passes with it in 0.3 s, plus checks pytest names still read right (TestA::test_one gives test_one, test_two[a-b], nested classes). Full suite: 368 passed, 1 skipped.

Assisted-by: Claude Code


Generated by Claude Code

…rmissions

- recent.py FAILED_TEST: the pytest branch had \S+::(?:\S+::)*, where \S+
  can itself eat "::", so a line like "FAILED " + "::"*40 backtracked
  exponentially and could hang caught_by(). \S+:: alone matches the same
  lines and still keeps the name after the last "::". New test runs it in
  a subprocess with a time limit (fails without the fix, passes with it).
- tests.yml, publish.yml: top-level permissions: contents: read. The
  publish job keeps its own id-token: write for PyPI.

Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iFhpNWWUnXp8kZTidZ
@connabyss connabyss self-assigned this Nov 5, 2026
@connabyss connabyss mentioned this pull request Nov 5, 2026
3 tasks done
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Bite ✅ Bite-proof. Nice work.

Bite took each change out, one at a time, and a test noticed every time. If one breaks later, that test will warn you.

Badge for your README: [![Bite-proof ✅](https://img.shields.io/badge/Bite--proof-%E2%9C%85-black)](https://github.com/connabyss/bite)

  • ✅ The test test_a_line_full_of_colons_does_not_hang noticed it was gone. If this change breaks later, that test will warn you.
    Commit 89fdbc60: “Fix the 3 CodeQL alerts: slow failing-test regex, missing workflow permissions”
How Bite checks

Bite asks one question about each change: if it disappeared, would any test notice? It takes the change out, runs your tests, and puts it back. What is Bite?

@connabyss
connabyss merged commit 09628d0 into main Nov 5, 2026
17 checks passed
@connabyss
connabyss deleted the claude/project-thread-95sjna branch November 5, 2026 05:43
connabyss pushed a commit that referenced this pull request Nov 5, 2026
Assisted-by: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175Q8iEKr191VmKAJN4JZd5
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