Skip to content

fix(results): recognize Proofpoint User/Domain create success shape (WYREAI-574) - #8

Merged
asachs01 merged 2 commits into
mainfrom
cursor/fix-create-success-shape-64c1
Nov 15, 2026
Merged

asachs01 merged 2 commits into
mainfrom
cursor/fix-create-success-shape-64c1

Conversation

@asachs01

@asachs01 asachs01 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Rick’s retest (WYREAI-574): users_create created the user, but the tool summary said 0 succeeded / 1 unconfirmed.

batchCreateResult only treated items as succeeded when they had success: true or a numeric status/code. Proofpoint’s postUser 201 response is a bare User (primary_email required) with no status/success flag — same idea for Domain name on postDomain.

This treats a returned item with primary_email/email (users) or name (domains) and no error fields as succeeded.

Also bumps @wyre-ai/node-proofpoint-essentials to ^1.1.1 (released after SDK #5 merge), which fixes users.get to use GET /orgs/{domain}/users/{email}.

Doc evidence

From Proofpoint Essentials OpenAPI (https://us1.proofpointessentials.com/apidocs/apidocs/docs):

  • postUser 201 → schema User (required: primary_email)
  • postDomain 201 → schema Domain (required: name)
  • 207 → “batch response, individual results contained within” (success items often omit status flags)
  • GET /orgs/{domain}/users/{user} — getUser (email path param); list endpoint has no email filter

SDK

  • Released: @wyre-ai/node-proofpoint-essentials@1.1.1
  • Lockfile resolved to that version

Test plan

  • Handler/sanitize tests cover User/Domain identity success
  • Local test/lint/typecheck pass
  • CI green after dep bump

Refs: WYREAI-574 / HubSpot 338019781355 / SDK WYRE-AI/node-proofpoint-essentials#5

Open in Web Open in Cursor 

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Bug Fixes

    • User and domain creation results are now counted as successful when the response includes a user email or domain name and no failure signal, even if a success status is omitted.
    • Created users are no longer reported as unconfirmed in these cases.
  • Documentation

    • Added notes describing how user and domain creation results are interpreted, plus the SDK version requirement for the single-user retrieval path fix.

…(WYREAI-574)

postUser 201 returns a User with required primary_email and no
status/success flag; batchCreateResult was marking those unconfirmed.
Recognize primary_email/email (users) and name (domains) without error
fields as succeeded.
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Next included review available in 13 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available. Your 69 included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI; Enforced overrides: Organization
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5648ee5d-ef82-4b7e-9e5b-a65e66df644f
Commits

Reviewing files that changed from the base of the PR and between 71b8268 and 1d81f57.

Files ignored due to path filters: 1

  • package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
Files selected for processing: 2

  • README.md
  • package.json

No actionable comments were generated in the recent review.

Walkthrough

The batch create result handler now counts identified user and domain items as succeeded when no failure condition applies. Tests cover the updated outcomes. The changelog and README document the classification and an SDK version requirement for a separate users_get path fix.

Changes: Create-result classification

Layer / File(s) Summary
Identity-based success classification
src/handlers/results.ts, src/__tests__/*, CHANGELOG.md, README.md
The handler treats a nonblank user email field or domain name as success after failure checks. Tests cover identified and unconfirmed results. The documentation describes the classification and notes the SDK version requirement for the users_get path fix.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: Minimal · previous review 71b82

This change makes users_create and domains_create report created users and domains as succeeded instead of unconfirmed. No concrete failure case was found, so the change looks safe to merge. The README notes that the users_get fix still depends on an SDK release.

Security architecture risk: Minimal · up to 71b82

The change corrects create-result reporting without adding create operations or broadening credential authority. Explicit failures still take precedence, and missing response items remain unconfirmed. No introduced or worsened material security risk was established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed exposure is confined to responses from the two existing credentialed create tools. Credential handling and organization-specific SDK invocation precede classification; the changed predicate grants no additional authority.

Trust Boundaries and Controls

  • observed — Resource identity cannot override a populated error or errors field, success=false, or a numeric status or code outside 200–299. These failure checks remain ahead of the expanded success branch.
  • observed — Raw all-success output is intentional rather than a general PII-redaction guarantee. That policy predates this PR. The change extends its applicability to identity-only successes; failed or unconfirmed batches retain cleaned records with sanitized messages.
Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Changelog Entry Inconclusive Pull request inputs changed after this check was assessed; its verdict is no longer current. Re-run the check against the current pull request inputs.
Passed Passed checks: 4 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the fix (recognizing the Proofpoint User/Domain create success shape in results handling) and the ticket. The changeset matches it: batchCreateResult now treats user items with primary…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the fix (recognizing the Proofpoint User/Domain create success shape in results handling) and the ticket. The changeset matches it: batchCreateResult now treats user items with primary_email or email, and domain items with name, as succeeded when no failure condition applies, with matching test and README/CHANGELOG notes. The title is specific and does not cover every detail, which is acceptable.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI; Enforced overrides: Organization
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e36f6bc1-a0b7-4902-bec1-7e3b8811ddf1
Commits

Reviewing files that changed from the base of the PR and between 2a11da4 and 71b8268.

Files selected for processing: 5

  • CHANGELOG.md
  • README.md
  • src/__tests__/handlers.test.ts
  • src/__tests__/sanitize.test.ts
  • src/handlers/results.ts
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Pins the released SDK that uses GET /orgs/{domain}/users/{email} for
users.get, matching the create-summary fix already on this branch.
@asachs01

Copy link
Copy Markdown
Contributor Author

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown
Action performed

Comments resolved and changes approved.

@asachs01
asachs01 merged commit 7babba8 into main Nov 15, 2026
7 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.4 🎉

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