Skip to content

Name the tenant boundary account in code - #1426

Merged
Kevinjohn merged 9 commits into
mainfrom
feature/account-vocabulary
Oct 1, 2026
Merged

Kevinjohn merged 9 commits into
mainfrom
feature/account-vocabulary

Conversation

@Kevinjohn

@Kevinjohn Kevinjohn commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Part of #1409 (T14). Merge predecessor: #1425 (this PR's base branch, feature/comment-voice-sweep).

  • One name per concept: code says account, the interface says "company", the wire says accountId. docs-src/reference/conventions.md holds the vocabulary table: account, company, accountId, the workspaceId account-port alias, resource, member, principal, the Better Auth user row, provider account and session. The section in development.md now points to it.
  • tenantStore.ts, tenantIntegrity.ts and tenantIndexes.ts become accountStore.ts, accountIntegrity.ts and accountIndexes.ts, with their tests and exported names. SQL text, trigger and index names, migration names and error messages are byte-identical; the migration checksum pins pass unchanged.
  • app.orgs.test.ts becomes app.companyCreation.test.ts; the /api/orgs route is unchanged.
  • The glossary gains a "resource" entry; development.md and the privacy stories cite the new paths.

No wire, route, schema or migration change.

Validation: Integrated Batch 4 tip (all five Batch 4 branches): pnpm run gate:all and pnpm run e2e (290 passed) on Node 24.16.0. Later changes on the stack touch only comments, the comment checker and two reference pages; on the final tip typecheck, lint, format, the comment-voice check and its test, ui:check, docs:build and pnpm run gate:server pass. Independently reviewed; findings applied. Migration checksum pins pass unchanged.

Merge order

  1. Route support to Discussions and remove PR screenshots #1411, Add project status, comparison, testing and philosophy pages #1412, Archive changelog sections before 0.41.0-alpha.3 #1414 (independent)
  2. Add a first-change path for contributors #1413 (after Archive changelog sections before 0.41.0-alpha.3 #1414), Restate the comment standard as numbered voice rules #1415, Reduce configuration and hide password MFA #1416
  3. Rename SMALLSASS_ACCOUNT_ settings to CAPACITYLENS_ #1417 → Add an init command that writes the environment file #1418
  4. Retire unused settings and derive engagement grouping #1419 → Move diagnostics to an Owner and Admin page #1420 → Reshape the documentation into four role guides #1421 → Use @/ for app imports that leave their folder #1422 → Consolidate server test scaffolding #1423 → Normalise server route handlers and reply messages #1424 → Apply the comment-voice rules and check them in the gate #1425 (Apply the comment-voice rules and check them in the gate #1425 also after Restate the comment standard as numbered voice rules #1415) → Name the tenant boundary account in code #1426

Merge predecessor for this PR: #1425.

Rename tenantStore, tenantIntegrity and tenantIndexes (and their tests) to
accountStore, accountIntegrity and accountIndexes, and rename their exported
Tenant/TENANT identifiers to account equivalents. SQL text, trigger and index
names, migration names and error messages are unchanged, so released
migration checksums still match.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Rename app.orgs.test.ts to app.companyCreation.test.ts and say company
instead of org in its test titles. The POST /api/orgs route keeps its URL.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Move the code, UI and wire naming table to conventions.md as one table
covering account, company, accountId, workspaceId, resource, member,
principal, user, provider account and session. The development guide's
section now points to it, and its storage paths follow the renamed modules.
Add a user-facing glossary entry for resource.

Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
…ulary

# Conflicts:
#	server/src/accountIndexes.ts
@Kevinjohn

Copy link
Copy Markdown
Owner Author

Polish review: no P1/P2 findings.

  • Independent review: only TypeScript identifiers, types and comments changed. Trigger and index names, SQL bodies, migration names, error messages, wire fields, storage keys and test ids are unchanged, so released migration checksums hold.
  • Ladder passes on Node 24: format, lint, typecheck, file sizes and server tsc, account conformance, policy:comment-voice and the full server suite (2,654 tests).

Merge order for this batch: #1411, #1412, #1414 → #1413, #1415, #1416 → #1417 → #1418, #1419 → #1420 → #1421 → #1422 → #1423 → #1424 → #1425 → #1426. Predecessor: #1425.

@Kevinjohn Kevinjohn added polish-done Polish review complete and removed polish-in-progress Polish review running labels Oct 1, 2026
…ulary

# Conflicts:
#	docs/reference/conventions.html
#	docs/reference/development.html
#	docs/reference/glossary.html
Signed-off-by: Kevinjohn Gallagher <kevinjohngallagher@hotmail.com>
@Kevinjohn
Kevinjohn merged commit 33489b7 into main Oct 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

polish-done Polish review complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant