Rename AI verdict columns to neutral semantics #102
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/issue-100-rename-ai-verdict-columns"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Sub-PR 2 of 3 for the domain-agnostic AI classification effort (#100).
What
c4e8a1f3b7d2) renamingposts.text_is_promotional→text_flaggedandposts.vision_is_real_cat→vision_accepted— rename only, data preserved, downgrade restores the old names.models.pymapped attributes andschemas.pyREST response fields follow the new names (breaking API change; Zhongli reads none of these fields — verified).ai_pipeline.py) swept to the new attribute names.Tests (TDD)
3d17cba4ae82with seeded rows via old column names → upgrade to head → values preserved under new names, old names gone; downgrade restores.text_flagged/vision_acceptedexposed, old keys dropped.Refs #100
WuMing
Found 1 issue(s). See inline comments below.
@ -20,6 +21,10 @@ The posts API's `reviewer_notes` field is now `auto_reject_reason`. The old name---The two AI verdict fields in the posts API have new, topic-neutral names: `text_is_promotional` is now `text_flagged`, and `vision_is_real_cat` is now `vision_accepted`. Since the classification prompts are configurable, the API should not assume the curated topic is cats — a book-curation instance flags text for opposite reasons, and "accepted" describes what the vision stage decided without naming the subject. Existing databases keep their data through the rename via a migration; only code reading these field names needs updating.docs [LOW]
The phrase 'flags text for opposite reasons' is vague and potentially misleading; a book-curation instance could flag text for different (not necessarily opposite) topic-specific criteria. Consider rewording to 'may flag text for entirely different reasons' or 'for different topic-specific reasons'.
packages/fenliu/Release-Notes.md✅ Fixed in commit
a0b7697— now reads "a book-curation instance may flag text for entirely different reasons".WuMing
Found 2 issue(s). See inline comments below.
@ -20,6 +21,10 @@ The posts API's `reviewer_notes` field is now `auto_reject_reason`. The old name---The two AI verdict fields in the posts API have new, topic-neutral names: `text_is_promotional` is now `text_flagged`, and `vision_is_real_cat` is now `vision_accepted`. Since the classification prompts are configurable, the API should not assume the curated topic is cats — a book-curation instance may flag text for entirely different reasons, and "accepted" describes what the vision stage decided without naming the subject. Existing databases keep their data through the rename via a migration; only code reading these field names needs updating.docs [LOW]
Formatting inconsistency: the renamed field names in this prose paragraph are not wrapped in backticks, unlike the same field names in the bullet on line 9 and elsewhere in the release notes. Wrap
text_is_promotional,text_flagged,vision_is_real_cat, andvision_acceptedin backticks for consistent code formatting.@ -395,0 +455,4 @@@test("Downgrade restores the original AI verdict column names")def test_downgrade_restores_names() -> None:"""Downgrading from head puts the cat-era column names back with data intact."""tests [LOW]
The downgrade test's docstring claims data remains intact, but the test never seeds a row before downgrade and adds no data-preservation assertions. Either seed a row and verify its values after downgrade, or narrow the docstring to only claim column names are restored.
✅ Fixed — downgrade test overclaimed data preservation
tests/test_database.py✅ Fixed in commit
d61db4c— the test now seeds a row at head (new column names), downgrades, and asserts the values survive under the restored old names, so the docstring's claim is actually verified.🔴 Not actioned — field names are already backticked
packages/fenliu/Release-Notes.mdThe four field names in that paragraph are wrapped in backticks in both revisions of this file in the PR (
229607aand current):`text_is_promotional`,`text_flagged`,`vision_is_real_cat`,`vision_accepted`— matching the bullet on line 9. No change needed.