Skip to content

test: add C# chained &&/|| deduplication branch coverage - #526

Merged
askpt merged 3 commits into
mainfrom
repo-assist/test-csharp-chained-logical-20260810-139cdc3ffa6eb440
Aug 10, 2026
Merged

test: add C# chained &&/|| deduplication branch coverage#526
askpt merged 3 commits into
mainfrom
repo-assist/test-csharp-chained-logical-20260810-139cdc3ffa6eb440

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Warning

Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding.

What happened

The threat detection results could not be parsed.

Review the workflow run logs for details.

🤖 This pull request was created by Repo Assist, an automated AI assistant.

Summary

Adds unit tests for C#'s logical operator chain deduplication (a && b && c counts once, not per pair), mirroring the existing JS/Go/Python/Rust tests for the same behaviour. This was the one language missing this specific regression test, and the corresponding branch in csharpAnalyzer.ts's getComplexityIncrement (the parent-chain short-circuit that returns 0 for inner nodes of a same-operator chain) was previously uncovered.

Tests added

  • C#: chained && counts once, not per paira && b && c should have complexity 1
  • C#: mixed && and || counts each sequence separatelya && b || c should have complexity 2

Test Status

npm run compile   OK (0 errors)
npm run lint      OK (0 warnings)
npm run test:unit OK 217 passing (was 215), 0 failing

Coverage improvement (csharpAnalyzer.ts): branches 77.46% -> 78.32%. All other files unchanged.

Note: the full npm test (VS Code integration test) could not be run in this sandboxed environment due to getaddrinfo EAI_AGAIN update.code.visualstudio.com (no network access to download VS Code) — this is a known environment limitation, not caused by this change.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • releaseassets.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "releaseassets.githubusercontent.com"

See Network Configuration for more information.

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@42c2ab5b4e4c9273534c39259b2e0df7f20f07e9

Adds tests for C# logical operator chain deduplication, mirroring
the existing JS/Go/Python/Rust tests. This covers the parent-chain
short-circuit branch (return 0 for inner nodes of a same-operator
chain) in csharpAnalyzer.ts's getComplexityIncrement, which was
previously untested for the C# analyzer.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Threat detection produced a warning for this pull request output.

These changes need to be scrutinized before merge and only merged after a careful manual review.

@askpt askpt changed the title [repo-assist] test: add C# chained &&/|| deduplication branch coverage test: add C# chained &&/|| deduplication branch coverage Aug 10, 2026
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.82%. Comparing base (e83bf39) to head (12b763e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #526      +/-   ##
==========================================
+ Coverage   81.76%   81.82%   +0.06%     
==========================================
  Files          13       13              
  Lines        4386     4386              
  Branches      449      450       +1     
==========================================
+ Hits         3586     3589       +3     
+ Misses        799      796       -3     
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@askpt
askpt marked this pull request as ready for review August 10, 2026 09:34
@askpt
askpt self-requested a review as a code owner August 10, 2026 09:34
Copilot AI balanced review requested due to automatic review settings August 10, 2026 09:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds C# regression coverage for logical-operator complexity deduplication.

Changes:

  • Tests chained && as one complexity increment.
  • Tests mixed &&/|| as separate sequences.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@askpt
askpt merged commit 4667c58 into main Aug 10, 2026
10 checks passed
@askpt
askpt deleted the repo-assist/test-csharp-chained-logical-20260810-139cdc3ffa6eb440 branch August 10, 2026 15:07
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.

2 participants