Skip to content

feat(affected): exclude tests on request - #5610

Open
rvitaliy wants to merge 1 commit into
Graphify-Labs:v8from
rvitaliy:fix/affected-no-tests
Open

rvitaliy wants to merge 1 commit into
Graphify-Labs:v8from
rvitaliy:fix/affected-no-tests

Conversation

@rvitaliy

Copy link
Copy Markdown
Contributor

What does this PR do?

Add graphify affected TARGET --no-tests and an optional MCP no_tests argument. Both entry points use the same test-path conventions as query --no-tests. The filtered view applies to target lookup and traversal, while the default still includes test coverage.

Closes #5609.

Type of change

  • New feature

Verification & Invariants

  • A test node cannot serve as the target or as a path from the target to another result. Directed and parallel edges among included nodes retain their original semantics.
  • The filtered view has its own lookup indexes. The same MCP session still returns the original results on a subsequent unfiltered request.
  • On a real Housekeeping query, both CLI and HTTP MCP output go from 23 hits (18 test paths) to 5 application hits.

How was this tested?

  • Nine focused cases fail on v8 and pass with the feature. python -m pytest -q --tb=short tests/test_affected_cli.py tests/test_serve_affected_seeds.py (43 passed on Python 3.14).
  • Full Python 3.14 suite split across xdist (12,080 passed), the two worker-sensitive files without xdist (93 passed), and the serial group (282 passed).
  • ruff check ., git diff --check, and graphify update . passed. Pyright adds no diagnostics relative to v8.

Graphify-specific checklist

  • Verified CLI/MCP behavior and reproducible filtering.
  • Reviewed the diff for credentials and generated graph files.
  • Disclosed AI assistance in the commit trailer.

@rvitaliy
rvitaliy requested a review from safishamsi as a code owner November 28, 2026 23:24
@github-actions

Copy link
Copy Markdown

Thanks for the pull request, @rvitaliy. A maintainer will review it soon.

Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions.

A couple of things that speed up review: make sure the test suite passes on Python 3.11 and 3.13, and that the change keeps extraction deterministic.

@github-actions github-actions Bot added the contributor Pull request from a returning community contributor label Nov 28, 2026

@graphify-labs graphify-labs Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Graphify review View in Graphify

Nothing blocking · 8 possible issues to check · Merge confidence 5/5

8 possible issues to check · High impact

The affected tool can now optionally omit test-path nodes from target lookup and reverse traversal.

8 possible issues we couldn't confirm
  • Required graph check is an assert, so it is removed under python -O and a missing graph reaches graph_without_tests and resolve_seed_outcome · graphify/serve.py:3674
  • affected rejects no_tests when a client sends it as a string such as "true", while query_graph's demote_docs accepts string booleans · graphify/serve.py:3672
  • The non-test view starts with an empty graph-attribute dict, so graph-level metadata on the original graph is invisible to seed lookup and t · graphify/affected.py:483
  • +5 more in Graphify

They don't change the score.

What this review covered
  • We didn't review 1 file that isn't source code, such as docs, config, images, or generated or third-party code.
  • 5 of 5 changed files inspected. This is scope, not a correctness guarantee.
Code graph · 1273 functions depend on this change
  • 3 functions became more coupled. main() (138 callers), dispatch_command() (8 callers), _build_server() (3 callers).
  • 658 of 658 test files are affected by this change.
  • Gate, test list and every flagged function: in the Graphify check.

Reviewed 368bd97

This branch has not been deployed

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

Labels

contributor Pull request from a returning community contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Let affected exclude test files in CLI and MCP queries

1 participant