refactor(workspace): relax lints, downgrade core crates, and expand documentation - #341
Merged
Conversation
* test(sha512): cover HKDF edge cases * test(sha512): cover HMAC key handling * test(sha512): add SHA-384 vectors * test(sha512): add SHA-512 vectors * test(sha512): cover utility helpers * test(sha512): remove legacy integration tests * test(sha512): add integration test helper * test(sha512): add public API vectors
* chore(workspace): update sha512 lock version * chore(libvctrl): update dependency versions * chore(core): update dependency versions * chore(plumbing): update libvctrl version * chore(sha512): bump crate version
…ety (#334) * chore(workspace): update Cargo.lock for handler benchmarks * chore(handler): add criterion dev-dependency and benchmark target * style(handler): remove unnecessary blank lines * style(handler): remove unnecessary blank lines * style(handler): remove unnecessary blank line * refactor(handler): use alloc and reorder imports * refactor(handler): add extern crate and test imports * style(handler): remove unnecessary blank lines * style(handler): reorder imports * style(handler): reorder imports * style(handler): reorder imports * refactor(handler): add Clone bound to Entry and clean up * style(handler): remove unnecessary blank lines * style(handler): reorder imports * style(handler): reorder imports * style(handler): remove unnecessary blank lines * style(handler): remove unnecessary blank lines * style(handler): reorder imports * refactor(handler): use HashSet for parent deduplication * refactor(handler): use specific imports and iter types * refactor(handler): reorder imports and use wrapping_add * style(handler): remove unnecessary blank line * fix(handler): improve duplicate detection in Tree * style(handler): remove unnecessary blank lines * fix(handler): validate ref name components more strictly * bench(handler): add handler benchmarks * test(handler): add blob tests * test(handler): add commit tests * test(handler): add commit_meta tests * test(handler): add common test utilities * test(handler): add delta tests * test(handler): add entry_kind tests * test(handler): add errors tests * test(handler): add hash tests * test(handler): add criterion import to hash_validation * test(handler): add criterion import to type_validation * test(handler): add tag_reflog tests * test(handler): add traits_index tests * test(handler): add tree tests * test(handler): add user_id tests * test(handler): add validation tests
* test(handler): fix empty slice assertion * test(handler): make test helpers public and add lint attributes * test(handler): use first() instead of get(0)
* test(core): add comprehensive tests for binary decoder * test(core): add tests for binary encoder and fix clippy * test(core): add tests for sha512 hasher * style(core): add alloc extern and allow lint * test(core): add tests for blob builder * test(core): add tests for commit builder * test(core): add tests for tag builder * test(core): add tests for tree and tree entry builders * test(core): add tests for memory store * test(core): add tests for memory ref store * test(core): remove obsolete codec_test * test(core): remove obsolete store_test * test(core): add builder API integration tests * test(core): add codec roundtrip integration tests * test(core): add common test utilities
* test(core): remove inline tests from binary_decoder * test(core): remove inline tests from binary_encoder * test(core): remove inline tests from sha512 * test(core): remove inline tests from blob * test(core): remove inline tests from commit * test(core): remove inline tests from tag * test(core): remove inline tests from tree * test(core): remove inline tests from memory store * test(core): remove inline tests from ref_store * test(core): remove builder_api integration tests * test(core): remove codec_roundtrip integration tests * test(core): remove common test utilities
* test(core): rewrite binary_decoder tests with roundtrip checks * test(core): add binary_encoder tests and roundtrip checks * test(core): add sha512 hasher tests with known vectors * test(core): add blob builder tests * test(core): add commit builder tests * test(core): add tag builder tests * test(core): add tree and tree entry builder tests * test(core): add memory store tests * test(core): add memory ref store tests * test(core): add common test utilities * test(core): add builder integration tests * test(core): add codec integration roundtrip tests * test(core): add hasher integration test * test(core): add store integration tests
* fix(plumbing): improve cat_file safety and error handling * style(plumbing): add alloc extern * test(plumbing): update cat_file integration tests
* style(root): remove unnecessary blank lines * test(root): add public API integration tests
* chore: update Cargo.lock for version bumps * chore(root): bump version to 2.2.0 * chore(core): bump version to 3.2.0 * chore(handler): bump version to 5.2.0 * chore(plumbing): bump version to 0.3.0 * chore(sha512): bump version to 3.2.0
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.
Summary
This PR fundamentally reverts the workspace to a more permissive developmental state by downgrading multiple crate versions, relaxing Clippy and Rustc lints from
denytowarn, and removing thezeroizesecurity dependency. It simultaneously modernizes the CI pipeline, simplifies the Makefile, heavily documents the public facade, and replaces a large standalone integration test suite with inline doctests.Motivation & Context
The previous state of the repository enforced an extremely strict
deny-based linting policy and had progressed to versions like 2.2.0/3.2.0/5.2.0. This change suggests a strategic pivot or reset, intentionally reverting to older minor versions (e.g., 2.1.x/3.0.x/5.0.x) likely to establish a cleaner baseline before future releases. The removal ofzeroizefrom a cryptographic crate indicates a trade-off where secure memory wiping was deprioritized, possibly to simplify dependencies or support a broaderno_stdenvironment withoutallocoverhead. Replacing thepublic_api.rsintegration tests with doctests indicates a shift towards documentation-driven development, ensuring examples are always compilable while reducing the maintenance burden of a separate test file.Detailed Changes
toolchain: 1.96.0parameter, allowing the GitHub Action to default to the latest stable toolchain. Eliminates thegit config --global core.autocrlf falseworkaround from all jobs, suggesting that line-ending issues have been resolved at the repository level or are no longer deemed necessary.libvctrl,libvctrl_core,libvctrl_handler,libvctrl_plumbing, andlibvctrl_sha512. Completely removes thezeroizecrate and removescriterionas a dependency oflibvctrl_handler.[workspace.lints.rust]and[workspace.lints.clippy]sections, downgrading the vast majority of rules from"deny"to"warn"and allowing previously forbidden lints likepedantic,nursery,std_instead_of_core, andstd_instead_of_alloc.CLIPPY_FLAGSto be empty instead of-D warnings. Removes redundant strict CI targets (ci-fast,clippy-strict,check-all). Removes the--workspaceflag from the baseclippytarget, narrowing its scope. Translates echo outputs from Indonesian to English and strips Unicode emojis. Hardcodes thepublish-allsequence and explicitly dropslibvctrl_sha512from the publication list. Changes theruntarget to default to the workspace root instead of requiring thePKGvariable.pub usestatement at the crate root.alloc::strandalloc::sync::Arcwith theirstdequivalents, aligning with the newly allowedstd_instead_of_corelint. Adds extensive rustdocs to the module, theBinaryDecoderstruct, and all trait implementation methods (decode_blob,decode_tree,decode_commit,decode_tag). Each method now includes format specifications, error conditions, and fully functional doctests that effectively replace the deleted integration tests.Impact & Breaking Changes
Breaking changes are present. The intentional downgrade of published crate versions (e.g.,
libvctrl_sha512from 3.2.0 to 3.0.0) will break downstream dependents using semver ranges like^3.1.0or^3.2.0. The removal of thezeroizedependency from the cryptographic crate is a breaking change if downstream code relied on theZeroizetrait implementation for secure memory clearing. The deletion oflibvctrl/tests/public_api.rsreduces the explicit test coverage of the facade crate, relying entirely on the new doctests to catch regressions. The CI pipeline's removal of the pinned toolchain version means builds may suddenly fail if a new Rust stable release introduces breaking changes or new warnings.Testing Recommendations
Execute
cargo test --workspace --docto verify that all newly introduced doctests successfully compile and pass, effectively proving that they cover the functionality previously held by the deletedpublic_api.rs. Runmake cito ensure the relaxed linting rules and unpinned CI toolchain do not introduce unexpected failures. Attempt to build a downstream crate against these downgraded versions to confirm the impact of the version retraction.