Repository navigation
feat(usage): group refusals by the reason they hit, not only by gate - #996
Open
sandstream wants to merge 3 commits into
Open
sandstream wants to merge 3 commits into
sandstream wants to merge 3 commits into
Conversation
Every kit check with the gates wired logs two refusals from its own negative controls. kit#980 marked them; the Floor tab still counted them, so a repository nobody was refused in showed 2 refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
Refusals that differ only in a path, host, package, quoted value or number fall into one group, so the wall most refusals hit is the first line. Deterministic substitutions; no model reads the reasons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
…-sync-p6fg9a-usage-walls
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
This branch has not been deployed
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.
Owner decision from kit-research
read-where-agents-fail-vs-kit: yes.Stacked on #993 (it contains that branch). Merge #993 first; this diff then shrinks to its own change.
Why
A post on failed Microsoft 365 connections found that 19 of 23 failures hit one wall, an admin approval nobody had given. kit's
kit usagecounted refusals per gate only. In the scratch project of kit-researchagent-platform-2027-vs-kit, all fourgate-fsrefusals had one reason, an unsigned scope, which onekit profile signby the scope's owner clears. The report did not show that.What
src/refusal-reasons.tsreduces each refusal's reason to its shape and groups by gate and shape:write to [REDACTED]/.claude/settings.json denied — no verified scope/RoE (unsigned, tampered, or missing); …write to <path> denied — no verified scope/RoE (…); …plaintext secret (kv-secret, keyed-secret, url-query-token) written to .envplaintext secret (…) written to .envhost(s) outside the signed egress scope: evil.example, files.example.orghost(…) outside the signed egress scope: <host>cannot reduce to a triage target: indirect-bin:$pm — run `kit triage` manually …cannot reduce to a triage target: <target> — run <…> manually …The substitutions are fixed rules: quoted values, URLs, paths that start a word,
scheme:valuetargets, host names (file names with a known extension are kept), parentheses and numbers. Only the first line of a reason is used, capped at 160 characters. No model reads the text.The Floor tab, on that scratch log:
--markdownadds a Reason | Gate | Count table, up to six rows.--jsoncarriesfloor.byReason.Verification
src/refusal-reasons.test.ts: the four reason shapes above, the line and length limits, and grouping four refusals that differ only in path into one.src/usage-markdown.test.ts: the table renders.node scripts/prepush.mjs: build, format, lint, tests of the changed files, self-audit pass.kit reviewand the new-source-file check fail locally for container reasons. Semgrep did not run (not installed here).cmdUsage,coverageFromRunsandkeysFromConfigAndRunpredate this change and are in the baseline.Generated by Claude Code