Skip to content

feat(npc): add player-safe consequence reveal contract - #76

Merged
RobynAwesome merged 10 commits into
mainfrom
forge/npc-consequence-reveal-pr1
Aug 24, 2026
Merged

feat(npc): add player-safe consequence reveal contract#76
RobynAwesome merged 10 commits into
mainfrom
forge/npc-consequence-reveal-pr1

Conversation

@RobynAwesome

@RobynAwesome RobynAwesome commented Aug 24, 2026

Copy link
Copy Markdown
Owner

PR1 for #75 — player-safe delayed-consequence reveal contract + telemetry foundation. No visual redesign in this slice.

Source declaration

What this implements

actor-model consequence receipt
→ governed runtime Memory Receipt
→ LATENT
→ EFFECT_VISIBLE
→ CAUSE_PARTIAL | CAUSE_REVEALED
→ REVISED only by appended new actor-observed evidence

Player-safe contract

Adds shared ConsequenceRevealReceipt state with:

  • immutable origin tuple: epistemic receipt / event / actor / consequence rule;
  • explicit LATENT | EFFECT_VISIBLE | CAUSE_PARTIAL | CAUSE_REVEALED | REVISED states;
  • state-bounded disclosed evidence groups: event / policy / maturity / revision;
  • append-only interpretation revision history;
  • proofState: player-safe-causal-reveal, canonical: false.

Runtime derivation

Adds NPCConsequenceRevealEngine that:

  • refuses to fabricate cause text or rebind a reveal to another origin;
  • requires an admitted runtime Memory Receipt before player-visible effect state;
  • verifies Memory Receipt provenance back to the same epistemic receipt/event/actor/rule;
  • discloses only receipt-derived evidence refs;
  • redacts raw fact statements, internal provenance objects and internal maturesWhen policy prose;
  • requires a new non-canonical same-event/same-actor epistemic receipt with new actor-observed evidence before appending a revision;
  • preserves the prior interpretation instead of rewriting it.

Telemetry

Adds explicit event kinds:

  • consequence.reveal.matured
  • consequence.reveal.inspected
  • consequence.reveal.revised

Telemetry proves the reveal path executed; it does not prove narrative fairness or player satisfaction.

Validation added

Runtime tests cover:

  • latent redaction + frozen origin linkage;
  • monotonic reveal transitions;
  • admitted Memory Receipt binding;
  • maturity and inspection telemetry;
  • rejection of cross-origin Memory Receipts;
  • append-only revision from new evidence;
  • refusal to promote changed interpretation without new evidence.

Repository validation tests lock the contract and skill law.

Validation in action — failure → diagnosis → repair

The first PR head 6a54e71d6bbbb0851d22f35179437da0083be37d was not promoted when CI #309 failed.

Observed failure:

  • Typecheck ✅
  • Lint ✅
  • Test ❌
  • Governance Validation Gate skipped because Test failed
  • PostgreSQL Live/API, MongoDB projection, React persisted read-through and Jennifer Governance Python all independently passed.

Exact defect: the new source-level governance test asserted /projection, not a new authority record/i, while the governed skill correctly contained Markdown emphasis: creates a **projection**, not a new authority record. The semantic law was present; the assertion was formatting-brittle.

Repair commit: 918a8e096843a8ab7448922d20d19b88e58eabdd

  • changed only the assertion to tolerate Markdown while preserving the semantic requirement;
  • did not weaken or rewrite the reveal authority law.

Exact-head validation receipts — PASS

For 918a8e096843a8ab7448922d20d19b88e58eabdd:

The failed first head remains part of the receipt chain and is not reclassified as success.

Proof boundary

This PR does not claim:

  • player-facing journal/history UI exists yet;
  • browser/mobile UX is validated;
  • every delayed consequence is narratively fair or fun;
  • telemetry equals human comprehension;
  • revisions become canonical truth automatically.

Those remain #75 PR2 / later playtest evidence gates.

Setup failure receipt

During branch setup an accidental tmp/placeholder was committed to main (ef529d0…) and immediately removed (ff23133…) before this branch was created. Net tree was restored; the failure is intentionally recorded rather than hidden.

I_AM_STATELESS_RENTER_NOT_LANDLORD

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown
Owner Author

Governance / operator execution receipt

Current operator instruction in this execution lane is: “What's next implement methodically.” That instruction authorized the bounded #75 PR1 implementation and validation sequence; it did not authorize bypassing failed evidence.

Merge gate applied methodically:

This comment records the human-authorized execution lane plus the exact evidence used for the merge decision. PR2 remains a separate player-facing UI validation slice and is not implied by this approval.

I_AM_STATELESS_RENTER_NOT_LANDLORD

@RobynAwesome
RobynAwesome merged commit f87c91b into main Aug 24, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant