Skip to content

Feat/fix discord untrusted boundary - #143

Open
ArnabChatterjee20k wants to merge 5 commits into
feat/custom-agents-md-instructions-per-repo-or-globalfrom
feat/fix-discord-untrusted-boundary
Open

Feat/fix discord untrusted boundary#143
ArnabChatterjee20k wants to merge 5 commits into
feat/custom-agents-md-instructions-per-repo-or-globalfrom
feat/fix-discord-untrusted-boundary

Conversation

@ArnabChatterjee20k

Copy link
Copy Markdown
Member

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

mark_answered stores the classified intent (COALESCE keeps prior); get_routing_intent reads it back.
DAT-2304: in ClaudearOnly mode emit a trusted structural marker from the stored intent (fallback [Claudear: prior answer]) instead of the generated answer body, closing the trust-boundary bypass. Full mode still includes the body for grounding.
@ArnabChatterjee20k
ArnabChatterjee20k force-pushed the feat/fix-discord-untrusted-boundary branch from 7b15ba7 to d660d2c Compare August 16, 2026 10:53
@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR prevents generated Discord answer bodies from being reintroduced into intent-classification transcripts, replacing them with a persisted routing-intent marker.

  • Adds stable routing labels and propagates them through issue metadata.
  • Persists routing intent on answered attempts through a new SQLite migration.
  • Uses structural markers for classification transcripts while retaining full answer grounding in trusted transcripts.
  • Adds coverage for fixed-label and legacy fallback behavior.

Confidence Score: 5/5

The PR appears safe to merge with no concrete actionable failures identified.

The persisted label is derived from a fixed intent enum, legacy rows have a safe generic fallback, and classification transcripts no longer reintroduce generated answer text while trusted grounding retains the full answer.

Important Files Changed

Filename Overview
crates/claudear-engine/src/intent.rs Adds fixed routing labels for each intent variant; no actionable defect identified.
crates/claudear-engine/src/processing.rs Separates full reply grounding from classification-safe structural markers and persists answer intent in both answer paths.
crates/claudear-engine/src/watcher.rs Stamps the upstream classified intent onto issues before background processing.
crates/claudear-storage/src/lib.rs Extends the tracker contract with optional intent persistence and retrieval while preserving default implementations.
crates/claudear-storage/src/migrator.rs Registers migration version 11 and updates migration tests to verify the new column.
crates/claudear-storage/src/sqlite.rs Persists and retrieves routing intent while preserving an existing value when callers omit it.
migrations/V11__fix_attempt_routing_intent.sql Adds the nullable routing_intent column needed for backward-compatible structural markers.

Reviews (1): Last reviewed commit: "fix(engine): stop re-injecting answer bo..." | Re-trigger Greptile

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.

1 participant