Repository navigation
cli-std: <cli> llm content rots — derive fact sections from in-binary sources of truth and gate the rest (llms.txt becomes generated) - #72
Open
chrischeng-c4 wants to merge 1 commit into
Open
chrischeng-c4 wants to merge 1 commit into
chrischeng-c4 wants to merge 1 commit into
Conversation
…m convention Add `assert_snapshot_matches` to `cli_std::llm` to compare committed snapshots against generated content, normalizing line endings and a single trailing newline. Re-export the helper in `api::llm` and add unit tests. Document the CLI llm convention in `crates/cli-std/CONTRIBUTING.md`.
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 #9
Summary of Changes
crates/cli-std/src/application/llm.rs:pub fn assert_snapshot_matches(committed: &str, generated: &str, regen_hint: &str)to compare committed documentation snapshots against generated output.normalize_snapshothelper which normalizes\r\nto\nand ensures a single trailing newline.crates/cli-std/src/api/llm.rs:assert_snapshot_matchesnext toassert_topics_render.assert_snapshot_matches.crates/cli-std/src/application/llm/tests.rs:crates/cli-std/CONTRIBUTING.md:## CLI llm conventiondetailing fact-bearing content asTopicSection::Generated, prohibition of hand-written restatement of derivable facts, generatedllms.txtgated byassert_snapshot_matches, and mandatory test conformance assertions.Local Unit Tests Passed
cargo test --locked -p cli-std(45 unit tests passed, 7 doc tests passed)cargo test -p service-backup --lib(21 unit tests passed)cargo clippy --locked -p cli-std --all-targets -- -D warnings(clean)cargo fmt --check --package cli-std(clean)cargo doc --locked -p cli-std --no-deps(clean)Cloud CI Verification Needed (Not Run Locally)
Per confirmed user test policy, functional CLI contracts, server/network/Raft/cluster tests, and end-to-end performance benchmarks are reserved for cloud CI: