Skip to content

M1: add approval-friction counters to TelegramApprover#58

Merged
jkyberneees merged 1 commit into
mainfrom
fix/m1-telegram-approver-friction
Jul 18, 2026
Merged

M1: add approval-friction counters to TelegramApprover#58
jkyberneees merged 1 commit into
mainfrom
fix/m1-telegram-approver-friction

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Closes M-1.

Changes

  • Added FrictionThreshold and FrictionWindow to TelegramApprover, with
    defaults of 3 approvals per 60 seconds (matching the TTY approver).
  • Added a per-class approval log and shouldFriction/recordApproval helpers.
  • When the friction threshold is reached, PromptCommand hides the Trust
    Session shortcut and prepends a warning to the approval card, forcing a
    per-call approval for that class until the window cools down.
  • Added regression tests for friction disabling trust and for the normal
    below-threshold path.
  • Updated AGENTS.md and docs/SECURITY.md.

Verification

  • go test ./... -count=1
  • go test -race ./cmd/odek/ ./internal/telegram/ -count=1

- Added FrictionThreshold/FrictionWindow and a per-class approval log to
  TelegramApprover.
- After the threshold approvals within the window, PromptCommand hides the
  Trust Session shortcut and surfaces a warning, forcing per-call approval.
- Added regression tests for friction disabling trust and for the normal
  below-threshold path.
- Updated AGENTS.md and docs/SECURITY.md to describe the friction guard.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
odek 982bef8 Commit Preview URL

Branch Preview URL
Jul 18 2026, 12:31 PM

@jkyberneees
jkyberneees merged commit 5fa47f7 into main Jul 18, 2026
7 checks passed
@jkyberneees
jkyberneees deleted the fix/m1-telegram-approver-friction branch July 18, 2026 12:32
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