Skip to content

feat(people): start dates, time zones, Slack IDs and per-field filters for search_people - #10538

Merged
waleedlatif1 merged 13 commits into
stagingfrom
feat/people-directory-fields
Dec 1, 2026
Merged

waleedlatif1 merged 13 commits into
stagingfrom
feat/people-directory-fields

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • people_directory_entry and people_directory_stage gain start_date and timezone. The sync reads Entra employeeHireDate, Okta timezone (plus hireDate/startDate custom attributes), and SCIM timezone. Values that are not a calendar date or an IANA zone are dropped. One-time Okta/Entra imports also carry the start date.
  • New people_slack_identity table (plus people_slack_sync state): each person's Slack user ID and time zone in the organization's Slack Search workspace, matched by email. The existing People sync cron refreshes it daily from the bot's users.list:
    • each organization is held under a lease token, so an overrunning sweep can't overwrite the next one
    • only changed rows are written, and members who left are deleted
    • the sweep waits out a rate limit and keeps the last good list if Slack fails
    • an organization whose bot is disabled, or that has no People, loses its identities
  • search_people (Search MCP, Assistant, workflows):
    • new filters: name, email (exact, case-insensitive), title, department, location, managerPersonId
    • new fields: timezone, slackUserId; list rows also get managerPersonId, managerEmail and totalDirectReports
    • a directory time zone wins over Slack's, and an unknown SCIM zone falls back to Slack's
    • the cursor is bound to the query and every filter
  • The Organization Search block's Search People operation and organization_search_people tool take the same filters.
  • Migration 0480 is additive and replay-safe (IF NOT EXISTS, guarded foreign keys), since an earlier migration in the deploy may end the batch with an embedded COMMIT.
  • The People page contract gains timezone, slackUserId and reportCount.
  • Mothership: regenerate the assistant tool contracts for the new search_people schema and description. No tool policy change.

Type of Change

  • New feature

Testing

  • lib/people/directory-fields.integration.ts: filters, email matching, manager rows, report counts, and Slack/directory time zone precedence against real Postgres.
  • lib/people/slack-identities.integration.ts: paging, whole-list replacement, rate-limit retry, lease fencing, failure retry, and a disabled bot.
  • lib/people/sync/stage.integration.ts: start date and time zone publish and republish.
  • lib/people/provider-import.test.ts: Okta/Entra parsing.
  • Guards were reverted locally and went red: email folding, Slack time zone fallback, whole-list delete, lease fence, republish on a time zone change.
  • lib/people, lib/knowledge/mcp, ee/scim, lib/internal/slack and the cron and organizations route suites: 418 unit tests.
  • bun run generate, lint, check:migrations, plus these audits: actorless-executor-operations, tool-request-boundary, boundaries, utils, comment-hygiene, test-patterns, file-names, api-validation:strict, tool-registry-boundary.

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 Dec 1, 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 Dec 1, 2026 8:46am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no new actionable issues were confirmed.RetriggerView in GreptileConfidence Score: 5/5

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

Summary

Adds directory start dates, time zones, Slack identities, and field-by-field filters to People search.

  • Directory profiles now carry start dates and time zones.
  • People records now include matching Slack workspace identities.
  • People search filters individual fields and returns richer reporting details.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Directory[Okta / Entra / SCIM] --> Stage[Stage directory fields]
  Stage --> People[Publish People directory]
  Slack[Slack workspace member lists] --> Refresh[Refresh under organization lease]
  Refresh --> Identities[Save Slack identities]
  People --> Lookup[Shared People lookup]
  Identities --> Lookup
  Lookup --> Consumers[MCP / Assistant / workflows]
Loading

Reviews (12) · Last reviewed commit: "chore(people): regenerate tool metadata ..." · Reviewed by Greptile

Comment thread apps/sim/lib/people/slack-identities.ts Resolved
Comment thread apps/sim/lib/people/slack-identities.ts Resolved
@blacksmith-sh

This comment has been minimized.

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

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/people/slack-identities.ts Resolved
Comment thread apps/sim/lib/people/slack-identities.ts Resolved
Comment thread apps/sim/lib/people/slack-identities.ts Resolved
@waleedlatif1
waleedlatif1 force-pushed the feat/people-directory-fields branch from bfc60af to 4f222d9 Compare December 1, 2026 05:32
@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 Dec 1, 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.

Comment thread apps/sim/lib/people/slack-identities.ts Resolved

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

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/people/slack-identities.ts Resolved
Comment thread apps/sim/lib/people/slack-identities.ts Resolved
@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 Dec 1, 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.

All reported issues were addressed across 29 files

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/people/slack-identities.ts Resolved
@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 Dec 1, 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 29 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

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
waleedlatif1 force-pushed the feat/people-directory-fields branch from 27d678d to ca6cfc3 Compare December 1, 2026 07:19
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 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.

All reported issues were addressed across 36 files

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/people/slack-identities.ts Resolved
@cubic-dev-ai

cubic-dev-ai Bot commented Dec 1, 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.

Comment thread apps/sim/lib/people/slack-identities.ts Resolved

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

Confidence score: 5/5

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

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

@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 Dec 1, 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.

Comment thread apps/sim/lib/people/slack-identities.ts Resolved

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

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/people/slack-identities.ts Resolved
Comment thread apps/sim/lib/people/slack-identities.ts Resolved
…s for search_people

- people_directory_entry/stage gain start_date and timezone, read from Entra employeeHireDate, Okta timezone and hireDate/startDate attributes, and SCIM timezone
- people_slack_identity holds each person's Slack user ID and time zone, refreshed daily by the People sync cron from the Slack Search bot's member list under a fenced lease
- search_people filters by name, email, title, department, location and managerPersonId, and returns time zone, Slack user ID, manager ID and email, and direct report counts
…r, fence writes to the current bot, regenerate assistant catalogs
…utbound scope, count only committed refreshes, format migration meta
…staging; pass search_people filters through the workflow block
… workspace and name the workspace with each ID
@waleedlatif1
waleedlatif1 force-pushed the feat/people-directory-fields branch from 9138b10 to 93f4fef Compare December 1, 2026 08:46
@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 Dec 1, 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 36 files

Confidence score: 5/5

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

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 8d592d6 into staging Dec 1, 2026
84 checks passed

This branch was previously deployed

1 inactive deployment
Preview — 93f4fef1 Deployed Dec 1, 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