Decision Playbooks
Playbooks are requirement-first decision tables: you start from what the ticket asks ("hide these
fields", "show Zones on the Instance page"), and each row names the command that decides, the
verdict (tier + knob/artifact), and the gotcha — every gotcha cited to platform source
(MibServer3 releases/6.0) or to the vendored seed extensions. They complement the reference pages
(Built-in Components, Seam Reference, Data Model): the playbook picks the lane, the reference drives in it.
They are also ingested into the mib tool, exactly like the component catalog and config keys. This
page is the source of truth: each section carries a <!-- mib:item --> block (the machine-readable
payload), and the human table below it is generated from that block by mib registry build — so the
two can never drift. Agents consume the same rows via:
mib list playbook # the decision playbooks
mib get playbook.<name> # full rows as JSON (mib_get over MCP)
mib search "esconder campo" # keyword search lands on the right playbook (PT + EN)
How playbooks are discovered
Every playbook so far came out of the same loop — keep running it:
- Field-test a real ticket with an agent in a real repo. Watch where it hesitates, greps blindly, or picks wrong — each hesitation is a missing playbook row.
- Mine the corpora for families:
Migrations/in customer repos cluster into recurring change-shapes; knob notes each imply the requirement that trips them; closed tickets name the operator-language. - Verify every gotcha in source before it becomes a row (file:line or it doesn't ship). A refuted claim is recorded as a correction, not dropped silently.
- Promote: recurring + verified -> a
<!-- mib:item -->block on this page (mib registry buildingests it). One-off -> a note in the relevant reference/skill.
Playbook A — pure form/list/related config (configure tier)
Route a config-looking requirement to the exact knob, with the gotchas that bite.
| Requirement | Decides | Verdict | Gotcha |
|---|---|---|---|
| Hide deprecated/obsolete fields from an edit form | mib knobs component.form --allmib datamodel <MT> # exact field names; deprecation flagged in field descriptions |
configure · EXCLUDE_FIELDS | INCLUDE_FIELDS/EXCLUDE_FIELDS are if/else — INCLUDE WINS when both are set. ID is immune to both filters. |
| Make a field read-only on the form | mib knobs component.form --all |
configure · READ_ONLY_FIELDS | Stored as a single string, not a list (knob note). |
| Group form fields into sections | mib knobs component.form --all |
configure · FORM_GROUPING (json) | A FormGrouping title can override the component TITLE knob (knob note). |
| Make a related-list read-only | mib knobs component.simple-related-list --all |
configure · ALLOW_ADD_NEW/ALLOW_EDIT/ALLOW_REMOVE=false | Effective = knob && permission.CanX — ADD gated by CanCreate, EDIT by CanWrite. Setting true grants nothing the permission denies. |
| Change the columns of a related-list | mib knobs component.simple-related-list --all |
configure · INCLUDE_FIELDS/EXCLUDE_FIELDS | ID cannot be excluded, is force-added (non-React path), and is FORCED to display position 0. |
| '+New / edit pencil vanished from a list' | mib knobs component.list --all # EDIT_URL |
configure · fix EDIT_URL | URL must end with the literal {id} token — the BFF regex /(? |
Load skills: mib-pages, mib-migrations.
Apply: author the C# migration (AddOrUpdatePageComponentConfiguration) → mib migration new
The bread and butter — pure configure-tier form/list/related changes.
Playbook B — looks like config, but is a datamodel change (the traps)
Split config-only from config+datamodel BEFORE editing anything — the DB and often the REPO differ.
| Requirement | Decides | Verdict |
|---|---|---|
| Add a NEW field to a form | mib datamodel <MT> # field absent from the export? |
datamodel FIRST (ADM_FIELDS → mib migration new --for datamodel), THEN include/exclude config here |
| Turn a text field into a dropdown / fix the widget | mib datamodel <MT> # the field's type/typeCode |
datamodel (ADM_FIELDS.TYPE + enum), not config |
| Add options to a dropdown | mib datamodel <MT> # the enum + its values |
datamodel (ADM_ENUMVALUES) |
| Show a related list of X on this page | mib datamodel <MT> # relateds list |
relation EXISTS (e.g. GVP_INSTANCES→GVP_ZONES 1:N) → config-only SimpleRelatedList slot; relation MISSING → datamodel first (ADM_RELATEDS), then the slot |
Load skills: mib-datamodel, mib-migrations.
Also check: groupPermissions in the same mib datamodel output — a new page/list is INVISIBLE without the group's CanRead (mib get recipe.grant-media-type-permission)..
Looks like config, but it is a datamodel change (another DB, often another repo). The same inspector decides both ways.
Playbook C — client dynamics, save-time logic, custom widget
Pick the cheapest tier for dynamic/save behavior: hook (remote) < seam (extend) / plugin < custom widget.
| Requirement | Decides | Verdict | Gotcha |
|---|---|---|---|
| Show field Y only when X=true (client-side dynamics) | mib inventory <page> --has hook # reports what IS wired, NOT what is possible — an empty result is not a capability signalread the remote's conventions |
React remote hook (useFormChange — PRE-SAVE only). GVP convention: 0 CUSTOM_BEHAVIORS, everything is hooks. | |
| React to a change in a RELATED LIST's ROWS (cross-row invariant — only one Preferred/Default/Primary among sibling rows) | mib get recipe.exclusive-flag-across-siblingsmib get building-block.page-bridge # perArchetypeData.relatedList — the value shape you rewrite |
useFormChange hook (remote) for the instant client-side correction + a save-time seam for the invariant. You do NOT need a custom remote: the stock RelatedList renders as <Form.Item name={componentKey}>, so its ENTIRE value lives in the page's one antd Form and a sibling hook can watch it (Form.useWatch(componentKey, { form })) and rewrite it (form.setFieldValue(componentKey, next)). Owning the RENDERER is required only for custom cell renderers / server-injected field schema / matrix / tree — building-block.frontend-decorators decision rule. | Rewrite BOTH halves of the value: items (what the grid RENDERS — omit it and the checkbox never visually unchecks) AND changes[{id,fields}] (the diff the BFF PERSISTS — omit it and the correction is visual-only and silently lost on save). Spread the current value so total/addedIds/saveOptions survive. And a client hook is never the invariant: it only covers the browser, so keep the backend seam for import scripts, direct API writes and concurrent editors. |
| Validate/transform at save time | mib contract component.form # POST /api/v2/form/datamib get seam.on-form-save-built # version gatemib doctor seam.on-form-save-built # is the seam on my TARGET build? (declared + source cross-check) |
business-rule plugin by default (works on 6.x AND 7.0). On 7.0 the seam-extend path (OnFormSaveBuilt etc.) is ALSO available — the extension seams merged into releases/7.0 (commit 9d02998c6) and ship in 7.0.0-beta8; on 6.x they do not exist. Pick the cheapest tier that fits (plugin often beats seam). Confirm a seam against the TARGET build via the version gate (mib get seam.on-form-save-built), never a hardcoded note. | HIDE_BULK_EDIT=true → OnFormSaveBuilt/OnDeleteBuilt do NOT fire on the HideBulkEdit no-op path (knob note, verbatim). |
| Replace the whole form with a custom React widget | mib inventory <page> # viewTypemib contract # MibComponentProps |
custom tier — COMPONENT_VIEW_TYPE must equal the federated remote's export key | |
| Field with autocomplete against another table | mib search autocomplete |
configure — component.related-auto-complete already exists; check it before considering custom |
Load skills: mib-frontend, mib-components.
v2/React — hook vs seam vs custom: where does dynamic/save behavior live?
Playbook D — landing a config change as a migration
Mechanics of the metadata migration itself — helpers are vendored per repo (GVP: src/DatabaseTools/Extensions/).
| Requirement | Decides | Verdict | Gotcha |
|---|---|---|---|
| Update an already-set config value | AddOrUpdatePageComponentConfiguration (upsert) | ||
| CLEAR a config value | DeletePageComponentConfiguration(pageKey, templateComponentKey[, configName]) | There is NO #null sentinel in this layer (0 hits in the extensions) — the delete helper IS the clear; all-keys and single-key overloads. | |
| Reposition a component on the page | Order on AddOrUpdateTemplateComponent | Order is MANDATORY — the helper throws InvalidOperationException("Order is Mandatory"). | |
| Config on a SHARED template | mib inventory --componentsmib inventory <pageKey> |
check blast radius FIRST | Per-page config (MIB3UX_PAGE_COMPONENT_CONFIGURATIONS, keyed by PAGE_ID) hits ONE page; template-component changes (MIB3UX_TEMPLATE_COMPONENTS) hit EVERY page using the template. |
| EXTEND a template (add a panel / template-component) | mib inventory <targetPage> --fullmib inventory --components |
inventory the target template BEFORE AddOrUpdateTemplateComponent — shared/GLOBAL ⇒ clone it, never extend in place | MANDATORY pre-step, not generic advice: mib inventory <targetPage> --full shows WHICH template the page uses + its template-components; the stock templates (form_template, one_list_template, …) are GLOBAL — a panel added to one leaks onto EVERY page sharing it. Shared ⇒ register your OWN template (AddOrUpdateTemplate + your own key) and point your page at it; extend in place ONLY when the inventory proves the template is exclusive to your page. |
Load skills: mib-migrations.
Apply: mib migration new
The "how": landing a config change as a migration — upsert, clear, reorder, blast radius.
Playbook E — where does the data come from? (stock vs seam vs custom)
Pick the cheapest tier to SOURCE a page's data: stock/mib.api → configure; unsupported shape or non-mib.api → seam (extend); no applicable seam → custom. Rule: no stock component fits ≠ build custom — check the component's seamSupport and try the data-source seam first.
| Requirement | Decides | Verdict | Gotcha |
|---|---|---|---|
| Data is mib.api-owned and a stock component already fits its shape | mib datamodel <TYPE>mib search <intent>mib knobs <component> |
configure — bind the stock list/form/related to the media type; do not extend a component that already does the job. | |
| READ-ONLY data that is aggregated / spans several media types but lives entirely in the datamodel DB (reporting, dashboards, a cross-kind read-only list) | mib datamodel <TYPE> # does a suitable shape already exist?read mib-datamodel skill — 'A media type can be a DB VIEW' |
configure — model a DB VIEW and declare it as a media type (create the view in a data-model migration; register it in MEDIA_TYPES + columns in ADM_FIELDS with base cols ID/NAME/DATEINS), then bind a stock read-only list. MIB stores only the object name (no table-vs-view flag), so a view reads like any type — cheaper than an OnFetchData seam when the data is all in the DB and read-only. | read-only: a join/aggregate view is not writable — mark it read-only with BLOCK_WRITE/BLOCK_DELETE/BLOCK_CREATE. For editable data, or data NOT in the datamodel DB, use the seam/custom rows below instead. |
| Data is mib.api-owned but NO stock component expresses the shape (polymorphic / cross-kind reference, computed or aggregated across types, a relationship no stock list models) | mib get component.<x> # seamSupport?mib get seam.on-fetch-datamib get recipe.swap-data-source-external-api |
EXTEND — subclass the component and override OnFetchData/ProvidesExternalData (+ TransformData/ContributeSchema to shape rows/columns); query the mib.api-owned content from INSIDE the seam via the injected ApiClient (mib get building-block.mib-api-client). Check the component's seamSupport FIRST — do not jump to custom. |
seamSupport=full (List/Related/Ordered — e.g. component.ordered-related-list) HOSTS the data-source seams; seamSupport=v1-frozen (e.g. component.related-auto-complete) has NO seam, so only THAT case justifies custom. |
| Data comes from a NON-mib.api source (external API, third-party catalog, another Core service) | mib get recipe.external-data-listmib get recipe.swap-data-source-external-apimib get seam.provides-external-data |
EXTEND — self-fetch via OnFetchData/ProvidesExternalData, threading paging + structured filters; host it in the stock list. Don't build a custom page if the seam fits. | |
| No applicable seam on the target archetype, or the shape truly can't be expressed via a seam | mib get component.<x> # seamSupport: v1-frozen?mib doctor <seam> # is the seam on my target line? |
custom tier (full IRenderableComponentV2 + federated remote) — LAST resort, only after proving no stock component AND no seam fits. | the data-source seams are version-gated — confirm availability on the TARGET line with mib doctor <seam> / mib get seam.<name>, never assume a hardcoded note. |
Load skills: mib-components, mib-datamodel, mib-architecture.
Where does the data come from? — stock/mib.api (configure) vs seam (extend) vs custom; check seamSupport before custom.
Playbook F — verify a feature actually renders (the done-oracle loop)
Confirm a page/feature actually renders and its writes land — beyond structural inventory, which never calls the render endpoint.
| Requirement | Verdict | Gotcha |
|---|---|---|
| BEFORE redeploy — catch the FieldChecker 500 offline | mib validate <MEDIA_TYPE> (refresh the snapshot first: mib export --datamodel). An ERROR here WILL 500 the page: missing base col ID/DATEINS/NAME, Enum w/o ENUMTYPE_ID, Related/Owner/Image w/o RELATEDTABLE. | |
| The done-oracle — does it actually render? | mib inventory |
The FieldChecker 500 lives in an authenticated XHR the CLI can't replay — 'likely renders' still needs you to OPEN the URL to confirm the authenticated render. |
| Get the page's URL (don't guess it) | mib inventory |
|
| Diagnose a failure — the RequestId method | A screenshot/HTTP status ALONE is insufficient: cross-reference the on-screen 'RequestId: xxxx' with docker logs <bff-container> --since 5m \| grep -E 'EROR\|FATL' for the same id — the frontend message strips the useful inner reason. --deep already surfaces these recent lines. |
'This component is being developed and is not available yet.' in the React shell usually = a missing COMPONENT_VIEW_TYPE on the template component, NOT a stock feature that isn't built. |
| Confirm a write actually landed (per Create/Update/Delete) | Confirm ALL THREE, not just the toast: (a) success toast, (b) XHR 2xx, (c) a direct DB read (mib datamodel |
A generic 'Validation failed…' toast doesn't tell you whether the server BLOCKED the write or only warned client-side — check the row. |
Load skills: mib-debug.
Prove a feature renders — validate (static FieldChecker) → inventory --deep (render probe) → open the URL + RequestId log → confirm the DB write.
Playbook G — ContentCriteria (automatic content lists): filters, ordering, groups, query
Understand and build a ContentCriteria (automatic, rule-driven) content list — filters, ordering, group composition, and the resolved query.
| Requirement | Verdict | Gotcha |
|---|---|---|
| The model: blueprint vs selection vs query | You seed the BLUEPRINT (CONTENT_CRITERIA + CONTENT_CRITERIA_FILTERS + CONTENT_CRITERIA_ORDER) = the filter fields + sorts AVAILABLE for one media type; editors create the SELECTION (CONTENT_SELECTION + _FILTERS/_ORDER/_HIGHLIGHTS) = what they chose; the engine compiles the selection to a SQL query at render. | |
| Add a filterable field | One CONTENT_CRITERIA_FILTERS row: TEXT = a raw SQL predicate template with {VALUES} (e.g. ID IN ({VALUES}), or a join-table subquery ID IN (SELECT MOVIE_CONTENT_ID FROM MOVIE_CONTENT_GENRES WHERE MOVIE_GENRE_ID IN ({VALUES}))), SEPARATOR (e.g. a comma), VALUE_TYPE_ID (1 Integer / 2 String / 3 NoValue). The COMPARISON is baked into TEXT — there is NO operator field. |
VALUE_TYPE_ID (value binding) is NOT SELECTION_TYPE_ID (editor UI picker). NoValue(3) needs {CONTEXT_IDS} and forbids {VALUES}. List any {MEDIA_TYPE} names in REQUIRED_MEDIA_TYPES. |
| Filter GROUPS — the AND/OR composition | Two-level boolean tree: filters sharing a GROUP_NUMBER join by that group's GROUP_OPERATOR; groups join by the selection top OPERATOR (1=AND / 2=OR). Example: [A,B in group 1; C in group 2] with defaults gives (A AND B) OR (C). | ASYMMETRIC defaults: unset top => OR, unset group => AND. The tree FLATTENS (group operators ignored) unless 2+ filters share a group number; a group's operator = its FIRST filter's operator. |
| Add a sort option / ordering | One CONTENT_CRITERIA_ORDER row whose TEXT is an ORDER BY fragment (NAME DESC, or a scalar subquery). Applied by RANK — CONTENT_SELECTION_ORDER.ORDER = 1 primary, 2 secondary. Direction is literal ASC/DESC inside the TEXT; there is no direction flag. |
|
| How the final query is mounted | SELECT ID FROM contentCriteria TTL) — a fresh content save can lag the list. |
|
| Wire the component + seed the blueprint | recipe.automatic-content-rows (bind component.content-criteria: CONTENTCRITERIAID + CONTENTSELECTIONFIELD + the parent media type). Fixed pre-applied filter: recipe.add-filter-by-config. Seed the blueprint in a data-model migration UpSeed with PACKAGE helpers / raw AddOrUpdate. | A greenfield has NO vendored AddContentCriteriaFilter helper — see recipe.hard-rules. |
| Highlights + the resolve endpoint | Pinned highlight ids are prepended and BYPASS the filter tree but NOT restrictions; the 250 cap is API-side, not engine-side. Resolve = POST /api/v1/contentselection/process, served by MibServerApi running the MibContentCriteria engine IN-PROCESS (a NuGet lib, not a separate service); live preview + a saved list's render share this one endpoint. | |
| Verify + debug | mib client get <page> --strict (a criteria component that cannot compile its permission is DROPPED silently from the 200 render); mib inventory <page> --deep flags an unbound ParentTemplateComponentKey (renders empty / 403). |
ParentTemplateComponentKey is a STRUCTURAL template-component link, NOT page config; unbound gives 'Missing CREATE' / _GET_ (see mib-debug references/log-signatures.md). |
Load skills: mib-components, mib-datamodel, mib-migrations.
Also check: skills/mib-components/references/content-criteria-engine.md (full mechanics + worked examples) and mcp/research/content-criteria-engine-investigation-2026-07-09.md (source-cited investigation)..
Playbook H — nobody can log in (loop, /account, blank page, empty sidebar)
Get from 'nobody can log in' to the named cause in one command (mib check --login), and know how to confirm it by hand when you need to.
| Requirement | Verdict | Gotcha |
|---|---|---|
| FIRST — let the tool find it | mib check --login walks BOTH browser flows end to end (fresh origin AND tokened origin) and prints the named cause + fix for each break. Deterministic, no browser needed. Everything below is the manual version of what it automates. |
Plain mib check does NOT cover this: it probes endpoints WITHOUT following redirects, so shell 200 only means nginx served index.html — and mib client login is a password grant against /oauth/token using the type-3 client, a path no browser takes. Both were green for six hours over a CMS nobody could log into. |
| BEFORE anything — is your evidence even valid? | Reproduce in a CLEAN browser profile (incognito that has never visited that origin), or headless via the curl ladder in mib-debug/references/login-flow.md. Run BOTH flows: a stack can pass one and fail the other. | shouldUseOauthFlow() is true whenever a refresh token exists, so a previously-used origin silently takes a DIFFERENT code path than a first-time user. Two separate investigations were sent down wrong paths by trusting a used origin as a working control. |
| /app/ loops to /auth/login forever | curl -sk -o /dev/null -w '%{http_code}' $FE/auth/login → expect 302 (the BFF). A 200 text/html is the SPA serving itself = the loop. Fix: proxy location ^~ /auth/ to the BFF. |
The auth container logs NOTHING during this — the loop lives entirely inside the frontend origin. That silence is the discriminator, not a sign of bad credentials. Do NOT 'fix' it by seeding localStorage / wiring start-react.sh. |
| Login succeeds, then dead-ends at /account | Auth log: 'The authorization request was rejected because the redirect_uri was invalid: "…"'. The QUOTED value names which initiator ran. Align API_CLIENTS.REDIRECT_URI + MIB_CLIENT_REDIRECT_URL on the ROOT {fe}/oauth/callback, and add the ingress correlation split. | Only ONE redirect_uri is registrable per client and BOTH auth lines validate it — registering one initiator's value breaks the other browser population. That is the loop-vs-/account seesaw. |
| Login succeeds, lands on a blank page at / | curl -sk -D- $FE/ → expect '302 location: /app/'. Fix: location = / { absolute_redirect off; return 302 /app/; }. |
The BFF's post-login default is returnUrl ?? '/' (AuthenticationController) and nothing serves / unless the ingress bounces it. absolute_redirect off is load-bearing: $host expansion silently drops a non-default port. |
| Everything 500s before login can even start | mib logs --since 30m | grep -E 'MissingAuthClientIdException|InvalidClientApplicationException|Dictionary was not specified' — each names its own missing env var (see building-block.login-flow serviceIdentities). | MissingAuthClientIdException = the BFF's OAuth identity; wire FRONTEND_* (type 1), NOT BACKEND_* (type 3, which /oauth/authorize rejects). InvalidClientApplicationException AFTER 'LoginAttempt success=True' = the auth server's OWN client (AuthPortal) — a different setting entirely. |
| The browser shows the OLD login page (blue MIB card, 'Keep me logged in', no React MFA step) | The Authorization Server renders its legacy Razor login whenever useNewLoginUI is false — and false is still the configuration default on 7.0. Set MIBAUTHORIZATIONSERVERCONFIG_DEFAULT_USENEWLOGINUI=true and FrontendAppRootUrl to the React Auth UI (apps/auth, served under /auth). |
Since the OpenIddict engine the legacy login is not a working fallback, and it is deprecated in 7.0 — an install that never set the key looks like 'the login is broken' rather than 'the wrong UI'. |
| An admin opening /Admin/Users (or /Admin/Groups, /Admin/Instances) on the auth server lands on /Account/AccessDenied | Those are the auth server's legacy Razor admin pages, deprecated in 7.0 (MEDIAIBOX-12394) and denying every user since 6.0.102. Administer from the CMS instead: ~/app/user-list-page, ~/app/group-list-page, ~/app/instance-list-page (building-block.cms-administration). | It is NOT a missing grant: no IS_AUTH_ADMIN or group change fixes it. The CMS pages check the user type of the profile, not the login cookie's roles. |
| Logged in, but the sidebar is empty | mib db query --db datamodel "SELECT OAUTH_CLIENT_ID, OAUTH_CLIENT_TYPE, CONFIGURABLE_PERMISSIONS_URL FROM API_CLIENTS" — the client the BFF presents must be type 1 AND declare a CONFIGURABLE_PERMISSIONS_URL, and the menu grants must hang off THAT client. | The permission MS never compiles a client without CONFIGURABLE_PERMISSIONS_URL, so the sidebar renders {"items":[]} over perfectly good AUTH_PERMISSIONS rows. Derive grant keys from MIB3UX_MENU — a hardcoded list drifts from the migrations that create the menus. |
| Auth 500s on everything, but the database is fine | Confirm the DB answers fast from outside (mib db query … AUTH_SIGNING_CREDENTIALS) and that sys.dm_exec_requests shows no blocking; then docker restart the auth container. |
Its SQL connection pool can wedge at boot when SQL is briefly busy during deploy, and it NEVER self-heals. Restarting cures it every time — this is not a config bug, so don't go looking for a setting. |
| You changed the ingress/template and nothing happened | Rebuild the tool (dotnet build/pack) before deploying — mib resolves templates/ from its BUILD OUTPUT first, so an edited mcp/templates/** is silently ignored by a stale binary. Also bounce nginx after any recreate: it caches upstream IPs at boot. | mib check printing '✓ stack up' proves nginx served index.html and nothing more. It can be fully green over a CMS nobody can log into. |
Load skills: mib-debug, mib-stack.
Playbook I — run ONE component locally behind the stack's ingress
Run one MIB component on your host behind the stack's ingress, and know who is actually serving any given request.
| Requirement | Verdict | Gotcha |
|---|---|---|
| FIRST — who is serving? | mib status (or mib dev route show --json) reports each routable slot as served-by host | container | none. X-Mib-Upstream on any response names the address that answered. |
Do this BEFORE diagnosing a 'healthy container, wrong behavior' bug. A stale host process makes a correct redeploy look like a no-op, and no amount of container-log reading will find the request — it never reached the container. |
| The BFF, locally (the zero-command path) | Declare dev: { fallback: [bff] } in setup.yaml and deploy. Read the allocated port from mib status, bind your process to it, and the ingress follows you. Stop the process and it returns to the container by itself. |
Bind 0.0.0.0, NOT localhost: host-gateway cannot reach a loopback listener on a Linux engine, and the CLI's probe still reports it live. The port is allocated per installation on purpose — a shared convention means one process captures BOTH running stacks. |
| The React shell or a third-party remote | mib dev route set shell / mib dev route clear shell. mib fetch --shell clones the shell source (github.com/agilecontent/MibFrontend), which the pinned image cannot give you. |
These CANNOT use dev.fallback: an nginx upstream carries a host and port but never a path, and the stock shell serves its base=/app/ bundle at root (so the ingress strips /app/) while a local shell already serves under /app/. mib setup validate refuses the declaration rather than half-routing the stack. |
| A locally-run shell must still log in | The ingress serves /app/config.json itself from a file mib deploy renders. Verify: curl -sk https://<frontend-host>/app/config.json — API_URL, AUTH_URL and MIB_CLIENT_SECRET must be non-empty. |
config.json is normally written at CONTAINER boot by the image's start.sh. A local shell serves the repo's own EMPTY public/config.json, and variables-*.js strips empty values BEFORE destructuring — so an empty config is not an error, it is a shell with no login URL. That is the /app/ redirect loop. |
| Up + healthy + 502 | An orphaned EXPLICIT route: all traffic points at a target nothing is listening on. mib doctor exits non-zero and names the revert. |
A FALLBACK route can never produce this — it returns to the container automatically. Only explicit routes can be orphaned, which is why the doctor check is scoped to them. |
| Never revert a live route | If something IS listening on the target, report it and use it. Reverting is only safe when nothing is listening AND the CLI owns the route; an externally-owned dead route is reported, not cleared (a hand-run dev server may be seconds from binding). | This is the one decision an agent must not get wrong — it ships as a tested classifier, not as prose. Clearing a live route kills someone's debugging session with no warning. |
| A breakpoint no longer dies at 60s | The shipped ingress sets proxy_read_timeout 3600s. On a stack deployed before that, redeploy to pick it up. | The old 60s default returned 504 on any held response — and it bit mib debug attach (vsdbg in the CONTAINER), not just host-routed loops. The trade: a genuinely wedged upstream now hangs rather than 504ing, so read mib status instead of treating a timeout as a diagnosis. |
| A POST can still 502 mid-request | Expected. nginx never replays a request already SENT to an upstream. | That is deliberate — a save must not be silently re-run against the container. Connection-refused (the host is simply down) still fails over cleanly, POST included. |
Load skills: mib-debug, mib-stack, mib-frontend.
Playbook J — port a wrapper component to a Core subclass + seams
Move a custom component onto its Core counterpart with seams — and, for each behaviour or value that changes, decide whether the Core is right or the wrapper was before writing code.
| Requirement | Verdict | Gotcha |
|---|---|---|
| Pick the base and the seams | Subclass the Core component of the same archetype (FormComponent, SimpleRelatedListComponent, ListComponent…) and override one seam per behaviour — mib get component.<x> lists its seams; the four worked cases are in extension-migration-cookbook.md. |
A persistence shape that is not a Core relation (N values inside one JSON column) stays custom: use the building blocks there (cookbook Case 3). |
| A value the wrapper wrote that the Core leaves NULL (0, false, '') | Find the value's origin before imitating it: a typed model in the wrapper (int / bool properties) turns NULL into 0/false on every save — a side effect, not a requirement. Then choose per field: (1) ADM DEFAULT_VALUE — what a NEW record starts with (seed ADM_FIELDS; building-block.field-defaults); (2) a backfill — the existing rows (a data migration); (3) keep NULL — when the specification says so; (4) code (TransformData / OnFormSaveBuilt) only when none of the three fits. | mib db profile <TYPE> <FIELD> first: when most rows hold NULL, NULL is the norm, not a gap. mib datamodel <TYPE> <FIELD> lists the commits and issue keys that touched the column — the specification may be in one of them. |
| A field the Core form marks required that the wrapper did not | FieldViewData.IsFieldRequired: the column is NOT NULL and the field is not read-only; a NOT NULL Boolean only on a new record without a DEFAULT_VALUE. mib datamodel <TYPE> marks each field req / req:new. Give the field an ADM DEFAULT_VALUE (or make the column nullable), not code. |
The column's SQL DEFAULT does not lift it: the form never sees that default. |
| The edit header gains a New button | Core behaviour: the shell's header reads addNew from the first form's schema configuration (mergeConfigs), and the BFF stamps addNew = the page's create permission on every FormSchema (DisplaySchema.SetFormsCreateVisibility). A wrapper whose schema carried no such configuration sent no addNew. See component.form → meta.formBehaviors.newButton. | No seam clears it on 7.0/7.1: the stamp runs after MapSchema and ContributeSchema. ALLOW_CREATE false hides it but also refuses /0 (CannotCreateException). Keeping the old header is a Core change. |
| The header's created date moves | createdAtAsUtc is true when DATEINS arrives as Unix seconds: the BFF has already converted createdAt to the user's time zone and the shell prints it as is; when false the shell converts it. | Compare the same record in both builds before calling it a time-zone bug. |
| A copy keeps the source NAME | FormComponent prefixes 'Copy of ' only on NAME's DisplayValue (FormComponent.cs:325 at releases/7.0, :327 at main); the V2 data carries the raw value, so the shell submits the source name. Prefix NAME in TransformData when Context.CopiedFrom > 0 if a copy must differ. | The form shows the source name, so the difference is only visible in the saved row. |
| A page plugin counts the rows of a related block | PersistenceComponentSaveRelatedEntitiesData.CurrentItems is only what the client posted; links are AddedRelateds, created rows NewEntities — a copy with related arrives as one or the other. 'Empty after the save?' is the Core's IsResultingRelatedListEmpty: no CurrentItems, no AddedRelateds, no NewEntities. | Wire the plugin with PERSISTENCE_PLUGIN_ASSEMBLY_NAME / PERSISTENCE_PLUGIN_CLASS_NAME: the PagePersistencePlugin_AssemblyName spelling binds nothing and loads no plugin, silently. |
| Prove the port | Compare stored rows, not screens: run the same saves (edit, revert, create, copy, bulk) on both builds with mib client edit, then read what they wrote (mib db profile, mib db query). |
Render parity is not value parity: a field that shows empty may hold NULL, '' or 0. |
Load skills: mib-components, mib-datamodel.
Port a wrapper component — pick the base and seams → find each value's origin before imitating it → expect the Core's screen behaviours (required Booleans, New, created date, copy name) → count related blocks the way the Core does → prove it on stored rows.