Repository navigation
test(research): cover signal scoping across security groups - #277
adityaanikam wants to merge 1 commit into
Conversation
PanWatch contribution checkThe mechanical PR requirements are satisfied. Product acceptance, evidence quality and code review remain maintainer decisions. Scope: 0 production files, 0 added + deleted production lines. Tests, Markdown docs and known lockfiles are excluded. 本检查只核对材料与改动规模,不代表产品或实现已经验收。首次提示后有14天整改窗口;第7天提醒,逾期仍未达标自动关闭。维护者可用 pr:hold 暂停;关闭后仍可重开或提交拆分版本。 |
|
@adityaanikam Thanks for this clean fix! The logic for scoping signals per group looks solid, and However, this branch is currently behind |
2bdef39 to
6d13f5b
Compare
|
Rebased onto the latest main. #284 already fixed the bug through |
Background
Closes #276. When more than
max_group_sizesecurities are bound, each group used to carry every signal andResearchInputrejected it. #284 has since fixed this on main throughResearchInput.for_stocks, so this PR no longer changes production code.Changes
Two tests in
test_research.pyuse two groups with a signal for each security, one for the normal path and one for the risk evidence request.Scope
Regression tests only.
Validation
Tested commit: 6d13f5b
Commands and results:
python -m pytest packages/pan-investment-research/tests -q: 119 passed.for_stocksremoved locally, both new tests fail and none of the other tests intest_research.pydo.Acceptance evidence
Steps: run the two new tests,
test_multi_group_scopes_signals_to_their_groupandtest_multi_group_evidence_request_scopes_signals_to_their_group.Expected: both research runs complete with a recommendation for each security.
Observed: both pass at the tested commit.
Evidence: with the signal filter removed from
for_stocks, both fail onsignal outside research scope or analysis cutoff(assert 'review' == 'ready'andassert 'validation_failed' == 'complete').Boundaries and risks
Follow-up
None.