Skip to content

Commit aecca73

Browse files
authored
fix(cli): point the lifecycle smoke at the module that owns refresh-state (#4534)
`examples/cli-project-lifecycle-command-modularization-smoke.py` fails on `main` with `project lifecycle module missing retry it before delivery`. The marker is not missing: #4521 moved the `refresh-state` command into `loopx/cli_commands/project_lifecycle_refresh_state.py`, which is where the string now lives, while the smoke still required it in the dispatcher module. The check now requires that marker, and the `refresh-state` command name, in the module that owns the command, and keeps requiring the dispatcher markers where they still are. Nothing is weakened: the marker is still required, and a regression that drops it from the refresh-state module still fails. This red blocked the pre-merge gate for any diff that selected the smoke, which is why it is worth fixing rather than working around. Verified: examples/cli-project-lifecycle-command-modularization-smoke.py ok (it was the failing check). Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com> Co-authored-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
1 parent 9714c96 commit aecca73

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎examples/cli-project-lifecycle-command-modularization-smoke.py‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
ROOT = Path(__file__).resolve().parents[1]
1313
CLI = ROOT / "loopx" / "cli.py"
1414
MODULE = ROOT / "loopx" / "cli_commands" / "project_lifecycle.py"
15+
# The `refresh-state` command owns its own module since #4521, so the markers
16+
# that belong to that command are required there instead of in the dispatcher.
17+
REFRESH_MODULE = ROOT / "loopx" / "cli_commands" / "project_lifecycle_refresh_state.py"
1518
INIT = ROOT / "loopx" / "cli_commands" / "__init__.py"
1619
GOAL_ID = "project-lifecycle-smoke"
1720

@@ -187,9 +190,14 @@ def main() -> None:
187190
"read-only-map",
188191
"reward",
189192
"operator-gate",
190-
"retry it before delivery",
191193
):
192194
require(marker in module_source, f"project lifecycle module missing {marker}")
195+
refresh_source = REFRESH_MODULE.read_text(encoding="utf-8")
196+
for marker in (
197+
"retry it before delivery",
198+
"refresh-state",
199+
):
200+
require(marker in refresh_source, f"refresh-state module missing {marker}")
193201
sink_source = (MODULE.parent / "project_lifecycle_sinks.py").read_text(encoding="utf-8")
194202
for marker in (
195203
"apply_external_sink_postcondition",

0 commit comments

Comments
 (0)