Bug
Three handlers in instance.ts silently return when an edge cannot be found, with // XXX LATER PROBLEM comments acknowledging the issue. No error is reported to the caller, no retry is attempted, and no rollback occurs.
Affected locations
instance.ts:317 — handleEdgeTransferFromGame: edge transfer data is dropped silently
instance.ts:334 — handleTrainLayoutUpdate: train layout update is dropped silently
instance.ts:357 — handleTeleportPlayerToServer: player teleport silently fails
// handleEdgeTransferFromGame (instance.ts:319-322)
if (!edge) {
console.log(data);
console.log("edge not found");
return; // XXX LATER PROBLEM
}
// handleTrainLayoutUpdate (instance.ts:336-338)
if (!edge) {
console.log("impossible edge not found!");
return; // XXX LATER PROBLEM
}
// handleTeleportPlayerToServer (instance.ts:360-362)
if (!edge) {
console.log("impossible edge not found!");
return; // XXX LATER PROBLEM
}
Impact
- Belt/fluid/power/train transfers are silently lost if the edge lookup fails
- Train layout updates are silently dropped, potentially leaving proxy stations in a stale state
- Player teleports silently fail with no feedback to the player
- All failures log only to
console.log rather than a proper logger, making them easy to miss in production
Expected behaviour
Each case should either retry the operation, return a failure response to the caller, or at minimum log a proper warning/error through the instance logger so the failure is visible.
Bug
Three handlers in
instance.tssilentlyreturnwhen an edge cannot be found, with// XXX LATER PROBLEMcomments acknowledging the issue. No error is reported to the caller, no retry is attempted, and no rollback occurs.Affected locations
instance.ts:317—handleEdgeTransferFromGame: edge transfer data is dropped silentlyinstance.ts:334—handleTrainLayoutUpdate: train layout update is dropped silentlyinstance.ts:357—handleTeleportPlayerToServer: player teleport silently failsImpact
console.lograther than a proper logger, making them easy to miss in productionExpected behaviour
Each case should either retry the operation, return a failure response to the caller, or at minimum log a proper warning/error through the instance logger so the failure is visible.