-
Notifications
You must be signed in to change notification settings - Fork 128
🏷️ fix: Keep Redacted Child Labels in Activity Phase Prompts #573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,6 +74,7 @@ import { | |
| resolveLangfuseConfig, | ||
| resolveToolOutputTracingConfig, | ||
| } from '@/langfuseConfig'; | ||
| import { coversToolOutputRedaction } from '@/langfuseToolOutputTracing'; | ||
| import { | ||
| cloneToolApprovalInterruptPayload, | ||
| TOOL_APPROVAL_REVIEW_CONFIG_KEY, | ||
|
|
@@ -3179,13 +3180,28 @@ export class Run<_T extends t.BaseGraphState> { | |
| redactionText: redaction.redactionText, | ||
| }; | ||
| } | ||
| /** Child labels were generated from each agent's own redacted evidence, | ||
| * so they can stand in for that evidence only when every agent's policy | ||
| * covers the merged phase policy. */ | ||
| const childLabelsRedacted = | ||
| redaction != null && | ||
| redactionContexts.length > 0 && | ||
| redactionContexts.every((context) => | ||
| coversToolOutputRedaction( | ||
| hasToolOutputTracingConfig(this.langfuse, context.langfuse) | ||
| ? resolveToolOutputTracingConfig(this.langfuse, context.langfuse) | ||
| : undefined, | ||
| redaction | ||
| ) | ||
|
Comment on lines
+3186
to
+3195
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
AGENTS.md reference: AGENTS.md:L147-L147 Useful? React with 👍 / 👎. |
||
| ); | ||
|
|
||
| const userPrompt = buildActivityPhaseLabelPrompt({ | ||
| activities, | ||
| totalActivityCount, | ||
| charLimit, | ||
| assistantContext, | ||
| redaction, | ||
| childLabelsRedacted, | ||
| }); | ||
| if (userPrompt === '') { | ||
| return {}; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With partial matching, set membership is not equivalent to redaction coverage: a candidate pattern such as
run_redacts every tool matched by a required patternrun_select_query, but this check returns false because the longer string is not literally in the candidate set. This occurs, for example, when the phase destination has the narrower partial rule and the contributing agent has the broader one;childLabelsRedactedremains false and a labels-only phase still returns{}despite the labels having been generated under a strictly stronger policy.Useful? React with 👍 / 👎.