Import Bubble export trees into PageOps and finish CSOC-WP-0001

Add import_content_tree management command and import_tree helper for
ADR-0004 sample trees. Document reichelag rehearsal lossiness; mark T02/T04
and the bubble exit workplan finished.
This commit is contained in:
tegwick 2026-08-13 12:48:55 +02:00
parent affed64839
commit 8447943dc0
6 changed files with 523 additions and 35 deletions

View file

@ -72,8 +72,10 @@ parent: "" # context_custom_article when set
## Next
1. Optional: longer crawl / pagination to fill more per-space articles.
2. **T04 rehearsal:** PageOps import of local tree into app content dir (CSOC-WP-0006).
3. Member → NetKingdom identity mapping for membership lists (no passwords).
2. ~~**T04 rehearsal:** PageOps import~~ → done 2026-08-13
(`docs/migration/rehearsal-reichelag-2026-08-13.md`, `import_content_tree`).
3. Member → NetKingdom identity mapping for membership lists (no passwords).
4. Multi-space import over full corpus (residual after single-space rehearsal).
## Related

View file

@ -0,0 +1,78 @@
# Migration rehearsal — reichelag sample (2026-08-13)
| Field | Value |
|-------|--------|
| Workplan | CSOC-WP-0001-T04 |
| Depends on | CSOC-WP-0006 PageOps landing pad |
| Source (local only) | `~/.config/coulomb-social/auth/exports/corpus-202608131015057/trees/reichelag/` |
| Destination | `CONTENT_ROOT/spaces/reichelag/` (local; not committed) |
| Command | `manage.py import_content_tree` |
**Do not commit** source trees or imported content — private business notes.
## Command
```bash
export CONTENT_ROOT="$PWD/var/content-rehearsal" # or default var/content
uv run python manage.py migrate
# sign-in once or ensure a Member exists for --member-subject
uv run python manage.py import_content_tree \
~/.config/coulomb-social/auth/exports/corpus-202608131015057/trees/reichelag \
--tenant tenant:coulomb \
--member-subject <your-oidc-subject> \
--replace
```
Dry-run:
```bash
uv run python manage.py import_content_tree PATH/TO/tree --dry-run
```
## Result (this run)
| Metric | Value |
|--------|------:|
| Pages copied | 30 (1 index + 29 articles) |
| Assets copied | 29 (logo/visual images) |
| Space row | Created `reichelag` title **ReichelAG** |
| Render path | `load_space_page``source=content-plane` |
| Index title | ReichelAG |
| Sample page | frontmatter title + markdown body render OK |
| Visual files | Present under `assets/` for pages that declare them |
## Lossiness and residuals
| Gap | Severity | Note |
|-----|----------|------|
| Bubble `Slug` vs export slug | low | Bubble space slug was `new-space-36`; export/tree uses friendly `reichelag` |
| Space display title | medium | Not first-class on `custom.space`; taken from index frontmatter / guess |
| Membership list | medium | Only local owner from `--member-subject`; Bubble `members_list_user` not mapped to NetKingdom |
| Parent/article graph | medium | Frontmatter `parent` kept as opaque bubble id; no outline/include graph yet |
| Full corpus coverage | high | Only **one** dense sample tree; 70 other spaces not imported; many spaces have incomplete article dumps |
| Chunk / Research UI | deferred | Bubble `pg_chunk` / Research surfaces not in tree |
| Workflows / privacy flags | deferred | `isprivate_boolean` not enforced in rebuild authz beyond tenant membership |
| Identity | blocked elsewhere | Member transfer assist / public registration (CSOC-IN-0001) |
| Production path | deferred | Rehearsal is local `CONTENT_ROOT`; cluster import needs operator CONTENT_ROOT volume + tenant choice |
## What worked losslessly (for this tree)
- Page **Title / Abstractor / Visual** frontmatter → PageOps + Space index fields
- Markdown **body** → content-plane render (bleach markdown pipeline)
- Relative **visual** assets under `assets/`
- **Page list** via `list_pages`
- Idempotent re-import with `--replace`
## Acceptance against CSOC-WP-0001
- [x] At least one migration rehearsal run
- [x] Residual gaps listed (above)
- [ ] Bulk multi-space import + NK membership map — residual
- [ ] Apex cutover — still gated on product parity + self-registration
## Related
- Export progress: `docs/migration/export-progress-2026-08-13.md`
- Field map: `docs/migration/field-map-from-session-2026-08-13.md`
- PageOps: `coulomb_social/apps/spaces/pageops.py`, `import_tree.py`
- Stage-1 cut: `docs/decisions/2026-08-12-feature-cut-stage-1.md`