About:Pharmacopedia.ext: Difference between revisions
From Pharmacopedia
More actions
| [checked revision] | [checked revision] |
MDElliottMD (talk | contribs) Doc update for v0.9.3: life-story timeline, observations, episodes, choice/multi voting, sharing subsystem, ClamAV rule, TimePicker |
MDElliottMD (talk | contribs) Bump to 0.9.4: add research_id (stable opaque per-user identifier for research) |
||
| Line 1: | Line 1: | ||
= Pharmacopedia extension specification = | = Pharmacopedia extension specification = | ||
'''Version:''' 0.9. | '''Version:''' 0.9.4 · '''Requires:''' MediaWiki >= 1.46.0 · PHP >= 8.5 | ||
'''Author:''' MDElliottMD · '''License:''' GPL-2.0-or-later | '''Author:''' MDElliottMD · '''License:''' GPL-2.0-or-later | ||
'''Source:''' <code>/var/www/mediawiki/extensions/Pharmacopedia/</code> | '''Source:''' <code>/var/www/mediawiki/extensions/Pharmacopedia/</code> | ||
| Line 19: | Line 19: | ||
* Verified-provider role with document-based verification | * Verified-provider role with document-based verification | ||
* Fail-closed ClamAV scan on every image / file upload (hard project rule) | * Fail-closed ClamAV scan on every image / file upload (hard project rule) | ||
* Per-user '''research_id''' (stable 10-char hex, opaque, never reassigned) for de-identified research participation | |||
== Precision doctrine == | == Precision doctrine == | ||
| Line 167: | Line 168: | ||
=== Block list === | === Block list === | ||
* '''Identity''' (display alias, default attribution, experience-report visibility) | * '''Identity''' (display alias, default attribution, experience-report visibility, read-only Research ID badge) | ||
* '''Demographics''' (full chip-picker rebuild, see below) | * '''Demographics''' (full chip-picker rebuild, see below) | ||
* '''Personality''' (Big Five OCEAN sliders + collapsible assessments) | * '''Personality''' (Big Five OCEAN sliders + collapsible assessments) | ||
| Line 381: | Line 382: | ||
Drift behavior: if the page editor changes the options list after votes exist, <code>ve_options_h</code> updates and new votes' <code>v_options_h</code> reflects the new value. Existing votes stay but their hash no longer matches (marked stale). New votes whose submitted hash mismatches the live one are rejected — protects against browser cache races. Tallies still aggregate by raw index, so RENAMING an option in place silently turns old votes into new-label votes; reordering is the dangerous case. Appending new options is safe. | Drift behavior: if the page editor changes the options list after votes exist, <code>ve_options_h</code> updates and new votes' <code>v_options_h</code> reflects the new value. Existing votes stay but their hash no longer matches (marked stale). New votes whose submitted hash mismatches the live one are rejected — protects against browser cache races. Tallies still aggregate by raw index, so RENAMING an option in place silently turns old votes into new-label votes; reordering is the dangerous case. Appending new options is safe. | ||
== Research ID == | |||
Every user profile carries a '''research_id''': a 10-character hex string (<code>bin2hex(random_bytes(5))</code> = 40 bits), generated once at profile create, stored UNIQUE in <code>pcp_user_profiles.prof_research_id</code>, and never reassigned. | |||
Purpose: provides a stable opaque identifier for de-identified research participation. It does not reveal the user's wiki username, user_id, or HMAC voter_hash; it survives username changes; and it stays constant across the user's lifetime on the wiki. Users can find theirs in the '''Public identity''' fieldset on <code>Special:MyProfile</code> (single-click to select-and-copy). | |||
Backfilled retroactively for all pre-existing profiles on 2026-05-18 (v0.9.4). | |||
== ClamAV scan rule (project standard) == | == ClamAV scan rule (project standard) == | ||
| Line 554: | Line 563: | ||
| <code>pcp_comments</code> || Threaded discussions | | <code>pcp_comments</code> || Threaded discussions | ||
|- | |- | ||
| <code>pcp_user_profiles</code> || Per-user profile meta (alias, attribution, voter hash) | | <code>pcp_user_profiles</code> || Per-user profile meta (alias, attribution, voter hash, prof_research_id) | ||
|- | |- | ||
| <code>pcp_profile_fields</code> || Generic key-value field store: (namespace, key, num, text, visibility) | | <code>pcp_profile_fields</code> || Generic key-value field store: (namespace, key, num, text, visibility) | ||