Repository navigation
Conversation
A leaf is wrapped when its parser sets emits_cli_output. The new test fails on an unwrapped leaf that is not listed in tests/data/cli_emits_unwrapped.txt, and on a listed leaf that is now wrapped or gone. The list holds the 76 leaves unwrapped on main; no behaviour change. Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues were found in the reviewed changes.
No open issues 🎉
What changed in this PR
0 new findings; nothing to fix.
Adds tests tracking CLI envelope adoption for #94 F2, without changing runtime behavior.
Changes:
- Requires each CLI leaf to be wrapped or explicitly allowlisted.
- Rejects wrapped, removed, or duplicate allowlist entries.
- Records the 76 currently unwrapped leaves.
| File | Description |
|---|---|
dokimi/tests/test_cli_emits_ratchet.py |
Adds three envelope-adoption and allowlist consistency tests. |
dokimi/tests/data/cli_emits_unwrapped.txt |
Lists existing unwrapped CLI leaves. |
Review effort: Balanced
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 2 selected item(s). CI at Review details
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1660 +/- ##
==========================================
- Coverage 96.44% 96.43% -0.02%
==========================================
Files 585 585
Lines 76600 76600
Branches 13175 13175
==========================================
- Hits 73876 73867 -9
- Misses 1671 1674 +3
- Partials 1053 1059 +6 🚀 New features to boost your workflow:
|
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of #94 (F2, the
--jsonenvelope on every leaf). #94 stays open.Summary
Adds a ratchet for the envelope wrap. A leaf is wrapped when its parser sets
emits_cli_output. The new test fails on:tests/data/cli_emits_unwrapped.txt(new commands must opt in);No behaviour change: no parser default, no route and no output changes. Wrapping a leaf without
--jsonis a no-op, so the list tracks what F2 still has to wrap.Numbers on main
19e52226c: 115 leaves, 39 wrapped, 76 listed. Every listed leaf has no--jsontoday.Input errors and
next[]One-off probe (a script, not in the tree) of the 39 wrapped leaves with a runtime
InputErrorunder--json:next[]entry:tools preference,eval personas discover,eval skill-coverage(input_help_next).next: []: every other wrapped leaf, includingagent runandagent replay.Argparse usage errors already name a
--helpstep for every--jsonleaf (test_a_usage_error_document_names_a_help_command_that_works). The gap is runtime input errors only. Fixing it means makinginput_help_nextthe default in_exit_with_document. That changes the output of 36 leaves and contradicts the "no next by design" invariant intest_cli_output.py, so this PR leaves it for a decision.Evidence
tests/test_cli_emits_ratchet.py: 3 tests. Red first: removing a row fails the new-leaf test; addingbackendsand a stale name fails the shrink test. Restored, all 3 pass.make ci-local CI_LOCAL_ARGS=--offlineon this branch: see the CI verdict in the report.Merge danger
--jsonon paid leaves, guards). Each one that wraps a listed leaf must delete its row in the same PR, or it fails this test. The list is a shared file, so adjacent row deletions can conflict on rebase: resolve by taking the deletions.🤖 Generated with Claude Code