Skip to content

chore: complete FIX-G-004 + bump v0.4.0 (5-state trust model release)#3

Merged
typelicious merged 1 commit into
mainfrom
chore/g-004-completion-and-v0.4.0
Jun 3, 2026
Merged

chore: complete FIX-G-004 + bump v0.4.0 (5-state trust model release)#3
typelicious merged 1 commit into
mainfrom
chore/g-004-completion-and-v0.4.0

Conversation

@typelicious

Copy link
Copy Markdown
Contributor

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

Source Change
Direct push (62670bd) 5-state trust model migration (audited → pending_review; deprecated added)
PR #2 TRUST_BADGES dict + get_trust_badge() helper
PR #2 test_models.py migrated from v1 4-state to v2 5-state vocabulary
This PR datetime.utcnow() → datetime.now(timezone.utc) in models.py (6 occurrences)
This PR pyproject.toml version 0.2.0 → 0.4.0
This PR CHANGELOG.md v0.4.0 entry

Breaking changes for downstream consumers

  • TrustState.AUDITED is removed — use TrustState.PENDING_REVIEW instead. Database rows with trust_state='audited' are normalized via normalize_legacy_state().
  • VALID_TRANSITIONS updated for 5-state graph; DEPRECATED end-of-life state added.

Verification

  • PYTHONPATH=src pytest tests/test_models.py → 55 passed
  • grep -rn "datetime.utcnow" src/ → 0 occurrences
  • No DeprecationWarning: datetime.datetime.utcnow() under Python 3.14
  • Ruff clean

Test plan

  • CI green (pytest 3.10/3.11/3.12)
  • After merge: tag v0.4.0 on main (manual until release workflow exists)
  • Publish to PyPI (manual or via new release workflow — to be decided in launch coordination)
  • Verify pip install capacium-models==0.4.0 works in clean venv

Process 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.

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 dev-bot-capacium left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to from datetime import datetime, timezone. Functionally equivalent — produces timezone-aware UTC datetimes instead of naive (deprecated in Py 3.12+, removed in future).
  • pyproject.toml — version 0.2.00.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 passed
  • grep -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.

@typelicious typelicious merged commit 6ec40c3 into main Jun 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants