test: the A-share floor sweep does not catch a restored flat constant
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
Research direction
Read dashboard/backend/tests/infrastructure/market_data/test_ifind_ashare.py:511-539 and the floor calculation it exercises. Update the sweep to include a short legal window, such as one with three weekdays, where a restored flat value of 40 exceeds the reachable 12 bars. Run the test and verify it fails when the implementation is temporarily changed to return 40.
Written by the indexing model from the issue text.
Description
Follow-up from #474 item 1 (PR #477).
test_minimum_bars_never_exceeds_what_any_legal_window_can_actually_return (dashboard/backend/tests/infrastructure/market_data/test_ifind_ashare.py:511-539) sweeps all seven start weekdays and asserts floor <= weekdays * 4. Its docstring claims it "fails loudly if someone raises _MINIMUM_BAR_COMPLETENESS above 1.0 or restores a flat constant".
It does the first. It does not do the second:
floor = max(4, int(weekdays * 4 * completeness)), so the assertion reduces tocompleteness <= 1.0— true for any value at or below 1.- A restored flat
40passes every case in the sweep. A 14-day window holds at most 10 weekdays,10 × 4 = 40, and40 <= 40holds. That is exactly the constant the change was made to remove, and it comes back green.
Fix shape: assert against a window the flat constant would break rather than against the widest one. A short legal window (say 3 weekdays → 12 reachable bars) separates a proportional floor from any flat value above 12. Mutation-check the new test by restoring return 40.
- Dominant language
- Python
- Stars
- 767
- Forks
- 156
- Avg merge
- 21h 57m
- Merged PRs (30d)
- 92
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Open-Finance-Lab/AgenticTrading
-
fix(llm): a non-ASCII execution handoff raises UnicodeEncodeError instead of ExecutionHandoffErrorOpen
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Open-Finance-Lab/AgenticTrading#659 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Open-Finance-Lab/AgenticTrading#658 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Open-Finance-Lab/AgenticTrading#657 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Open-Finance-Lab/AgenticTrading#591 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Open-Finance-Lab/AgenticTrading#586 ·
Maintainers usually reply within 1 day
All issues in Open-Finance-Lab/AgenticTrading
Similar issues
-
[oblt-aw][autodoc] Update workflow docs for gh-aw v0.92.5 and detector permission scopePossibly taken @github-actions claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
roadmap-100
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
comp/tools P2 tool/browser tool/file type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NousResearch/hermes-agent#143418 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
python-hyper/uritemplate#164 ·