Skip to content

Move response cap completion tests to the end-to-end tier - #718

Merged
Firehed merged 9 commits into
mainfrom
completion-cap-tier
Oct 7, 2026
Merged

Firehed merged 9 commits into
mainfrom
completion-cap-tier

Conversation

@Firehed

@Firehed Firehed commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Moves the response cap tests to the end-to-end tier and merges CompletionCapFloodTest into it.

Part of #694.

Script. completion-response-cap.php completes the prefix s inside namespace Fixtures\Completion (new fixture src/Completion/ResponseCap.php). Core PHP's s* functions overflow the cap, so the list is reported incomplete. The file's own summarizeTotals still survives: it ranks as a current-namespace symbol, while by name well over 100 core functions (str*, stream_*, sprintf, …) sort before it. Sorting the cap by label alone makes the script fail. This is the flood test's point with real data instead of a generated classmap, and it needs no optional extension.

The flood test also covered built-in functions beating workspace classes in global and call contexts. Those pieces stay unit-tested (ReferenceKindTest orders the kinds, ReferenceResolverTest assigns them, SymbolCandidatesTest writes the prefix), and every context reaches the prefix through the same SymbolCandidates::find.

Unit tests.

  • ReferenceKindTest is new. The unit suite did not cover ReferenceKind::priority(), the ranking that decides which symbols survive the cap. It pins the order and that no two kinds tie.
  • CompletionHandlerTest already covers the cap itself: untouched under the limit, sorted by sortText ?? label, truncated, and flagged incomplete over it.

New vocabulary. ReportsIncomplete() checks the list's isIncomplete flag.

Removed.

  • Both cap tests from CompletionHandlerIntegrationTest, and the setup they alone needed (a seeding helper and a handler factory taking its own source).
  • CompletionCapFloodTest.
  • The flood() method of Namespacing/AbsoluteNavigation.php, whose marker only the deleted navigation cap test used.

Coverage. ReferenceKind and CompletionHandler are fully covered by their own unit tests.

🤖 Generated with Claude Code

Firehed and others added 6 commits October 7, 2026 11:45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.71%. Comparing base (b52e2a1) to head (50e6196).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #718      +/-   ##
============================================
+ Coverage     82.52%   82.71%   +0.18%     
  Complexity     1901     1901              
============================================
  Files           135      135              
  Lines          4876     4876              
============================================
+ Hits           4024     4033       +9     
+ Misses          852      843       -9     

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

Firehed and others added 3 commits October 7, 2026 11:59
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Firehed
Firehed marked this pull request as ready for review October 7, 2026 19:04
@Firehed
Firehed merged commit 237978d into main Oct 7, 2026
9 checks passed
@Firehed
Firehed deleted the completion-cap-tier branch October 7, 2026 19:21
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.

1 participant