Repository navigation
v0.14.0: tool gate freeze, definition pins, policy compare and cost reservation - #18
Merged
Merged
Conversation
- tool gate: one accessor for the in-memory action ticket and one answer for a failed state-store read (unknown action 404, store unavailable 503) - sorted map keys come from the standard library (slices.Sorted over maps.Keys); three local helpers removed - a test pins how config reload treats every config section: applied on reload or kept until restart No change to commands, output, configuration or stored data.
…eservation - Freeze the tool gate from Telegram (/freeze, /unfreeze) or with draftcat gate freeze|unfreeze|status; a frozen gate denies every call, refuses to consume permits and leaves standing grants unused - Pin a tool's definition with definition_sha256 on a rule; a missing or changed definition is handled like an argument mismatch; gate hash-definition prints the value - gate test --compare old.yaml prints the cases that decide differently - budgets.reserve_max_cost admits a model call only if its worst-case cost fits the daily cost cap - telegram.digest sends one daily message with what needs a person, and nothing on a day without
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features
/freeze [reason]and/unfreezein Telegram, ordraftcat gate freeze|unfreeze|status, stop every gated tool call at once. While the gate is frozen it denies each call with "tool gate frozen by operator", refuses to consume issued permits and leaves standing grants unused. The freeze is stored, holds across a restart and reaches a running engine on its next call.definition_sha256on a tool rule. The harness sends the tool'sdefinitionwith the call, and a missing or changed definition is handled like an argument mismatch.draftcat gate hash-definitionprints the value;gate check --definitionanddefinition:in test cases decide it offline.draftcat gate test cases.yaml --config new.yaml --compare old.yamlprints only the cases that decide differently and exits 1 when any does.budgets.reserve_max_cost: true, or the same key on a pipeline'sbudget, a model call is admitted only if settled spend plus the call's maximum cost stays withinper_day_cost. The actual cost replaces the reservation when the call settles.telegram.digest: {at: "08:00", timezone: Europe/Berlin}sends one message a day listing approvals waiting over an hour, a frozen gate and failed tool outcomes of the last day. On a day with none of these, nothing is sent.Evidence
go build ./...,go vet ./...andgo vet -tags voice ./...pass.go test -short ./...,go test -short -tags voice ./...,go test -race -short ./...and the full non-short suite (three consecutive runs) pass.go run . validatereports 0 errors.npm ci --ignore-scripts && npm test && npm pack --dry-runand the teams-relay build pass.golangci-lint run --new-from-revon master reports 0 issues.on_mismatch, no pin unchanged, policy hash), compare mode, cost reservation (cap edge, concurrent calls, settlement, reopen) and the digest (silent day, once per day across a restart, retry).Door
Two-way. Every new setting is optional, and a configuration without it decides exactly as before. Rules without
definition_sha256keep their policy hashes, and the golden hash tests are unchanged. The state changes are additive: thegate_freezeandoperator_digesttables and two columns onbudget_calls, all created at first start. Older binaries ignore them.Blast radius
reserve_max_cost), thegateCLI (new subcommands and flags), the Telegram command list, the engine loop (digest tick),internal/statemigrations, validation, and docs (docs/tool-gate.md,docs/governance-lifecycle.md,docs/operations.md).gateusage gains its new lines, and one sentence about the state store now names the subcommands it applies to.Review notes
a9697f8.