fix(events): the public phase label finds the phase by key (runicnpc D314) #211

Merged
whitlocktech merged 1 commits from fix/event-public-phase-label into main 2026-10-07 02:50:17 +00:00
Member

What & why

The open question from docs#323, decided as D314 (docs#324): an event's public page never showed its phase label. eventPublic.phaseLabel matched a run's current_phase against p.id, but spec.js validates and the engine writes the phase's key (id is not even a valid phase field). So every live run read "Under way" since Events Phase 14a, UO's events included.

  • phaseLabel finds the phase by key first and still accepts id second, for a spec stored in the older shape.
  • The test fixture moves to key, as real specs are. A unit test covers a UO-shaped spec, the id fallback, key-before-id, and an unknown or missing phase.

Generic, and nothing module-specific: UO and Rust events both get their label back.

How it was tested

  • node --test test/eventPublic.test.js: 29/29.
  • npm test: 2079 pass, 2 fail. The two are routes.manifest.json / routes.guards.json "in sync with the live Express stack", and they fail identically on a clean main in this checkout, because it has modules/rust and modules/uo installed and their routes join the live stack. CI has no modules installed, so they are not this change.

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why The open question from docs#323, decided as D314 (docs#324): an event's public page never showed its phase label. `eventPublic.phaseLabel` matched a run's `current_phase` against `p.id`, but `spec.js` validates and the engine writes the phase's **`key`** (`id` is not even a valid phase field). So every live run read "Under way" since Events Phase 14a, UO's events included. - `phaseLabel` finds the phase by `key` first and still accepts `id` second, for a spec stored in the older shape. - The test fixture moves to `key`, as real specs are. A unit test covers a UO-shaped spec, the `id` fallback, key-before-id, and an unknown or missing phase. Generic, and nothing module-specific: UO and Rust events both get their label back. ## How it was tested - `node --test test/eventPublic.test.js`: 29/29. - `npm test`: 2079 pass, 2 fail. The two are `routes.manifest.json` / `routes.guards.json` "in sync with the live Express stack", and they **fail identically on a clean `main`** in this checkout, because it has `modules/rust` and `modules/uo` installed and their routes join the live stack. CI has no modules installed, so they are not this change. ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-07 02:36:15 +00:00
fix(events): the public phase label finds the phase by key (runicnpc D314)
All checks were successful
PR Checks / bot-tests (pull_request) Successful in 36s
PR Checks / client-build (pull_request) Successful in 7m50s
PR Checks / server-tests (pull_request) Successful in 13m50s
ef93c73d2c
eventPublic.phaseLabel matched a run's current_phase against p.id, but spec.js
validates and the engine writes the phase's `key`, so every live run's public
page read "Under way" since Events Phase 14a, UO's events included. It now
matches `key` first and still accepts `id` second. The test fixture moves to
`key`, as real specs are, and a unit test covers a UO-shaped spec, the id
fallback, key-before-id and an unknown phase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech approved these changes 2026-10-07 02:42:09 +00:00
whitlocktech scheduled this pull request to auto merge when all checks succeed 2026-10-07 02:42:14 +00:00
whitlocktech merged commit 43f706c003 into main 2026-10-07 02:50:17 +00:00
whitlocktech deleted branch fix/event-public-phase-label 2026-10-07 02:50:18 +00:00
Sign in to join this conversation.
No description provided.