Skip to content

Stale backticked code references outside keel/web (engine._assemble_cts_context, backtest._closed_trade, simulate._slippage_for_products) #982

Closed

Description

@eaitbrahim

Found by the PR #978 gatekeeper. These predate #978 and are outside its scope, which is keel.web citations, pinned by test_a_cited_web_module_attribute_exists. They are #967's class of bug in other packages: backticked module.name references that resolve to nothing.

  • keel/research/independence.py:60 cites engine._assemble_cts_context. The function is public now, as engine.assemble_cts_context; bias.py and cts_factors.py already cite it that way.
  • keel/strategy/stats.py:88 and keel/strategy/rules/base.py:158 cite backtest._closed_trade. keel/strategy/backtest.py defines only _close_trade (line 390).
  • keel/commands/slippage.py:169 cites simulate._slippage_for_products. keel/commands/simulate.py has no such function.

agent._DECIMAL_PARAMS (strategy/rules/base.py:349, agent.py:184) is cited deliberately as history ("used to live here") and is not stale.

Fix: correct each reference. Then widen the resolver in tests/web/test_web_prose_stays_true.py from keel.web to these packages, or add a sibling test, so each correction is pinned.

A general resolver over every backticked stem.name is not workable as-is. It hits DB columns, event kinds and config keys, so it needs a module allowlist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions