Skip to content

draftcat 0.17.0: nine fixes and additions on top of 0.16.1 - #24

Merged
renezander030 merged 15 commits into
masterfrom
gitlab-merge-11
Nov 30, 2026
Merged

renezander030 merged 15 commits into
masterfrom
gitlab-merge-11

Conversation

@renezander030

Copy link
Copy Markdown
Owner

draftcat 0.17.0: nine fixes and additions on top of 0.16.1

This release carries 0.16.1 (its seven fixes, first commit, unchanged tree) and nine changes on top of it.

0.16.1 (carried, unchanged)

  • Every tool-gate glob refuses a value containing a .. path segment; validation refuses a glob with a literal .. segment.
  • approval_window on a tool rule must be at least one second.
  • Validation's pipeline token-budget warning counts every possible output retry.
  • Cost reservation adds the prompt-cache write premium only when the request carries a cache marker.
  • /grants separates a removed operator's grants into an ended section.
  • A late relay callback returns 410 expired after its gate times out.
  • /cron explains a pipeline name over the 52-byte keyboard limit and keeps the other pipelines usable.

0.17.0

  1. An operator's refusal of a call outranks a standing grant: an identical call refused inside repeat_window is not released by a grant issued afterwards.
  2. A call whose approval timed out, or whose prompt could not be delivered, is asked again when the agent retries it; only a refusal is repeated by the repeat guard.
  3. Model calls resume once the usage ledger can be read again; a failed read no longer blocks every call until restart. A failed usage write still blocks until restart.
  4. Telegram calls that hit flood control (429 with retry_after) wait the named time and are sent again, up to 30 seconds in all.
  5. An ai step with output_schema asks again under output_retries when the provider's reply carries no message, and counts that reply's usage.
  6. /grant <tool> <duration> [uses] [agent] arg=glob ... scopes a standing grant to argument values; other calls still reach a human.
  7. A Telegram tool-call prompt for a rule with allow_grants carries Approve + allow 1h, which approves the call and allows the same agent, tool and arguments for an hour.
  8. free: true on a model lets its calls run after a cost cap is reached; token caps still apply and validate refuses it on a priced model.
  9. A failed ai step keeps its model, tokens and cost on its error span, its step metrics and its OTLP span.

Evidence

  • Each change has a test that fails on 0.16.1 and passes on this branch.
  • go vet ./... and go vet -tags voice ./...; go test -short ./... with and without -tags voice; golangci-lint 2.5.0, no new issues; npm test; npm pack --dry-run; draftcat validate.
  • End to end: the 0.16.1 and 0.17.0 binaries were run against local Telegram Bot API and OpenAI-compatible emulators, one scenario per change, with the 0.16.1 result and the 0.17.0 result recorded for each.

Door

Two-way. All new settings are optional; policy hashes and permit bindings are unchanged. Two defaults change: a retried call whose approval timed out is asked again, and a failed ledger read blocks only while it lasts. The tool_grants table gains arg_scope and args_hash at first start; end scoped grants with /ungrant before downgrading, since older binaries ignore those columns.

Blast radius

Touched: tool gate decisions on repeat and grants, standing grants and their store, Telegram API calls and approval prompts, budget admission and ledger reads, ai-step output retries and step spans, validation of model settings, docs and changelog. Untouched: pipeline scheduling, webhooks, the relay protocol, receipts and their signatures, voice, connectors, the npm installer.

Reading order: the first commit is 0.16.1 with an unchanged tree; read the nine commits after it, then the version commit and a lint commit.

drakt-sync and others added 15 commits November 30, 2026 08:02
draftcat 0.16.1: close seven governance gaps

See merge request rene/draftcat!5
A standing grant released an identical call the operator had just refused,
when the grant was issued after the refusal. The gate now checks its
repeat_window memory before taking a grant use: a refused call goes to the
repeat guard, which answers with the refusal. Other calls under the grant
are released as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The repeat guard treated an approval that timed out like an operator's
refusal and denied the agent's retry for the rest of repeat_window, so an
operator who came back never saw the call. The guard now repeats only a
refusal; a timeout or a failed prompt is asked again, and max_repeats still
bounds the prompts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One failed read of the day's usage (a locked or briefly unavailable state
store) blocked every model call until restart. A read failure now blocks
only while it lasts; a failed usage write or invalid provider usage still
blocks until restart, since the day's total may then be missing usage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 429 from the Bot API failed the approval prompt at once, although the
response names how long to wait. Calls now wait retry_after and send again,
up to 30 seconds in all; a longer wait fails the call as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A provider reply with usage but an empty choices list failed the step at
once, although output_retries exists for invalid replies. The empty reply
is now settled, counted in the step's tokens and cost, and asked for again
under output_retries; output_retries: 0 still fails at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/grant took a tool, duration, use count and agent, so a grant covered
every call of the tool. Trailing arg=glob fields now narrow it to calls
whose argument matches, with the args-glob matching; other calls still
reach a human and take no use. The scope is stored with the grant and
shown by /grants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An operator approving the same routine call over and over had only /grant,
which covers every call of the tool. A Telegram tool-call prompt for a rule
with allow_grants now carries an Approve + allow 1h button: it approves the
call and stores a grant bound to the same agent, tool and argument hash for
an hour. Other arguments still reach a human; a tap the prompt did not
offer is not an approval.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Once a daily cost cap was reached every model call was refused, including
calls to a local or free-tier model that cost nothing. A model marked
free: true is now admitted past the cost caps; token caps still apply, any
reported cost still counts, and validate refuses free on a priced model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An ai step that failed after paid attempts emitted an error span with no
model, tokens or cost, so step metrics and traces undercounted spend. The
step's usage is now recorded after each attempt and carried on the error
span like on a successful one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Telegram client builds its request with a context and checks the body
close; the grant lookup filters operators in Go instead of building an IN
list, so its query is a fixed string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ee-model warning

- An Approve + allow grant for a call without an agent name covered
  every agent; an argument-bound grant now matches the call's agent
  exactly.
- The button's duration label dropped digits for windows other than an
  hour (90m printed as 1h3); it now drops only zero trailing units.
- An empty last model reply was settled but left off the step's error
  span and metrics; its usage now counts before the retry decision.
- reserve_max_cost validation warned that a free model reserves
  nothing, which failed validate --strict; free models are not named.
- README and the governance guide state the timeout rule of the repeat
  guard and the free-model validation rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
draftcat 0.17.0: nine fixes and additions on top of 0.16.1

See merge request rene/draftcat!6
@renezander030
renezander030 merged commit 57a55c4 into master Nov 30, 2026
1 check passed
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