Repository navigation
Conversation
… restriction and a three-part deny reason When a policy needs a marker, the skills now ask the admin two things before registering it: how long the restriction lasts and whether the person can disable it early. They name each marker for what it restricts and why, write its description as the sentence the deny reason will open with, and register one marker per restricted tool so the person can disable one safeguard while another stands. Enforcement policies now return a three-part deny reason: what triggered the restriction, the time remaining, and whether the person can ask to have the safeguard disabled. A policy cannot read a marker's expiry, so the writer stamps marked_at and the reader derives the minutes left from it and the registered TTL. The disable offer is gated on the registry's clearable flag and on clearing being armed on the gateway, so the reason never promises an exit that does not exist. Also corrects the cleanup note: deleting a marker is now refused while a policy still references it. Plugin version 1.2.3. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
pareilly
marked this pull request as ready for review
October 26, 2026 18:15
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.
What changes
When an authoring run needs a marker,
dtwo-gateway-policynow asks the admin two questions before registering it, how long the restriction should last and whether the person can disable it early, and refuses to pick either on its own. It names each marker for what it restricts and why, writes the description as the first sentence of the deny reason, and registers one marker per restricted tool so a person can disable one safeguard while another stays in force.dtwo-policy-rego's reader example now returns the three-part deny reason: what triggered the restriction, the time remaining, and whether the person can ask to have the safeguard disabled. A policy cannot read a marker's expiry, so the writer stampsmarked_atand the reader derives the minutes left from it and the registered TTL. The disable offer is gated on the registry'sclearableflag and on clearing being armed on the gateway. The running example is renamed frompii_detectedtono_slack_after_piito match the naming rule, and a "one trigger, several restrictions" writer snippet shows a trigger emitting one key per restriction.The cleanup note is corrected: deleting a marker is now refused while a policy still references it.
Plugin version bumped to 1.3.1 (main moved to 1.3.0 while this was open; merged in).
How it was tested
opa check --strictand was evaluated under both OPA 1.18 and the gateway's Regorus binding across the fresh / no-timestamp / two-writer / non-clearable / clearing-not-armed / empty-registry cases.skill-harness:pnpm test(181 passing) andpnpm biome:checkclean.Review notes
🤖 Generated with Claude Code