Skip to content

Extract shared run-rendering helpers into cli/_run_render.py - #27

Merged
jbedient-kizen merged 1 commit into
mainfrom
refactor/extract-run-render-helpers
Sep 4, 2026
Merged

Extract shared run-rendering helpers into cli/_run_render.py#27
jbedient-kizen merged 1 commit into
mainfrom
refactor/extract-run-render-helpers

Conversation

@jbedient-kizen

Copy link
Copy Markdown
Contributor

Problem

runs.py owned the execution-history and step-log rendering, and automations.py needed the same rendering for start --wait and --show-logs. So one command module imported private helpers from a sibling command module — the kind of edge that quietly turns into a duplicated renderer the next time someone touches it.

Solution

Move the five shared renderers into cli/_run_render.py and have both command modules import from there.

Pure move, no behaviour change. print_step_log loses its leading underscore because it is now called across a module boundary; that rename is the entire semantic delta.

Testing

bin/check.sh — all five steps pass: 1426 passed, 4 skipped, unchanged from the branch below this one, which is what a pure move should produce.

The diffstat balances: 140 lines into the new module against 135 removed from the two command modules, the difference being the module docstring and imports.

Design notes / tradeoffs

No changelog entry — this is an internal refactor with no user-visible effect, per the repo's convention.

Second of six stacked branches; based on the rename so the changelog stays conflict-free down the stack.

runs.py owned the history/log rendering that automations.py's start
--wait and --show-logs also need, so automations.py imported from a
sibling command module. Both now import the shared renderers from one
place instead.
Pure move — no behaviour change. print_step_log loses its leading
underscore because it is now called across module boundaries.
@jbedient-kizen
jbedient-kizen changed the base branch from chore/consistent-kizen-admin-cli-references to mainSeptember 4, 2026 16:31
@jbedient-kizen
jbedient-kizen merged commit dfecc7f into mainSep 4, 2026
8 checks passed
@jbedient-kizen
jbedient-kizen deleted the refactor/extract-run-render-helpers branch September 4, 2026 16:34
@jbedient-kizen
jbedient-kizen restored the refactor/extract-run-render-helpers branch September 4, 2026 16:36
@jbedient-kizen
jbedient-kizen deleted the refactor/extract-run-render-helpers branch September 4, 2026 16:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jbedient-kizen@annaliu-kizen