Skip to content

Dockerfile dash-flag members no longer miss on the leading word boundary (Part of #4108) - #7862

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/4108-20261106T0422Z
Nov 6, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/4108-20261106T0422Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4108 (slice 22, same pattern as #7837 for Elixir).

What

In dockerfile.py, three rules carried members starting with - inside a leading \b(?:...) group. \b before - needs a word char on its left, so java -Xmx512m, node --max-old-space-size=4096, app --log-level debug, npx jest --passWithNoTests and npm install --no-audit never matched after whitespace. Those members move out of the \b group behind (?<![\w-]) (so x--memory=1 and a-Xmx1 still don't fire): memory_alloc (--memory=, --max-old-space-size, -Xmx, -Xms), telemetry (--log-level ...), test_skip (--passWithNoTests, --no-audit). For the -Xmx/-Xms/--memory=/--max-old-space-size members the trailing \b is dropped too: it required a non-word char after -Xmx, so -Xmx512m could not match either.

Test: tests/extraction/languages/test_dockerfile_dash_flags_4108.py (9 fire, 4 no-fire).

Evidence

  • Before the change RUN java -Xmx512m ... etc. returned no match; after, all fire.
  • golden-lock.sh python tests/tools/crucible_check.py (check, both legs): PASS, no differences, no bless.
  • pr_gates --fast: 9/9 pass. Existing test_dockerfile*.py: pass.

Class / Sibling gaps

Class: a regex alternation behind a leading \b whose member starts with a non-word character, so the \b cannot match after whitespace or punctuation. Swept by a scan of every languages/*.py for \b(?: groups with a non-word-first alternative. Handled here: the three dockerfile rules above (members --memory=, --max-old-space-size, -Xmx, -Xms, --log-level, --passWithNoTests, --no-audit), each tested. Sibling gaps (candidates from the scan, each needs its own read and golden check): agc_assembly.py:245 (#\s*REF:), assembly.py:383 (\.rodata), csharp.py:600 (\[Inject\]), go.py:550 (\.MatchString), java.py:556 (\.matches\(), javascript.py:378 (\.bind\(), kotlin.py:202 (!is), lua.py:289 (:[ \t]*close), ruby.py:308 (::T::), scala.py:392 (!ptr), swift.py:475 (\.range\(of:), dart.py:170,386. Some may be intentional (e.g. sandwiched by an identifier). Related, not this class: dockerfile test_skip skipTests misses -DskipTests (no boundary between D and s).

Remaining slices

One language per slice from the sibling list above (go/java/javascript/kotlin/scala/swift/dart/lua/ruby/csharp/assembly), each golden-checked.

🤖 Generated with Claude Code

…hNoTests, --no-audit) no longer miss on the leading word boundary (Part of #4108)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 6, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 6, 2026 04:35
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 6, 2026 04:37
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd

squid-shepherd Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant