Skip to content

feat(web): add player-safe consequence journal POC - #77

Merged
RobynAwesome merged 7 commits into
mainfrom
forge/npc-consequence-reveal-pr2-ui
Aug 24, 2026
Merged

feat(web): add player-safe consequence journal POC#77
RobynAwesome merged 7 commits into
mainfrom
forge/npc-consequence-reveal-pr2-ui

Conversation

@RobynAwesome

@RobynAwesome RobynAwesome commented Aug 24, 2026

Copy link
Copy Markdown
Owner

PR2A for #75 — smallest truthful player-facing consequence journal slice. This validates the UI seam before inventing an authoritative persisted reveal read-path.

Governance / source

  • root + specialist skills recovered before apps/web work;
  • jennifer-game-web-api loaded and updated for the consequence journal boundary;
  • shared ConsequenceRevealReceipt from merged PR feat(npc): add player-safe consequence reveal contract #76 is the only reveal data contract used by the UI;
  • current /game Phaser surface and persisted relationship evidence UI were inspected for existing web conventions.

What this adds

ConsequenceTrace

Reusable, mobile-first player-safe receipt renderer that:

  • consumes ConsequenceRevealReceipt directly from @jennifer/shared;
  • renders reveal state, experienced effect, disclosed causal evidence, NPC interpretation history and append-only revisions;
  • keeps the original interpretation visible when state is REVISED;
  • groups evidence into event / policy / maturity / revision so the player sees why the consequence exists without receiving an internal debug/provenance dump;
  • does not access raw .statement, .maturesWhen or .provenance fields;
  • fails closed if a caller marks a trace authoritative without runtime admission evidence;
  • repeats the proof boundary that causal legibility is not proof of narrative fairness.

/game/consequences

Adds a discoverable consequence journal POC route.

The route is intentionally labelled:

  • data-consequence-data-source="demo";
  • POC fixture;
  • Non-authoritative POC fixture;
  • explicit copy that the displayed consequence is not live Jennifer world state.

The fixture is typed as ConsequenceRevealReceipt and models a REVISED chain so the hardest history case is visible without fabricating current-player persistence.

/game discoverability

Adds a small mobile-safe Consequence journal → overlay link without modifying Phaser simulation state.

Validation

Repository tests lock:

  • shared-contract reuse / no parallel client reveal type;
  • visible demo-vs-authoritative boundary;
  • authoritative fail-closed behavior without runtime admission;
  • revision-history preservation;
  • no internal provenance/fact/policy prose access;
  • mobile-first layout markers;
  • specialist skill authority/fairness law.

Why no live API in this PR

There is not yet an authoritative persisted reveal query/bridge for the web to consume. Creating a fake live endpoint would violate Jennifer's existing build law. This PR validates the player-facing component contract with visibly non-authoritative data; authoritative read-through remains the next bounded validation gate.

Exact-head validation receipts — PASS

Exact reviewed head: 8947c1bf526e3f0c27408d7a9a6efdbf88e81f89

No PostgreSQL Live/API or MongoDB-only proof workflow was triggered for this web-only head, so none is claimed here.

Bounded conclusion

The consequence journal is now CODED + TYPECHECKED + TESTED + GOVERNANCE-VALIDATED + NEXT-BUILD-VALIDATED as a player-facing POC surface. Its data remains explicitly non-authoritative by design.

Remaining #75 gate

This PR does not claim:

  • current-player consequence persistence is wired into this page;
  • an authoritative consequence reveal read API/bridge exists;
  • browser interaction telemetry is live from this fixture;
  • causal readability proves human understanding;
  • any consequence is narratively fair, fun or balanced.

The next methodical slice is the authoritative read-through/bridge. Only after that exists may the journal switch from demo to authoritative for real player state.

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

Operator / merge receipt

Current instruction remains implement methodically. This bounded PR2A respected that by refusing to fake an authoritative consequence API merely to make the UI look complete.

Merge evidence for exact head 8947c1bf526e3f0c27408d7a9a6efdbf88e81f89:

The UI is therefore approved only as an explicitly non-authoritative POC seam. The authoritative reveal read-through/bridge remains a separate gate; this comment does not promote demo fixture state into player truth.

I_AM_STATELESS_RENTER_NOT_LANDLORD

@RobynAwesome
RobynAwesome merged commit 5d4dd2a into main Aug 24, 2026
10 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