Declare C5.2m coursework Project defaults (module, commit_id_field) in the shared-course import mapping
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
调研方向
Read scripts/prod/import_shared_course_platform.py, especially _mapping(), _refuse_mapping_drift(), and _import_projects(), then run the existing importer and defaults tests. Extend scripts/tests/test_import_shared_course_platform_defaults.py for fresh defaults, replay preservation, and unknown-field refusal, and update _docs/architecture/course-platform-shared-apps-mapping.md. Done means the focused tests and required verification checks pass without changing the pinned environment or unrelated import behavior.
由索引模型根据 Issue 内容生成。
描述
Goal
Keep the DataTalks.Club course experience, learner records, and shared-course import behavior unchanged while accepting two reviewed community-base C5.2m Project fields. Preserve the importer's refusal of every unreviewed field. This is bounded compatibility work for the shared AISL/DTC course package, not a site feature change.
Read first and authority
- _docs/specs/04-courses-and-cohorts.md: cohort-owned assessment behavior and preservation of existing project, submission, review, score, and result flows.
- _docs/specs/09-migration-rollout-roadmap.md: atomic, repeatable import and retained learner data.
- _docs/architecture/course-platform-shared-apps-mapping.md: P6 field decisions, package defaults, and decision 4 for site-side cohort modules.
- _docs/runbooks/production-data-migration.md: P6 import and refusal contract.
- _docs/PROCESS.md, _docs/ci/change-selective-ci.md, coding-standard.md.
- Accepted mapping precedent #443, source-order compatibility #445, and community-base PR #351 at exact candidate
97bafa0449dd5f215680b7500c65611280ae5b05.
Evidence and field decisions
At DTC main 058956428f19aaeaa292c980afac75e92132b841, scripts/prod/import_shared_course_platform.py:_mapping() maps courses.Project to cb_coursework.Project and declares only pooled_review_window_days as a package default. _refuse_mapping_drift() checks actual concrete target fields before family writes. The P16 DTC consumer job for PR #351 reports 21 MappingCoverageDrift errors after the candidate adds two concrete fields in cb_coursework.0006_project_module_commit_id_field.
| Target field | DTC source decision | Fresh imported row | Replay |
|---|---|---|---|
Project.module |
DTC projects belong to a Cohort; site modules remain site-side under decision 4, so no source module FK is inferred. | Package nullable FK default None. |
Preserve any target-side module assignment. |
Project.commit_id_field |
DTC's existing submission model and flow collect a commit ID. | Package Boolean default True. |
Preserve any target-side value. |
The candidate also changes ProjectSubmission.commit_id to blank=True; project validation still requires it when commit_id_field=True. That package validation change is not a DTC import mapping field and requires no DTC submission rewrite. The currently pinned community-base v0.5.10 lacks the two target fields. Exact default names are inert under that pin because the drift guard checks actual model fields; every other unclassified concrete field must still refuse the run.
Scope and non-goals
- In
scripts/prod/import_shared_course_platform.py, add onlymoduleandcommit_id_fieldto the existingProjectpackage-default frozenset. Keep_refuse_mapping_drift()strict and keep_import_projects()write values and identity key unchanged. - Extend
scripts/tests/test_import_shared_course_platform_defaults.py, the existing registered test owner, with Project real-candidate default, replay, and unknown-field refusal coverage. Reuse its synthetic graph and helpers where practical; keep the test file within the coding-standard size limit. - Add the two decisions to
_docs/architecture/course-platform-shared-apps-mapping.mdbeside the other reviewed package defaults. - Do not edit package code, site models/migrations, public readers, forms, templates, routes, API, permission rules, project-submission validation, deployment workflow, dependency pin, lockfile, quality exclusions, or broad field allowlists. Do not assign a shared module from a site module or force these values into replay update dictionaries.
Dependencies and sequencing
The exact reviewable PR #351 candidate and migration already exist, so engineering may start in its own clean isolated DTC worktree. Package merge or v0.5.19 release is not a prerequisite: the package's required P16 DTC check needs this source correction on DTC main first. Use the candidate only in a package-owned disposable consumer context for actual-model proof; keep the original DTC worktree on its tagged pin.
Development recovery #442 / aws-infra #58 is a separate operational gate. It does not block local compatibility implementation, independent testing, PM source acceptance, or source integration. If the ordinary exact-source development deploy remains refused, keep this issue open with Refs #448 and record the blocker; do not claim deployed acceptance. No further database reset, manual AWS change, deployed import, or workaround is authorized here.
Sequence: frozen DTC patch and pinned tests -> exact PR #351 candidate-model proof -> independent tester -> PM acceptance -> focused source commit and local no-ff main merge/push -> on-call observes DTC CI and ordinary development deploy -> package owner reruns final P16 against updated DTC main -> package PR merge/release under its own process.
Acceptance criteria
- AC1: Only the two exact reviewed
cb_coursework.Projectfields join its package-default set. DTC source fields, import value dictionary, natural key(cohort, slug), and all other mapping families retain their behavior. The existingv0.5.10pin,pyproject.toml,uv.lock, and source seals remain unchanged. - AC2: The pinned site environment accepts simulated concrete
Project.moduleandProject.commit_id_fieldtogether. A genuinely unrelated concrete Project field still raises a namedMappingCoverageDriftbefore_import_coursesor any family write. A broad default, catch, suppression, or bypass does not satisfy this criterion. - AC3: Against exact candidate
97bafa0449dd5f215680b7500c65611280ae5b05with its real0006migration, a fresh synthetic import produces Projectmodule_id=Noneandcommit_id_field=True, preserves copied fields, project submissions and equal family counts. No candidate-only skip counts as proof. - AC4: In that real-candidate context, replay keeps project and submission identities and existing learner/review/score records; after a target-only Project module and
commit_id_field=Falseare set, replay preserves both while still refreshing ordinary copied source fields. An unrelated concrete target field still fails before writes. No duplicate rows or reset of target-only metadata occurs. - AC5: Mapping documentation states why each default is safe, the fresh and replay values, the absent-field behavior under the current pin, and continuing unknown-field refusal. No UI, URL, copy, accessibility, permission, or API behavior changes.
- AC6: Focused importer/default tests, migration-drift check if selected,
make lint,make lint-advisory, and every component selected by the versioned verification plan pass. Engineer records exact base/head, patch digest, graph/plan digests, commands/counts, and allrerun,reused,skipped, andnot_applicabledispositions. Required failures or pending evidence are fixed before handoff. - AC7: Separate tester independently recomputes the plan, verifies frozen source and candidate evidence, runs focused Django and applicable browser checks, and posts a PASS report. PM then accepts the user-visible preservation contract. Source CI and ordinary development deployment are reported separately after push; a failed deployment is not accepted as green.
Verification scenarios
- Pinned DTC: run
uv run --frozen python manage.py test scripts.tests.test_import_shared_course_platform scripts.tests.test_import_shared_course_platform_defaults. The existing importer suite covers dry-run rollback, family equality, replay and refusals; extend the defaults suite for the two Project fields and unrelated-field refusal. - Candidate package: in a disposable package-owned P16 consumer checkout overlaying only the frozen DTC patch, run the same importer/default modules against the exact PR #351 SHA and real migrated model. Record package SHA, DTC base/patch digest, environment, counts and zero candidate-only skips. Run the selected broader plan when the controller requires it.
- Generate and run the local verification plan with
uv run --frozen python scripts/ci.py verification-plan,verification-run, andverification-report-checkper the plan's command/environment contract.scripts/is import/test infrastructure, so use the graph-selected full checks when required. Do not hand-narrow the plan. - Browser: this change has no product-page render surface, so screenshots are
not_applicablewith that reason. The separate tester runs at leastuv run --frozen python scripts/ci.py test-playwright-smoke; use a broader browser tier if the generated plan selects it. There is no new URL, state, copy, or denial flow to screenshot. All data remains synthetic and local.
Required role handoffs
SWE owns the three named paths and freezes an uncommitted patch. A separate tester verifies it; PM accepts after tester PASS. SWE then commits with Refs #448 while the development gate is open. Root merges locally with --no-ff, pushes, and dispatches sole on-call observer. DTC creates no pull request.
- 主要语言
- Python
- 星标
- 0
- 派生
- 0
- 平均合并
- 37 分钟
- 30 天内合并 PR
- 36
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DataTalksClub/website 的其他 Issue
-
bug infra operations P1 testing
难度 2/5 1-3 小时 新手友好度 72/100
DataTalksClub/website#329 ·
维护者通常 1 天内回复
-
bug content data-migration documentation events operations P1
难度 2/5 1-3 小时 新手友好度 84/100
DataTalksClub/website#327 ·
维护者通常 1 天内回复
-
bug frontend P0 testing
难度 2/5 1-3 小时 新手友好度 90/100
DataTalksClub/website#300 · 7 条评论 ·
维护者通常 1 天内回复
-
bug data-migration events P0 testing
难度 2/5 1-3 小时 新手友好度 72/100
DataTalksClub/website#295 · 6 条评论 ·
维护者通常 1 天内回复
-
Show pending evaluation instead of premature project failure and zero scores (CMP drift)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug courses frontend P1
难度 4/5 3-5 天 新手友好度 35/100
DataTalksClub/website#525 · 2 条评论 ·
维护者通常 1 天内回复
查看 DataTalksClub/website 的全部 Issue
相似的 Issue
-
[dbt] exported dataset keys reference physical columns可能已有人在做 @WilliamKelley 今天认领。 未关闭needs-triage
难度 2/5 1-3 小时 新手友好度 68/100
apache/ossie-converters#251 ·
维护者通常 2 天内回复
-
cli difficulty: easy enhancement
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
desec-io/desec-stack#1312 ·
维护者通常 14 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 82/100
aws/aws-durable-execution-sdk-python#977 ·
维护者通常 1 天内回复
-
needs-triage
难度 1/5 1 小时以内 新手友好度 88/100
flashinfer-ai/flashinfer#9803 ·
维护者通常 1 天内回复