Skip to content

feat: Version 1.0 of the request-derived context #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ollieread
Copy link
Owner

The first version of the request-derived context pattern.

The pattern defines a consistent and reusable structure for identifying the context of a HTTP request, such as the current user, tenant, locale, language, session, or any combination of the above.

@ollieread ollieread requested a review from Copilot June 2, 2025 20:43
Copilot

This comment was marked as outdated.

This means the context must be derived from the request itself.
- **Early Context Requirements** <br/>
Core decisions at both the application and domain level will often depend on context, which means it must be
resolved early on, so the request can be processed correctly.

Choose a reason for hiding this comment

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

"resolved" is a funny word, because it could be understood to mean completely understood; whereas multi-request context requires that it isn't finalised. Think "Cookes are resolved" which means they're fully decoded, but does not mean they are appended to the response.

Not sure what the better wording is, though. Context is recognised? Loaded?

Copy link
Owner Author

Choose a reason for hiding this comment

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

"resolved" is a funny word, because it could be understood to mean completely understood; whereas multi-request context requires that it isn't finalised. Think "Cookes are resolved" which means they're fully decoded, but does not mean they are appended to the response.

Not sure what the better wording is, though. Context is recognised? Loaded?

I've changed "must" to "may" locally, to address this specific concern. The context can be resolved at any point, but in some cases it may need to be resolved early.

Copy link
Owner Author

Choose a reason for hiding this comment

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

@assertchris

  • Early Context Requirements

    Core decisions at both the application and domain level will often depend on context, which means it may be
    resolved early on, so the request can be processed correctly.
    The pattern must allow for both early and late resolution of context, whether eager or lazy.

@ollieread ollieread requested a review from Copilot June 5, 2025 09:25
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces version 1.0 of the request-derived context pattern documentation by clarifying and standardizing the approach to extracting contextual information from HTTP requests.

  • Updated the intent and problem sections for clearer, more comprehensive descriptions.
  • Expanded the solution section with a detailed breakdown of pattern components (extractor, resolver, and mentions of store and manager).
Comments suppressed due to low confidence (1)

PATTERN.md:93

  • Consider adding brief explanations for the 'store' and 'manager' components to complete the architectural overview.
The solution is to separate the process into four distinct components, an extractor, a resolver, a store, and a manager.

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.

2 participants