Skip to content

test(research): lock maximal-window tie break - #120

Merged
stacknil merged 2 commits into
mainfrom
stacknil/v07-maximal-window-tie
Aug 28, 2026
Merged

test(research): lock maximal-window tie break#120
stacknil merged 2 commits into
mainfrom
stacknil/v07-maximal-window-tie

Conversation

@stacknil

Copy link
Copy Markdown
Owner

Summary

  • add a minimal equal-score candidate control for the final chronological tie-break
  • verify candidate input order does not change the selected window
  • record the bounded evidence and remaining research boundaries in the episode ADR

Why

The v0.7 research matrix named maximal-window ties as an unverified policy point. Six synthetic events are sufficient to create exactly two candidates with equal covered-event count, total span, and episode count, so the final chronological key is the only distinguishing objective. A focused control gives higher decision value than another large JSON fixture.

How to validate

python -m unittest tests.test_episode_candidate_core
python -m unittest discover -s tests -p 'test_episode*.py'
python -m ruff check scripts tests
cmake --build build --config Debug --target test_detector
ctest --test-dir build -C Debug --output-on-failure

Risk / rollout notes

  • Design decision: when all higher-priority objectives tie, select the lexicographically earliest chronological window key; candidate input order must not affect the result.
  • Main risk: overgeneralizing one bounded characterization case to unresolved shared-evidence or production-complexity policy.
  • Compatibility impact: test and ADR only; Detector::analyze(), CLI behavior, loglens.report.v3, and v0.6 behavior are unchanged.
  • Rollback path: revert commits 2008d8e and 4d01850; no migration or runtime rollback is required.

@stacknil

Copy link
Copy Markdown
Owner Author

Post-CI final diff review completed.

  • Checks: all 11 reported status entries succeeded (Ubuntu, Windows, CodeQL, parser fuzz smoke, and Repo Sentinel; push and pull-request workflows both ran).
  • Design decision: when covered-event count, total span, and episode count tie, the lexicographically earliest chronological window key wins; reversing candidate input must not change the selection.
  • Main risk: treating this bounded characterization as evidence for unresolved shared-evidence or production-complexity policy. The ADR keeps those boundaries explicit.
  • Compatibility impact: the final diff contains only tests/test_episode_candidate_core.py and docs/adr/0001-episode-semantics-boundaries.md; there is no src/, CLI, report-v3, rule, or v0.6 behavior change.
  • Rollback path: revert 2008d8e and 4d01850; no runtime migration or data rollback is required.

No review comments, bot action items, privacy findings, or secret findings remain.

@stacknil
stacknil merged commit bc4bcbc into main Aug 28, 2026
11 checks passed
@stacknil
stacknil deleted the stacknil/v07-maximal-window-tie branch August 28, 2026 03:19
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