MemberJunction / MemberJunction/MJ
mj app install rejects every first-party BizApp schema (__mj_BizApps*) — requires a 'dangerously' flag for routine installs
- Dominant language
- TSQL
- Stars
- 29
- Forks
- 6
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 323
Description
## Summary
`mj app install` refuses to install any Open App whose schema name starts with `__` — which is every first-party MemberJunction BizApp. The convention those apps ship is `__mj_BizApps*`:
| App | Declared schema |
|---|---|
| bizapps-common | `__mj_BizAppsCommon` |
| bizapps-tasks | `__mj_BizAppsTasks` |
| bizapps-forms | `__mj_BizAppsForms` |
| bizapps-caliber | `__mj_BizAppsCaliber` |
So the installer cannot install the MJ BizApps family on its default path.
## Root cause
`@memberjunction/open-app-engine/dist/install/schema-manager.js` → `ValidateSchemaName`:
```js
if (!options.allowDoubleUnderscore && schemaName.startsWith('__')) {
return { Success: false, ErrorMessage: `Schema names starting with '__' are reserved for MJ internals` };
}
```
`__mj` itself is already protected separately by the `RESERVED_SCHEMAS` set, so the prefix rule is doing additional work beyond protecting internals.
## Reproduction
```
mj app install https://github.com/MemberJunction/bizapps-forms --version 0.2.0
→ Install failed: Failed to install dependency: Schema names starting with '__' are reserved for MJ internals
```
Fails on the first dependency (bizapps-common). Identical in 5.48.0 and 5.49.0.
## Impact
Every install of a first-party BizApp — and every re-install into a new environment (dev, staging, prod) — requires the hidden `--dangerously-ignore-dbl-underscore-schema-rule` flag. Naming a routine, required step "dangerously" trains operators to reach for an escape hatch by reflex, which is exactly the habit the flag exists to discourage.
## Suggested fix
Allow the `__mj_` + suffix pattern (or a first-party allowlist) while continuing to reject bare `__mj` via `RESERVED_SCHEMAS`. If the prefix rule is genuinely wanted for third-party apps, the BizApps schema convention and this guard need to be reconciled — right now they contradict each other.
Contributor guide
Research direction
Start in @memberjunction/open-app-engine/dist/install/schema-manager.js at ValidateSchemaName, then inspect how RESERVED_SCHEMAS and allowDoubleUnderscore are used. Reproduce the mj app install command from the issue and check existing validation coverage. Done means the __mj_ BizApps schemas install through the default path while bare __mj remains rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100