docs(server): implementation plan for the scope switch (#580) - #581
Open
halcwb wants to merge 4 commits into
Open
docs(server): implementation plan for the scope switch (#580)#581halcwb wants to merge 4 commits into
halcwb wants to merge 4 commits into
Conversation
Implementation plan for GENPRES_SCOPE=accredited|full: one shared Feature list, a gate in the command dispatcher, a getSettings method the client mirrors, defaults that fail towards accredited in production. Keeps development, acceptance and production on one trunk instead of release branches. Refs informedica#580 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Greptile SummaryThis documentation-only PR provides a phased implementation plan for runtime scope selection between accredited and full GenPRES surfaces.
Confidence Score: 5/5The documentation plan appears safe to merge, with no outstanding actionable findings. The latest revision closes the prior sheet-loading lifecycle gap by moving permitted loads into the settings-resolution handler and explicitly verifying that full scope fetches both sheets. All earlier findings are resolved in the current plan. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
Env["GENPRES_SCOPE / GENPRES_PROD"] --> Settings["Validated server Settings"]
Settings --> Gate["processCmd scope gate"]
Command["API Command"] --> Gate
Gate -->|Permitted| Ports["Server ports and domain logic"]
Gate -->|Withheld| Error["NOT_IN_SCOPE"]
Settings --> API["getSettings"]
API --> Client["Client settings handler"]
Client --> Pages["Filter and normalize pages"]
Client --> Sheets["Load permitted client-side sheets"]
Reviews (3): Last reviewed commit: "docs(server): start permitted sheet load..." | Re-trigger Greptile |
No compose fallback for GENPRES_SCOPE so the production derivation holds; the scope check is the first operation in processCmd, ahead of the four commands that bypass requireLoaded; the start page is normalised when settings resolve; client-only sheets are not fetched in accredited scope, with server-side routing as a named follow-up. Refs informedica#580 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ules The client-side sheets limit in the scope switch plan now points to the issue that removes it, instead of an unnamed follow-up. Refs informedica#580, informedica#582 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
With unresolved settings treated as accredited, a gated load in init would never run. The settings-resolved handler now dispatches the permitted client-side sheet loads and normalises the start page. Refs informedica#580 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
7 tasks
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.
Description
Implementation plan for the scope switch (#580): the production server exposes only the MDR-accredited parts of GenPRES, all other environments the full suite, selected at runtime and enforced by the server. One trunk, no release branches.
Key points:
GENPRES_SCOPE=accredited|full, parsed intoSettings; defaults toaccreditedwhenGENPRES_PROD=1,fullotherwise; any other value stops the server at startup.Featurelist compiled into server and client;Feature.ofCommandis total over every command family, with a test per case.processCmdahead ofrequireLoadedand returns a stableNOT_IN_SCOPEerror without touching any port.getSettingsmethod carries scope and demo flag to the client, which filters the page list and guardsUpdatePageand thepgdeep link. This also repairs the deadIsDemoplumbing.Five PRs, each under 200 lines.
Author checklist
Reviewer checklist
🤖 Generated with Claude Code