Repository navigation
0.7 filters - #49
0.7 filters#49
Conversation
All Stream filtering now lives in a dedicated FilteredStream<> view, created fluently via Has(...), Not(...), and Where(...) on any Stream. - Breaking: init-only Subset/Exclude sets removed from Stream; Stream.Where(...) now returns FilteredStream<>. - Fixed: Has (formerly Subset) uses AND semantics as documented (an archetype must have ALL listed expressions; was OR). - FilteredStream honors all filters in For, Job, Count, enumeration, and Despawn; Raw/Blit stay on the unfiltered Stream (.Stream property). - Two-delegate runners: every For/Job variant gains an (included, excluded) overload partitioning the Query in one pass. - Jobs synchronize per invocation instead of sharing a CountdownEvent between Stream copies; per-element Pass overhead removed from unfiltered Stream.Job work items. - Test batteries regenerated (FilteredStream.Tests.tt); refactored files at 100% line and branch coverage.
- HasUsesAndSemantics now runs all four single-delegate For variants, so the archetype-skip path executes in the entity/uniform overloads too. - DespawnHonorsPredicates gains a Not clause and a sheltered archetype, covering the archetype-skip during predicate collection.
There was a problem hiding this comment.
All reported issues were addressed across 57 files
Not reviewed (too large): src/fennecs.tests/Stream/generators/FilteredStream.Tests.generated.cs (~18,292 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
|
This PR is large and would use a significant portion of your monthly review quota. Comment |
There was a problem hiding this comment.
1 issue found across 60 files
Not reviewed (too large): src/fennecs.tests/Stream/generators/FilteredStream.Tests.generated.cs (~18,292 lines) - if these are generated or fixture files, add them to ignored paths to exclude them from future reviews.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/fennecs/Cross.cs">
<violation number="1" location="src/fennecs/Cross.cs:46">
P3: Join internals now expose mutable pooled arrays/lists assembly-wide, so any internal caller can mutate counters or retain references past Dispose and break iteration/pool invariants. Keeping these fields private (and exposing only needed safe members) avoids that accidental coupling.</violation>
</file>
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
| { | ||
| private readonly int[] _counter; | ||
| private readonly int[] _limiter; | ||
| internal readonly int[] _counter; |
There was a problem hiding this comment.
P3: Join internals now expose mutable pooled arrays/lists assembly-wide, so any internal caller can mutate counters or retain references past Dispose and break iteration/pool invariants. Keeping these fields private (and exposing only needed safe members) avoids that accidental coupling.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/fennecs/Cross.cs, line 46:
<comment>Join internals now expose mutable pooled arrays/lists assembly-wide, so any internal caller can mutate counters or retain references past Dispose and break iteration/pool invariants. Keeping these fields private (and exposing only needed safe members) avoids that accidental coupling.</comment>
<file context>
@@ -43,10 +43,10 @@ internal static bool FullPermutation(Span<int> counter, Span<int> limiter)
{
- private readonly int[] _counter;
- private readonly int[] _limiter;
+ internal readonly int[] _counter;
+ internal readonly int[] _limiter;
</file context>
There was a problem hiding this comment.
All reported issues were addressed across 10 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
feat: splitting the filtering responsibilities between
StreamandFilteredStream.feat: bifurcated runners on
FilteredStreamto run code on passing and rejected entities and archetypesfeat: dotnet stryker mutation resilience improved with specific tests