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?

};
export { _EmailMessage as EmailMessage };
}
/**
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.

Why are these types here? It looks like the snapshot generation has pulled in "Flag" stuff too?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I just tried pulling main with no local changes and ran just generate-types and get these changes as well. It seems the original PR that added these types did not run this command?

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.

@danlapid - is that possible?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

flags shouldn't be here, this seems wrong

BSFishy added 5 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>
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 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%

⚡ 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%

Comparing BSFishy:add-access-types (55e36f9) 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.

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