Skip to content

fix(cli): align Functions with SDK - #2700

Closed
shrey150 wants to merge 2 commits into
v4-spike-clifrom
agent/fix-functions-parity
Closed

fix(cli): align Functions with SDK#2700
shrey150 wants to merge 2 commits into
v4-spike-clifrom
agent/fix-functions-parity

Conversation

@shrey150

@shrey150 shrey150 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

BLUF

Repair the immediate browse functions drift so fresh Browse-generated projects develop, publish, and invoke successfully. Project selection is inferred from the API key by default; --project-id / BROWSERBASE_PROJECT_ID remains an optional override.

Root cause

The Functions API did not introduce a breaking contract change. Browse had a parallel implementation that stopped tracking the canonical SDK/CLI as it evolved. The most visible failures came from stale scaffold metadata/dependencies and runtime/archive behavior—not from a newly required project ID.

Changes

  • align scaffold package metadata, required dependencies, and npm/pnpm output with the SDK
  • infer the Functions project from the API key while preserving an explicit override
  • align local invocation context, structured runtime errors, Lambda ARN formatting, API URL flags, and the 50 MB archive guard
  • cover publish, invoke, async status, local dev, scaffolding, and error contracts

This is the tactical fix. The stacked follow-up, #2701, removes the parallel implementation entirely by consuming the shared SDK core. The canonical core extraction is browserbase/sdk-functions-node#40.

E2E test matrix

Command / flow Observed output Confidence / sufficiency
Browse lint/build Formatting, ESLint, typecheck, manifest generation, and build passed Proves the package compiles; does not exercise Functions remotely
Browse full test suite 25 files and all tests passed Covers Browse command, JSON, telemetry, and error contracts; most service boundaries are mocked
Workspace check 10/10 format/lint/typecheck tasks passed with 0 errors Proves the tactical changes do not break the containing workspace
Fresh npm and pnpm scaffolds Both installed with complete metadata and dependencies Proves generated projects are installable under both package managers
Local Functions dev with real credentials Managed session connected, invoked starter code, and released cleanly Exercises the real session/runtime path on public starter behavior
Fresh scaffold publish Cloud build completed and created a function version Exercises archive upload and build polling against the real Functions service
Synchronous invoke Invocation completed with expected starter results Exercises the real blocking invocation path
Async invoke followed by independent status lookup Submission and status polling completed with the expected result Exercises the real non-blocking and resume/status path
Publish and local dev without --project-id Both completed after project inference from the API key Proves the corrected default project-selection path for the tested account

Live validation used public starter behavior. Secrets, account identifiers, resource IDs, and connection URLs are intentionally omitted.

@changeset-bot

changeset-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9e8a971

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
browse Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@shrey150

Copy link
Copy Markdown
Contributor Author

Superseded by #2704, which carries the same tactical Functions fix on the isolated v3-cli lineage rooted at the last pre-v4 main commit. Closing this draft to avoid accidentally shipping unrelated v4-spike-cli changes.

@shrey150 shrey150 closed this Aug 13, 2026
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