max_reblog has a hidden default of 5 that overrides run_continuously #56
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When
run_continuously = trueis set in config butmax_reblogis not set, zhongli stops after 5 posts becausemax_rebloghas a hardcoded default of5in theConfigurationstruct.\n\nThe field should have no default (i.e.int | None = None), so that:\n- If not set, there is no post limit\n- If set to a positive integer, that limit is honoured regardless ofrun_continuously\n\nThis removes the silent, surprising behaviour caused by the hidden default.Root cause:
Configuration.max_rebloghasint = 5as its type annotation and default inconfig.py. Inboost_from_fenliu, the CLI--max-postsargument takes precedence, but when absent (the normal container case),config.max_reblogis used directly — so the undocumented default of 5 silently caps every run.\n\nrun_continuouslyis parsed but never influences the limit logic.\n\nPlan:\n1. Changemax_reblog: int = 5→max_reblog: int | None = Noneinconfig.py\n2._should_stop_boostingalready treats falsymax_postsas "no limit", soNonepropagates correctly with no further changes needed\n3. Add/update tests to assert the field isNonewhen omitted from config and that_should_stop_boostingnever fires whenmax_postsisNone\n\nBranch:fix/issue-56-max-reblog-no-default