ferro-orm 0.21.2__tar.gz → 0.23.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ferro_orm-0.23.0/AGENTS.md +561 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/CHANGELOG.md +441 -0
- ferro_orm-0.23.0/CONTEXT.md +424 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/Cargo.lock +46 -44
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/Cargo.toml +2 -2
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/PKG-INFO +8 -3
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/README.md +4 -2
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/crates/ferro-ddl-lowering/src/lib.rs +3313 -553
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/crates/ferro-ddl-lowering/src/policy_expr.rs +35 -11
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/crates/ferro-migrate/Cargo.toml +2 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/directory.rs +1642 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/crates/ferro-migrate/src/emit.rs +396 -389
- ferro_orm-0.23.0/crates/ferro-migrate/src/generate/backfill.rs +1506 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/generate/columns.rs +934 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/generate/downs.rs +514 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/generate/enums.rs +226 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/generate/mod.rs +4392 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/generate/rebuild.rs +1115 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/generate/renames.rs +109 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/generate/stages.rs +359 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/generate/staging.rs +404 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/lib.rs +803 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/plan.rs +4959 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/render.rs +810 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/revision.rs +740 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/revision_tests.rs +774 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/run_plan/step_class.rs +1625 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/run_plan.rs +5576 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/snapshot.rs +343 -0
- ferro_orm-0.23.0/crates/ferro-migrate/src/tests.rs +6246 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/crates/ferro-schema-ir/src/lib.rs +232 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0010-create-pass-owns-only-missing-tables.md +2 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0011-label-addition-update-gated-append-only.md +2 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0014-table-checks-sqlite-create-only.md +2 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0020-enum-type-drop-on-downgrade.md +2 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0021-enum-type-reuse-on-upgrade.md +2 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0022-enum-type-creation-for-add-column.md +2 -0
- ferro_orm-0.23.0/docs/adr/0023-schema-snapshots-outlive-ir-versions.md +12 -0
- ferro_orm-0.23.0/docs/adr/0024-data-steps-are-atomic-or-chunked.md +20 -0
- ferro_orm-0.23.0/docs/adr/0025-historical-models-see-the-union-of-adjacent-snapshots.md +19 -0
- ferro_orm-0.23.0/docs/adr/0026-one-migration-renders-ddl-per-target-dialect.md +13 -0
- ferro_orm-0.23.0/docs/adr/0027-the-generator-diffs-the-ddl-bearing-projection-of-the-ir.md +5 -0
- ferro_orm-0.23.0/docs/adr/0028-python-sequences-a-run-rust-decides-and-executes.md +20 -0
- ferro_orm-0.23.0/docs/adr/0029-the-run-lock-dies-with-the-process.md +25 -0
- ferro_orm-0.23.0/docs/adr/0030-a-finished-step-is-re-recorded-an-unfinished-one-may-be-edited.md +30 -0
- ferro_orm-0.23.0/docs/adr/0031-a-baseline-is-verified-and-has-no-override.md +42 -0
- ferro_orm-0.23.0/docs/adr/0032-renames-are-declared-on-the-model-and-recorded-in-the-snapshot.md +38 -0
- ferro_orm-0.23.0/docs/adr/0033-irreversibility-is-declared-and-a-down-reaches-the-parent-snapshot.md +53 -0
- ferro_orm-0.23.0/docs/adr/0034-sqlite-changes-alter-cannot-express-are-table-rebuilds.md +96 -0
- ferro_orm-0.23.0/docs/adr/0035-a-data-step-declares-its-shape-and-an-unwritten-one-is-a-todo.md +64 -0
- ferro_orm-0.23.0/docs/adr/0036-config-names-databases-not-connections.md +81 -0
- ferro_orm-0.23.0/docs/adr/0037-step-numbers-are-shared-across-dialects-and-a-skipped-backfill-is-a-guard.md +54 -0
- ferro_orm-0.23.0/docs/adr/0038-connect-never-runs-migration-files-and-a-tracked-database-refuses-auto-migrate.md +74 -0
- ferro_orm-0.23.0/docs/adr/0039-config-is-ferro-toml-or-pyproject-and-is-read-through-ferrosettings.md +49 -0
- ferro_orm-0.23.0/docs/adr/0040-a-migration-is-applied-whole-and-staging-is-the-editing-cadence.md +52 -0
- ferro_orm-0.23.0/docs/adr/0041-the-alembic-bridge-translates-the-one-planner.md +113 -0
- ferro_orm-0.23.0/docs/adr/0042-not-null-on-postgres-is-staged-after-the-backfill.md +51 -0
- ferro_orm-0.23.0/docs/adr/0043-foreign-keys-and-checks-on-an-existing-postgres-table-are-staged.md +86 -0
- ferro_orm-0.23.0/docs/adr/0044-indexes-on-an-existing-postgres-table-are-built-concurrently-and-ddl-waits-for-locks-under-a-timeout.md +91 -0
- ferro_orm-0.23.0/docs/adr/0045-the-test-harness-carries-the-targets-the-application-api-refuses.md +70 -0
- ferro_orm-0.23.0/docs/adr/0046-a-sqlite-table-rebuild-sits-in-its-phase-step-and-a-table-is-copied-once-per-phase.md +83 -0
- ferro_orm-0.23.0/docs/adr/0047-the-reconciliation-pass-honours-rename-hints.md +54 -0
- ferro_orm-0.23.0/docs/adr/0048-a-run-is-a-rust-object-holding-the-lock-the-directory-and-the-plan.md +88 -0
- ferro_orm-0.23.0/docs/adr/0049-the-auto-migrate-pass-reports-what-it-executed.md +53 -0
- ferro_orm-0.23.0/docs/adr/0050-a-plans-two-sides-are-adapters-and-a-down-is-the-ups-artifacts-planned-back.md +162 -0
- ferro_orm-0.23.0/docs/adr/0051-every-door-plans-a-redefined-index-and-a-removed-foreign-key.md +45 -0
- ferro_orm-0.23.0/docs/adr/0052-plan-reports-are-typed-and-the-generator-refuses-what-no-op-answers.md +69 -0
- ferro_orm-0.23.0/docs/adr/0053-a-column-is-retired-one-release-before-it-is-dropped.md +35 -0
- ferro_orm-0.23.0/docs/adr/0054-a-steps-class-is-recorded-when-it-is-applied.md +30 -0
- ferro_orm-0.23.0/docs/examples/_migrations_project.py +141 -0
- ferro_orm-0.23.0/docs/examples/migrations_adopting.py +149 -0
- ferro_orm-0.23.0/docs/examples/migrations_backfill.py +76 -0
- ferro_orm-0.23.0/docs/examples/migrations_backfill_annotated.py +79 -0
- ferro_orm-0.23.0/docs/examples/migrations_quickstart.py +50 -0
- ferro_orm-0.23.0/docs/examples/migrations_quickstart_annotated.py +53 -0
- ferro_orm-0.23.0/docs/examples/migrations_rename.py +62 -0
- ferro_orm-0.23.0/docs/examples/migrations_rename_annotated.py +64 -0
- ferro_orm-0.23.0/docs/examples/migrations_retire.py +71 -0
- ferro_orm-0.23.0/docs/examples/migrations_retire_annotated.py +74 -0
- ferro_orm-0.23.0/docs/examples/migrations_retire_label.py +75 -0
- ferro_orm-0.23.0/docs/examples/migrations_retire_label_annotated.py +76 -0
- ferro_orm-0.23.0/docs/examples/migrations_testing.py +83 -0
- ferro_orm-0.23.0/docs/examples/migrations_testing_annotated.py +86 -0
- ferro_orm-0.23.0/docs/pages/api/connection.md +57 -0
- ferro_orm-0.23.0/docs/pages/api/exceptions.md +125 -0
- ferro_orm-0.23.0/docs/pages/api/migrations.md +91 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/api/model.md +10 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/api/queries.md +3 -1
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/concepts/architecture.md +4 -4
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/concepts/backends.md +3 -3
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/faq.md +4 -4
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/getting-started/installation.md +6 -4
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/getting-started/next-steps.md +1 -1
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/getting-started/quickstart.md +1 -1
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/guide/connections.md +3 -3
- ferro_orm-0.23.0/docs/pages/guide/migrations.md +40 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/guide/models-and-fields.md +8 -6
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/guide/queries.md +1 -1
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/guide/relationships.md +1 -1
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/guide/row-level-security.md +39 -46
- ferro_orm-0.23.0/docs/pages/guide/schema/alembic.md +135 -0
- ferro_orm-0.23.0/docs/pages/guide/schema/auto-migrate.md +286 -0
- ferro_orm-0.23.0/docs/pages/guide/schema/data-steps.md +287 -0
- ferro_orm-0.23.0/docs/pages/guide/schema/deploying.md +248 -0
- ferro_orm-0.23.0/docs/pages/guide/schema/migrations.md +466 -0
- ferro_orm-0.23.0/docs/pages/guide/schema/overview.md +96 -0
- ferro_orm-0.23.0/docs/pages/guide/schema/testing.md +87 -0
- ferro_orm-0.23.0/docs/pages/howto/adopting-migrations.md +139 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/howto/migrate-from-sqlalchemy.md +13 -7
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/howto/multiple-databases.md +1 -1
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/howto/testing.md +6 -0
- ferro_orm-0.23.0/docs/pages/reference/cli.md +172 -0
- ferro_orm-0.23.0/docs/pages/reference/configuration.md +149 -0
- ferro_orm-0.23.0/docs/research/migration-cli-config-prior-art.md +564 -0
- ferro_orm-0.23.0/docs/research/migration-prior-art.md +772 -0
- ferro_orm-0.23.0/docs/research/sqlite-schema-change-recipes.md +685 -0
- ferro_orm-0.23.0/docs/research/sqlx-migrate-internals.md +394 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/alembic-add-column-enum-type-undefined.md +5 -4
- ferro_orm-0.23.0/docs/solutions/issues/postgres-contention-was-a-guard-race.md +80 -0
- ferro_orm-0.23.0/docs/solutions/issues/test-module-cleanup-disarms-alembic-bridge.md +75 -0
- ferro_orm-0.23.0/docs/solutions/patterns/cross-emitter-ddl-parity.md +164 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/derived-type-and-naming-decision-table.md +10 -1
- ferro_orm-0.23.0/docs/solutions/patterns/historical-models-and-the-registry-swap.md +85 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/json-family-factory-migrate-backfill.md +3 -1
- ferro_orm-0.23.0/docs/solutions/patterns/one-planner-and-live-facts.md +69 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/pyproject.toml +12 -1
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/backend.rs +73 -1
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/codec_plan.rs +5 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/connection.rs +101 -5
- ferro_orm-0.23.0/src/ddl_exec.rs +1368 -0
- ferro_orm-0.23.0/src/errors.rs +1233 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/__init__.py +163 -15
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/_annotation_utils.py +15 -2
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/_bind_payload.py +3 -1
- ferro_orm-0.23.0/src/ferro/_core.pyi +778 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/base.py +52 -1
- ferro_orm-0.23.0/src/ferro/cli/__init__.py +151 -0
- ferro_orm-0.23.0/src/ferro/cli/exit_codes.py +23 -0
- ferro_orm-0.23.0/src/ferro/cli/migrate.py +1004 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/columns.py +91 -2
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/fields.py +34 -1
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/ir/compiler.py +197 -17
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/metaclass.py +297 -9
- ferro_orm-0.23.0/src/ferro/migrations/__init__.py +76 -0
- ferro_orm-0.23.0/src/ferro/migrations/_baseline.py +241 -0
- ferro_orm-0.23.0/src/ferro/migrations/_drift.py +452 -0
- ferro_orm-0.23.0/src/ferro/migrations/alembic.py +737 -0
- ferro_orm-0.23.0/src/ferro/migrations/chunked.py +306 -0
- ferro_orm-0.23.0/src/ferro/migrations/context.py +179 -0
- ferro_orm-0.23.0/src/ferro/migrations/errors.py +111 -0
- ferro_orm-0.23.0/src/ferro/migrations/generate.py +532 -0
- ferro_orm-0.23.0/src/ferro/migrations/historical.py +346 -0
- ferro_orm-0.23.0/src/ferro/migrations/layout.py +285 -0
- ferro_orm-0.23.0/src/ferro/migrations/report.py +497 -0
- ferro_orm-0.23.0/src/ferro/migrations/rerecord.py +153 -0
- ferro_orm-0.23.0/src/ferro/migrations/runner.py +1143 -0
- ferro_orm-0.23.0/src/ferro/migrations/scaffold.py +486 -0
- ferro_orm-0.23.0/src/ferro/migrations/steps.py +535 -0
- ferro_orm-0.23.0/src/ferro/migrations/target.py +148 -0
- ferro_orm-0.23.0/src/ferro/migrations/testing.py +458 -0
- ferro_orm-0.23.0/src/ferro/migrations/translate.py +429 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/models.py +53 -2
- ferro_orm-0.23.0/src/ferro/pass_report.py +151 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/query/nodes.py +6 -1
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/query/wire.py +27 -5
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/registry.py +123 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/relations/__init__.py +62 -5
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/session.py +2 -0
- ferro_orm-0.23.0/src/ferro/settings.py +910 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/introspect.rs +550 -51
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/lib.rs +13 -9
- ferro_orm-0.23.0/src/live_ir.rs +648 -0
- ferro_orm-0.23.0/src/migrate.rs +1584 -0
- ferro_orm-0.23.0/src/migrations_ffi.rs +1403 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/naming_ffi.rs +10 -238
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/operations.rs +72 -16
- ferro_orm-0.23.0/src/run.rs +3850 -0
- ferro_orm-0.23.0/src/schema.rs +1010 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/state.rs +67 -4
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/_alembic_harness.py +107 -6
- ferro_orm-0.23.0/tests/_casebook.py +305 -0
- ferro_orm-0.23.0/tests/_pass_harness.py +90 -0
- ferro_orm-0.23.0/tests/_pg_sequence.py +36 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/conftest.py +100 -2
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/db_backends.py +54 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/README.md +7 -3
- ferro_orm-0.23.0/tests/fixtures/ir_vectors/schema_rename_hints_v2.json +111 -0
- ferro_orm-0.23.0/tests/fixtures/ir_vectors/schema_retired_column_v2.json +127 -0
- ferro_orm-0.23.0/tests/static_fixtures/good_migrations_api.py +54 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_alembic_enum_type_drop.py +93 -117
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_alembic_render_execute.py +4 -3
- ferro_orm-0.23.0/tests/test_alembic_translator.py +1593 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_alembic_typing.py +19 -6
- ferro_orm-0.23.0/tests/test_auto_migrate.py +4868 -0
- ferro_orm-0.23.0/tests/test_chunked_steps.py +804 -0
- ferro_orm-0.23.0/tests/test_cli_init.py +744 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_composite_index.py +3 -1
- ferro_orm-0.23.0/tests/test_connect_guard.py +392 -0
- ferro_orm-0.23.0/tests/test_cross_emitter_parity.py +2032 -0
- ferro_orm-0.23.0/tests/test_data_steps.py +657 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_db_backends.py +62 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_db_type_cross_emitter_parity.py +49 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_db_type_integration.py +4 -5
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_db_type_validation.py +23 -0
- ferro_orm-0.23.0/tests/test_ddl_lock_timeout.py +643 -0
- ferro_orm-0.23.0/tests/test_ddl_unprepared.py +71 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_docs_examples.py +8 -2
- ferro_orm-0.23.0/tests/test_docs_migrations.py +274 -0
- ferro_orm-0.23.0/tests/test_generate_backfill.py +773 -0
- ferro_orm-0.23.0/tests/test_generate_columns.py +641 -0
- ferro_orm-0.23.0/tests/test_generate_enum_removal.py +427 -0
- ferro_orm-0.23.0/tests/test_generate_enums.py +509 -0
- ferro_orm-0.23.0/tests/test_generate_indexes.py +217 -0
- ferro_orm-0.23.0/tests/test_generate_postgres_staging.py +434 -0
- ferro_orm-0.23.0/tests/test_generate_primary_key_refusal.py +108 -0
- ferro_orm-0.23.0/tests/test_generate_renames.py +618 -0
- ferro_orm-0.23.0/tests/test_generate_retired.py +240 -0
- ferro_orm-0.23.0/tests/test_generate_row_security.py +488 -0
- ferro_orm-0.23.0/tests/test_generate_sqlite_rebuild.py +917 -0
- ferro_orm-0.23.0/tests/test_historical_models.py +311 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_hydration.py +39 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_ir_vectors_contract.py +86 -8
- ferro_orm-0.23.0/tests/test_isolated_imports.py +101 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_label_addition.py +61 -9
- ferro_orm-0.23.0/tests/test_live_read.py +162 -0
- ferro_orm-0.23.0/tests/test_migrate_baseline.py +592 -0
- ferro_orm-0.23.0/tests/test_migrate_check.py +273 -0
- ferro_orm-0.23.0/tests/test_migrate_defaults.py +421 -0
- ferro_orm-0.23.0/tests/test_migrate_down.py +458 -0
- ferro_orm-0.23.0/tests/test_migrate_drift.py +898 -0
- ferro_orm-0.23.0/tests/test_migrate_new.py +586 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_migrate_plan.py +507 -13
- ferro_orm-0.23.0/tests/test_migrate_replace.py +582 -0
- ferro_orm-0.23.0/tests/test_migrate_rerecord.py +559 -0
- ferro_orm-0.23.0/tests/test_migrate_status.py +317 -0
- ferro_orm-0.23.0/tests/test_migrate_up.py +692 -0
- ferro_orm-0.23.0/tests/test_migrations_api.py +429 -0
- ferro_orm-0.23.0/tests/test_migrations_testing_harness.py +580 -0
- ferro_orm-0.23.0/tests/test_pass_report.py +199 -0
- ferro_orm-0.23.0/tests/test_postgres_isolation.py +208 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_query_wire_vectors.py +13 -2
- ferro_orm-0.23.0/tests/test_registry_swap.py +165 -0
- ferro_orm-0.23.0/tests/test_retired_columns.py +528 -0
- ferro_orm-0.23.0/tests/test_retired_labels.py +513 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_rls_end_to_end.py +2 -2
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_row_security_alembic.py +373 -123
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_row_security_create_pass.py +217 -40
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_row_security_orphans.py +134 -35
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_row_security_rebuild.py +225 -44
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_row_security_reconcile.py +288 -58
- ferro_orm-0.23.0/tests/test_run_lock.py +420 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_schema_constraints.py +45 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_session_set_config.py +2 -3
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_session_settings_connection_delivery.py +3 -3
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_session_settings_operations.py +5 -5
- ferro_orm-0.23.0/tests/test_settings.py +1293 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_static_contracts.py +71 -0
- ferro_orm-0.23.0/tests/test_step_class.py +484 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_structural_types.py +2 -1
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_table_check_orphans.py +196 -38
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_table_check_rebuild.py +207 -39
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_table_check_reconcile.py +247 -36
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_table_checks.py +15 -4
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_transactions.py +107 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/uv.lock +72 -2
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/zensical.toml +14 -1
- ferro_orm-0.21.2/AGENTS.md +0 -601
- ferro_orm-0.21.2/CONTEXT.md +0 -213
- ferro_orm-0.21.2/crates/ferro-migrate/src/lib.rs +0 -567
- ferro_orm-0.21.2/crates/ferro-migrate/src/tests.rs +0 -2421
- ferro_orm-0.21.2/docs/pages/api/connection.md +0 -23
- ferro_orm-0.21.2/docs/pages/api/exceptions.md +0 -75
- ferro_orm-0.21.2/docs/pages/api/migrations.md +0 -5
- ferro_orm-0.21.2/docs/pages/guide/migrations.md +0 -265
- ferro_orm-0.21.2/docs/solutions/patterns/alembic-comparator-slot.md +0 -78
- ferro_orm-0.21.2/docs/solutions/patterns/cross-emitter-ddl-parity.md +0 -105
- ferro_orm-0.21.2/src/errors.rs +0 -261
- ferro_orm-0.21.2/src/ferro/_core.pyi +0 -401
- ferro_orm-0.21.2/src/ferro/migrations/__init__.py +0 -3
- ferro_orm-0.21.2/src/ferro/migrations/alembic.py +0 -1525
- ferro_orm-0.21.2/src/migrate.rs +0 -904
- ferro_orm-0.21.2/src/schema.rs +0 -703
- ferro_orm-0.21.2/tests/test_auto_migrate.py +0 -1658
- ferro_orm-0.21.2/tests/test_cross_emitter_parity.py +0 -418
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.github/PERMISSIONS.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.github/PYPI_CHECKLIST.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.github/PYPI_SETUP.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.github/generated/wheels.generated.yml +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.github/pull_request_template.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.github/workflows/ci.yml +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.github/workflows/packaging-smoke.yml +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.github/workflows/publish-docs.yml +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.github/workflows/publish.yml +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.github/workflows/release.yml +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.gitignore +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.pre-commit-config.yaml +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/.python-version +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/CONTRIBUTING.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/LICENSE +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/benchmarks/README.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/benchmarks/__init__.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/benchmarks/__main__.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/benchmarks/backends.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/benchmarks/baselines/postgres.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/benchmarks/baselines/sqlite.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/benchmarks/compare.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/benchmarks/harness.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/benchmarks/model.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/benchmarks/run.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/context7.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/crates/ferro-ddl-lowering/Cargo.toml +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/crates/ferro-migrate/src/order.rs +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/crates/ferro-schema-ir/Cargo.toml +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0001-resolved-epoch-registration.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0002-unified-column-fact-derivation.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0003-path-blind-db-type-validation.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0004-jsonb-postgres-only-canonical.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0005-jsonb-default-on-postgres.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0006-relation-traversal-inner-joins.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0007-materialization-plan-complete-instances.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0007-reverse-relations-tested-not-traversed.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0008-populated-relations-include.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0008-predicate-negation-uniform-not.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0009-aggregate-projections-derived-grouping.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0012-table-checks-are-lambdas.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0013-table-check-reconciliation.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0015-table-check-body-drift.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0016-check-predicates-literals-only.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0017-omitted-nulls-means-last.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0018-position-paging.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/adr/0019-row-policy-drift-and-the-one-way-flags.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/agents/domain.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/agents/issue-tracker.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/agents/triage-labels.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/architecture-review-2026-07-08.html +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-04-29-named-connections-role-routing-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-05-08-typed-query-predicates-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-05-13-configurable-column-storage-types-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-05-14-autogenerate-support-for-db-type-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-05-25-annotated-strenum-cold-hydration-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-06-24-ir-p8-119-wire-automigrate-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-06-25-ir-p8-120-parity-gate-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-06-26-ir-p8.5-140-shared-lowering-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-06-26-ir-p8.5-143-db-type-drop-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-06-26-ir-p8.5-144-reconcile-indexes-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-06-28-ir-p8.5-141-single-schema-ir-producer-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-06-29-ir-p8.6-146-dialect-enum-unification-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-06-29-ir-p8.6-153-create-path-ir-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-06-30-ir-p8.6-155-deferred-annotations-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-06-30-ir-p8.6-158-check-renderer-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-07-01-ir-p8.6-154-datetime-tz-coarseness-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-07-01-ir-p8.6-162-typed-save-bind-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-07-01-ir-p8.6-165-blob-introspection-false-positive-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-07-02-ff-c1-codec-plan-design.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/brainstorms/2026-07-06-upgrade-guide-consolidation-requirements.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/aggregations.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/aggregations_annotated.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/existence_tests.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/existence_tests_annotated.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/multiple_databases.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/mutations.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/pagination.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/partial_selects.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/partial_selects_annotated.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/populated_relations.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/populated_relations_annotated.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/predicates.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/predicates_annotated.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/quickstart.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/quickstart_annotated.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/raw_sql.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/relationships.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/relationships_annotated.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/row_level_security.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/row_level_security_annotated.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/soft_deletes.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/soft_deletes_annotated.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/table_checks.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/table_checks_annotated.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/testing_conftest.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/timestamps.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/timestamps_annotated.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/transactions.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/traversal.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/examples/traversal_annotated.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/api/fields.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/api/raw-sql.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/api/relationships.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/api/transactions.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/changelog.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/concepts/identity-map.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/concepts/performance.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/concepts/query-typing.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/concepts/type-safety.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/contributing.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/guide/aggregations.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/guide/mutations.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/guide/raw-sql.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/guide/transactions.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/howto/pagination.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/howto/soft-deletes.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/howto/timestamps.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/howto/upgrade-guide.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/index.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/roadmap.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/stylesheets/extra.css +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/pages/why-ferro.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-04-24-001-refactor-multi-db-backend-architecture-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-04-29-001-typed-null-binds-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-04-29-002-feat-named-connections-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-05-07-001-refactor-generic-model-connection-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-05-08-001-feat-typed-query-predicates-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-05-13-001-feat-configurable-column-storage-types-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-05-25-001-fix-annotated-strenum-cold-hydration-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-06-19-001-ir-first-roadmap.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-06-24-001-feat-ir-p8-119-wire-automigrate-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-06-25-001-feat-ir-p8-120-parity-gate-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-06-26-001-feat-ir-p8.5-140-shared-lowering-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-06-26-002-feat-ir-p8.5-143-db-type-drop-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-06-26-003-feat-ir-p8.5-144-reconcile-indexes-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-06-28-001-feat-ir-p8.5-141-single-schema-ir-producer-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-06-29-001-refactor-ir-p8.6-153-create-path-unification-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-06-29-002-refactor-ir-p8.6-146-dialect-enum-unification-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-06-30-001-refactor-ir-p8.6-158-check-renderer-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-06-30-002-fix-ir-p8.6-155-deferred-annotations-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-01-001-feat-ir-p8.6-162-typed-save-bind-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-01-002-fix-ir-p8.6-154-datetime-tz-coarseness-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-01-003-fix-ir-p8.6-165-blob-introspection-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-02-001-fable-fixes-roadmap.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-02-002-feat-ff-a-172-typed-exceptions-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-02-003-ff-c-native-decode-design.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-02-004-ff-c-c2-catalog-cache-design.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-02-005-ff-d-identity-routing-design.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-02-006-ff-d-identity-routing-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-03-007-ff-e-registry-identity-design.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-03-008-ff-e-registry-identity-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-06-009-ff-f-query-builder-1.0-design.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-06-010-ff-f-query-builder-1.0-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-06-011-ff-g-hardening-design.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-06-012-ff-g-hardening-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-06-013-ff-g2-operations-dedup-design.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-06-014-ff-g2-operations-dedup-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-06-015-docs-upgrade-guide-consolidation-plan.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/2026-07-18-016-existence-tests-design.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/ir-first-migration-guide.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/plans/ir-first-release-checklist.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/rfc/ir-contracts-v1.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/README.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/architecture-patterns/ir-first-lowering-consolidation-audit.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/architecture-patterns/ir-first-merge-readiness-review.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/alembic-create-table-reissues-enum-type.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/n-ary-check-chain-reads-as-drift.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/pg18-restrict-sqlstate-23001.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/pydantic-slots-missing-after-ferro-hydration.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/python-3.14-deferred-annotation-typeerror-swallow.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/query-ir-version-pin-sweep.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/sa-pk-column-nullable-divergence.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/sa-vs-rust-unique-constraint-shape.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/self-fk-evicts-component-from-create-order.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/sqlite-integer-decimal-hydrates-as-none.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/sqlite-null-hydrates-as-int-zero.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/issues/typed-where-null-panics-is-null.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/configurable-column-storage-types.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/ddl-on-live-engine.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/foreign-key-index.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/index-unique-redundancy.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/ir-invariants.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/persistence-state.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/position-paging-after.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/shadow-fk-columns.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/sqlite-alembic-reconnect-hydration-tests.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/typed-null-binds.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/docs/solutions/patterns/wire-scalar-canonicalization.md +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/justfile +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/scripts/demo_queries.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/scripts/demo_queries_pre_v012.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/codec.rs +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/_deprecations.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/_shadow_fk_types.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/checks.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/composite_indexes.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/composite_uniques.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/exceptions.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/ir/__init__.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/py.typed +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/query/__init__.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/query/builder.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/query/rows.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/raw.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/relations/descriptors.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/rowsecurity.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/ferro/state.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/hydration.rs +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/query.rs +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/schema_bind.rs +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/src/session_settings.rs +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/__init__.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/codec_registry_core_v1.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_account_exists_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_account_scoped_exists_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_card_after_null_slot_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_card_nulls_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_owner_nested_exists_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_owner_not_exists_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_transaction_aggregate_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_transaction_global_aggregate_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_transaction_include_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_transaction_left_join_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_transaction_record_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_transaction_traversal_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_transaction_traversed_record_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_user_add_columns_set_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_user_add_literal_set_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_user_after_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_user_before_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_user_compound_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_user_literal_set_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_user_m2m_exists_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_user_merge_set_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_user_mixed_set_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_user_not_compound_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_user_not_leaf_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/query_user_now_set_v14.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/schema_invoice_baseline_v1.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/schema_phase1_fixture_models_v1.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/fixtures/ir_vectors/schema_raw_str_pk_autoincrement_v1.json +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/static_fixtures/bad_includes.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/static_fixtures/bad_predicates.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/static_fixtures/bad_projections.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/static_fixtures/good_includes.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/static_fixtures/good_predicates.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/static_fixtures/good_projections.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_after_position.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_aggregation.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_alembic_autogenerate.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_alembic_bridge.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_alembic_db_type.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_alembic_nullability.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_alembic_type_mapping.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_annotation_utils.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_before_position.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_bulk_create_chunking.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_bulk_install.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_bulk_update.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_catalog_cache.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_check_predicate_dialect.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_codec_plan.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_column_specs.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_compiled_query.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_composite_unique.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_connection.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_connection_redaction.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_constraints.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_crud.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_db_type_typing.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_deletion.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_deprecations.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_documentation_features.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_enum_cold_hydration.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_exception_mapping.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_exceptions.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_field_wrapper.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_fk_target_pk.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_generation_counter_dirty_tracking.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_global_aggregates.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_grouped_aggregates.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_helpers.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_hydration_equivalence.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_identity_memory.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_identity_refresh.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_identity_scoped_invalidation.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_identity_weakref.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_import_budget.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_include.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_live_table_checks.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_metaclass_internals.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_metadata.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_model_identity.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_models.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_mutation_pagination_guard.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_named_connections_integration.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_naming_single_source.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_negation.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_one_to_one.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_operation_seam_sync.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_order_by_nulls.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_order_by_nulls_wire.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_partial_selects.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_position_paging_traversal.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_primary_key_facts.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_provisional_import.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_query_builder.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_query_column_validation.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_query_exists.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_query_immutability.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_query_joins.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_query_typing.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_raw_sql.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_refresh.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_registry_entrypoints.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_registry_owner.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_relation_specs.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_relationship_engine.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_relationship_resolution_errors.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_route_single_site.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_routing_errors.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_save_pk_edges.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_save_semantics.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_schema.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_schema_db_type_metadata.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_schema_enum_annotations.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_session.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_session_settings.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_shadow_fk_types.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_sqlite_alembic_reconnect_hydration.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_string_search.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_temporal_types.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_traversed_projection.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_typed_null_binds.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_typed_save_bind.py +0 -0
- {ferro_orm-0.21.2 → ferro_orm-0.23.0}/tests/test_update_recipe.py +0 -0
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Hard project invariants for Ferro. These are contracts that **must hold across
|
|
4
|
+
every code path**. They are not style preferences. Violating one of these is a
|
|
5
|
+
correctness bug.
|
|
6
|
+
|
|
7
|
+
`.cursorrules` covers project vision, architecture, and TDD workflow. This file
|
|
8
|
+
covers the invariants that the architecture rests on.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## I-1: Cross-emitter DDL parity
|
|
13
|
+
|
|
14
|
+
**Every DDL emission path in Ferro must produce byte-identical schema artifacts
|
|
15
|
+
for the same model definition.**
|
|
16
|
+
|
|
17
|
+
Take one edit, `bio: str | None = None` added to `Author`. Each door below
|
|
18
|
+
runs the same statement for it, `ALTER TABLE "author" ADD COLUMN "bio"
|
|
19
|
+
varchar`, because each asks the same planner and renders through the same
|
|
20
|
+
functions. Today Ferro emits DDL through:
|
|
21
|
+
|
|
22
|
+
- The **reconciliation pass** (`src/schema.rs`, `src/migrate.rs` over
|
|
23
|
+
`crates/ferro-migrate`): `connect(auto_migrate=True)` and its
|
|
24
|
+
`migrate_updates` / `migrate_destructive` rungs. It reads the live database
|
|
25
|
+
(`src/live_ir.rs`, `_core._live_schema_ir`), plans with the one planner
|
|
26
|
+
(`ferro_migrate::plan_from_ir`) and runs its `Plan::render`; its
|
|
27
|
+
create pass is `ferro_migrate::render_create_table`. What it executed is its
|
|
28
|
+
`PassReport` (`ferro.migrate()` / `ferro.create_tables()` return it, built
|
|
29
|
+
from what the DDL executor ran, ADR-0049), pinned against the planner by
|
|
30
|
+
pin **(g)**.
|
|
31
|
+
- The **migrations door** (`src/ferro/migrations/` +
|
|
32
|
+
`crates/ferro-migrate/src/generate/`): `ferro migrate new`. It plans between
|
|
33
|
+
two schema snapshots with the same planner and renders through the same
|
|
34
|
+
`Plan::render`, once per dialect, into step files. It decides which step an
|
|
35
|
+
op lands in and which headers a file carries, never a statement. Its
|
|
36
|
+
online shapes are the pass's renderings in another mode: `NOT VALID` then a
|
|
37
|
+
validate step (`ConstraintMode`, ADR-0043), `CONCURRENTLY` (`IndexMode`,
|
|
38
|
+
ADR-0044), the `_ferro_notnull_<table>_<col>` staged `NOT NULL`
|
|
39
|
+
(`staged_not_null_name`, never `ck_*`, #534), the SQLite table rebuild
|
|
40
|
+
(ADR-0046) and the Postgres enum type swap for a removed label (#536).
|
|
41
|
+
- The **Alembic autogenerate bridge** (`src/ferro/migrations/alembic.py` +
|
|
42
|
+
`src/ferro/migrations/translate.py`): `alembic revision --autogenerate`. It
|
|
43
|
+
translates the one planner's ops (ADR-0041, item 11).
|
|
44
|
+
- Any **future emitter** added to the codebase (e.g. `ferro schema dump`, a
|
|
45
|
+
`Ferro.to_sql()` API, an introspection-based diff tool).
|
|
46
|
+
|
|
47
|
+
For a single model, every emitter must agree on:
|
|
48
|
+
|
|
49
|
+
1. **Table name** — already handled by `model_name.lower()`.
|
|
50
|
+
2. **Column names** — including shadow `*_id` columns from `ForeignKey`.
|
|
51
|
+
3. **Column types** — decided by ONE function:
|
|
52
|
+
`ferro_ddl_lowering::resolve_column_storage` (explicit `db_type` token →
|
|
53
|
+
native-enum resolution → the `canonical_from_parts` cascade). The Alembic
|
|
54
|
+
bridge consumes it mechanically over FFI (`_core._resolve_storage_type`)
|
|
55
|
+
and `_db_type_to_sa_type` is only the SA *rendering* of the shared token
|
|
56
|
+
vocabulary — never a second decision table. Pinned exhaustively by
|
|
57
|
+
`tests/test_db_type_cross_emitter_parity.py` (every token and every
|
|
58
|
+
derived annotation × both dialects, and every token through a generated
|
|
59
|
+
`ADD COLUMN`). See
|
|
60
|
+
`docs/solutions/patterns/derived-type-and-naming-decision-table.md`.
|
|
61
|
+
4. **Index names** — `idx_<table>_<col>` for single-column indexes,
|
|
62
|
+
`idx_<table>_<col1>_<col2>...` for composite indexes.
|
|
63
|
+
5. **Unique constraint names** — `uq_<table>_<col>` for single-column,
|
|
64
|
+
`uq_<table>_<col1>_<col2>...` for composite.
|
|
65
|
+
6. **Foreign key constraint names** — `fk_<table>_<col>_<to_table>`, always
|
|
66
|
+
emitted (every emitter renders `SchemaForeignKey.name`; single-sourced in
|
|
67
|
+
`ferro_ddl_lowering::fk_name`). See
|
|
68
|
+
`docs/solutions/patterns/derived-type-and-naming-decision-table.md`.
|
|
69
|
+
7. **Primary key constraint names** — when explicitly named.
|
|
70
|
+
8. **Check constraint names** — `ck_<table>_<col>` for the single-column
|
|
71
|
+
`db_check=True` constraint; `ck_<table>_<suffix>` for table checks declared
|
|
72
|
+
in `__ferro_checks__`. Column checks use `_ddl_check_constraint_name`
|
|
73
|
+
(Python) and `db_check_constraint_name` (Rust); table checks use
|
|
74
|
+
`_ddl_table_check_constraint_name` (Python) and
|
|
75
|
+
`table_check_constraint_name` (Rust).
|
|
76
|
+
9. **Default values** — server-side defaults must serialize identically.
|
|
77
|
+
One exception (ADR-0034): on SQLite the reconciliation pass adds a
|
|
78
|
+
required column with a literal default as `NOT NULL DEFAULT <literal>`
|
|
79
|
+
and keeps that default, since only a rebuild could drop it; a migration
|
|
80
|
+
rebuilds the table without it (`KEPT_DEFAULTS` in
|
|
81
|
+
`tests/test_cross_emitter_parity.py`).
|
|
82
|
+
10. **Nullability** — must agree.
|
|
83
|
+
11. **Every change to an existing database: the Alembic bridge translates the
|
|
84
|
+
one planner's ops.** What changes and the statement that changes it are
|
|
85
|
+
decided once, by the one planner (`ferro_migrate::plan_from_ir`) and its
|
|
86
|
+
renderer (`ferro_migrate::Plan::render`), over function families in
|
|
87
|
+
`ferro_ddl_lowering`. Every op leaves the planner with its
|
|
88
|
+
`ferro_migrate::OpVerdict`, decided once (ADR-0050): whether the dialect
|
|
89
|
+
runs it natively, rebuilds the table, refuses it (naming the fix) or
|
|
90
|
+
cannot reverse it, and whether it demands values from existing rows,
|
|
91
|
+
drops data or can fail on them. Every door reads that one verdict and
|
|
92
|
+
re-decides none of it. The reconciliation pass runs them directly; the
|
|
93
|
+
migrations door writes them into step files; the bridge's one comparator
|
|
94
|
+
(`dispatch_for("schema")` in `src/ferro/migrations/alembic.py`) reads the
|
|
95
|
+
live database through `_core._live_schema_ir` and asks the core for the
|
|
96
|
+
whole revision in one call, `_core._plan_revision`
|
|
97
|
+
(`ferro_migrate::plan_revision`): the upgrade planned live → models with
|
|
98
|
+
destructive changes on, its `downgrade()` the one down every door uses,
|
|
99
|
+
`ferro_migrate::plan_down`, run from the models back to the live
|
|
100
|
+
database and scoped to the artifacts the upgrade touched (ADR-0050; a
|
|
101
|
+
check or policy put back with the body the catalog printed through
|
|
102
|
+
`render_check_restore`), both rendered by the one renderer, with every
|
|
103
|
+
refusal, marker, irreversible reason, Alembic-twin choice, autocommit
|
|
104
|
+
and foreign-key rider decided there. `translate.py` writes that answer
|
|
105
|
+
and decides nothing: Alembic's own op where the core says it has one,
|
|
106
|
+
`op.execute(sa.DDL(...))` of the pass's statement, byte for byte, where
|
|
107
|
+
it does not. The per-family comparators, their slot registrations and
|
|
108
|
+
the `_plan_check_*` FFI are gone (#533).
|
|
109
|
+
The families, each one decision consumed by every door:
|
|
110
|
+
- **Enum labels** — `missing_enum_labels` / `extra_enum_labels` +
|
|
111
|
+
`render_pg_enum_add_value` (ADR-0011: append-only, update-gated; an
|
|
112
|
+
extra live label is a warning on a live database, and between two
|
|
113
|
+
declared snapshots the migrations door's removal, #536). A label
|
|
114
|
+
rename hint is `render_pg_enum_rename_value` (`render_label_update`
|
|
115
|
+
on SQLite, in a migration only; the pass warns there, ADR-0047); an
|
|
116
|
+
enum class rename `render_pg_enum_rename_type`.
|
|
117
|
+
- **Checks** — additions (`missing_check_names` /
|
|
118
|
+
`render_check_addition`), rebuilds (`drifted_check_names` /
|
|
119
|
+
`render_check_rebuild`) and leftovers (`extra_check_names` /
|
|
120
|
+
`extra_check_names_warning` / `render_check_drop`) (ADR-0013..0015).
|
|
121
|
+
One normalizer, `normalize_check_definition`, compares the canonical
|
|
122
|
+
rendering with the catalog's; it folds only the casts Postgres adds for
|
|
123
|
+
display (any cast on a literal, and a text-family cast on a column or
|
|
124
|
+
`ARRAY[…]`), and every other cast is drift (#563).
|
|
125
|
+
- **Row security** — the policy name, shorthand cast, rendered
|
|
126
|
+
expression and `ENABLE` / `FORCE` / `CREATE POLICY` statements
|
|
127
|
+
(`row_policy_name`, `is_ferro_row_policy_name`,
|
|
128
|
+
`row_policy_shorthand_cast`, `render_row_policy_setting_expr`,
|
|
129
|
+
`render_create_row_policy`, `row_security_statements`, over
|
|
130
|
+
`ROW_POLICY_COMMANDS`), and the reconciliation of a live table
|
|
131
|
+
(`plan_row_security_reconcile`, with `is_default_row_policy_roles`,
|
|
132
|
+
`ferro_manages_row_security`, `normalize_row_policy_expr`,
|
|
133
|
+
`row_policy_command_from_catalog_code` and its warning texts), whose
|
|
134
|
+
flags are decided by `missing_row_security_flags` (the flags to turn
|
|
135
|
+
on) and `excess_row_security_flags` (the flags to turn off,
|
|
136
|
+
`migrate_destructive` only), each a `Vec<RowSecurityFlag>`. The
|
|
137
|
+
Python declaration surface (`src/ferro/rowsecurity.py`) consumes the
|
|
138
|
+
name, the cast and the command table over FFI
|
|
139
|
+
(`_core._ddl_row_policy_name`, `_core._rls_shorthand_cast`,
|
|
140
|
+
`_core._rls_command_matrix`). A foreign policy and an unverifiable raw
|
|
141
|
+
body never become an op on any door (ADR-0019). Postgres-only; SQLite
|
|
142
|
+
gets one warning per table and no DDL (ADR-0014).
|
|
143
|
+
- **Enum types** — a type the change introduces is always the pass's
|
|
144
|
+
guarded `CREATE TYPE` (`render_pg_enum_create_type`) ahead of every
|
|
145
|
+
table op, and a type it retires is `render_pg_enum_drop_type` after
|
|
146
|
+
them; the bridge renders every enum column `create_type=False`
|
|
147
|
+
(`ferro.migrations.render_item`). This supersedes in part the
|
|
148
|
+
inline-vs-statement provenance of ADR-0020..0022 (ADR-0041).
|
|
149
|
+
Postgres-only (SQLite enums store as text).
|
|
150
|
+
|
|
151
|
+
Every artifact above reaches every door through the one planner,
|
|
152
|
+
`ferro_migrate::plan_from_ir` (`_core._plan_from_ir` over FFI): its
|
|
153
|
+
per-family deciders are private to it and pinned through it, never as a
|
|
154
|
+
second entry point; `_core._plan_enum_type_provenance` remains as a
|
|
155
|
+
pass-side parity pin. The item is carried by pins **(e)** and **(f)**
|
|
156
|
+
below.
|
|
157
|
+
|
|
158
|
+
### The seven pins
|
|
159
|
+
|
|
160
|
+
`tests/test_cross_emitter_parity.py` pins the migrations door, the bridge and
|
|
161
|
+
the pass itself against the one planner over every casebook change
|
|
162
|
+
(`tests/_casebook.py`, cases A–F, built from the generator tests' own models)
|
|
163
|
+
on both dialects:
|
|
164
|
+
|
|
165
|
+
- **(a)** the statements of the generated DDL steps, headers stripped and the
|
|
166
|
+
online shapes compared by their plain twins (`normalize_online_shape`: a
|
|
167
|
+
`NOT VALID` add is the plain add, `CONCURRENTLY` is gone, a validate or
|
|
168
|
+
staging statement is nothing, a rebuild is the ops it carries), equal the
|
|
169
|
+
pass's plan for the same before/after modelset
|
|
170
|
+
(`_core._plan_from_ir(..., render=True)`, two declared snapshots);
|
|
171
|
+
- **(b)** a rebuild's `CREATE TABLE "_ferro_new_<t>"` is byte for byte the
|
|
172
|
+
create pass's rendering of the shape its step leaves (the relaxed shape for
|
|
173
|
+
an expand, the target for a contract), apart from the table name;
|
|
174
|
+
- **(c)** a concurrent index statement equals the pass's by exactly one token
|
|
175
|
+
(`IF NOT EXISTS` against `CONCURRENTLY`);
|
|
176
|
+
- **(d)** the validate, label-addition and type-creation statements are the
|
|
177
|
+
pass's, through the one renderer;
|
|
178
|
+
- **(e)** a database taken through the migration chain shows no drift, has
|
|
179
|
+
the same live schema (facts included) as one `connect(auto_migrate=True)`
|
|
180
|
+
built from the same models, and the same server default on every column
|
|
181
|
+
(no backfill `DEFAULT` left behind, and a renamed table's serial sequence
|
|
182
|
+
under the name a fresh table gives it), and Alembic autogenerate against
|
|
183
|
+
the auto-migrated one is empty (against the migrated one it refuses: a
|
|
184
|
+
tracked database is `ferro migrate new`'s);
|
|
185
|
+
- **(f)** the bridge's revision runs the pass's DDL for every planner op:
|
|
186
|
+
every statement it runs as written is the pass's, and it leaves the same
|
|
187
|
+
live schema the pass's statements do;
|
|
188
|
+
- **(g)** the pass executes what the planner renders: on a database at the
|
|
189
|
+
case's before side, `ferro.migrate(destructive=True)`'s `PassReport`
|
|
190
|
+
`schema` statements equal `_core._plan_from_ir(..., render=True)` for the
|
|
191
|
+
same live read, grouped by table (or enum type) and in order within each,
|
|
192
|
+
the create pass standing in for each `AddTable`; its warnings equal the
|
|
193
|
+
plan's reports by kind and subject, never by sentence.
|
|
194
|
+
|
|
195
|
+
A pin that says "the same live schema" must list the catalog facts it reads,
|
|
196
|
+
because a fact it does not read is a gap it cannot see. Pin (e) compared
|
|
197
|
+
columns, types, nullability, indexes, constraints and policies but not server
|
|
198
|
+
defaults, and that hid three real parity gaps for the whole epic: an invented
|
|
199
|
+
enum `DEFAULT`, SQLite's leftover backfill `DEFAULT`, and a renamed table's old
|
|
200
|
+
serial sequence. They surfaced only once the pin started reading
|
|
201
|
+
`column_default` (#605, #608).
|
|
202
|
+
|
|
203
|
+
A pin that fails against merged behaviour is listed in `FINDINGS` there,
|
|
204
|
+
`xfail(strict=True)` with its reason, until the fix lands and the strict
|
|
205
|
+
xfail removes it.
|
|
206
|
+
|
|
207
|
+
### Why this invariant exists
|
|
208
|
+
|
|
209
|
+
A user can adopt any migration strategy or switch between them. If two doors
|
|
210
|
+
disagree on _any_ schema artifact, the second one sees phantom diffs: running
|
|
211
|
+
`alembic revision --autogenerate` or `ferro migrate drift` against a database
|
|
212
|
+
that `connect(auto_migrate=True)` bootstrapped proposes a drop + create of an
|
|
213
|
+
index named `ix_*` for one named `idx_*`. The migration is technically a
|
|
214
|
+
no-op, but the diff is unreviewable noise and pollutes the migration history.
|
|
215
|
+
|
|
216
|
+
Phantom diffs are the canonical symptom that this invariant has been broken.
|
|
217
|
+
|
|
218
|
+
### How this invariant is enforced
|
|
219
|
+
|
|
220
|
+
- One planner, one renderer: every door plans with
|
|
221
|
+
`ferro_migrate::plan_from_ir` and renders with `Plan::render`; every
|
|
222
|
+
decision lives in one `ferro_ddl_lowering` function, consumed over FFI by
|
|
223
|
+
the Python side.
|
|
224
|
+
- `src/ferro/migrations/alembic.py` constructs `MetaData` with an explicit
|
|
225
|
+
`naming_convention` that mirrors the Rust emitter (see `_FERRO_NAMING_CONVENTION`).
|
|
226
|
+
- `src/schema.rs` hard-codes the same names via `format!("idx_{}_{}",
|
|
227
|
+
table_lower, col_name)` and the helpers in `composite_index_name` /
|
|
228
|
+
`composite_unique_index_name`.
|
|
229
|
+
- `tests/test_cross_emitter_parity.py` holds the bridge sentinel (autogenerate
|
|
230
|
+
against an auto-migrated database is empty) and the seven pins; `tests/test_db_type_cross_emitter_parity.py` pins every type token;
|
|
231
|
+
`tests/test_alembic_autogenerate.py` and `tests/test_schema_constraints.py`
|
|
232
|
+
pin the names (`test_index_name_matches_rust_runtime_*`).
|
|
233
|
+
- `docs/solutions/patterns/cross-emitter-ddl-parity.md` documents the rule and
|
|
234
|
+
the recipes below.
|
|
235
|
+
|
|
236
|
+
### Adding a new emitter
|
|
237
|
+
|
|
238
|
+
If you add a new emitter (e.g. `ferro schema dump`):
|
|
239
|
+
|
|
240
|
+
1. Plan with `ferro_migrate::plan_from_ir` and render with `Plan::render`;
|
|
241
|
+
read the constants in `_FERRO_NAMING_CONVENTION` and the `composite_*_name`
|
|
242
|
+
helpers — these are the source of truth. Never a second renderer.
|
|
243
|
+
2. Add a pin to `tests/test_cross_emitter_parity.py` that compares your
|
|
244
|
+
emitter's output with `_core._plan_from_ir(..., render=True)` for every
|
|
245
|
+
casebook case on both dialects, the way pin (a) does for the migrations
|
|
246
|
+
door; at least single-column index, composite index, single-column
|
|
247
|
+
unique, composite unique and foreign key with shadow column must be
|
|
248
|
+
among them.
|
|
249
|
+
3. Update this AGENTS.md entry with the new emitter in the bulleted list above.
|
|
250
|
+
|
|
251
|
+
### Adding a new artifact
|
|
252
|
+
|
|
253
|
+
If you add a new schema feature (e.g. partial indexes, exclusion constraints):
|
|
254
|
+
|
|
255
|
+
1. Pick the canonical name format and document it in this file under the
|
|
256
|
+
numbered list above.
|
|
257
|
+
2. Decide it in one `ferro_ddl_lowering` function, plan it as a
|
|
258
|
+
`MigrationOp` and render it in `Plan::render`, so every door gets it in the
|
|
259
|
+
same PR; give the bridge's `translate.py` its op (Alembic's own, or the
|
|
260
|
+
pass's statement).
|
|
261
|
+
3. Add a casebook case (`tests/_casebook.py`) so pins (a)–(g) cover it, and a
|
|
262
|
+
parity test that asserts the names match.
|
|
263
|
+
4. Do not edit `CHANGELOG.md` manually — release tooling records entries at
|
|
264
|
+
release time (see I-10).
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## I-2: Direct-to-Dict / Zero-copy hydration is non-negotiable
|
|
269
|
+
|
|
270
|
+
`pydantic-core` `__init__` calls are the single largest source of overhead in
|
|
271
|
+
Python ORMs. The Rust core must populate model dicts directly via the bridge
|
|
272
|
+
documented in `src/lib.rs` rather than calling `Model(**row)` from Rust.
|
|
273
|
+
|
|
274
|
+
Hydrated instances must still be **observationally equivalent** to instances
|
|
275
|
+
constructed through `BaseModel.__init__` for Pydantic’s own slot attributes:
|
|
276
|
+
anything in `BaseModel.__slots__` that `__init__` assigns (notably
|
|
277
|
+
`__pydantic_extra__` and `__pydantic_private__`, in addition to
|
|
278
|
+
`__pydantic_fields_set__`) must be initialized on the Rust hydration path as
|
|
279
|
+
well. Leaving a slot unset raises `AttributeError` on access (unlike a normal
|
|
280
|
+
instance attribute defaulting to `None`).
|
|
281
|
+
|
|
282
|
+
If you find yourself wanting to call `__init__` from Rust to "make this easier",
|
|
283
|
+
stop and read `.cursorrules` §3.B and the design notes under
|
|
284
|
+
`docs/solutions/patterns/`.
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## I-3: No `unwrap()` across the FFI boundary
|
|
289
|
+
|
|
290
|
+
PyO3 functions must propagate failures via `PyResult` — never panic. Panics
|
|
291
|
+
across the FFI boundary unwind into Python as opaque process aborts and ruin
|
|
292
|
+
the integration test feedback loop. Use `?`, `map_err`, or explicit
|
|
293
|
+
`PyErr::new::<PyTypeError, _>(...)`.
|
|
294
|
+
|
|
295
|
+
`cargo test` does enforce this for unit tests, but `pytest` is the canonical
|
|
296
|
+
gate.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## I-4: Tests live with the layer they exercise
|
|
301
|
+
|
|
302
|
+
- Pure SQL/schema generation logic: `cargo test` (Rust unit tests in
|
|
303
|
+
`src/schema.rs`, etc.).
|
|
304
|
+
- Anything that crosses the Python ↔ Rust bridge or exercises Pydantic models:
|
|
305
|
+
`pytest` integration tests under `tests/`.
|
|
306
|
+
|
|
307
|
+
A feature is not "done" until both sides are green.
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## I-5: docs/solutions/ is institutional memory
|
|
312
|
+
|
|
313
|
+
When you discover a non-obvious pattern, gotcha, or architectural decision while
|
|
314
|
+
working on Ferro, add it to `docs/solutions/`. Future agents (human and AI) will
|
|
315
|
+
search this directory before starting work.
|
|
316
|
+
|
|
317
|
+
`docs/solutions/patterns/` — design patterns and conventions.
|
|
318
|
+
`docs/solutions/issues/` — debugging stories and known footguns.
|
|
319
|
+
|
|
320
|
+
See `docs/solutions/README.md` for the frontmatter conventions.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## I-6: No stop-gap solutions
|
|
325
|
+
|
|
326
|
+
Every feature, bug fix, and improvement must be designed as the best,
|
|
327
|
+
well-thought-out solution for the project with the library's future in
|
|
328
|
+
mind — as if time and money were no object. No stop-gaps, hacks,
|
|
329
|
+
quick-fixes, or otherwise lesser solves.
|
|
330
|
+
|
|
331
|
+
What this means in practice:
|
|
332
|
+
|
|
333
|
+
- **Prefer first-class, reusable primitives over local patches.** If a fix
|
|
334
|
+
only works for the immediate symptom while leaving the underlying
|
|
335
|
+
capability gap in place, build the capability instead. (Precedent:
|
|
336
|
+
`EngineHandle::refresh_pool()` was built as an engine-level schema-epoch
|
|
337
|
+
primitive rather than a migration-local statement-cache flush.)
|
|
338
|
+
- **Fail loudly over degrading silently.** "Skip with a warning and
|
|
339
|
+
continue", "best effort", and "documented residual risk" are not
|
|
340
|
+
acceptable resolutions for correctness gaps. Either the operation
|
|
341
|
+
succeeds completely or it aborts with a clear, actionable error.
|
|
342
|
+
- **Treat certain phrases as redesign triggers.** If a plan, comment, or PR
|
|
343
|
+
description contains "best-effort", "partial mitigation", "documented
|
|
344
|
+
residual risk", "good enough for now", "temporary workaround", or
|
|
345
|
+
"fallback if X turns out to be hard" — that part of the design is not
|
|
346
|
+
finished. Redesign it before presenting or implementing it.
|
|
347
|
+
- **Scoped-down is fine; hollowed-out is not.** Deliberately excluding
|
|
348
|
+
something from scope (with the boundary stated and a real path for the
|
|
349
|
+
excluded case, e.g. "renames are Alembic territory") is good design.
|
|
350
|
+
Shipping a half-working version of something that is *in* scope is not.
|
|
351
|
+
- **Every refusal names its fix.** A refusal tells the reader what to do
|
|
352
|
+
next: the command, the line or the recipe. This binds every refusal text
|
|
353
|
+
the migration doors print: the primary-key recipe, the SQLite rebuild
|
|
354
|
+
refusals (an undeclared object, a type SQLite cannot check), the
|
|
355
|
+
tracked-database refusal of `connect(auto_migrate=True)` and of Alembic
|
|
356
|
+
autogenerate, and the edited-file refusals (`ferro migrate rerecord`,
|
|
357
|
+
`--continue` / `--restart`).
|
|
358
|
+
|
|
359
|
+
This rule binds human contributors and AI agents equally, and overrides any
|
|
360
|
+
agent default that biases toward minimal or expedient changes.
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## I-7: Docs examples show both field-declaration styles
|
|
365
|
+
|
|
366
|
+
Ferro supports two equivalent ways to declare model fields: assignment
|
|
367
|
+
(`name: str = Field(unique=True)`) and `Annotated` metadata
|
|
368
|
+
(`name: Annotated[str, Field(unique=True)]`). Every documentation example
|
|
369
|
+
that declares model fields with `Field()`/`FerroField()` options must show
|
|
370
|
+
**both** styles, side by side, as content tabs:
|
|
371
|
+
|
|
372
|
+
=== "Assignment"
|
|
373
|
+
|
|
374
|
+
```python
|
|
375
|
+
--8<-- "docs/examples/<example>.py:models"
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
=== "Annotated"
|
|
379
|
+
|
|
380
|
+
```python
|
|
381
|
+
--8<-- "docs/examples/<example>_annotated.py:models"
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
Rules:
|
|
385
|
+
|
|
386
|
+
- Both tabs must be backed by real, runnable code. Snippet-embedded model
|
|
387
|
+
definitions get a runnable `<name>_annotated.py` companion in
|
|
388
|
+
`docs/examples/` (exercised by `tests/test_docs_examples.py`); inline
|
|
389
|
+
blocks are written in both styles and compile-checked by the same test.
|
|
390
|
+
- Constructs with only one valid form appear identically in both tabs and
|
|
391
|
+
are not tabbed on their own: forward FKs are always
|
|
392
|
+
`Annotated[Target, ForeignKey(...)]`, and `BackRef()` / `ManyToMany()`
|
|
393
|
+
are always assignments.
|
|
394
|
+
- Code blocks that do not declare fields (queries, mutations, transactions,
|
|
395
|
+
usage snippets) are not affected by this rule.
|
|
396
|
+
|
|
397
|
+
This keeps users from ever wondering whether something is possible in their
|
|
398
|
+
preferred declaration style.
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## I-8: Lambda predicates are the official query style
|
|
403
|
+
|
|
404
|
+
Documentation and examples use the lambda predicate style for all queries:
|
|
405
|
+
|
|
406
|
+
```python
|
|
407
|
+
adults = await User.where(lambda user: user.age >= 18).all()
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
Rules:
|
|
411
|
+
|
|
412
|
+
- **Every query example** in docs, docstring `Examples:` sections, and
|
|
413
|
+
`docs/examples/` scripts uses lambda predicates.
|
|
414
|
+
- Name the lambda parameter after the model in **lowercase singular**
|
|
415
|
+
(`user` for `User`, `post` for `Post`) so filters read naturally.
|
|
416
|
+
- When the predicate styles themselves are documented, present them in
|
|
417
|
+
order **lambda > `col()` > operator**, with lambda labeled the officially
|
|
418
|
+
recommended style.
|
|
419
|
+
- **Operator style** (`User.where(User.age >= 18)`) is compatible today but
|
|
420
|
+
is slated for deprecation in a future release and fails static type
|
|
421
|
+
checking (`User.age >= 18` types as `bool`; `where()` expects
|
|
422
|
+
`QueryNode | Predicate`). Docs say so explicitly wherever the style is
|
|
423
|
+
shown.
|
|
424
|
+
- **`order_by` is not a predicate**, but its lambda selector
|
|
425
|
+
(`order_by(lambda u: u.age, "desc")`) is validated and is the documented
|
|
426
|
+
style — and it is the ONLY way to order by a related column
|
|
427
|
+
(`order_by(lambda t: t.account.label)`), which relation traversal requires.
|
|
428
|
+
Attribute style is not accepted — `order_by` takes a column-name string or
|
|
429
|
+
a lambda selector (anything else raises `TypeError`).
|
|
430
|
+
|
|
431
|
+
The canonical comparisons live in `docs/pages/guide/queries.md`
|
|
432
|
+
("Predicate Styles") and `docs/pages/concepts/query-typing.md`; everywhere
|
|
433
|
+
else uses lambda without restating the trade-offs.
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
437
|
+
## I-9: PRs must close scoped issues explicitly
|
|
438
|
+
|
|
439
|
+
Issue closure is part of feature completion, not optional cleanup.
|
|
440
|
+
|
|
441
|
+
Rules:
|
|
442
|
+
|
|
443
|
+
- Every PR that completes scoped work **must** include GitHub auto-close
|
|
444
|
+
keywords in the PR body for each completed issue, e.g.
|
|
445
|
+
`Closes #89`, `Fixes #90`, `Resolves #91`.
|
|
446
|
+
- Do not rely on manual post-merge issue triage when the work is already done
|
|
447
|
+
in the PR; encode closure directly in the PR body.
|
|
448
|
+
- PRs must include an explicit exit-steps checklist item confirming issue status
|
|
449
|
+
updates are complete before merge.
|
|
450
|
+
- AI agents and human contributors follow the same requirement. If issue status
|
|
451
|
+
closure is missing, the PR is not done.
|
|
452
|
+
|
|
453
|
+
---
|
|
454
|
+
|
|
455
|
+
## I-10: Do not edit CHANGELOG.md manually
|
|
456
|
+
|
|
457
|
+
`CHANGELOG.md` is updated automatically by the release workflow (semantic
|
|
458
|
+
release / release tooling). Agents and contributors must **not** add,
|
|
459
|
+
reorder, or edit changelog entries in feature, bugfix, or docs PRs.
|
|
460
|
+
|
|
461
|
+
What to do instead:
|
|
462
|
+
|
|
463
|
+
- Describe user-visible changes in the PR title and body.
|
|
464
|
+
- Rely on conventional commit messages and the release process to populate
|
|
465
|
+
`CHANGELOG.md` after merge.
|
|
466
|
+
|
|
467
|
+
If release tooling fails to capture a change, fix the release configuration or
|
|
468
|
+
commit message conventions — do not patch `CHANGELOG.md` by hand in ordinary
|
|
469
|
+
PRs.
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## I-11: Explain technical concepts in plain language, example-first
|
|
474
|
+
|
|
475
|
+
When explaining a concept, design, trade-off, or change to the maintainer, lead
|
|
476
|
+
with plain language and a concrete, user-facing example — not internal function
|
|
477
|
+
names and call graphs.
|
|
478
|
+
|
|
479
|
+
Rules:
|
|
480
|
+
|
|
481
|
+
- **Anchor on what the user sees.** Show a real model definition and the SQL (or
|
|
482
|
+
behavior) it produces, then explain the internal mechanics against that
|
|
483
|
+
anchor. "A `datetime` field becomes `timestamptz` — here's the `CREATE TABLE`"
|
|
484
|
+
beats "`canonical_from_parts` maps the logical type."
|
|
485
|
+
- **Introduce jargon only after the plain version.** Function and type names are
|
|
486
|
+
precise back-references once the idea is clear — not the primary explanation.
|
|
487
|
+
- **Use analogies for architecture.** "Two translation dictionaries that must
|
|
488
|
+
agree by hand" communicates a duplication smell faster than a module diagram.
|
|
489
|
+
- **Show, don't just tell.** Prefer before/after diffs, rendered SQL, and
|
|
490
|
+
concrete values over abstract prose (complements the show-don't-tell habit
|
|
491
|
+
used in issue/PR explanations).
|
|
492
|
+
|
|
493
|
+
This applies to brainstorming, design discussions, PR descriptions, issue
|
|
494
|
+
comments, and any explanation directed at the maintainer. It governs how work is
|
|
495
|
+
communicated, not what gets built.
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
## I-13: Query and update literals match save() for datetime/date/time/UUID/Decimal
|
|
500
|
+
|
|
501
|
+
A developer pages a chat transcript with `after()` on a UTC datetime order
|
|
502
|
+
key:
|
|
503
|
+
|
|
504
|
+
```python
|
|
505
|
+
pinned_at = datetime(2026, 3, 1, 15, 0, tzinfo=UTC)
|
|
506
|
+
await Message(id=2, pinned_at=pinned_at, ...).save()
|
|
507
|
+
page = await (
|
|
508
|
+
Message.order_by(lambda m: m.pinned_at)
|
|
509
|
+
.order_by(lambda m: m.id)
|
|
510
|
+
.after((pinned_at, 2))
|
|
511
|
+
.all()
|
|
512
|
+
)
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
SQLite stores that timestamp as **text**. `save()` writes pydantic JSON
|
|
516
|
+
(`2026-03-01T15:00:00Z`). `datetime.isoformat()` writes `…+00:00`. Those are
|
|
517
|
+
the same instant to a human and to Postgres `timestamptz`; to SQLite they
|
|
518
|
+
are different strings, so keyset prefix equality misses and the next page
|
|
519
|
+
can skip the cursor row.
|
|
520
|
+
|
|
521
|
+
Query and `update()` literals for `datetime`, `date`, `time`, UUID, and
|
|
522
|
+
Decimal canonicalize through one function (`canonicalize_wire_scalar`) whose
|
|
523
|
+
output for a given value is pinned against `save_bind_payload`. `save()`
|
|
524
|
+
remains instance `model_dump` (field serializers stay on that door). A
|
|
525
|
+
second datetime/UUID/Decimal cascade — including `datetime.isoformat()` or a
|
|
526
|
+
“mirrors save_bind_payload” comment — is an I-13 violation. Enums on the
|
|
527
|
+
query wire are out of scope for this invariant.
|
|
528
|
+
|
|
529
|
+
Pinned by helper-vs-save unit equality for those five types and by a SQLite
|
|
530
|
+
`save` then `after((original_python_datetime, pk))` paging test.
|
|
531
|
+
Architecture review: I-22 in #428. See PRD #430 and
|
|
532
|
+
`docs/solutions/patterns/wire-scalar-canonicalization.md`.
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
## Agent skills
|
|
537
|
+
|
|
538
|
+
### Issue tracker
|
|
539
|
+
|
|
540
|
+
GitHub Issues on `syn54x/ferro-orm`; external PRs are a triage surface. See `docs/agents/issue-tracker.md`.
|
|
541
|
+
|
|
542
|
+
### Triage labels
|
|
543
|
+
|
|
544
|
+
Canonical five-role vocabulary (`needs-triage`, `needs-info`, `ready-for-agent`, `ready-for-human`, `wontfix`). See `docs/agents/triage-labels.md`.
|
|
545
|
+
|
|
546
|
+
### Domain docs
|
|
547
|
+
|
|
548
|
+
Single-context — `CONTEXT.md` at repo root, ADRs in `docs/adr/`. See `docs/agents/domain.md`.
|
|
549
|
+
|
|
550
|
+
<!-- sdd-routing -->
|
|
551
|
+
## Agent workflow
|
|
552
|
+
|
|
553
|
+
- Specs and plans live in GitHub Issues. Never create `docs/plans`, `docs/specs`, `.scratch/*/issues` or any plan file in the repo.
|
|
554
|
+
- Plan with `/grill-with-docs` → `/to-spec` → `/to-tickets`. Build with `/build-epic <epic#>` (M/L/XL) or `/implement <N>` (one ticket).
|
|
555
|
+
- Do not use brainstorming, writing-plans, ce-plan or any other plan-writing skill. `/to-spec` owns the spec; `/to-tickets` owns the plan.
|
|
556
|
+
- Workers: TDD, run the issue's **Verify** block, open a PR with `Closes #N`, never merge.
|
|
557
|
+
- Readiness = open + not blocked + unassigned + `ready-for-agent`. Claim by assigning yourself. Unclaim if you stop without a PR.
|
|
558
|
+
- Progress is one comment per issue under `<!-- sdd-progress -->`, rewritten in place. Never post a second one.
|
|
559
|
+
- Mode: org. Sizes: `size:S/M/L` labels. Priority: none.
|
|
560
|
+
- Upstream feedback: on. When on, `close-epic` may propose skill-defect issues on syn54x/skills-plus-plus, allowlisted fields only, each one shown and approved by a human before filing; never from a non-interactive run.
|
|
561
|
+
<!-- /sdd-routing -->
|