Make public treasury timestamps UTC-explicit#745
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR standardizes datetime representation across treasury and account APIs by introducing a ChangesUTC Timestamp Serialization
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
bitdamii
left a comment
There was a problem hiding this comment.
Reviewed current head 8e436ff71178744be76be52704fb6022f38bc502 as a non-author for the review bounty.
Evidence:
- Inspected the new
public_utc_timestamp()helper and every treasury/account/activity surface changed by this PR: proposal summaries, account pending payouts, activity pending payouts, treasury proposal/challenge serialization, capacity projection events, and recent reserve windows. - Verified the conversion path treats the app's stored naive UTC datetimes as UTC, normalizes aware datetimes to UTC, and emits an explicit
Zsuffix instead of ambiguous timezone-less ISO strings. - Checked the patch against current
origin/main;git diff --checkis clean andgit merge-tree --write-tree origin/main HEADproducedb6d4196b9880126dcea645faec6b95f5c67f263bwithout conflicts. - Local validation passed: targeted pytest coverage for account/activity/treasury timestamp surfaces was
7 passed;ruff checkpassed;ruff format --checkpassed;python -m compileall -q apppassed. - GitHub shows the PR as CLEAN with Quality/readiness/docs/image checks successful and CodeRabbit successful.
I did not find any blocking issue in the current head.
|
Follow-up pushed in What changed:
Validation run locally on
No ledger, payout, wallet, transfer, exchange, bridge, or private account behavior changed. |
bitdamii
left a comment
There was a problem hiding this comment.
Follow-up review on updated current head aeb6160e138566515fa944ef79f708a5eeddabbf after the author pushed aeb6160.
Additional evidence checked:
- Inspected the follow-up diff from
8e436ff71178744be76be52704fb6022f38bc502toaeb6160e138566515fa944ef79f708a5eeddabbf; it extendspublic_utc_timestamp()to directbounty_to_dict().created_atandbounty_awards_to_dict().created_atsurfaces. - Confirmed the added serializer/MCP assertions cover bounty row timestamps and accepted award history timestamps with explicit UTC
Zoutput. - Re-ran local validation on the updated head: targeted timestamp/account/activity/treasury/serializer/MCP pytest selection was
10 passed;ruff checkpassed;ruff format --checkpassed;python -m compileall -q apppassed;git diff --check origin/main...HEADwas clean;git merge-tree --write-tree origin/main HEADproduced clean tree6532678dd02a606f0a29ed49f15cdb5e9832592e. - GitHub still reports the PR as CLEAN with Quality/readiness/docs/image checks successful and CodeRabbit successful.
I still do not see a blocker in the updated current head.
Bounty #655
Summary
public_utc_timestamp()serializer for public API timestampsZUTC timestamps to treasury proposals, proposal challenges, pending payout proposal rows, account pending payouts, activity pending payouts, and treasury status capacity timing fieldsWhy
Live public APIs currently expose execution-critical pending payout / treasury proposal timestamps without a timezone marker, which makes delayed payout execution windows easy to misread as local time. This keeps the stored DB values unchanged and only makes the public serialization explicit.
Validation
.venv/bin/pytest-> 591 passed, 1 warning.venv/bin/ruff check app/serializers.py app/treasury.py tests/test_account_routes.py tests/test_activity.py tests/test_treasury_proposals.py.venv/bin/ruff format --check app/serializers.py app/treasury.py tests/test_account_routes.py tests/test_activity.py tests/test_treasury_proposals.py.venv/bin/mypy appgit diff --checkOut of scope: no payout/proof/ledger/wallet/exchange/cash-out behavior changes.
Summary by CodeRabbit