Skip to content

fix(people): stop tracking background checks for auditor-only members (CS-416)#2995

Merged
Marfuen merged 1 commit into
mainfrom
cs-416
Jun 2, 2026
Merged

fix(people): stop tracking background checks for auditor-only members (CS-416)#2995
Marfuen merged 1 commit into
mainfrom
cs-416

Conversation

@Marfuen
Copy link
Copy Markdown
Contributor

@Marfuen Marfuen commented Jun 2, 2026

CS-416 — Stop tracking background checks for auditor-only members

Relates to: https://linear.app/compai/issue/CS-416 (sub-issue of CS-475)

Problem

Auditor-only members (external reviewers) were still surfaced as needing a background check in the people area, which confused customers.

Fix

Treat auditor-only members (every comma-separated role is auditor) as not subject to the background-check requirement:

  • People score (apps/api/src/frameworks/frameworks-people-score.helper.ts): auditor-only members no longer count toward the BG-check requirement (alongside the existing backgroundCheckExempt exclusion).
  • Employee detail page (Employee.tsx): the Background Check tab + header status are hidden for auditor-only members.
  • The people-list row was already gated (MemberRow.tsx !isAuditorOnly).
  • Extracted a small, tested isAuditorOnly helper.

A member with auditor plus another role still requires a check (they carry the other role's obligations).

Tests

  • API (jest): frameworks-people-score.helper.spec.ts → 10/10 (adds auditor-only and auditor+employee cases).
  • App (vitest): isAuditorOnly.test.ts → 4/4.
  • tsc clean on changed files; no new lint.

🤖 Generated with Claude Code


Summary by cubic

Stops tracking background checks for auditor-only members to avoid confusing customers. Auditor-only users are excluded from the requirement and related UI, matching CS-416.

  • Bug Fixes
    • People score: exclude auditor-only members from background-check requirements (still required if auditor is combined with another role).
    • Employee page: hide Background Check tab and header for auditor-only members.
    • Add isAuditorOnly helper (shared logic) with tests; expand API tests for auditor-only and mixed-role cases.

Written for commit 06e2552. Summary will update on new commits.

Review in cubic

… (CS-416)

Auditor-only members are external reviewers and aren't subject to
people-security requirements. Exclude them from the background-check
requirement in the people score and hide the Background Check tab/header
on their detail page (the people-list row was already gated).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Marfuen
Copy link
Copy Markdown
Contributor Author

Marfuen commented Jun 2, 2026

@cubic-dev-ai ultrareview this

@linear
Copy link
Copy Markdown

linear Bot commented Jun 2, 2026

CS-416

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai Bot commented Jun 2, 2026

@cubic-dev-ai ultrareview this

@Marfuen Ultrareview monthly budget exhausted (12/12 used). Budget resets at the start of next month.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

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

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jun 2, 2026 7:18pm
comp-framework-editor Ready Ready Preview, Comment Jun 2, 2026 7:18pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped Jun 2, 2026 7:18pm

Request Review

@Marfuen
Copy link
Copy Markdown
Contributor Author

Marfuen commented Jun 2, 2026

@cubic-dev-ai review this

@Marfuen Marfuen marked this pull request as ready for review June 2, 2026 19:29
@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai Bot commented Jun 2, 2026

@cubic-dev-ai review this

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

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

cubic analysis

No issues found across 5 files

Confidence score: 5/5

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

Linked issue analysis

Linked issue: CS-416: Remove background check requirement from Auditor roles in the people tab

Status Acceptance criteria Notes
Exclude auditor-only members from the background-check requirement in people-score computation computePeopleScore was updated to skip auditor-only members when computing whether a member requires a background check, and tests were added to verify auditor-only vs auditor+other-role behavior.
Hide Background Check tab and header/status on the Employee detail page for auditor-only members Employee page now computes showBackgroundCheck using isAuditorOnly and conditionally omits the Background Check tab, content, and background-check-related props.
Ensure a member who is auditor plus another role still requires a background check Tests exercise a mixed-role member (auditor,employee) and assert that a background check is still required.
Add a shared isAuditorOnly helper with unit tests A new isAuditorOnly helper was added and covered by vitest unit tests for empty, single, multiple, and mixed-role inputs.
People-list row does not show background check for auditor-only members (no user-facing regression) PR notes the people-list row was already gated; no change required and behavior remains consistent with the fix.

Re-trigger cubic

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

cubic analysis

No issues found across 5 files

Confidence score: 5/5

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

Linked issue analysis

Linked issue: CS-416: Remove background check requirement from Auditor roles in the people tab

Status Acceptance criteria Notes
Exclude auditor-only members from the background-check requirement in people-score computation computePeopleScore was updated to skip auditor-only members when computing whether a member requires a background check, and tests were added to verify auditor-only vs auditor+other-role behavior.
Hide Background Check tab and header/status on the Employee detail page for auditor-only members Employee page now computes showBackgroundCheck using isAuditorOnly and conditionally omits the Background Check tab, content, and background-check-related props.
Ensure a member who is auditor plus another role still requires a background check Tests exercise a mixed-role member (auditor,employee) and assert that a background check is still required.
Add a shared isAuditorOnly helper with unit tests A new isAuditorOnly helper was added and covered by vitest unit tests for empty, single, multiple, and mixed-role inputs.
People-list row does not show background check for auditor-only members (no user-facing regression) PR notes the people-list row was already gated; no change required and behavior remains consistent with the fix.

Re-trigger cubic

@Marfuen Marfuen merged commit 4e7d57d into main Jun 2, 2026
10 checks passed
@Marfuen Marfuen deleted the cs-416 branch June 2, 2026 20:00
claudfuen pushed a commit that referenced this pull request Jun 2, 2026
# [3.67.0](v3.66.2...v3.67.0) (2026-06-02)

### Bug Fixes

* **api:** guarantee non-null SoA justification on YES defaults ([7f564df](7f564df))
* **api:** include a default justification on SoA ([732f262](732f262))
* **app:** able to edit the justification ([2939178](2939178))
* **app:** fix empty justification issue on SoA ([43fa889](43fa889))
* **app:** keep SoA justification dialog open when save fails ([a5621cb](a5621cb))
* **app:** return a generic default when no family match on SoA ([6682be1](6682be1))
* **app:** show default justification at all times on SoA ([13f468a](13f468a))
* **background-checks:** move admin actions into the status card footer ([#2998](#2998)) ([dcd4b4d](dcd4b4d))
* **people:** stop tracking background checks for auditor-only members (CS-416) ([#2995](#2995)) ([4e7d57d](4e7d57d))

### Features

* **admin:** add Finding Templates management to admin panel ([c381397](c381397))
* **background-checks:** admin cancel/delete/retry (CS-475) ([#2993](#2993)) ([51c3b3d](51c3b3d))
* **background-checks:** hourly reconciliation for stuck checks (CS-473) ([#2996](#2996)) ([3d6e609](3d6e609))
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.67.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants