release: v2.67.0 — the Discipline tab grows search, evidence, and controls - #61
Merged
Merged
Conversation
… the backend already had The v2.66 Discipline tab was a knob with no workbench: no search, no sort, no polling, top-5 denials only — and most of the backend capability unexposed. read_events() had no caller, scope=global no route, signal_ttl_s and blocked_tools no write surface. This wires all of it in: - Hub tab: free-text filter + mode/denials/attention chips + sort, 5s poll that never fires mid-interaction, cards extracted so local state survives the refresh. - Raw denial-event search on both servers (access_telemetry.search_events; q/layer/tool/session-prefix/since/limit), session + recency shown on aggregate rows. - Global default card for ~/.c3 (scope=global on the POST route), TTL and blocked-tools editors, bulk apply with one confirm, and a drill-panel Discipline tab that project names now open. - enforcement_policy.set_fields: mode-less writes that never touch mode/set_by and refuse to create a section that would shadow an inherited mode. set_mode gains blocked_tools + write-time ttl validation. - Fix: enforce was missing from the hub main_view whitelist, so the Discipline tab silently never persisted as the active view. 42 new tests (132 in the enforcement suites, full run 1926 green); docs/enforcement.md updated; version 2.67.0. Claude-Session: https://claude.ai/code/session_01NYoHjKBW6UjTqjwzPRojEt
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.
v2.66 shipped the knob; this ships the workbench around it. Most of what landed was capability the backend already had and no surface exposed: the raw denial-event log had a public reader nothing called, the policy layer accepted
scope=globalthat no route passed,signal_ttl_sandblocked_toolswere resolved and validated but had no write surface.Hub Discipline tab
/focuses), chips for Strict / Advisory / Off / Has denials / Attention (warnings + unreadable + tier drift), sort by name/denials/mode. 5s poll (like Locks) that never fires while typing or with a dialog open.all eventsto browse newest-first. Aggregate rows now show last-hit recency + session counts (already sent by the server, never rendered).~/.c3— mode picker + TTL editor, honestNOT SETstate.Backend
enforcement_policy.set_fields— mode-less partial writes that never touchmode/set_byand refuse to create an enforcement section (a mode-less section coerces to strict and would shadow an inherited mode).set_modegainsblocked_tools+ write-time ttl validation (30..86400 → 400).access_telemetry.search_eventsbackingGET /api/enforcement/denials/search(project) andGET /api/projects/enforcement/denials/search(hub); includes the rotated.jsonl.1;matchedkeeps counting past the cap so truncation is visible.POST /api/projects/enforcementbody is now{path?, scope?, mode?, signal_ttl_s?, blocked_tools?}; project scope keeps its old contract exactly. NewGET /api/projects/enforcementmirror feeds the drill tab; aggregates accept?session=.enforcewas missing from the hubmain_viewwhitelist — the Discipline tab silently never persisted as the active view (client swallows the 400). Pinned by a test mirroring the Locks one.Verification
docs/enforcement.mdupdated (config reference, Hub section, telemetry search).Deferred (evaluated, not in this release): outcome telemetry (advisory-nudge/allow logging for an effectiveness view — hot hook path, 10-100x event volume) and NotebookEdit governance (the discipline hook does not govern it at all today — enforcement-semantics change with its own tests).
Release: after merge, tag
v2.67.0on the merge commit →release.ymlgates on CI, builds, publishes to PyPI via trusted publishing, and attaches the GitHub release.pyproject.tomlandcli/c3.pyare both bumped to 2.67.0 (the workflow verifies tag == package version).https://claude.ai/code/session_01NYoHjKBW6UjTqjwzPRojEt