honcho/scripts
Phil 117a83de96 review: fix migration execution + index/FK consistency for tenant_id schema
- Move the shared-schema bootstrap out of the Alembic chain into a standalone
  script (scripts/bootstrap_shared_schema.py). As a chained revision it collided
  with the per-tenant history on `alembic upgrade head` (DuplicateTable) and would
  have run on existing single-tenant instances via init_db(). It is now run
  explicitly against the fresh shared DB; the migration track owns provisioning.
- Run the bootstrap in AUTOCOMMIT so 1000+ partition creations plus composite FKs
  don't exhaust max_locks_per_transaction in a single transaction.
- Derive the partitioned-table set from the models instead of hand-listing it
  (a hand list drifts and yields a partitioned parent with zero partitions).
- message_embeddings: index (message_id, tenant_id) since message_id lookups are
  cross-tenant; restore the composite workspaces FK for parity with peer tables.
- messages: ix_messages_peer_lookup = (tenant_id, workspace_name, peer_name,
  created_at) to serve the peer-history query without a sort.
- QueueItem.__repr__: include tenant_id.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 13:20:50 -04:00
..
__init__.py v1.0.0 Release Candidate (#95) 2025-04-10 13:59:40 -04:00
bootstrap_shared_schema.py review: fix migration execution + index/FK consistency for tenant_id schema 2026-09-02 13:20:50 -04:00
configure_embeddings.py Make embeddings configurable (#678) 2026-05-14 15:03:35 -04:00
dialectic_cost_calculator.py fix: increase throughput of unit tests by changing behavior db teardown (#949) 2026-07-29 11:19:41 -04:00
ensure_alembic_tests.py feat: introduce alembic migration verification (#238) 2025-10-23 16:24:35 -04:00
generate_jwt.py feat: add generate_jwt.py script for creating scoped JWTs (#757) 2026-06-09 13:49:55 -04:00
generate_jwt_secret.py feat: introduce alembic migration verification (#238) 2025-10-23 16:24:35 -04:00
generate_message_embeddings.py fix: use model-aware tokenizer and skip empty messages - DEV-1238 (#647) 2026-05-11 17:22:50 -04:00
jsonl_to_json.py feat: agentic dreamer and agentic dialectic (#309) 2026-01-12 15:12:17 -05:00
migrate_db.py Alembic genesis (#106) 2025-05-13 12:26:58 -04:00
provision_db.py fix: use engine args on both engines in db.py (#147) 2025-06-27 15:26:29 -04:00
run_alembic_tests.py Oolong Benchmark (#323) 2026-02-23 16:55:59 -05:00
test_reasoning_levels.py fix: increase throughput of unit tests by changing behavior db teardown (#949) 2026-07-29 11:19:41 -04:00
update_version.py v3.0.11 Release Candidate (#841) 2026-06-24 12:44:13 -04:00