Skip to content

feat(): batch fixs + aws extended + filter quality batch#997

Open
aeppling wants to merge 30 commits intomasterfrom
develop
Open

feat(): batch fixs + aws extended + filter quality batch#997
aeppling wants to merge 30 commits intomasterfrom
develop

Conversation

@aeppling
Copy link
Copy Markdown
Contributor

@aeppling aeppling commented Apr 3, 2026

Feat :

8 to 20 aws commands supports

Filters quality :

  • git diff hunk header no trunc
  • go ->preserve failing test location (by keyword)

Fixs :

#886
#893
#733
#938
#892
#897
#913
#989

Jb and others added 16 commits March 30, 2026 20:38
Add 17 specialized filters for high-token-waste AWS operations:
- CloudWatch Logs (get-log-events, filter-log-events, get-query-results)
- CloudFormation describe-stack-events (failures-first)
- Lambda list-functions, get-function (strips Environment secrets)
- IAM list-roles (extract principals), list-users
- DynamoDB scan/query/get-item (recursive type unwrapping)
- ECS describe-tasks (stoppedReason + exitCode)
- EC2 describe-security-groups (compact rule notation)
- S3API list-objects-v2, S3 sync/cp (text summary)
- EKS describe-cluster, SQS receive-message
- Secrets Manager get-secret-value

Architecture:
- Extract run_aws_filtered() shared runner with Result<i32> return
- Add force_tee_hint() for truncation recovery (no dead ends for LLMs)
- Follow six-phase contract (stderr tracking, tee on failure, exit codes)
- Migrate existing 8 handlers to shared runner

Inspired by #644 for DynamoDB get-item, S3 transfer, Secrets Manager,
query-results, and N-type precision.
When RTK runs via Claude Code's PreToolUse hook, grep/rg subprocesses
inherit the hook's open stdin pipe. They block waiting for EOF and never
terminate, accumulating memory unboundedly (reported: 514GB on 96GB Mac,
kernel panic).

Fix: set stdin(Stdio::null()) on both rg and grep fallback commands so
subprocesses get immediate EOF instead of inheriting the parent pipe.

Signed-off-by: Patrick szymkowiak <[email protected]>
pr_merge() was using run_filtered with a filter_fn that ignored stdout
and always returned "ok merged". This made AI agents believe PRs were
merged when they weren't.

Switch to run_passthrough so the real gh output is shown. gh pr merge
is a destructive action — the user must see exactly what happened.

Signed-off-by: Patrick szymkowiak <[email protected]>
Previously, commands not in any deny/ask list were auto-allowed. This
bypassed Claude Code's least-privilege default where unlisted commands
should prompt the user for confirmation.

Permission precedence is now: Deny > Ask > Allow (explicit) > Default (ask).

Changes:
- permissions.rs: load allow rules from settings.json, add Default variant
- rewrite_cmd.rs: treat Default same as Ask (exit 3)
- hook_cmd.rs: add permission checks to Copilot VS Code hook (ask/allow/deny),
  add deny check to Gemini hook (no ask mode available in Gemini CLI)

Gemini CLI limitation: only supports allow/deny, no ask mode. Codex: ask
is parsed but fails open. These tools document the limitation.

Signed-off-by: Patrick szymkowiak <[email protected]>
feat(aws): expand CLI filters from 8 to 25 subcommands
…733)

Command::output() sets stdin to Stdio::piped() by default, creating an
empty pipe instead of inheriting the terminal. SSH signing tools
(1Password, YubiKey, gpg-agent with pinentry) need TTY access on stdin
for passphrase prompts or agent communication. This caused signatures
to be silently dropped — commits succeeded but without gpgsig headers.

Fix: add .stdin(Stdio::inherit()) to git commit and git push commands
so they inherit the parent's stdin (terminal or hook pipe). Output
capture via stdout/stderr pipes is preserved.

Signed-off-by: Patrick szymkowiak <[email protected]>
fix(security): default to ask when no permission rule matches (#886)
fix(git): inherit stdin for commit and push to preserve SSH signing (#733)
Also fixes flaky test_rewrite_rtk_disabled_warns_on_stderr: the subprocess part relied on target/debug/rtk being current, but cargo test doesn't rebuild the standalone binary.

Added mtime guard -> skips when binary is older than test executable.
fix(grep): close subprocess stdin to prevent memory leak (#897)
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 3, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 4 committers have signed the CLA.

✅ pszymkowiak
✅ aeppling
✅ em0t
❌ Jb


Jb seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

em0t and others added 9 commits April 3, 2026 18:09
Telemetry details are already documented in the README privacy section.
No need to print them during init.

Signed-off-by: Patrick szymkowiak <[email protected]>
fix(go): preserve failing test location context
fix(git): preserve full diff hunk headers
fix(init): remove opt-out instruction from telemetry message
fix(gh): pass through gh pr merge instead of canned response (#938)
@aeppling aeppling changed the title feat(): batch fixs + aws extended filters feat(): batch fixs + aws extended + filter quality batch Apr 3, 2026
@aeppling
Copy link
Copy Markdown
Contributor Author

aeppling commented Apr 3, 2026

CLA-assistant fail to lookup @jbronssin but he has already signed CLA

@aeppling
Copy link
Copy Markdown
Contributor Author

aeppling commented Apr 4, 2026

Need : #1021 , once merged ok for me

aeppling added a commit that referenced this pull request Apr 4, 2026
Integrates ~30 develop commits (PR #997): AWS expansion (8→25 cmds),
SSH signing for git commit/push, go test context, grep stdin leak fix,
default-to-ask permissions, gh pr merge passthrough.

Conflict resolution (4 files):
- git.rs: kept .output()+stdin(inherit) for commit/push (SSH/GPG signing)
- go_cmd.rs: accepted incoming + added pub(crate) visibility
- hook_check.rs: merged binary_hook_registered + other_integration_installed
- hook_cmd.rs: fixed permissions path, println→writeln for Gemini deny

Verified: 1445 tests pass, 0 clippy errors, all manual integration tests pass.

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
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.

4 participants