Skip to content

feat(devin): support Enterprise personal ACU cycles - #3833

Draft
jeanroloff wants to merge 5 commits into
steipete:mainfrom
jeanroloff:feature/devin-enterprise
Draft

jeanroloff wants to merge 5 commits into
steipete:mainfrom
jeanroloff:feature/devin-enterprise

Conversation

@jeanroloff

Copy link
Copy Markdown

Summary

Extends the existing Devin provider with optional support for dedicated Devin Enterprise deployments. When an Enterprise host is configured, CodexBar imports the browser session for that origin and reads the signed-in user's personal monthly ACU cycle. Leaving the field empty preserves existing standard Devin behavior.

Why

Closes #3603

Dedicated Devin Enterprise deployments use a separate host and personal monthly ACU cycle, rather than the organization Daily/Weekly quota shape currently supported by the standard provider.

Implementation

  • Adds an optional Enterprise host setting, for example your-team.devinenterprise.com.
  • Reuses Devin's existing browser-session discovery and organization matching with credentials bound to the configured origin. This builds on the origin-isolation behavior introduced around fix(devin): isolate browser sessions and honor organization selection #3735 instead of adding a separate authentication mechanism.
  • Prefers the appropriate Auth0 token for Enterprise without changing standard Devin's existing auth behavior.
  • Calls /api/personal-analytics/usage-limit and maps the monthly cycle to the primary shared UsageSnapshot window, with shared ACU detail rows.
  • Uses the real cycle duration when both cycle boundaries are available; when only the end is provided, it does not invent a 30-day duration.
  • Adds synthetic tests and documents both standard and Enterprise setup.

Security / privacy

Enterprise support is opt-in. Credentials are scoped to the configured, validated HTTPS origin, and no Enterprise host is contacted while the setting is empty. The provider queries only the signed-in user's personal analytics and does not log tokens. Standard Devin behavior remains unchanged.

Validation

  • Focused Devin Enterprise/session tests: PASS (17 tests).
  • Full relevant test suite: PASS (1,308 selections across 119 groups).
  • make check: PASS (formatting and lint clean).
  • swift build -c release: PASS.
  • Manual validation against a Devin Enterprise deployment: PASS (user-confirmed).

Opened as a Draft to make the implementation and scope available for concrete review before moving to Ready for Review.

Scope

@clawsweeper

clawsweeper Bot commented Sep 21, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

ClawSweeper will not retry this unchanged revision.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

Optional enterprise host switches Devin to the personal-analytics
endpoint and imports the browser session from that origin. Chrome's
LevelDB keeps several versions of the same auth0 key, so the scan
could return a stale or cross-origin token and usage flip-flopped to
"session expired"; pick the freshest token by JWT expiration instead.
Keep Enterprise credentials origin-bound and preserve Standard Devin auth priority.

Refs steipete#3603
@jeanroloff
jeanroloff force-pushed the feature/devin-enterprise branch from ded3a68 to 852678c Compare September 21, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant