Prompt #154

Back to prompts
Yoga Tenant Override Setup
System Β· openai/gpt-4.1
5/5
Variables
tenant_id, template_name, slug, page_title
Tags
stack-aware,yoga,tenant,isolation,override,plugin-bootstrap
Source
research-2026-05-01-stack-aware
Use count
0
Created
2026-05-01T18:30:48.776731+00:00
Updated
2026-05-01T18:30:48.776731+00:00

Content

Set up a tenant-specific override in yoga for tenant {tenant_id}.

Yoga's tenant-isolation rules (from AGENTS.md Β§14):
- Code IS shared across containers (/nvmetank1/docker/yoga/)
- Settings/Pages/Plugin-State are NOT shared (per-container .db)
- NEVER use setting_set() in seed paths β€” only setting_set_if_new()
- Pages: page_save(only_if_new=True) for default pages
- Plugin-Bootstrap-Marker: plugin._bootstrap_done blocks auto-activate

Steps:
1. Create tenant template at /persistent/yoga-templates/{tenant_id}/{template_name}.html
2. Register override in db: `setting_set_if_new("tenant.{tenant_id}.template", "{template_name}")`
3. Verify isolation: other containers must NOT see this setting
4. If adding a new page: `page_save(slug="{slug}", title="{page_title}", only_if_new=True)`
5. If enabling a plugin: check `plugin._bootstrap_done` marker before calling plugin.enable()

Test: spin up a second yoga container and verify the override does NOT appear there.