Skip to content

feat(infra): optional private Institute mount at /institute, off by default - #377

Merged
shitratgit[bot] merged 2 commits into
mainfrom
desk/institute-mount
Nov 27, 2026
Merged

shitratgit[bot] merged 2 commits into
mainfrom
desk/institute-mount

Conversation

@shitratgit

@shitratgit shitratgit Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Adds an optional Institute Worker behind Mischief at /institute. It is off by default: production and CI declare and route nothing new.

What changes

  • .env.schema declares two new inputs:
    • INSTITUTE_ARTIFACT: an absolute path to a prebuilt Institute dist. Leave it unset and nothing is declared.
    • INSTITUTE_ENABLED: the rollout switch, default false.
  • apps/infra/src/institute.ts declares the prebuilt Institute Worker, but only when the artifact is set. It is configured with:
    • bundle: false;
    • ASSETS at dist/client;
    • worker-first /institute/content/*;
    • no workers.dev, previews, route or domain.
  • apps/infra/alchemy.run.ts moves the WEBSITE binding into a shared gateway step. That step adds INSTITUTE only when the Worker exists. The institute-private stage declares only that gateway.
  • apps/site/src/institute-mount.ts forwards the original request for /institute and /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 adds x-robots-tag: noindex and 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.ts covers the declaration with the artifact set and unset;
    • apps/site/test/institute-mount.test.ts covers the exact prefix, queries, Range, the /institutes and /institute-x neighbours, 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.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: da5bd57d-5b16-4b62-a9e3-241824ffd86f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@shitratgit
shitratgit Bot merged commit f1c8383 into main Nov 27, 2026
4 checks passed
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.

0 participants