Skip to content

fix(release): keep Entra sync running through mid-read drift and tighten release-audit findings - #9649

Merged
waleedlatif1 merged 4 commits into
stagingfrom
fix/release-audit-2026-11-03
Nov 4, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
fix/release-audit-2026-11-03

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Entra directory sync: a user deleted after the users phase (Graph 404 Request_ResourceNotFound on its directReports) reads as having no reports instead of discarding the whole staged run. Any other 404 still fails as before
  • Entra directory sync: a person read under a second manager during a multi-slice read takes the latest read instead of failing the run. Graph allows one manager, so a second claim is a reorg mid-read; publication's cycle check still guards the final graph
  • People profile and org chart keep loaded data when a background refresh fails with a 5xx or network error, so an open Edit modal no longer unmounts and loses its draft. 401/403/404 still replace the view as before
  • People directory no longer requests the next page while showing the previous filter's placeholder rows
  • Search Assistant refuses citation URLs with userinfo (https://trusted@other/) now that web results can cite
  • Search clean-entry check uses toString() instead of URLSearchParams.size, which older Safari lacks
  • Cleanup: checkpoint(..., { lockProfiles }) instead of a misnamed step arg, shared RELEASED, chunkArray, flattenFieldErrors, MCP TSDoc
  • CLI, lint-test and run-hook cleanups from the same audit landed in improvement(cleanup): tighten the agent-harness changes from the latest audit #9650; this branch takes staging's versions of those files

Type of Change

  • Bug fix

Testing

  • lib/people/sync/stage.integration.ts and lib/people/sync/large-directory.integration.ts against real Postgres: 12/12 pass; each new case fails with its fix reverted
  • resolve-citations.test.ts, retrieval-citations.test.ts, knowledge/application/chat.test.ts, slack-search/assistant-stream.test.ts: 71/71 pass; the credentialed-URL case fails with the fix reverted
  • biome on changed files; type-check, audits and the full suite 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 Nov 4, 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 Nov 4, 2026 1:42am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

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

Summary

Makes Entra sync tolerate users deleted mid-read and reporting lines that change between reads.

  • Entra sync finishes snapshots when users change mid-read.
  • People profiles and charts stay visible through temporary refresh errors.
  • Citations skip web addresses that contain login details.
  • The people list waits for its current filter before loading more.
  • Search Assistant recognizes query strings on older Safari.
  • Sync helpers and error notes use clearer shared names.

The previous unnumbered test finding is addressed: one call now includes competing manager claims and checks the intended winner. waleedlatif1 confirmed that same-batch claims deliberately choose the lowest manager ID, while later batches replace earlier assignments.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Users[Read users into private stage] --> Reports[Read reporting lines]
  Reports --> Deleted{User deleted mid-read?}
  Deleted -->|Yes| Complete[Finish that user's reports read]
  Deleted -->|No| Claims[Save report claims]
  Claims --> Complete
  Complete --> More{More pages remain?}
  More -->|Yes| Reports
  More -->|No| Check[Check finished graph for cycles]
  Check -->|Valid| Publish[Publish together]
  Check -->|Cycle| Reject[Keep previous directory]
Loading

Reviews (3) · Last reviewed commit: "test(people): pin the same-batch manager..." · 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 20 files

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/people/sync/stage.ts Resolved
@waleedlatif1 waleedlatif1 changed the title fix(release): harden Entra sync against mid-read drift and tighten release-audit findings fix(release): keep Entra sync running through mid-read drift and tighten release-audit findings Nov 4, 2026
@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 Nov 4, 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.

@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 Nov 4, 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 14 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 3261cf5 into staging Nov 4, 2026
79 of 80 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/release-audit-2026-11-03 branch November 4, 2026 01:46

This branch was previously deployed

1 inactive deployment
Preview — c5aedd26 Deployed Nov 4, 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