Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.

fix: address review findings round 1 (PR #798)#799

Closed
github-actions[bot] wants to merge 3 commits into
mainfrom
fix/issue-387-behavioral-tests-1f66dce0
Closed

fix: address review findings round 1 (PR #798)#799
github-actions[bot] wants to merge 3 commits into
mainfrom
fix/issue-387-behavioral-tests-1f66dce0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Addresses 5 expert review findings from round 1 on PR #798.

Findings addressed

# Severity Fix
1 🟡 MODERATE (3/3) Renamed OnSessionComplete_HandlerFiresForMatchingSessionNameOnSessionComplete_SubscriptionDoesNotThrow with clear documentation that Demo mode can't fire OnSessionComplete
2 🟡 MODERATE (2/3) Added documentation comments to §2, §3, §5, §6, §9 noting they test patterns in isolation (not calling production methods). Noted §1, §7, §8 call real production code.
3 🟡 MODERATE (2/3) Dashboard_NewSessionButtonExists now asserts exists directly instead of asserting dashboard loaded (which was a duplicate of another test)
4 🟢 MINOR (2/3) CreateSessionState now initializes CurrentResponse, FlushedResponse, PendingReasoningMessages backing fields to prevent future NREs
5 🟡 MODERATE (2/3) Settings_ConnectionModeExists now asserts navigated unconditionally — can no longer pass with zero assertions

Test results

All 3,632 tests pass (0 failed, 0 skipped).

Warning

⚠️ Firewall blocked 1 domain

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

  • 192.0.2.1

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

network:
  allowed:
    - defaults
    - "192.0.2.1"

See Network Configuration for more information.

Generated by Review & Fix · ● 11.3M ·

github-actions Bot and others added 3 commits April 28, 2026 20:44
Add 56 behavioral unit tests and 3 integration tests covering the
orchestration recovery paths introduced in PR #375.

Unit test coverage (OrchestrationRecoveryBehavioralTests.cs):
- LoadHistoryFromDiskAsync: 11 tests parsing events.jsonl with
  user/assistant/tool/reasoning messages, timestamps, edge cases
- bestResponse accumulation: 5 tests verifying longest-content-wins
  across multi-round recovery, null initial, progressive rounds
- PrematureIdleSignal lifecycle: 8 tests exercising ManualResetEventSlim
  set/reset/wait/dispose/cross-thread signaling
- OnSessionComplete handler: 5 tests for TCS pattern, name matching,
  cancellation registration, unsubscription
- OCE handling: 4 tests verifying bestResponse preserved on cancellation
  with linked CTS timeout and user abort scenarios
- dispatchTime filtering: 10 tests for timestamp-based message filtering
  including exact boundary, disk fallback, type exclusion
- GetEventsFileMtime: 4 tests for file modification time detection
- Constants validation: 4 tests verifying timeout values are reasonable
- Recovery loop TCS pattern: 4 end-to-end simulations of the full
  recovery loop with multi-round accumulation

Integration tests (OrchestrationRecoveryTests.cs):
- Dashboard loads, new session button exists, settings page accessible

Fixes #387

Co-authored-by: copilot-agentic-workflow[bot] <224017+copilot-agentic-workflow[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…gs 3, 5)

Finding 3: Dashboard_NewSessionButtonExists computed 'exists' but never
asserted it — test could not detect a missing button. Now asserts directly.

Finding 5: Settings_ConnectionModeExists wrapped assertions inside
if(navigated), allowing the test to pass with zero assertions when
navigation failed. Now asserts navigation succeeds unconditionally.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Finding 1 (3/3): Renamed OnSessionComplete_HandlerFiresForMatchingSessionName
to OnSessionComplete_SubscriptionDoesNotThrow — the test only verifies
subscription + send don't throw (Demo mode can't fire OnSessionComplete).
Added comment explaining why and pointing to TCS-based tests for behavioral
coverage.

Finding 4 (2/3): Initialize CurrentResponse, FlushedResponse, and
PendingReasoningMessages backing fields in CreateSessionState() to prevent
NullReferenceException if future tests call production methods. Added
documentation listing all initialized fields.

Finding 2 (2/3): Added documentation comments to §2, §3, §5, §6, §9
noting that these sections test production patterns in isolation rather
than calling production methods. Documented the trade-off and noted §1,
§7, §8 as the sections with real production code coverage.

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

Copy link
Copy Markdown
Owner

Stale fix-round PR — fixes were pushed to the main PR branch.

@PureWeen PureWeen closed this Apr 30, 2026
@PureWeen PureWeen deleted the fix/issue-387-behavioral-tests-1f66dce0 branch April 30, 2026 20:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant