Skip to content

fix: preserve banked Restoration Energy during update reviews - #152

Merged
0xQuerencia merged 5 commits into
mainfrom
fix/banked-re-during-update-review-20261101
Nov 1, 2026
Merged

0xQuerencia merged 5 commits into
mainfrom
fix/banked-re-during-update-review-20261101

Conversation

@0xQuerencia

Copy link
Copy Markdown
Collaborator

Verified behavior vs intended economy

Pixl's payout code documents earned Restoration Energy as banked forever, but both the server and reviewer dashboard only counted rows with current status approved. Re-shipping an approved project temporarily sets its status to shipped, with prior_approved_hours captured specifically to preserve the last approved baseline. Previously earned RE could disappear until the update was reapproved.

Changes

  • Count approved projects at their current approved hours, and in-review updates only at their previously approved hours (not new unapproved tracked hours).
  • Keep the server's lifetime hours/RE, total community RE, Vault's community energy and historical chapter eligibility consistent with this rule.
  • Align internal-dashboard lifetimeRe (used by reviewer payout calculations) with the same banked-hours baseline.
  • Add regression tests covering updates in shipped, fraud_review, second_review and needs_changes, while excluding first-time unapproved submissions.
  • Do not alter refund/reversal logic, Trial prize settlement or funding grants.

Policy intent and safeguards

No credit for new work until approval. Banned projects remain excluded. No database migration, no direct production changes. This PR requires CI and financial review before merge.

Remaining work

Hardware funding order deduplication and Trial item update payouts need database-backed settlement/idempotency guarantees and are not silently changed here.

Copilot AI balanced review requested due to automatic review settings November 1, 2026 07:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@0xQuerencia
0xQuerencia merged commit a251344 into main Nov 1, 2026
8 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