fix(config): sweep every remaining stale description of the intraday gate - #82
Merged
Conversation
…gate Review of #78 asked whether its guard was too narrow. It was, in a way worse than "a reworded sentence escapes the regex": the guard scanned only the two report modules it had just fixed, so SIX live instances of the original defect were structurally unreachable by it -- one in qt/config.py and five in the I5b/c/d/e/f config YAMLs. Those YAML comments are what an operator reads before enabling price_limit_check, a higher-stakes readership than a docstring. A guard scoped to the files you already fixed can only ever confirm what you already know. Widening it to the whole feature surface immediately found six MORE stale sites of a related kind -- "execute at the first valid 1min CLOSE in [14:51, 14:56:59]" in the I5a/I5b/I5f configs and the tail-framework module docstring, describing the FILL price, which PR #75 also moved to the bar VWAP. Twelve sites total: seven describing the gate, five describing the fill. Two restatements survive by necessity and now say so. runtime/backtest/ event_models.py and qt/config.py both sit UPSTREAM of qt.intraday_tail_framework in the import graph -- it imports them -- so neither can call limit_basis_phrase without a cycle. Both now point at it instead of restating it, and the scan is the net under them. Deliberately NOT swept, and checked individually: RUNBOOK.md and CLAUDE.md's "涨跌停用未复权 raw close 比 stk_limit" describe the DAILY universe tradability filter (universe/filters.py, data/clean/tradability.py) -- a separate, older mechanism that genuinely does compare a raw daily close. Sweeping those would have replaced a true statement with a false one. The test's docstring states its scope honestly: it catches "close" written near "execution minute", not a reworded synonym. Review proved seven such escapes and no lexical guard can close that. Composition is the answer where the import graph allows it; this scan covers the two places it does not. pytest 1776 passed, ruff clean, 31/31 configs validate, phase0 unchanged.
Review of #82 verified the sweep independently -- 12 pre-fix hits, 0 post-fix, line numbers matching -- and noted that #79's qt/exec_basis_eval.py, qt/exec_basis_sanity.py and qt/exec_forward_returns.py describe the same execution anchor from the factor side and were not in the scan's target list. They are accurate today; it read them. Adding them anyway. The entire reason this guard had to be widened twice was that its first version covered only the files already fixed, which meant it could confirm nothing except what was already known. Waiting for these three to go stale before listing them would repeat that exactly. No behaviour change; the scan passes with them included.
StackOverFlow11
added a commit
that referenced
this pull request
Jul 21, 2026
docs: record the repo-wide gate/fill description sweep (#82)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Review of #78 asked whether its guard was too narrow. It was — and in a way worse than "a reworded sentence escapes the regex."
The guard scanned only the two report modules it had just fixed. Six live instances of the original defect were therefore unreachable by it even in principle:
qt/config.py:343stk_limit"config/phase_i5b_...yaml:7config/phase_i5b_...yaml:46config/phase_i5c_...yaml:45config/phase_i5d_...yaml:46config/phase_i5e_...yaml:48config/phase_i5f_...yaml:51Five of these are in the config files an operator reads before enabling
price_limit_check— a higher-stakes readership than a docstring, since they are exactly what someone edits when touching this feature.A guard scoped to the files you already fixed can only ever confirm what you already know.
Widening it found six more
Extending the scan to the whole feature surface immediately surfaced a related staleness from the same PR #75 behaviour change — descriptions of the fill price, not the gate:
in
qt/intraday_tail_framework.py's module docstring and the I5a / I5b / I5f configs. PR #75 moved the fill to the bar VWAP too. Twelve sites total: seven describing the gate, five describing the fill.The two restatements that survive by necessity
runtime/backtest/event_models.pyandqt/config.pyboth sit upstream ofqt.intraday_tail_frameworkin the import graph — it imports them — so neither can calllimit_basis_phrase()without a cycle. Both now point at it rather than restating it, and the repo-wide scan is the net underneath them. Theevent_models.pydocstring says so explicitly, so the next person does not try the import and discover the cycle themselves.What was deliberately NOT swept
RUNBOOK.mdandCLAUDE.md's 「涨跌停用未复权 raw close 比stk_limit」 describe the daily universe tradability filter (universe/filters.py,data/clean/tradability.py) — a separate, older mechanism that genuinely does compare a raw daily close. Checked individually; sweeping them would have replaced a true statement with a false one.Scope of the guard, stated honestly in its own docstring
It catches "close" written near "execution minute". It does not catch a reworded synonym — review demonstrated seven escapes ("its last print", "the final tick", "1-minute" for "1min"), and no lexical guard can close that gap. Composition is the real answer where the import graph allows it; this scan covers the two places it does not.
Gates
pytest1776 passed ·ruffclean · 31/31 configs validate · phase0ic_mean=0.9600, annual_return=0.8408· secret scan 0