Skip to content

release: v0.5.4 (synced from monolith 015104cd) - #8

Merged
random1st merged 4 commits into
mainfrom
release-v0.5.4
Jul 7, 2026
Merged

release: v0.5.4 (synced from monolith 015104cd)#8
random1st merged 4 commits into
mainfrom
release-v0.5.4

Conversation

@random1st

Copy link
Copy Markdown
Owner

No description provided.

release-secguard and others added 4 commits July 7, 2026 01:09
secguard-secrets inherits sha2 and ignore via `{ workspace = true }` but the root
[workspace.dependencies] only pinned serde/serde_json/log/regex/tree-sitter, so
cargo aborted at manifest-parse ("error inheriting `ignore` from workspace root"),
failing the fmt and test CI jobs before any build. Pins match monolith source.
The release sync renamed crate package names in Cargo.toml but left the crate's
own Rust path identifier untouched in external test/bench targets, which reference
it as `diana_guard::...`. In the standalone the crate is `secguard-guard`, so those
5 targets (tests/fixture_runner, model_smoke, blacklist_whitelist,
scoring_integration; benches/matcher_lookup) failed to compile with E0433
"cannot find module or crate `diana_guard`", breaking `cargo test --all`.

Identifier-only rename; test logic unchanged (22 tests pass locally). Root cause
fixed in monolith release-secguard.sh step 5, which now rewrites each crate's own
underscore identifier across .rs files, not just diana_secguard_brain.
`cargo clippy --all -- -D warnings` on stable 1.96 flags the
`match non_flags.first().copied() { Some(m) => m, None => return None }`
as clippy::question_mark, failing the test job's clippy step. Replaced with
`non_flags.first().copied()?` — semantically identical, satisfies the lint on
both older and current stable. Verified locally: check/test/clippy/fmt all pass
under stable 1.96.1 (matches CI @stable).

Monolith source diana-guard/src/rules.rs has the same pattern at the synced SHA
and will re-emit this on the next sync; not fixed here because that file has
unrelated local WIP — flagged separately for Roman.
@random1st
random1st merged commit 024efe8 into main Jul 7, 2026
4 checks passed
random1st added a commit that referenced this pull request Jul 8, 2026
The v0.5.4 sync (release-secguard.sh, `rm -rf crates` + 3-lib template) deleted the
hand-maintained secguard-cli and secguard-server crates from the release branch;
merging PR #8 propagated that deletion to main, so the Release workflow's binary
build (`tar ... secguard`) and Docker build (`cargo build -p secguard-server`) both
failed and main shipped as lib-only.

Restore both binary crates (from b07ef81, the last main that had them) and the
5-member root workspace with the union of lib + binary deps. All 5 crates build
against the updated v0.5.4 libs with no source changes needed. Also make 4 cli
hook-guard tests hermetic (pin SECGUARD_CONFIG to an empty tempfile) so they assert
the strict default regardless of an ambient ~/.config/secguard/config.toml — matching
the pattern already used by hook_guard_strict_block_false_via_config_file.

Verified on stable 1.96.1: cargo test --all (0 failed), clippy --all -D warnings and
fmt --check clean, and `rm -rf /` hard-blocks with exit 2 under a clean HOME.

The sync-script/template root cause is fixed separately in the monolith so future
syncs no longer wipe these crates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant