# 0040 — Bootstrap — Module Triage

**Milestone:** TBD
**Owner:** TBD
**Status:** planning

## Goal

Consolidates 8 legacy issues from the
`MetaDrivenPlatform4AI` repo that share the same module / area label,
so they can be triaged together by the corresponding domain IC.

Module label scope: `module/bootstrap`.

## Acceptance criteria

- [ ] All `ported` children below have a Story or Bug filed in pingcap-pack
- [ ] All filed Stories / Bugs have a linked test (existing or to-write task with scaffold)
- [ ] Engineering review confirms which children are still applicable under the new project's design

## Stories / Bugs (filed as GitHub issues)

8 children classified `ported`. Phase 3/4 will file each as
a Story (capability) or Bug (defect) in this repo and back-reference the
legacy issue. Initial child list:

- [ ] #TBD — legacy MetaDrivenPlatform4AI#381 — perf: backend startup takes 10-15 min due to unconditional permission seeding
- [ ] #TBD — legacy MetaDrivenPlatform4AI#670 — Review PermRunReports bootstrap assignment — analytics accessible to all profiles
- [ ] #TBD — legacy MetaDrivenPlatform4AI#680 — perf: optimize startup slow queries — assertFieldColumnMapping N+1 and LOWER(JSON_CONTAINS)
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1099 — persistence: BatchUpsertProfiles should include UserType explicitly (defense-in-depth)
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1219 — docs: document one-way-door when data-spec sets IsCustomized=1 on reconcileDiscoveredFieldOverrides entries
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1605 — [Architecture] _System_* table classification audit: 20+ tables mis-classified; under-implemented; or tenant-leaking
- [ ] #TBD — legacy MetaDrivenPlatform4AI#1609 — [Architecture] Tenant-specific metadata leaking into PlatformCore/PlatformUX/PlatformConfig packs — binary ships PingCAP/TiDB identifiers to every org
- [ ] #TBD — legacy MetaDrivenPlatform4AI#2149 — refactor(bootstrap): keep only generic bootstrap behavior in public core

## Non-goals

- Re-port legacy fixes that are no longer relevant under the new project's
  pure-platform design — engineering identifies these case-by-case
- Layer-belonging classification (L0 / L1 / L2) — engineering's job

## History

- 2026-05-03 — created during Phase 2 from clustered orphan issues.

## Stories (filed in Phase 3)

_Pending Phase 3 synthesis._
