Skip to content

feat: add access context types#6735

Open
BSFishy wants to merge 5 commits into
cloudflare:mainfrom
BSFishy:add-access-types
Open

feat: add access context types#6735
BSFishy wants to merge 5 commits into
cloudflare:mainfrom
BSFishy:add-access-types

Conversation

@BSFishy
Copy link
Copy Markdown

@BSFishy BSFishy commented May 6, 2026

Replaces #6413 and #6549.

Adds types for Cloudflare Access integration into Workers

@BSFishy BSFishy requested review from a team as code owners May 6, 2026 13:53
@BSFishy BSFishy requested a review from penalosa May 6, 2026 13:53
@BSFishy BSFishy force-pushed the add-access-types branch from 75a134f to 057152e Compare May 6, 2026 15:51
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 8, 2026

Codecov Report

❌ Patch coverage is 37.93103% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.61%. Comparing base (ac31559) to head (55e36f9).

Files with missing lines Patch % Lines
src/workerd/api/global-scope.c++ 19.04% 15 Missing and 2 partials ⚠️
src/workerd/api/global-scope.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6735      +/-   ##
==========================================
- Coverage   66.62%   66.61%   -0.01%     
==========================================
  Files         402      402              
  Lines      115914   115937      +23     
  Branches    19425    19428       +3     
==========================================
+ Hits        77226    77230       +4     
- Misses      27095    27111      +16     
- Partials    11593    11596       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@danlapid danlapid requested a review from kentonv May 9, 2026 00:58
Comment thread src/workerd/io/worker-entrypoint.h Outdated
@BSFishy BSFishy force-pushed the add-access-types branch from 057152e to eaafa55 Compare May 11, 2026 19:08
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

Feels like we need to run the snapshots against clean main to remove the extra unexpected types?

Comment thread types/generated-snapshot/experimental/index.d.ts
BSFishy added 4 commits May 12, 2026 14:58
Signed-off-by: Matt Provost <mprovost@cloudflare.com>
Signed-off-by: Matt Provost <mprovost@cloudflare.com>
Signed-off-by: Matt Provost <mprovost@cloudflare.com>
Signed-off-by: Matt Provost <mprovost@cloudflare.com>
@BSFishy BSFishy force-pushed the add-access-types branch from eaafa55 to 55e36f9 Compare May 12, 2026 15:29
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 12, 2026

Merging this PR will improve performance by 13.76%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 71 untouched benchmarks
⏩ 129 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
Encode_ASCII_256[TextEncoder][0/0/256] 3.1 ms 2.7 ms +13.76%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing BSFishy:add-access-types (822a381) with main (ac31559)

Open in CodSpeed

Footnotes

  1. 129 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

this should be more in line with workerd architecture. we separate the
polymorphism to something that AccessContext wraps around rather than
having AccessContext itself be polymorphic.

Signed-off-by: Matt Provost <mprovost@cloudflare.com>
@BSFishy BSFishy force-pushed the add-access-types branch from 55e36f9 to 822a381 Compare May 13, 2026 14:14
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

Reviewed for typings

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.

5 participants