Repository navigation
docs(cli): document plugins, policy-file and memory seed, and keep CLI.md complete - #739
Merged
Merged
Conversation
…I.md complete docs/CLI.md covered every registered command except plugins (list, enable, disable), policy-file and memory seed. Add a row for each, add policy-file and plugins examples, and add a test that walks the registered non-hidden commands and asserts each appears in CLI.md, so the page cannot drift again. Closes DobermanCore#721
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.
Closes #721 (and its PostHog twin #732).
What changes
docs/CLI.mdgets a row, in the same table shape as its neighbours (what it does + key flags), for each registered command it didn't mention:doberman policy-file(next topolicy-versions): status ofdoberman.policy.yaml(present/absent, applied globs, rejected reason, pending drops), and--acceptbehind diff confirmation plus the strongest possession factor, with no--yesbypass.doberman plugins list/enable NAME/disable NAME(after theapprovalsrows): opt-in by name;listshows names and states without loading anything; disabling a name that was never enabled is a no-op.doberman memory seed(next tomemory reset/memory prune). The test below found this one too: it isn't in the issue, but it was also missing from the page. It links toBASELINE_SEEDING.md.The Examples block gains
doberman policy-file,doberman plugins listanddoberman plugins enable my_rule.The guard
tests/unit/test_cli_help.py::test_cli_md_documents_every_visible_commandwalksget_command(app)the way the help-target test above it does, skipping hidden commands. It asserts each command and group path appears indocs/CLI.mdas`doberman <path>, which allows trailing arguments such asNAMEor[NAME]. Onmainit fails with:On this branch
test_cli_help.pygives 87 passed, andpytest tests/unit -k "doc or cli_md or CLI"passes. ruff is clean.AI assistance: I used an AI assistant to draft the doc rows and the test. I checked each row against the command's code and
--help, and ran the tests above myself.