Skip to content

test_rule_manifest still pins the DCA rule budget to config.dca.budget_usd after #840 #844

Description

@eaitbrahim

Found in review of #843 (#840).

Since #843, the live executor sizes each DCA buy from the rule's size_usd, with config.dca.budget_usd only as a fallback. But tests/test_rule_manifest.py::test_committed_manifest_is_valid still has an assertion (1) at lines 176-184. It requires deploy/live-rules.json's DCA budget_usd to equal config.live-sandbox.yaml's dca.budget_usd, on the grounds that the config value is "the value the executor actually spends". That is no longer true.

Concrete failure: the manifest sync that #843's PR body proposes would fail this test even though it is the correct state. That sync records the live BTC DCA rule at budget_usd: "40", with the config fallback left at 50.

The docstring at the top of scripts/rule_manifest.py (lines 9-14) carries the same stale rationale.

Fix: drop or re-aim assertion (1), for example to pin each committed DCA rule's budget_usd to its intended value, and keep assertion (2) (status live). Also rewrite the comment block and the rule_manifest.py docstring.

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions