Skip to content

fix(telemetry): classify permission denials as permission errors - #1618

Draft
altimate-software-factory[bot] wants to merge 1 commit into
mainfrom
factory/altimate_code/run-40754576223-1
Draft

altimate-software-factory[bot] wants to merge 1 commit into
mainfrom
factory/altimate_code/run-40754576223-1

Conversation

@altimate-software-factory

@altimate-software-factory altimate-software-factory Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Automated fix proposed by the Altimate software factory; a maintainer reviews every change.

The problem, fix and criteria below are the agent's own account; check them against the diff.

Problem

The permission denial message includes the user's whole rule list as JSON, and the error classifier checks for the word parse before it checks for permission, so a rule such as dbt parse made the denial count as a parse error.

The telemetry message is the denial sentence followed by repeated permission entries, and a new test that builds a real denial with a dbt parse rule got parse_error before the fix and permission after it.

Fix

Tool calls blocked by permission rules or rejected by the user are now recorded as permission errors instead of parse errors in telemetry.

Acceptance criteria

  • classifyError returns permission for a PermissionNext.DeniedError whose ruleset contains a pattern with the word parse
  • classifyError returns permission for the core PermissionV1.DeniedError message
  • classifyError returns permission for RejectedError and for CorrectedError whose feedback mentions syntax
  • classifyError still returns parse_error for a genuine parse error message

Changes

2 files changed, 43 lines added, 0 lines removed.

  • packages/opencode/src/altimate/telemetry/index.ts
  • packages/opencode/test/telemetry/classify-permission-denial.test.ts

New tests

  • packages/opencode/test/telemetry/classify-permission-denial.test.ts

Independent review: accepted, confidence 0.87

Verification

  • Verify job: passed

Summary by cubic

Fixes telemetry error classification so permission denials and user rejections are recorded as permission errors instead of parse errors.

  • Denial messages embed the user's rule patterns (e.g. dbt parse *), so permission checks now run before the parse-error keyword match.
  • Adds tests covering config-rule denials, core v1 denials, rejections with feedback, and confirming genuine parse errors still classify as parse_error.

Written for commit e79543f. Summary will update on new commits.

View guided diff Turn on auto-fix

Factory lane: altimate_code.
Agent-Authored-By: altimate-factory
@altimate-software-factory altimate-software-factory Bot added the agent-authored Opened by the software factory label Oct 28, 2026
@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1dd65940-ce55-4d7b-b74f-ebd178ab67f6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.
  • "Cost side effects" section is missing or empty. Describe any model calls, queries or cloud resources whose cost grows with user data, or write "None".

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants