You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(flow): print at-rest CLI hints through the hint helper - #2600
Main is red on "flow core unit (shard 1/2)" since #2423: tests/test_cli_hints.py::test_printed_hints_never_hard_code_the_engine_spelling
fails because cli_at_rest.py prints two hints that hard-code openadapt-flow at-rest ....
Change
packages/flow/openadapt_flow/cli_at_rest.py: the "No recovery key" hint in at-rest status and the incomplete-shred message in at-rest shred now
build the command with cli_hints.command(), so they read openadapt flow at-rest ... under the launcher. Under openadapt-flow the
output is unchanged.
packages/types/CHANGELOG.md and packages/verify/CHANGELOG.md: the
late-publish note now also cites this PR. This is how the types 0.24.2 and
verify 0.2.1 publish is re-triggered. scripts/ci/newest_green.py publishes
each package from its newest first-parent commit, which for both is bb7d4fc (docs(types, verify): date 0.24.2 and 0.2.1 so they publish after #2589 #2592), and that run is red. A Flow-only fix would not move it.
No version changes; neither version is on PyPI yet.
The CLI help snapshot (tests/fixtures/cli_surface.json) holds help text
only, so it does not change.
Independent cross-vendor review of claude/fix-cli-at-rest-hints (6ea5a4fa26a1ea180ccec9cfc17adc0c9c1bf16d):
Correctness: Both hard-coded openadapt-flow at-rest ... printed hints in packages/flow/openadapt_flow/cli_at_rest.py (_cmd_status and _cmd_shred) now route through openadapt_flow.cli_hints.command(), fixing tests/test_cli_hints.py::test_printed_hints_never_hard_code_the_engine_spelling on main while preserving identical output under openadapt-flow and rendering openadapt flow at-rest ... under the launcher.
Release re-trigger: Updating the late-publish notes in packages/types/CHANGELOG.md and packages/verify/CHANGELOG.md cleanly advances newest_green.py's first-parent commit for openadapt-types 0.24.2 and openadapt-verify 0.2.1 with zero version or API changes.
Generality & Durability: Uses the existing general cli_hints.command() helper (zero app-specific branches, zero safety-path weakening), durably restores green main CI, and unblocks the 0.24.2 / 0.2.1 PyPI publish.
CI is currently queued; ready for head-pinned squash-merge as soon as checks turn green.
The fix is small and correct. Both hints in cli_at_rest.py now go through cli_hints.command(), so they read openadapt flow at-rest ... under the launcher. Under openadapt-flow they are unchanged.
Evidence at this head (box checkout, uv sync --locked --python 3.12 --extra dev):
tests/test_cli_hints.py, tests/test_at_rest_review_round3.py and tests/test_encryption_at_rest.py: 46 passed.
Red before, green after: with main's cli_at_rest.py (main 0cece309) swapped in, test_printed_hints_never_hard_code_the_engine_spelling fails, which matches main's red shard. With this head's file, it passes.
Rendering: command('at-rest recovery create', argv=['/usr/bin/openadapt', ...]) gives openadapt flow at-rest recovery create, and an engine argv gives openadapt-flow at-rest archive.
ruff check and ruff format --check on the file: clean. The import of cli_hints is stdlib-only, so there is no import cycle.
git merge-tree against main 0cece309: merges cleanly.
Generality gate: pass. This is a generic CLI-wording fix. Nothing in it is specific to a workflow, app or customer.
Non-blocking:key_hierarchy.py:1226 (RecoveryRestoreRequired) still hard-codes openadapt-flow at-rest restore DIR --yes in an exception message. The test only scans print() calls, so it does not catch this, but a launcher user would still see the engine spelling. Worth a follow-up.
Limits:
I did not run the full Flow suite. I also did not check scripts/ci/newest_green.py end to end, so I have not confirmed that touching the two CHANGELOGs re-triggers the types 0.24.2 and verify 0.2.1 publish. I only confirmed that no version numbers change.
CI at this head when I posted: 18 pass, 12 pending (flow core unit shards, at-rest shards, protected-path evidence), 0 failing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main is red on "flow core unit (shard 1/2)" since #2423:
tests/test_cli_hints.py::test_printed_hints_never_hard_code_the_engine_spellingfails because
cli_at_rest.pyprints two hints that hard-codeopenadapt-flow at-rest ....Change
packages/flow/openadapt_flow/cli_at_rest.py: the "No recovery key" hint inat-rest statusand the incomplete-shred message inat-rest shrednowbuild the command with
cli_hints.command(), so they readopenadapt flow at-rest ...under the launcher. Underopenadapt-flowtheoutput is unchanged.
packages/types/CHANGELOG.mdandpackages/verify/CHANGELOG.md: thelate-publish note now also cites this PR. This is how the types 0.24.2 and
verify 0.2.1 publish is re-triggered.
scripts/ci/newest_green.pypublisheseach package from its newest first-parent commit, which for both is
bb7d4fc (docs(types, verify): date 0.24.2 and 0.2.1 so they publish after #2589 #2592), and that run is red. A Flow-only fix would not move it.
No version changes; neither version is on PyPI yet.
The CLI help snapshot (
tests/fixtures/cli_surface.json) holds help textonly, so it does not change.
Tests
tests/test_cli_hints.py,tests/test_at_rest_review_round3.py,tests/test_encryption_at_rest.py: 46 passed (single process).ruff checkandruff format --checkoncli_at_rest.py: clean.