Skip to content

FEAT: native Auto-review, /permissions and /approve - #106

Merged
merefield merged 3 commits into
mainfrom
feat/native-auto-review
Nov 16, 2026
Merged

merefield merged 3 commits into
mainfrom
feat/native-auto-review

Conversation

@merefield

Copy link
Copy Markdown
Owner

Why

Codex already provides an approval reviewer and an exact-action retry API. Exposing those native controls lets Codexometer manage review preferences alongside its existing session controls without inventing a second risk engine, weakening the sandbox, or automatically answering human checkpoints.

Native session controls

  • Extend /permissions with server-allowed permission profiles, approval policies and human/Auto-review reviewer selection. Support the native inline profile/flag syntax, shell-style quoting and granular policy JSON.
  • Discover managed requirements and the native guardian_approval feature; keep profile-only behaviour when an older server omits reviewer metadata.
  • Revalidate the loaded session, directory, current settings and options before writing, and read back requested permission settings before reporting success. Never retry unconfirmed mutations.
  • Add /approve: inspect recent native denials and record consent for one exact retry using thread/approveGuardianDeniedAction. This is not direct command execution; the retry still passes through native Auto-review.

Sessions in terminal and web

  • Show human/automatic reviewer metadata, an animated AUTO REVIEWING working badge in the terminal, and the latest native assessment alongside—not instead of—the conversation.
  • Display the reviewed action, risk, user-authorisation assessment and rationale. Track overlapping reviews and ignore late starts for completed assessments.
  • Keep exact retry events private to the shared backend. Retain a bounded, connection-local denial inventory, with spent-consent replay protection and no persistence.
  • Use the existing command menus and guarded writable-web endpoint. Read-only web can display review telemetry but cannot send these changes. Mandatory human checkpoints retain their existing approval controls.
  • Keep full bounded denial-review text separate from the shorter telemetry excerpt, so consent is never based on clipped action/rationale text.

Maintenance and documentation

  • Consolidate terminal/browser command acknowledgements and keep operation-specific review wording accurate.
  • Add translated terminal reviewer labels for all 17 locale options.
  • Update README command/setup/safety guidance and the maintained introduction post. Regenerate browser contracts and embedded assets.

Validation

  • Full Go race suite (with localisation screen tests run separately), plus targeted native command/socket regressions and terminal review tests.
  • Coverage includes all seven native action conversions, exact retry payloads, spent-consent replay, denied/ignored settings writes, managed allowlists, concurrent directory/settings drift, full review text and mandatory human checkpoints.
  • Go vet; local binary rebuilt.
  • Svelte/TypeScript and Prettier checks; frontend production build.
  • Browser tests for informational native review in read-only mode and existing slash-command confirmation.
  • Duplication ratchet checked without editing the baseline.

No release or version bump is included. Native schema/behaviour was checked against Codex 0.169.0 source. This PR does not enable Auto-review globally, edit managed policy, add a separate approval model, or claim that Auto-review permits only low-risk operations.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Approval-tracking gaps can allow retries or permission changes while human approval is pending, and truncated denial details prevent users from fully inspecting what they confirm.

6 open issues
What changed in this PR

Adds Codex’s native Auto-review controls to Codexometer’s existing session-management flow, with permission configuration, exact-action retry consent and review telemetry in terminal and web interfaces.

Changes:

  • Extends /permissions and adds /approve, with managed-policy checks, settings readback and replay protection.
  • Displays reviewer settings and native assessments alongside conversations, while keeping human checkpoints separate.
  • Adds regression coverage, translated terminal labels, documentation and regenerated browser assets.
File Description
web/​tests/​browser.spec.ts Tests informational review display in read-only mode.
web/​src/​Sessions.svelte Displays reviewer settings and native assessments.
web/​src/​SessionCommands.svelte Adds inline permissions entry and review wording.
web/​src/​contracts.generated.ts Adds browser review-data types.
README.md Documents commands, requirements and safety boundaries.
intro-post.md Introduces native review controls and updated usage.
internal/​web/​state.go Projects sanitized review telemetry to browsers.
internal/​web/​dist/​index.html References the regenerated browser bundle.
internal/​web/​dist/​assets/​index-DZqQ0MhB.js Includes compiled frontend changes.
internal/​web/​control_commands.go Uses shared command acknowledgements.
internal/​web/​auto_review_test.go Tests read-only projection and capability privacy.
internal/​ui/​monitor.go Adds reviewer labels and the reviewing badge.
internal/​ui/​monitor_detail.go Appends assessments to conversation detail.
internal/​ui/​monitor_commands.go Updates review wording and acknowledgements.
internal/​ui/​monitor_commands_inline.go Handles inline permissions arguments.
internal/​ui/​monitor_auto_review_test.go Tests review display and human-checkpoint precedence.
internal/​i18n/​locales/​zh-Hans.json Adds Simplified Chinese reviewer labels.
internal/​i18n/​locales/​tr.json Adds Turkish reviewer labels.
internal/​i18n/​locales/​sv.json Adds Swedish reviewer labels.
internal/​i18n/​locales/​ru.json Adds Russian reviewer labels.
internal/​i18n/​locales/​pt-PT.json Adds European Portuguese reviewer labels.
internal/​i18n/​locales/​pt-BR.json Adds Brazilian Portuguese reviewer labels.
internal/​i18n/​locales/​nl.json Adds Dutch reviewer labels.
internal/​i18n/​locales/​nb.json Adds Norwegian Bokmål reviewer labels.
internal/​i18n/​locales/​ja.json Adds Japanese reviewer labels.
internal/​i18n/​locales/​it.json Adds Italian reviewer labels.
internal/​i18n/​locales/​fr.json Adds French reviewer labels.
internal/​i18n/​locales/​fi.json Adds Finnish reviewer labels.
internal/​i18n/​locales/​et.json Adds Estonian reviewer labels.
internal/​i18n/​locales/​es.json Adds Spanish reviewer labels.
internal/​i18n/​locales/​en-GB.json Adds English reviewer-label catalogue entries.
internal/​i18n/​locales/​de.json Adds German reviewer labels.
internal/​i18n/​locales/​da.json Adds Danish reviewer labels.
internal/​codex/​session_settings_unix_test.go Extends fixtures for permissions and retry requests.
internal/​codex/​session_permissions_unix.go Verifies requested policies and reviewer settings.
internal/​codex/​session_permissions_menu_unix.go Parses permission arguments and builds managed choices.
internal/​codex/​session_goal.go Recognizes editable permissions command paths.
internal/​codex/​session_context.go Adds reviewer metadata to session context.
internal/​codex/​session_commands.go Adds permission snapshots and shared acknowledgements.
internal/​codex/​session_commands_unix.go Integrates native menus, validation and mutations.
internal/​codex/​session_command_cache.go Excludes typed permissions reviews from caching.
internal/​codex/​session_auto_review.go Defines display-only assessment data.
internal/​codex/​session_auto_review_unix.go Tracks assessments, denial inventory and retry consent.
internal/​codex/​session_auto_review_unix_test.go Tests lifecycle, conversions, permissions and replay protection.
internal/​codex/​live_usage.go Incorporates review telemetry into grouped sessions.
internal/​codex/​daemon_status_unix.go Integrates review notifications and connection-local state.
go.sum Records shell-argument parser checksums.
go.mod Adds the shell-argument parser dependency.

Review effort: Balanced

Comment thread internal/codex/session_commands_unix.go Resolved
Comment thread internal/codex/live_usage.go Resolved
Comment thread web/src/SessionCommands.svelte Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread internal/ui/monitor_commands.go Resolved
Comment thread web/src/SessionCommands.svelte Resolved
Comment thread internal/ui/monitor_commands_inline.go Resolved
@merefield
merefield merged commit 26d628f into main Nov 16, 2026
8 checks 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.

2 participants