Skip to content

Wire Guard into the default policy so ASK actually escalates - #8

Merged
lorenzoliuzzo merged 2 commits into
mainfrom
fix/wire-guard-ask-channel
Jul 12, 2026
Merged

Wire Guard into the default policy so ASK actually escalates#8
lorenzoliuzzo merged 2 commits into
mainfrom
fix/wire-guard-ask-channel

Conversation

@lorenzoliuzzo

Copy link
Copy Markdown
Contributor

Summary

  • DefaultPolicy implemented mythings.policy.Policy directly and never read MYTHINGS_ASK_CMD — every unattended run's tracking-issue-edit ASK collapsed straight to DENY via .under(unattended=True), with no escalation step in between (same class of bug my-guard#10 fixed for the bot).
  • Replaced it with default_policy(), a myguard.Guard carrying the same single rule, so an ASK now escalates through the ask channel before .under() ever runs.
  • Added my-guard as a dependency.
  • Added a proof-case test: with MYTHINGS_ASK_CMD set to an exit-0 command, the tracking-issue edit now happens even under GITHUB_ACTIONS=true.

Test plan

  • python -m pytest -q — 11/11 pass (10 existing + 1 new proof case)
  • ruff check . clean
  • existing test_unattended_ci_suppresses_public_issue_edit still passes (no ask channel configured → still fails closed)

Refs MyThingsLab/fleet-dispatch#40

lorenzoliuzzo and others added 2 commits July 12, 2026 15:18
DefaultPolicy implemented mythings.policy.Policy directly and never
consulted MYTHINGS_ASK_CMD, so every unattended run's tracking-issue ASK
collapsed straight to DENY regardless of whether a human was reachable.
Route the same rule through myguard.Guard instead.

Refs MyThingsLab/fleet-dispatch#40

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Same pattern as my-things-core: my-guard is a sibling repo dependency.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@lorenzoliuzzo
lorenzoliuzzo merged commit 22e0a39 into main Jul 12, 2026
2 checks passed
@lorenzoliuzzo
lorenzoliuzzo deleted the fix/wire-guard-ask-channel branch July 12, 2026 13:27
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