Skip to content

fix: replace unanchored regex with string assertions in tests#767

Merged
Mossaka merged 1 commit intomainfrom
fix/regex-anchors
Feb 12, 2026
Merged

fix: replace unanchored regex with string assertions in tests#767
Mossaka merged 1 commit intomainfrom
fix/regex-anchors

Conversation

@Mossaka
Copy link
Collaborator

@Mossaka Mossaka commented Feb 12, 2026

Summary

Test plan

  • npm run build passes
  • npm test passes (all 19 test suites)
  • No behavioral change — both assertions check for the same literal substring

🤖 Generated with Claude Code

Replace `.not.toMatch(/domain\.com\//)` with `.not.toContain('domain.com/')`
in squid-config.test.ts to resolve CodeQL "Missing regular expression anchor"
alerts (#171, #172). The string-based assertion is clearer in intent since
these tests check for literal substrings (trailing slashes in domains).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 12, 2026 20:15
@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 82.26% 82.42% 📈 +0.16%
Statements 82.31% 82.47% 📈 +0.16%
Functions 82.14% 82.14% ➡️ +0.00%
Branches 74.70% 74.80% 📈 +0.10%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/docker-manager.ts 83.5% → 84.2% (+0.67%) 83.0% → 83.6% (+0.65%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Squid config unit tests to avoid unanchored regular expressions flagged by CodeQL by switching to literal substring assertions, while preserving the intent of validating that trailing slashes are removed from domains.

Changes:

  • Replaced .not.toMatch(/github\.com\//) with .not.toContain('github.com/') in the trailing-slash removal test.
  • Replaced .not.toMatch(/example\.com\//) with .not.toContain('example.com/') in the protocol+trailing-slash removal test.

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

@github-actions github-actions bot mentioned this pull request Feb 12, 2026
@github-actions
Copy link
Contributor

Build Test: Node.js Results

Project Install Tests Status
clsx PASS
execa PASS
p-limit PASS

Overall: PASS

All Node.js projects built and tested successfully.

AI generated by Build Test Node.js

@github-actions
Copy link
Contributor

Smoke test results for Claude:

Last 2 merged PRs:

Test Results:

  • ✅ GitHub MCP (retrieved PRs)
  • ✅ Playwright (page title: "GitHub · Change is constant. GitHub keeps you ahead. · GitHub")
  • ✅ File Writing (created smoke-test-claude-21962690253.txt)
  • ✅ Bash Tool (verified file content)

Status: PASS

AI generated by Smoke Claude

@github-actions
Copy link
Contributor

Build Test: Deno ✅

All tests passed successfully!

Project Tests Status
oak 1/1 ✅ PASS
std 1/1 ✅ PASS

Overall: PASS

  • Deno version: 2.6.9
  • Test duration: ~2ms per project

AI generated by Build Test Deno

@github-actions
Copy link
Contributor

Smoke Test Results

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP: Retrieved 2 merged PRs
  • ✅ Playwright: Title contains "GitHub"
  • ✅ File Write: Created test file successfully
  • ✅ Bash Tool: Verified file content

Status: PASS 🎉

cc: @Mossaka

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

Go Build Test Results

Project Download Tests Status
color 1/1 PASS
env 1/1 PASS
uuid 1/1 PASS

Overall: PASS

All Go projects successfully downloaded dependencies and passed tests.

AI generated by Build Test Go

@github-actions
Copy link
Contributor

C++ Build Test Results

Project CMake Build Status
fmt PASS
json PASS

Overall: PASS

All C++ projects built successfully.

AI generated by Build Test C++

@github-actions
Copy link
Contributor

Build Test: Bun - Results

Project Install Tests Status
elysia 1/1 PASS
hono 1/1 PASS

Overall: PASS

All Bun build tests completed successfully with Bun v1.3.9.

AI generated by Build Test Bun

@github-actions
Copy link
Contributor

.NET Build Test Results

Project Restore Build Run Status
hello-world PASS
json-parse PASS

Overall: PASS

All .NET projects successfully restored, built, and ran with expected output.

AI generated by Build Test .NET

@github-actions
Copy link
Contributor

Rust Build Test Results

Project Build Tests Status
fd 1/1 PASS
zoxide 1/1 PASS

Overall: PASS

All Rust projects built and tested successfully.

AI generated by Build Test Rust

@github-actions
Copy link
Contributor

Build Test: Java ✅

All Java build tests PASSED

Project Compile Tests Status
gson 1/1 PASS
caffeine 1/1 PASS

Overall: PASS

All Maven projects compiled successfully and all tests passed through the firewall proxy.

AI generated by Build Test Java

@github-actions
Copy link
Contributor

Chroot Version Comparison Test Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.12 Python 3.12.3 ❌ NO
Node.js v24.13.0 v20.20.0 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall Result: ❌ Tests did not pass - version mismatches detected

The chroot mode is successfully detecting and using host binaries, but version differences indicate the host and container environments are not identical. This is expected behavior as the container uses its own runtime versions when chroot is not accessing host binaries.

AI generated by Smoke Chroot

@github-actions
Copy link
Contributor

Merged PRs: fix: review recommendations for PR #720 | fix: eliminate nested bash layer in chroot command execution for Java/.NET
Tests: MCP✅ GH✅ Playwright✅ Tavily❌ File✅ Build✅ Discuss✅
Overall: FAIL

AI generated by Smoke Codex

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant