Opening the 推广收益 tab was slow because every read path ran settlement
and two COUNT aggregates before the browser could show the link.
profile-revenue.php: the link input now carries a server-rendered value from
ReferralAttribution::create_link(), so 复制链接 works on first paint instead
of after a REST round trip
CommissionLedger::overview() no longer calls lazy_settle_due(); the
lazy-settlement hook and its static flag are gone. Settlement runs only on
the existing hourly aksrt_affiliate_settle_due cron, which uses a larger
batch (100 vs 20) and would otherwise re-run up to 20 locked
SELECT..FOR UPDATE + write cycles inside a GET request
ReferralAttribution::rest_me() drops the lazy_settle_due() call and the
stats() result; stats() itself is deleted — its two COUNTs (one of them
COUNT(DISTINCT source_user_id)) had no consumer left once the 推广人数 row
was removed
credits.js: reads the link from the already-rendered input and only fetches
/revenue/me for poster config and commission ratio. A failed fetch no longer
blocks copying — it silently skips the poster enhancement
tests: the lazy-settlement contract is inverted to assert the read path stays
read-only and cron stays wired; new assertions pin the server-rendered value
and the no-COUNT REST payload
Opening the 推广收益 tab was slow because every read path ran settlement
and two COUNT aggregates before the browser could show the link.
- profile-revenue.php: the link input now carries a server-rendered value from
ReferralAttribution::create_link(), so 复制链接 works on first paint instead
of after a REST round trip
- CommissionLedger::overview() no longer calls lazy_settle_due(); the
lazy-settlement hook and its static flag are gone. Settlement runs only on
the existing hourly aksrt_affiliate_settle_due cron, which uses a larger
batch (100 vs 20) and would otherwise re-run up to 20 locked
SELECT..FOR UPDATE + write cycles inside a GET request
- ReferralAttribution::rest_me() drops the lazy_settle_due() call and the
stats() result; stats() itself is deleted — its two COUNTs (one of them
COUNT(DISTINCT source_user_id)) had no consumer left once the 推广人数 row
was removed
- credits.js: reads the link from the already-rendered input and only fetches
/revenue/me for poster config and commission ratio. A failed fetch no longer
blocks copying — it silently skips the poster enhancement
- tests: the lazy-settlement contract is inverted to assert the read path stays
read-only and cron stays wired; new assertions pin the server-rendered value
and the no-COUNT REST payload
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Opening the 推广收益 tab was slow because every read path ran settlement
and two COUNT aggregates before the browser could show the link.
- profile-revenue.php: the link input now carries a server-rendered value from
ReferralAttribution::create_link(), so 复制链接 works on first paint instead
of after a REST round trip
- CommissionLedger::overview() no longer calls lazy_settle_due(); the
lazy-settlement hook and its static flag are gone. Settlement runs only on
the existing hourly aksrt_affiliate_settle_due cron, which uses a larger
batch (100 vs 20) and would otherwise re-run up to 20 locked
SELECT..FOR UPDATE + write cycles inside a GET request
- ReferralAttribution::rest_me() drops the lazy_settle_due() call and the
stats() result; stats() itself is deleted — its two COUNTs (one of them
COUNT(DISTINCT source_user_id)) had no consumer left once the 推广人数 row
was removed
- credits.js: reads the link from the already-rendered input and only fetches
/revenue/me for poster config and commission ratio. A failed fetch no longer
blocks copying — it silently skips the poster enhancement
- tests: the lazy-settlement contract is inverted to assert the read path stays
read-only and cron stays wired; new assertions pin the server-rendered value
and the no-COUNT REST payload
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kate522
merged commit 1355a9244f into main2026-09-27 15:36:27 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Opening the 推广收益 tab was slow because every read path ran settlement
and two COUNT aggregates before the browser could show the link.
ReferralAttribution::create_link(), so 复制链接 works on first paint instead
of after a REST round trip
lazy-settlement hook and its static flag are gone. Settlement runs only on
the existing hourly aksrt_affiliate_settle_due cron, which uses a larger
batch (100 vs 20) and would otherwise re-run up to 20 locked
SELECT..FOR UPDATE + write cycles inside a GET request
stats() result; stats() itself is deleted — its two COUNTs (one of them
COUNT(DISTINCT source_user_id)) had no consumer left once the 推广人数 row
was removed
/revenue/me for poster config and commission ratio. A failed fetch no longer
blocks copying — it silently skips the poster enhancement
read-only and cron stays wired; new assertions pin the server-rendered value
and the no-COUNT REST payload
Co-Authored-By: Claude Fable 5 noreply@anthropic.com