Register the event-slug data migration in the isolation inventory
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Mở test_support/tests/test_migrations.py và tìm MigrationSeedContractTests.test_every_data_migration_uses_historical_apps_without_runtime_side_effects. Thêm đường dẫn migration được đề cập vào inventory chính xác hiện có, giữ nguyên thứ tự và các kiểm tra của inventory đó. Chạy Django test tập trung được quản lý bằng uv; hoàn tất khi migration 0012 được phát hiện và đánh giá mà không thay đổi hành vi migration hoặc làm suy yếu fail-closed coverage.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Product outcome
Restore the deterministic data-migration isolation gate after the accepted event-slug shortening added a historical RunPython migration without registering it in the gate's exact inventory. The gate must discover and inspect that migration like every other data migration, while event rows, aliases, canonical URLs, slug allocation, and migration execution remain byte-for-byte behaviorally unchanged.
Confirmed evidence
- Exact failed release anchor:
face8e4808d65afbf0374d1ced7a88079950d663. - Scheduled run 33315212334, migrations job 99267303151 ran
make test-migrationsand failedMigrationSeedContractTests.test_every_data_migration_uses_historical_apps_without_runtime_side_effectsbecause the discovered set contained one unregistered path:events/migrations/0012_shorten_event_slugs.py. - Commit
ef19e48added that migration. It uses historicalapps.get_model("events", "Event")andapps.get_model("events", "EventAlias"), performs deterministic ordered database updates, and imports no current application model/service. test_support/tests/test_migrations.pymaintains an exact allowlist of every file for whichdata_migration_functions()finds aRunPythoncallable. It then runsassert_data_migration_isolation(path)and requires the source to containapps.get_modelfor every registered path. The new migration is discovered correctly; only the expected inventory entry is absent.- The same CI job separately fails
EditorialRouteMigrationContractTests.test_checked_manifest_is_bound_to_schema_projection_and_runtimeon a projection digest mismatch. That failure belongs to #253 and is not part of this issue. - Repository and GitHub issue search found no existing owner for the missing
0012_shorten_event_slugs.pyinventory entry. #261 owns a bounded formatting/typing/template recovery and does not include this file or failure.
Normative authority
- Development process, for truthful red-gate recovery, role separation, and terminal verification.
- Migration and rollout roadmap, for backend-portable migrations and migration gates.
- Event specification, for immutable Event identity and event behavior that this gate-only correction must preserve.
test_support/tests/test_migrations.py, the current executable exact-inventory and historical-app isolation contract.
Scope
Change exactly one tracked file:
test_support/tests/test_migrations.py
Add events/migrations/0012_shorten_event_slugs.py exactly once to the expected data-migration path set in test_every_data_migration_uses_historical_apps_without_runtime_side_effects. Retain exact-set equality so both an unreviewed new data migration and a stale/nonexistent inventory entry continue to fail closed.
The existing loop must then apply the existing isolation checker and historical-apps.get_model source assertion to migration 0012; do not special-case, skip, mock, or weaken either check.
Acceptance criteria
- The exact expected data-migration inventory contains
events/migrations/0012_shorten_event_slugs.pyonce, in the established deterministic ordering, with no other inventory membership change. - The focused inventory test discovers migration
0012through the existing AST-basedRunPythondetection and runs the sameassert_data_migration_isolationandapps.get_modelrequirements used for every other data migration. - Removing the new inventory entry reproduces the exact unexpected-path failure; adding an unregistered synthetic numbered
RunPythonmigration or a stale expected path still fails exact-set equality. No permissive glob-only assertion replaces the reviewed inventory. -
events/migrations/0012_shorten_event_slugs.py,events/slugs.py, event models/services/routes/templates/projections/manifests, and event tests are unchanged by this issue. - Existing migration
0012semantics remain unchanged: historical models only, deterministicidordering, current slug/alias update behavior, no network/provider/runtime-model import, and the existing no-op reverse operation. - The exact focused Django test passes on the frozen candidate. After #253 repairs the independent editorial projection digest mismatch,
make test-migrationspasses in full with 18 tests and no skip, retry, xfail, quarantine, assertion weakening, or accepted residual failure. - Locked format/lint/type/migration-drift checks and the graph-selected versioned verification plan/report pass on the same frozen candidate.
- Engineer and independent tester publish their exact base/candidate, one-file diff digest, plan/report digests, terminal commands/counts, and confirm the event product surface is unchanged.
Required test scenarios
- Run the exact focused test:
uv run --frozen python manage.py test --noinput test_support.tests.test_migrations.MigrationSeedContractTests.test_every_data_migration_uses_historical_apps_without_runtime_side_effects. - Prove migration
0012is in the discovered set and is evaluated by both existing historical-isolation assertions, without changing the migration source. - Prove the contract remains fail-closed for one unexpected numbered
RunPythonmigration and one stale expected path using the smallest existing test technique; do not leave a synthetic migration in the repository. - On a base containing #253's accepted projection repair, run
make test-migrationsand require all 18 tests green. A run that still contains #253's unrelated digest failure is useful attribution evidence but is not terminal tester acceptance. - Run the change-selective plan and every selected repository/Django gate. Browser execution and screenshots are
not_applicableonly if the final one-file diff proves no render-impact path changed.
Dependencies and recovery ordering
There is no implementation dependency on #253 or #261: an engineer may prepare and freeze this one-file correction independently from the exact face8e4 anchor. It does not overlap #261's allowed files and must not be folded into or mutate the already frozen #261 candidate.
Final tester acceptance and integration do require a clean shared migration component. #253 owns the second, independent make test-migrations failure and must supply its accepted repair before this issue can claim the full target green. Preserve the recovery order already assigned to #261; rebase this candidate after the accepted #253/#261 recovery base and land it immediately after them, before later recovery issues reuse or claim migration-component evidence. Any base or source change invalidates the versioned plan and requires recomputation.
Non-goals
- No edit to
events/migrations/0012_shorten_event_slugs.py, event data, aliases, slug length/allocation, routes, redirects, public copy, visual design, or event behavior. - No new migration, seed, reverse migration, data replay, database/provider/production access, or durable job.
- No #253 projection/source/pin/manifest/hash/terminology repair and no generated artifact change.
- No #261 formatting, archive-row, normalization, or prose-template work.
- No refactor of
data_migration_functions,assert_data_migration_isolation, the migration test suite, Make targets, CI workflow, tool version, or verification policy. - No assertion weakening, broad exception, skip, retry, xfail, quarantine, timeout increase, test deletion/demotion, commit, push, merge, or deployment during engineering/testing.
Verification disposition
This is an internal migration-test contract correction with no product render impact. Playwright and screenshots are not_applicable only for the exact one-file final diff; the independent tester must confirm that disposition from the recomputed graph. The ordinary engineer → independent tester → PM acceptance → focused commit → local no-ff merge/push → on-call lifecycle still applies.
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DataTalksClub/website
-
bug infra operations P1 testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
DataTalksClub/website#329 ·
-
bug content data-migration documentation events operations P1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
DataTalksClub/website#327 ·
-
bug frontend P0 testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
DataTalksClub/website#300 · 7 bình luận ·
-
bug needs grooming P1 testing
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
DataTalksClub/website#473 ·
-
auth courses email enhancement P1
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
DataTalksClub/website#472 · 1 bình luận ·
Tất cả issue của DataTalksClub/website
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
GoogleCloudPlatform/gce-rescue#195 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
intake mcp-intake needs-ac needs-human-review priority:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Ikalus1988/MisakaNet#3848 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
521xueweihan/HelloGitHub#4105 ·
-
bug size:XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày