Repository navigation
refactor(earn): read the environment and cluster from the scope - #2554
Open
keeganthomp wants to merge 2 commits into
Open
keeganthomp wants to merge 2 commits into
keeganthomp wants to merge 2 commits into
Conversation
- Routes and services stop threading what the cluster scope holds (ADR 0007); earnClusterFor and the route-bound earnRuntime(c) go - The boundary test fails Earn code that reads either fact elsewhere Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
[Critical impact] The PR appears safe to merge. SummaryEarn routes and services now read their environment and cluster from
Reviews (2) · Last reviewed commit: "refactor(earn): read the scope inside th..." · Reviewed by Greptile |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
@greptileai review |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Earn routes and services take the environment and cluster from the open cluster scope instead of passing them down, the last step of HOO-1881, after #2544.
currentClusterScope(), neverresolveSdpEnvironment(c)orearnRuntime(c)environment/clusterearnClusterForis gone; plan and row checks compare against the scopeReviewer notes
Verification
pnpm typecheck28/28, Biome, module-boundary and value-movement checks passsdp-api-integrationsuitesTier: Critical (money paths). Threat model: same callers and actions; Earn code outside a scope fails closed (
CLUSTER_SCOPE_MISSING). AI use: written with Claude Code.🤖 Generated with Claude Code