Start eligible quest-chain successors after committed claims

This commit is contained in:
unimatrixgit 2026-11-29 08:55:43 +01:00
commit ca5acc79b2

View file

@ -0,0 +1,11 @@
# Quest-chain automatic start — execution brief, 29 November 2026
Owner request: upon completing a quest, start the next one automatically. Apply after the authoritative successful reward claim, since existing prerequisite rules require claimed predecessors. Keep current quest/XP history intact.
Bounded scope: reuse createQuestProgression for Personal and the existing namespace-mapped Reputation engine. During the original claim transaction, queue a deterministic successor-start job only for definitions with direct same-season/same-branch children. After reward commit, use the ordinary authorized start/key issuance API. Never nest keys.issue inside keys.consume or broaden its transaction-store security boundary. Persist failed starts in the existing namespaced progression outbox and retry through completion processing or idempotent claim retry. Require all real predecessors and cooldowns; one eligible successor starts, competing successors remain choices. Do not automatically claim rewards, create objective facts or select unrelated branches. No new schema or plugin/backend replacement.
Website refresh selects the authoritative returned nextQuestId. Existing authenticated game journal responses forward the same server-owned successor result; clients cannot supply a nextQuestId. Native optional focus support can consume this field in the separate quest UI work without changing reward authority.
Validation so far:59 local progression/game/POL tests passed, including four new chain cases (unique next/no extra reward, forks/unrelated branches, all-predecessor gating/retry, failed issuance retaining committed reward) and native response/forged-input coverage. Existing uncapped POL test now checks the absence of mandatory-completion jobs and exactly one real claim, rather than incorrectly treating a successor-start job as an automatic reward. No production quest/XP/account records modified by tests.
Remaining acceptance: canonical Linux CI/build, focused source review, publication, live serving revision and ordinary user confirmation. This work is separate from the current pack incident; no draft code has been deployed. Existing pending gameplay producers are separate work and are not fabricated by automatic starting.