web/docs/design/POL-ACTIVITY-KEYS.md
2026-11-21 20:22:37 +01:00

4.4 KiB

Verified POL activity receipts

The existing Personal and POL progression engines remain separate namespaces of the same quest engine. pol-activity-events.mjs connects the finite themed POL objective definitions to ordinary QSM evidence, rather than accepting a player-supplied counter. This does not implement game events, NPC synchronization, a third XP type or political Decision effects.

The private API contract is POST /internal/progression/pol/event, authenticated with the existing game-service credential. A browser session has no authority. The body contains exactly eventId, accountId, minecraftUuid, seasonId, metric, quantity, occurredAt and reference. Only an existing server-owned POL objective metric is accepted. A producer must emit this receipt only after its real domain operation commits. The transport credential is not evidence that unimplemented gameplay has occurred; no production events are invented to test this contract.

The event pins a unique original evidence reference, the current ordinary linked player, active season, event time, positive bounded quantity, the current registered quest-giver SID and a canonical payload hash. System, official, memorial and disabled accounts cannot receive player progress. Reusing a reference with a different event ID cannot double-credit the objective. Changed payloads, account links or seasons are rejected. Original QSM keys and dossiers remain history.

The existing POL collector reads and validates actual unrevoked keys and current quest-giver identities. It records cumulative observations with a deterministic proof digest through the existing internal quest observer. Players cannot submit observations. At claim time, evidence and identity are revalidated under locks, including the QSM and SID keys. A counter previously collected before revocation cannot authorize a new claim. Existing claimed XP is historical; a later revocation does not silently rewrite it. Explicit server-side authoritative observation adapters retain their existing contract.

Current configured quest XP values, prerequisite chains, claims, outboxes and namespace isolation are preserved. This source adapter does not mint DM, invent a reward fund or activate unconfigured policy Decisions. Monetary effects require an existing approved reward configuration and funded delivery consumer. Policy Decision effects remain separate work. A metric declaration or private endpoint does not implement a game producer.

Continuing episodes and ESK evidence

The ordinary policy:POL:S01:v2 instrument installs six configurable XP baselines: PvP100XP per eligible player defeat; mobs50XP per10; any death25XP per5; PvE death25XP per5; spice100XP per100harvested units; smuggling100XP per100verified delivered units. These are Alpha balancing defaults for the separately requested repeatable objectives, not adoption of the proposed PDF monetary formulas. Each subsequent completed episode grows its XP by2%, rounded upward, bounded at5x baseline. Levels remain uncapped, and episodes have no gameplay count limit within the existing safe-integer/key-reference bounds. Monetary reward defaults are absent; this policy neither mints DM nor authorizes a debit. Existing staff-customized configurations are preserved.

Each account/metric/episode uses a distinct ordinary QST and an immutable existing claim. Only the next episode and currently active episodes appear; previous claims remain in History and retries retain their original receipt. A caller cannot select a distant episode or another account. Existing engine reads restrict configuration/state queries to their actual definitions; they do not load every account episode.

Player kills, mob kills, all player deaths and PvE deaths read the original existing ESK dossier, hash, scope and unrevoked system key. The future producer must identify source=minecraft and attributes environment=production, questEligible=true, with damageSourceKind=player, mob or environment. Lore deaths, bans, respawns, test events, self-kills and system/official/memorial targets cannot masquerade as a player bounty. The same eligible death may advance distinct death objectives without duplicating it within one counter. The same PvP victim counts once per24hours. Spice and smuggling use immutable committed-activity QSM receipts; they cannot forge a kill metric. Claims revalidate current source keys, identity and quantities under locks. No Minecraft/plugin producer is included or fabricated in production.