Skip to content

[comp] Production Deploy#3240

Merged
tofikwest merged 24 commits into
releasefrom
main
Jun 23, 2026
Merged

[comp] Production Deploy#3240
tofikwest merged 24 commits into
releasefrom
main

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.


Summary by cubic

Attach Stagehand to Browserbase over CDP using a resolved connect URL to eliminate “Premature close” errors and surface the upstream cause when retries are exhausted. Also include custom‑role members in task and evidence assignee filters, ship a unified Finder‑style frameworks list (FRAME‑20), add a daily job to refresh OAuth tokens before they expire, and accept PDFs with a leading BOM/whitespace during upload.

  • New Features

    • Framework Editor (FRAME‑20): replace per‑family sections with a single Finder‑style tree table (families + ungrouped frameworks at root; expanded families show indented frameworks); added a toolbar “Move Framework” action.
    • Integration Platform: daily 05:00 UTC schedule to refresh OAuth tokens expiring within 24h using @trigger.dev/sdk; checks only the latest credential version per connection.
  • Bug Fixes

    • Browserbase/Stagehand: resolve session connectUrl via getSessionConnectUrl (with retry) and attach using env: 'LOCAL' + localBrowserLaunchOptions.cdpUrl to avoid resume errors.
    • Errors: append upstream Browserbase error text to ServiceUnavailableException so exhausted retries show the cause.
    • Tasks/Evidence: include all app‑access members (custom roles) in assignee options and task overview via permission‑based filtering; removed hardcoded role allowlists.
    • Attachments: accept PDFs whose %PDF header appears within the first 1024 bytes (handles leading BOM/whitespace); still reject files declared as PDF without the header.

Written for commit 8e02ddb. Summary will update on new commits.

Review in cubic

github-actions Bot and others added 5 commits June 22, 2026 20:52
When retries are exhausted, withBrowserbaseRetry threw a generic
"Browserbase is temporarily unavailable" that hid the real upstream
error. Append the underlying error text to the message so an exhausted
retry is diagnosable from the UI/response, not only the server logs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013zSwXMqVNvWLJBZEot9x12
…ry-cause

fix(browserbase): surface the underlying cause on exhausted retries
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
comp-framework-editor (staging) Ready Ready Preview, Comment Jun 23, 2026 6:45pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
app (staging) Skipped Skipped Jun 23, 2026 6:45pm
portal (staging) Skipped Skipped Jun 23, 2026 6:45pm

Request Review

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

Confidence score: 5/5

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

Re-trigger cubic

chasprowebdev and others added 4 commits June 23, 2026 11:10
…on resume

Staging logs proved the connect blocker after disableAPI shipped: init now
fails at the Browserbase session resume — bb.sessions.retrieve(<id>) →
"Premature close" on all 3 retries (deterministic, so retry can't help).

That retrieve runs on Stagehand's OWN internal Browserbase client, which
lacks the accept-encoding:identity header we added to our client in
c8ed2e9 to stop exactly this compression-induced premature-close. Our
own identity-encoded calls in the same flow (contexts.create,
sessions.create, sessions.debug) succeed; only Stagehand's gzip retrieve
fails — confirming the header is the difference. Stagehand hardcodes
`new Browserbase({apiKey})`, so we can't inject the header into it.

Fix: resolve the session's connectUrl ourselves via our identity-encoded
client (getSessionConnectUrl), then attach Stagehand with env:'LOCAL' +
localBrowserLaunchOptions.cdpUrl. Stagehand then connects straight to the
session over CDP (connectOverCDP) and never makes its own bb.sessions.*
call, eliminating the premature-close. extract/act/agent run locally
against ANTHROPIC_API_KEY (env:'LOCAL' uses no hosted API), and we keep
managing the session lifecycle ourselves (keepAlive + closeSession).

Follow-up to #3230 (disableAPI); supersedes its BROWSERBASE-mode connect.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013zSwXMqVNvWLJBZEot9x12
…-url

fix(browserbase): attach Stagehand over CDP to avoid premature-close on session resume
tofikwest and others added 5 commits June 23, 2026 11:39
## Problem

Evidence items assigned to users with custom roles (e.g. 'SecDev') appear unassigned on the dashboard and those users don't show up in the assignee filter dropdown, even though they have the necessary evidence management permissions.

## Root cause

Two hardcoded role allowlists in the frontend filter out custom roles:

1. `page.tsx` lines 70-76 server-side filters team members to only `['owner', 'admin', 'auditor']`
2. `TaskList.tsx` line 121 filters eligible assignees using the same hardcoded list

When a 'SecDev' role is assigned evidence, it gets dropped from both lists. The assignee lookup then finds nothing and displays 'Unassigned', and the filter dropdown never includes them as an option.

## Fix

Replaced hardcoded role allowlists with permission-based checks that respect the actual permissions granted to each role. The frontend now queries whether a user has evidence management capabilities rather than checking against a fixed list of role names.

This means any role with the right permissions will properly show assignees and appear in filters, regardless of what the role is called.

## Explicitly NOT touched

- Permission/role assignment logic
- Evidence creation or deletion flows
- Audit logging or history
- Any backend role definitions

## Verification

✅ Custom role members now appear in assignee filter dropdown
✅ Evidence assigned to custom roles displays with correct assignee name
✅ Admin and auditor roles still work as before
✅ Permission checks validate user can view/manage evidence before showing in lists
## Problem

Users with custom roles like SecDev are not visible in the Assignee filter or task overview, even though they can be assigned tasks. This breaks workflows for organizations using custom role types.

## Root cause

The client-side filter `filterMembersByOwnerOrAdmin` in `filter-members-by-role.ts` manually parses the comma-split role field and keeps only members with 'owner' or 'admin'. Any user with a custom role like 'SecDev' gets filtered out before the UI even displays them.

The backend already returns all active members from /v1/people and allows assignment to any member (only blocking platform-admin users). This is a pure client-side display bug - SecDev members are fetched but hidden from the filter dropdown and task overview selectors.

Duplicate filter logic also lives inline in TaskItemItem.tsx and has the same issue.

## Fix

Removed the overly restrictive role check. Instead of filtering to only 'owner' or 'admin' roles, we now show all active members. The backend already enforces the actual permission boundaries, so the frontend doesn't need to second-guess role eligibility.

Updated both the shared filter util and the inline duplicate logic in TaskItemItem.tsx to match.

## Explicitly NOT touched

- RBAC checks or org scoping (backend handles these)
- Platform admin role detection (unchanged, still blocks platform-admin user.role)
- Task assignment endpoints or permissions
- Other role-based filters elsewhere in the codebase

## Verification

✅ SecDev and other custom role members now appear in Assignee filter dropdown
✅ Custom role members visible in task overview selector
✅ Task assignment to custom roles works end-to-end
✅ Existing owner/admin assignment flows unchanged
✅ Platform admin restriction still in place
…0 follow-up)

Joe's feedback on the families UI: the boxed per-family sections threw the
columns out of alignment and the move control was too subtle. Rework into one
unified list (folders + files, like Finder):

- Single table with one set of columns. Families (folders) and ungrouped
  frameworks (files) are intermixed alphabetically at the root; a family's
  frameworks appear indented (~6 chars) beneath it when expanded.
- Version / Status / Requirements / Controls columns are centred, the same
  whether a row is in a family or not — fixes the misalignment.
- Family rows show the "n frameworks" / "Empty" count in the Version column and
  the status badge in the Status column (per the ticket), not floating by the
  name.
- Move Framework is now a button on the toolbar row (next to Import / Create
  New Framework Family / Create New Framework); dropped the subtle per-row "→".
- Extracted the tree-row builder into a pure, tested helper.

Resizable columns (the wasted name↔version space) is FRAME-17, handled separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGwXoPb6qHxuHy8miVmyxT
…-evidence

fix(evidence): include custom roles in assignee visibility and filters
@vercel vercel Bot temporarily deployed to staging – portal June 23, 2026 15:58 Inactive
feat(framework-editor): unified Finder-style frameworks list (FRAME-20 follow-up)
@vercel vercel Bot temporarily deployed to staging – app June 23, 2026 16:15 Inactive
@vercel vercel Bot temporarily deployed to staging – portal June 23, 2026 16:15 Inactive
tofikwest and others added 3 commits June 23, 2026 14:25
validateFileContent required the %PDF magic bytes at offset 0
(subarray(0,4).equals('%PDF')). Per ISO 32000 the header is allowed within the
first 1024 bytes, and some exporters/vendors (e.g. GoodHire) prepend a UTF-8 BOM
or whitespace — so a strict offset-0 check rejected otherwise-valid PDFs, surfacing
as "Failed to upload background check" on the attach-report flow.

PDFs are now validated by searching the first 1024 bytes for %PDF (handled
explicitly, like WebP). Image/zip magic-byte checks are unchanged (those formats
require the signature at offset 0).

21 tests pass (new: PDF with leading BOM accepted; non-PDF declared as PDF rejected).

Related: CS-570 (paul.everton attach-report failure).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fix(attachments): accept PDFs with a leading BOM/whitespace before %PDF
@vercel vercel Bot temporarily deployed to staging – portal June 23, 2026 18:44 Inactive
@vercel vercel Bot temporarily deployed to staging – app June 23, 2026 18:44 Inactive
@tofikwest tofikwest merged commit 6347dec into release Jun 23, 2026
14 checks passed
@claudfuen

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.88.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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants