fix(hooks): writeln!(stderr) not eprintln! in gate-no-rewrite deny path - #110
Merged
Merged
Conversation
Closed
8 tasks
noogalabs
pushed a commit
to noogalabs/contextcrawler
that referenced
this pull request
Jun 4, 2026
* feat(docker): add docker compose support with compact output Add token-optimized output for docker compose commands: - `docker compose ps`: compact service listing with status and ports - `docker compose logs`: deduplicated log output via existing log engine - `docker compose build`: summary with build time, services, and step count - Unsupported compose subcommands pass through directly Includes 11 tests (8 compose format tests + 3 for existing compact_ports). Fixes thehoff#101 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address PR thehoff#110 review — use --format for compose ps, fix bytes/chars bugs - Switch format_compose_ps to parse structured --format tab output instead of fragile human-readable table (eliminates contains("Up") false positives and byte/char confusion) - Fix find('[') byte offset used with chars().skip() in build parsing - Use .next_back() instead of .last() on DoubleEndedIterator - Consistent error handling with .context()? in run_compose_ps - Strengthen test assertion for compose logs - Add tests for no-ports and long-image-path cases Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: propagate exit codes on compose failures + remove Vec allocation Address PR thehoff#110 review feedback from pszymkowiak: - Check output.status.success() after .output() in run_compose_ps, run_compose_logs, and run_compose_build to prevent silent failures when Docker daemon is not running - Replace .collect::<Vec<&str>>().len() with .count() in format_compose_build step counting to avoid unnecessary allocation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: update version references to 0.20.1 after upstream rebase Sync documentation version strings with Cargo.toml after rebasing on upstream master. Fixes CI validate-docs check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: drop upstream workflow file from feature branch This workflow was pulled in during rebase on upstream master. Not part of the docker compose feature — let upstream manage it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore: restore validate-docs workflow from upstream Workflow was unintentionally removed while resolving a push permission issue. Restored to match upstream master. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 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.
Summary
Release-blocker fix found while auditing the merged tip after the #100 audit landed.
src/hooks/mod.rscarries#[deny(clippy::print_stdout, clippy::print_stderr)]so a stray print macro can't corrupt the hook protocol. The gate-wiring deny log (#106 follow-up) usedeprintln!athook_cmd.rs:487. Each audit PR's CI ran against an earlierdevelop, so this only surfaced as a clippy hard error once all 9 changesets were on the same tip.Swapped to the file's established
writeln!(io::stderr(), ...)pattern — identical to theread_stdin_limitederror path a few lines down. Behaviourally identical.Verification (on the merged develop tip)
cargo clippy --workspace --release— was exit 101, now exit 0, cleancargo test --workspace— 2418 pass, 0 fail, 13 suitescargo build --release— cleanRemaining clippy warnings (contains-vs-any, MSRV notes, doc indentation) pre-date the audit and are not release-gating.
Test plan
🤖 Generated with Claude Code