Repository navigation
716 archived field cc group models - #5
Closed
Conversation
…terion (openedx#716) Adds archived = models.BooleanField(default=False) to both models, in one migration, per ADR 0002 Decision 7's archive-only retirement rule. No archived_at companion field: django-simple-history (ADR 0003) already tracks both models, covering the "when" without a separate timestamp. Both models' existing `.. no_pii:` class-level docstring annotation already covers the new field, matching CompetencyRuleProfile.archived's existing non-PII precedent; no separate registry change needed. This ticket makes no behavior changes: nothing here sets, reads, or filters on the field. That is downstream tickets' scope (openedx#674, openedx#675, openedx#681). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Pins the same contract CompetencyRuleProfile.archived already has a test for (test_rule_profile.py's test_creating_a_rule_profile_persists_its_columns): a freshly created row is not archived unless told otherwise. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
6 tasks
tbain
approved these changes
Sep 30, 2026
tbain
left a comment
There was a problem hiding this comment.
Approved from me, and Codex had no issues or comments either
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
archived = models.BooleanField(default=False)toCompetencyCriteriaGroupandCompetencyCriterion, in one migration, per ADR-0002Decision 7's archive-only retirement rule (a group or criterion referenced by learner status is
retired by archiving, never hard-deleted). No
archived_atcompanion field:django-simple-history(ADR-0003) already tracks both models, covering the "when" without a separate timestamp.
This PR makes no behavior changes. Nothing here sets, reads, or filters on
archived; that'sdownstream tickets' scope (openedx#674, openedx#675, openedx#681). Both models' existing
.. no_pii:class-leveldocstring annotation already covers the new field, matching
CompetencyRuleProfile.archived'sexisting non-PII precedent, so no separate PII registry change was needed.
Impacted roles: Developer only. This is a schema-only change with no reachable behavior yet;
no Course Author, Learner, or Operator-facing effect until a downstream ticket starts using the
field.
Supporting information
lands first adds it" language in their own tickets)
its own branch/PR so the model change lands and reviews independently of [BE] GET Competency Criteria & Groups openedx/openedx-core#681's endpoint logic
Testing instructions
python manage.py migrate openedx_learningpython manage.py makemigrations --check --dry-run(shouldreport nothing pending for
openedx_learning)pytest tests/openedx_learning/applets/cbe/test_criteria_group.py tests/openedx_learning/applets/cbe/test_criterion.py --no-cov— includes
test_group_archived_defaults_to_falseandtest_criterion_archived_defaults_to_false,pinning the same "defaults to False" contract
CompetencyRuleProfile.archivedalready has a testfor
pytest tests/openedx_learning/applets/cbe/ --no-covtox -e pii_check(or directly:code_annotations django_find_annotations --config_file .pii_annotations.yml --report --coverage)and confirm
CompetencyCriteriaGroup/CompetencyCriterionare not listed among uncovered modelsOther information
AddFieldon four tables — the two models plus theirdjango-simple-historyhistorical counterparts); no data migration involved.🤖 Generated with Claude Code