Skip to content

fix(audit): cap rollup writes process-wide and name the run on credential access entries - #9407

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/v0935-review-findings
Oct 28, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/v0935-review-findings

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Audit rollup writes now go through one process-wide queue, so ROLLUP_WRITE_CONCURRENCY caps every insert in flight. Before, each window timer, size flush, and scope end started its own batch, so a burst of distinct rollups could insert all at once
  • credential.accessed entries from a workflow run now record metadata.workflowId and metadata.executionId (tool calls and Vertex AI credentials in Agent, Router, and Evaluator), so a merged entry says which run used the credential
  • Audit log docs say where to find them

Type of Change

  • Bug fix

Testing

  • lib/oauth/token-resolution, selector, personal-token, and executor/utils tests (369) and the @sim/audit suite pass
  • Throwaway check (not committed): 200 distinct rollups whose windows close together peaked at 10 concurrent inserts with the fix and 200 without it
  • Biome and comment hygiene on the changed files; full lint, type-check, and audits run in 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)

@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Oct 28, 2026 4:29am UTC

Request Review

@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 9 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/executor/utils/vertex-credential.ts
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no new blocking findings.

Summary

This PR caps rollup inserts at ten across the process and adds workflow and execution IDs to credential-access entries.

  • Audit rollup inserts share one process-wide limit.
  • Credential access entries identify the workflow run that used them.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Timer[Window closes] --> Queue[Shared write queue]
  Size[Size limit reached] --> Queue
  Scope[Run ends] --> Queue
  Queue --> Writes[Up to ten inserts at once]
  Writes --> Database[(Audit logs)]
Loading

Reviews (3) · Last reviewed commit: "fix(audit): record Vertex service-accoun..." · Reviewed by Greptile

@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 28, 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 9 files

Confidence score: 5/5

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/executor/utils/vertex-credential.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 28, 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 9 files

Confidence score: 5/5

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

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 093c50e into staging Oct 28, 2026
69 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/v0935-review-findings branch October 28, 2026 04:42

This branch was previously deployed

1 inactive deployment
Preview — f376b16a Deployed Oct 28, 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