Skip to content

datastores: collectSecondaryPositions discards the First() result — blank positions silently appended on outage #154

@SyniRon

Description

@SyniRon

Found during the wave-2 silent-failure review (pre-existing, shared by both stacks — not a parity break).

datastores/mysql.go:205 (collectSecondaryPositions, feeds position search via generateLiteProtoProfile at mysql.go:296): ds.Db.First(&position, id) — the result/error is discarded entirely. A connection failure, context timeout, or missing row silently appends a blank position (positionTitle:"", positionId:0) into a 200 response. Hides every error class; a user cannot distinguish degradation from real data.

Same pattern at mysql.go:404 (collectS1UniformsSecondaryPositions, S1 uniforms route).

Fix shape: check the error; on failure propagate (500 via the route's outage path) rather than emitting fabricated members. Note any fix must respect the golden corpus — error paths are witnessed live, not by goldens, so this is behavior-improving and needs a ruling against PRD #112's parity discipline before changing the happy-path-with-partial-outage shape.

Metadata

Metadata

Assignees

Labels

7cavbugSomething isn't workingready-for-agentFully specified, ready for an AFK agent to implement

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions