chore: complete FIX-G-004 + bump v0.4.0 (5-state trust model release)#3
Merged
Merged
Conversation
This is the v0.4.0 release commit consolidating since v0.2.0: - 5-state trust model migration (already on main via 62670bd) - TRUST_BADGES + get_trust_badge() helper (PR #2, ef4f770) - test_models.py migrated to v2 vocabulary (PR #2) - datetime.utcnow() cleanup in models.py (this commit, closes FIX-G-004 gap) Changes in this commit: - src/capacium_models/models.py: 6× datetime.utcnow() → datetime.now(timezone.utc). Extended import accordingly. Closes the FIX-G-004 completion gap that the original Stream G codemod missed. - pyproject.toml: version 0.2.0 → 0.4.0 - CHANGELOG.md: v0.4.0 entry documenting breaking changes (TrustState AUDITED removed → PENDING_REVIEW), new features (TRUST_BADGES, get_trust_badge), bug fixes (utcnow cleanup), test migration, and process notes (5-state migration commit landed without PR). Verified locally: PYTHONPATH=src pytest tests/test_models.py → 55 passed, zero utcnow DeprecationWarnings under Python 3.14. Next step (out of scope for this PR): tag v0.4.0 on main + publish to PyPI. capacium-models has no automated release workflow yet — will be handled manually or via a follow-up workflow PR.
dev-bot-capacium
approved these changes
Jun 3, 2026
dev-bot-capacium
left a comment
There was a problem hiding this comment.
Code review for PR #3 (chore: complete FIX-G-004 + bump v0.4.0).
Scope: Release-prep PR consolidating capacium-models changes since v0.2.0:
- 5-state trust model migration (already on main via direct push 62670bd)
- TRUST_BADGES + get_trust_badge() helper (PR #2, merged)
- test_models.py migrated to v2 vocabulary (PR #2)
- This PR: FIX-G-004 completion (datetime.utcnow → now(timezone.utc) in models.py); pyproject.toml v0.2.0 → v0.4.0; CHANGELOG.md v0.4.0 entry.
Files reviewed:
src/capacium_models/models.py— 6×datetime.utcnow().isoformat()→datetime.now(timezone.utc).isoformat()(lines 74, 165, 215, 289, 326, 352); import extended tofrom datetime import datetime, timezone. Functionally equivalent — produces timezone-aware UTC datetimes instead of naive (deprecated in Py 3.12+, removed in future).pyproject.toml— version0.2.0→0.4.0. Skip-by-1 from 0.2.0 to 0.4.0 documented in CHANGELOG Process Notes (5-state migration that landed via 62670bd direct push is captured retroactively in this release entry).CHANGELOG.md— comprehensive v0.4.0 entry with Breaking Changes / New Features / Bug Fixes / Test Migration / Process Notes sections.
Local verification:
PYTHONPATH=src pytest tests/test_models.py→ 55 passedgrep -rn datetime.utcnow src/→ 0 occurrences- No
DeprecationWarning: datetime.datetime.utcnow()under Python 3.14
Remote CI: 3/3 SUCCESS (test 3.10/3.11/3.12).
Note: Approval via dev-bot-capacium per explicit maintainer authorization. PR work was guided by v2 Fix-PRD launch-prd.md §4 Phase 1 reviewed and approved by maintainer prior to implementation. Side-finding (FIX-G-004 completion gap) folded into this PR per maintainer request rather than separate cleanup PR.
Approved.
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.
Summary
Release prep for capacium-models v0.4.0 — consolidates all changes since v0.2.0 (tagged 2026-05-24) and closes the FIX-G-004 datetime.utcnow() gap that was missed in the original Stream G codemod.
What's included in v0.4.0
Breaking changes for downstream consumers
TrustState.AUDITEDis removed — useTrustState.PENDING_REVIEWinstead. Database rows withtrust_state='audited'are normalized vianormalize_legacy_state().VALID_TRANSITIONSupdated for 5-state graph;DEPRECATEDend-of-life state added.Verification
PYTHONPATH=src pytest tests/test_models.py→ 55 passedgrep -rn "datetime.utcnow" src/→ 0 occurrencesDeprecationWarning: datetime.datetime.utcnow()under Python 3.14Test plan
v0.4.0on main (manual until release workflow exists)pip install capacium-models==0.4.0works in clean venvProcess note
The 5-state migration commit (62670bd) landed on main without a PR. This release is the first tag covering those changes. CHANGELOG documents the irregular trail.