feat: add canonical station layouts#350
Conversation
|
Important Review skippedToo many files! This PR contains 191 files, which is 91 over the limit of 100. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (191)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ecc42e6e3d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48f45e31c8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
mrtdown-data/data/station/TNM.json
Line 31 in 2d8a54d
Tanah Merah's current station page lists public Exits 1 and 2 (for example, https://landtransportguru.net/tanah-merah-station/#Exits), but this new layout publishes exits: []. Because the schema has no unknown/not-collected state, clients will treat this as authoritative and hide every entrance or fail wayfinding for Tanah Merah even though open exits exist; add the known exits or avoid asserting an empty list.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
mrtdown-data/packages/fs/src/validate.ts
Line 415 in 2fb6ccd
This new layout check only verifies that the service included the station in any revision, so a platform can advertise a service whose only matching stop was historical or future and still pass validation. Since the layout is documented as current-state data and platform serviceIds drive wayfinding, stale service mappings can validate cleanly after a service revision removes a station; check the current/open revision instead of any revision here.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1efa17b4b8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9e5031541
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5572439eab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ec08ad5b6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6083574f9e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 119cc78f2b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc05bd48db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "serviceIds": [ | ||
| "EWL_CG_E" | ||
| ], |
There was a problem hiding this comment.
Connect Platform A to advertised Platform E
When an airport-bound departure uses TNM_EWL_E—as this serviceIds mapping says it normally can—passengers arriving on the eastbound main line at Platform A have no corresponding direct transfer path: the layout contains A–D, F–D, and F–E, but not A–E. Consumers using these platform-pair paths can therefore route the same transfer when the branch train uses D but not when it uses E; add the A–E path or stop advertising E as a boarding platform for this service.
Useful? React with 👍 / 👎.
| Platforms represent public boarding areas. They should reference full scheduled | ||
| service patterns through `serviceIds`. | ||
| service patterns through `serviceIds`. A terminal platform used only to unload | ||
| arriving passengers remains part of the layout with `boardingStatus` set to |
There was a problem hiding this comment.
Document required layout update dates
lastUpdated is now required by StationLayoutLevelSchema, StationLayoutExitSchema, StationLayoutPlatformSchema, StationLayoutAccessPointSchema, and StationLayoutTransferPathSchema, but this active authoring plan's examples and field descriptions still omit it. Authors following the platform example here—or the level, exit, access-point, and transfer-path examples—will create records rejected by StationSchema, contrary to the repository review rule requiring documentation and code to agree; add the required field to each example and document its meaning.
Useful? React with 👍 / 👎.
| from: { | ||
| kind: 'platform', | ||
| id: 'KET_ISL_E', | ||
| lastUpdated: '2026-07-18', |
There was a problem hiding this comment.
Remove update dates from transfer endpoints
StationLayoutTransferEndpointSchema and the newly documented contract define endpoint references as containing only kind and id, but the fixture generator now emits lastUpdated inside both endpoint objects. Zod silently strips these unsupported keys when repositories parse the fixture, so raw-fixture consumers and tests observe a shape that production repository consumers never receive; retain provenance on the transfer path and remove these two endpoint fields.
Useful? React with 👍 / 👎.
Summary
lastUpdatedprovenance dates to station layout recordsWhy
Station records previously lacked complete passenger-facing layout data. This fills the canonical target layout directly in
data/stationso downstream consumers can render exits, boarding platforms, service directions, door counts, and interchange connectivity without relying on temporary research artifacts.Data boundaries
Validation
npm run data:validatenpm run checknpm test— 30 files and 314 tests passed