Skip to content

fix(logs): treat a logs query path as withheld only when its content field was omitted - #9318

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/logs-query-withheld-path
Oct 22, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/logs-query-withheld-path

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • contentWithheld is span-level: projection sets it when any content field was omitted. logs query treated every unresolved path on a marked span as withheld, so --where output.route=x kept runs whose intact output just lacks route, and --field output.missing said "value unknown"
  • Projection omits a content field whole (never a nested key), so a path is now withheld only when the span is marked and the content field it reads through is absent: input/output/thinking/errorMessage, toolCalls.N.input|output|error, modelToolCalls.N.arguments, provider-segment content. The output fallback (result.count → output.result.count) is checked too
  • A key missing inside a present field is path not found on span and fails --where, as before fix(logs): mark withheld trace span content so logs query stops reporting it as missing #9314
  • Runs whose --where could not be checked get whereUnchecked: true and a separate whereUnchecked summary count; contentWithheld now counts only rows whose --field was withheld
  • Usage text and the v2 contentWithheld description state whole-field semantics (openapi regenerated)

Type of Change

  • Bug fix

Testing

  • engines.test.ts: new regression tests (marked span with intact output, filtered under --where / not found under --field, tool-call and thinking paths, separated counts); 5 fail on current staging, all 20 pass with the fix
  • Scratch differential: 400 generated traces x 77 field/where combos with no marker, output byte-identical to staging
  • bun run lint, check:openapi, check:comment-hygiene; full gates left to CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…field was omitted

- The projection omits a content field whole, so a path is withheld only when the span is marked and the content field it reads through (input/output/thinking/errorMessage, tool-call or provider-segment content) is absent; a key missing inside a present field is path not found and fails --where again
- Report runs whose --where could not be checked as whereUnchecked (summary count + row flag) apart from field-level contentWithheld
- Document whole-field omission on the v2 contentWithheld marker and in the logs query usage text
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 22, 2026 9:41pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues remain from this review.

Summary

Updates logs query to distinguish omitted content fields from missing keys inside readable fields.

  • Log queries tell withheld fields from missing keys.

No new actionable issues were found in the changes since the previous review. No previous finding threads were supplied.

Reviews (2) · Last reviewed commit: "fix(logs): keep a withheld direct path u..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 5 files

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/mothership/agent-cli/engines/query.ts
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 0d3dda9 into staging Oct 22, 2026
66 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/logs-query-withheld-path branch October 23, 2026 00:24

This branch was previously deployed

1 inactive deployment
Preview — c29dde7f Deployed Oct 22, 2026 by vercel[bot]
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