Skip to content

feat: remove all mentions of Notion - #286

Open
angelayzheng wants to merge 3 commits into
stagingfrom
feat/275-remove-notion
Open

angelayzheng wants to merge 3 commits into
stagingfrom
feat/275-remove-notion

Conversation

@angelayzheng

@angelayzheng angelayzheng commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

What this changes

Removes Notion references from documentation, code comments, fixtures, and tests while preserving historical migrations. New migrations reassign existing Notion documents to web, delete Notion identity rows, and remove the source and provider registry entries; new URLs use ordinary web-link handling.

Why

UTMIST no longer uses Notion for internal documentation.

Closes #275.

Zone

root · discord-bot · services/connectors · services/documentation-system · services/team-tracking

This deliberately spans zones because removing the integration requires coordinated registry migrations, fixture updates, and documentation cleanup across the platform.

  • READMEs and service documentation remove obsolete references and examples.
  • New migrations perform the database cleanup without rewriting migration history.
  • Tests and fixtures reflect the remaining providers and sources, using YouTube for fetch-disabled cases.
  • contracts/types.py and src/backfill.py update outdated examples.
  • AGENTS.md records the new migration heads and narrowly permits registry-only rollback for documentation-system 009 and team-tracking 011. Both services' docs/CONTRIBUTING.md link to that shared rule so their migration instructions agree with the intentional retirement cleanup.
  • Deployment documentation explains cleanup and rollback behavior.

How to verify

Against disposable local PostgreSQL databases:

(cd services/team-tracking && docker compose up -d postgres)
(cd services/documentation-system && docker compose up -d postgres)

(cd services/team-tracking && \
  uv run alembic upgrade head && \
  uv run alembic downgrade -1 && \
  uv run alembic upgrade head && \
  uv run pytest && \
  uv run ruff check . && \
  uv run ruff format --check .)

(cd services/documentation-system && \
  uv run alembic upgrade head && \
  uv run alembic downgrade -1 && \
  uv run alembic upgrade head && \
  RUN_PG_TESTS=1 RUN_PG_MIGRATION_TESTS=1 uv run pytest && \
  uv run ruff check . && \
  uv run ruff format --check .)

(cd discord-bot && npm ci && npm test && npm run lint && npm run format:check)

git grep -i notion

The final search should return only the unchanged historical seed migrations.

Regression tests cover document preservation, URL fallback to web, deletion of only the retired identity rows, and restoration of registry entries on downgrade.

Local review verification passed both complete affected Python suites, including PostgreSQL integration and migration tests, the full bot suite, and the relevant lint/format checks. Additional checks against disposable PostgreSQL 16 with pgvector exercised populated upgrade/downgrade/re-upgrade paths: active and inactive documents, tags, grants, content and chunks survive; only retired identity rows are removed, while other identities, people, memberships and groups survive. Python src/contracts imports were pinned to the isolated review worktree and their file paths verified. Provider calls used fakes.

Checklist

  • Branched off staging and targeting staging.
  • Ran the service's full test suite locally, including Postgres.
  • uv run ruff check . and uv run ruff format --check . clean.
  • Read and followed both services' docs/CONTRIBUTING.md guidance, including the explicit retirement-cleanup rollback exceptions.
  • Docs updated where this change makes them wrong.

Deployment notes

  • Migration — apply documentation-system revision 009 and team-tracking revision 011. PostgreSQL upgrade/downgrade/re-upgrade checks passed locally on disposable databases with existing rows; no deployed database was changed during review.
  • Data cleanup — take database backups before applying the migrations. Downgrade restores registry entries only; it does not recover deleted identity rows or previous document source assignments.
  • Consumer impact — Notion disappears from /sources and /providers. Existing documents remain available as web documents; former Notion identity mappings are removed.

Anything you're unsure about

The retirement cleanup is intentionally permanent. The explicit exceptions in AGENTS.md match the migration code and deployment notes; all other migrations retain the normal reversibility requirement. Populated PostgreSQL checks confirmed the documented behavior.

@github-actions github-actions Bot added size/l < 500 lines changed zone: discord-bot Owned by the discord-bot zone (docs/CODE-OWNERSHIP.md) zone: services/connectors Owned by the services/connectors zone (docs/CODE-OWNERSHIP.md) zone: services/documentation-system Owned by the services/documentation-system zone (docs/CODE-OWNERSHIP.md) zone: services/team-tracking Owned by the services/team-tracking zone (docs/CODE-OWNERSHIP.md) zone: root Owned by the root zone (docs/CODE-OWNERSHIP.md) and removed size/l < 500 lines changed labels Oct 18, 2026
@github-actions github-actions Bot added the size/l < 500 lines changed label Oct 18, 2026

@qiuethan qiuethan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete removal change and approved the intentional retirement cleanup.

The follow-up documentation commit makes documentation-system 009 and team-tracking 011 explicit exceptions to data rollback: downgrade restores registry entries only. Both CONTRIBUTING guides now link to that shared rule; other migrations retain the normal reversibility requirement. Backup/recovery limitations remain documented.

Verification passed against disposable PostgreSQL 16 with pgvector: populated upgrade/downgrade/re-upgrade checks preserved documents, tags, grants, content, chunks and unrelated directory records, while removing only the retired identities. PostgreSQL-backed API checks confirmed registry removal and ordinary web handling for retired URLs. Both complete affected Python suites, the full bot suite and relevant lint/format checks passed; Python src/contracts imports were pinned and their paths verified. External providers were faked.

No actionable findings remain. The latest commit only changes migration guidance; the verified migration implementations are unchanged.

All CI checks passed on the reviewed head 4f43f30.

@qiuethan qiuethan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed 4f43f30. No additional standalone findings; the documented registry-only rollback behavior remains intentional.

Focused offline migration, provider, in-memory adapter, URL normalization, and backfill tests passed against isolated snapshots with source imports verified. Current CI checks are green. Postgres suites were not rerun in this review.

Merge coordination: this PR and #282 both introduce documentation-system revision 009. If this PR merges first, #282 must rebase, renumber its migration to the next sequential revision, update down_revision, and verify upgrade/downgrade/upgrade before merging.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l < 500 lines changed zone: discord-bot Owned by the discord-bot zone (docs/CODE-OWNERSHIP.md) zone: root Owned by the root zone (docs/CODE-OWNERSHIP.md) zone: services/connectors Owned by the services/connectors zone (docs/CODE-OWNERSHIP.md) zone: services/documentation-system Owned by the services/documentation-system zone (docs/CODE-OWNERSHIP.md) zone: services/team-tracking Owned by the services/team-tracking zone (docs/CODE-OWNERSHIP.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[task] Remove all mentions of Notion

2 participants