Skip to content

fix(core): deduplicate denied secret prompts in orchestration loop#1476

Merged
bug-ops merged 5 commits intomainfrom
secret-prompt-dedup
Mar 9, 2026
Merged

fix(core): deduplicate denied secret prompts in orchestration loop#1476
bug-ops merged 5 commits intomainfrom
secret-prompt-dedup

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Mar 9, 2026

Summary

  • Closes fix(orchestration): duplicate secret prompt shown after 120s timeout in plan confirm #1455
  • process_pending_secret_requests() now accepts a plan-scoped denied: &mut HashSet<(String, String)> tracking (handle_id, secret_key) pairs already denied in this plan execution
  • On timeout or explicit user rejection the pair is inserted into denied; subsequent re-requests from the same sub-agent for the same key are auto-denied with a tracing::debug! log without re-prompting the user
  • Approved secrets are not tracked — re-requesting an approved key after TTL expiry prompts normally
  • Different sub-agents requesting the same key are handled independently via the composite (handle_id, key) pair
  • The HashSet is local to run_scheduler_loop() and is dropped when the plan ends; new plans start fresh

Test plan

  • All existing tests pass (cargo nextest run --workspace --features full --lib --bins — 4917 passed)
  • cargo clippy --workspace --features full -- -D warnings — clean
  • cargo +nightly fmt --check — clean
  • Manual: start a plan with a sub-agent that requests a secret, let the prompt time out, verify the prompt does not reappear on subsequent ticks

bug-ops added 2 commits March 9, 2026 19:49
…1455)

After a timeout or user denial in `process_pending_secret_requests()`,
the `(handle_id, secret_key)` pair is now tracked in a plan-scoped
`HashSet`. Subsequent re-requests from the same sub-agent for the same
key are auto-denied without re-prompting the user.
@github-actions github-actions bot added bug Something isn't working size/S Small PR (11-50 lines) documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate and removed bug Something isn't working size/S Small PR (11-50 lines) labels Mar 9, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 9, 2026 18:51
@github-actions github-actions bot added bug Something isn't working size/S Small PR (11-50 lines) labels Mar 9, 2026
@bug-ops bug-ops merged commit e7ae0f5 into main Mar 9, 2026
18 checks passed
@bug-ops bug-ops deleted the secret-prompt-dedup branch March 9, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/S Small PR (11-50 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(orchestration): duplicate secret prompt shown after 120s timeout in plan confirm

1 participant