Conversation
Extract pure-Rust logic into pub(crate) functions so cargo test can reach them. PyO3 module becomes thin wrappers via #[pymodule_export]. Add regex and ignore crate deps for pattern matching and gitignore- aware directory walking. Add rlib to crate-type and tempfile dev-dep to enable cargo test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…, secret scan Three checks: .gitignore presence and advisory entry audit (Python), .env vs .env.example key drift (Rust via diff_env_files), secret pattern detection in committed files (Rust via scan_secrets). CLI: PATH arg, --strict (warnings as errors), --quiet (plain text). Graceful degradation when Rust extension is unavailable. Type stubs (_devbrief_core.pyi) and py.typed PEP 561 marker added so IDEs resolve EnvDiff / SecretMatch return types. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Python tests cover all three checks via mocked Rust functions: gitignore present/missing/missing-entries, env drift missing-key/ undocumented/clean/missing-files, scan_secrets match/no-match/ binary/gitignored, summary line, --strict and --quiet flags. Manual QA (tests/MANUAL_QA.md): 12 terminal scenarios for the full integration path, including secret-in-gitignored-file and --strict. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ci.yml: install dtolnay/rust-toolchain@stable and uv run maturin develop before pytest; activate rust-check job (clippy + cargo test) with PYO3_BUILD_EXTENSION_MODULE=1 to avoid libpython linking on hosts where it is not a shared lib. release-wheels.yml: new workflow triggered on v* tags; builds maturin wheels for linux/macos/windows x py3.12/py3.13, plus sdist, then publishes via OIDC trusted publishing (no API token). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ule feature Remove pyo3/extension-module from [tool.maturin] features — deprecated in PyO3 0.27; maturin >=1.9.4 sets PYO3_BUILD_EXTENSION_MODULE automatically during extension builds. Removing it also unblocks cargo test which previously could not link without libpython. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
README: add devbrief env to intro, Usage section, and project structure; document --strict/--quiet flags, exit codes, and the Rust-backed secret scanner; add Rust to dev prerequisites and document cargo test command with PYO3_BUILD_EXTENSION_MODULE=1. CLAUDE.md: mark devbrief env IN PROGRESS v0.4.0; document Rust testing setup (rlib + PYO3_BUILD_EXTENSION_MODULE); tick task #8. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reads the installed package version via importlib.metadata so the output stays in sync with pyproject.toml without any hardcoding. is_eager=True ensures the flag is processed before subcommand routing, making `devbrief --version` work standalone. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace splitn(2, '=') with split('=') (needless_splitn)
- Replace iter().any(|&b| b == 0) with contains(&0) (manual_contains)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ensures local dev automatically has the same toolchain and components as CI without manual rustup component add invocations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two missing semicolons on early-return EnvDiff structs and one long assert! reformatted to multi-line by rustfmt. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Extract pure-Rust logic into pub(crate) functions so cargo test can
reach them. PyO3 module becomes thin wrappers via #[pymodule_export].
Add regex and ignore crate deps for pattern matching and gitignore-
aware directory walking. Add rlib to crate-type and tempfile dev-dep
to enable cargo test.
Three checks: .gitignore presence and advisory entry audit (Python),
.env vs .env.example key drift (Rust via diff_env_files), secret
pattern detection in committed files (Rust via scan_secrets).
CLI: PATH arg, --strict (warnings as errors), --quiet (plain text).
Graceful degradation when Rust extension is unavailable.
Type stubs (_devbrief_core.pyi) and py.typed PEP 561 marker added
so IDEs resolve EnvDiff / SecretMatch return types.
Python tests cover all three checks via mocked Rust functions:
gitignore present/missing/missing-entries, env drift missing-key/
undocumented/clean/missing-files, scan_secrets match/no-match/
binary/gitignored, summary line, --strict and --quiet flags.
Manual QA (tests/MANUAL_QA.md): 12 terminal scenarios for the full
integration path, including secret-in-gitignored-file and --strict.
ci.yml: install dtolnay/rust-toolchain@stable and uv run maturin
develop before pytest; activate rust-check job (clippy + cargo test)
with PYO3_BUILD_EXTENSION_MODULE=1 to avoid libpython linking on
hosts where it is not a shared lib.
release-wheels.yml: new workflow triggered on v* tags; builds
maturin wheels for linux/macos/windows x py3.12/py3.13, plus sdist,
then publishes via OIDC trusted publishing (no API token).
Remove pyo3/extension-module from [tool.maturin] features — deprecated
in PyO3 0.27; maturin >=1.9.4 sets PYO3_BUILD_EXTENSION_MODULE
automatically during extension builds. Removing it also unblocks
cargo test which previously could not link without libpython.
Reads the installed package version via importlib.metadata so the
output stays in sync with pyproject.toml without any hardcoding.
is_eager=True ensures the flag is processed before subcommand
routing, making
devbrief --versionwork standalone.