Repository navigation
feat(infra): optional private Institute mount at /institute, off by default - #377
Merged
Merged
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
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.
Adds an optional Institute Worker behind
Mischiefat/institute. It is off by default: production and CI declare and route nothing new.What changes
.env.schemadeclares two new inputs:INSTITUTE_ARTIFACT: an absolute path to a prebuilt Institutedist. Leave it unset and nothing is declared.INSTITUTE_ENABLED: the rollout switch, defaultfalse.apps/infra/src/institute.tsdeclares the prebuiltInstituteWorker, but only when the artifact is set. It is configured with:bundle: false;ASSETSatdist/client;/institute/content/*;apps/infra/alchemy.run.tsmoves theWEBSITEbinding into a sharedgatewaystep. That step addsINSTITUTEonly when the Worker exists. Theinstitute-privatestage declares only that gateway.apps/site/src/institute-mount.tsforwards the original request for/instituteand/institute/*unchanged. It does so only when the binding is present and the switch is on. Every other path and host falls through to today's dispatch. The private stage addsx-robots-tag: noindexand has no domain.Checks
pnpm turbo run check test build --summarize: all 106 tasks pass. Commit hooks pass on both commits.New tests:
apps/infra/test/institute-binding.test.tscovers the declaration with the artifact set and unset;apps/site/test/institute-mount.test.tscovers the exact prefix, queries, Range, the/institutesand/institute-xneighbours, apex and www, a missing binding and the switch off.A planted loose-prefix bug fails them.
A read-only production plan, with the artifact unset, shows the same resource action set as a plan of clean
main. It has no Institute, no new binding, and no creates, replacements or deletions.Rollout
Nothing routes until a deploy both sets the artifact and turns the switch on. Production routing is a separate decision.