mysql2 was bumped to 3.24.4 by the npm audit fix in #35. Since mysql2 3.23, MariaDB JSON columns come back from the driver already parsed. Two endpoints still called JSON.parse on the column value, threw, and silently fell back to an empty value:
GET /api/internal/executions/:id (Gandalf M2M relay) returned logs: [] for every execution, so Gandalf's ping-through-Pulse check never saw REACHABLE and opened a false P2 (ticket 234226988). Link Debug ethtool/SFP collection was empty for the same reason.
GET /api/workflows/:id returned definition: {}, breaking the workflow Edit modal.
Fix
Guard both sites with the same typeof === 'string' check that GET /api/executions/:id already uses.
Verification
Queried the production DB with the current driver: logs arrives as an array, definition as an object. Old code parses to 0 log entries; fixed code returns the real entries.
## Summary
mysql2 was bumped to 3.24.4 by the `npm audit fix` in #35. Since mysql2 3.23, MariaDB JSON columns come back from the driver already parsed. Two endpoints still called `JSON.parse` on the column value, threw, and silently fell back to an empty value:
- `GET /api/internal/executions/:id` (Gandalf M2M relay) returned `logs: []` for every execution, so Gandalf's ping-through-Pulse check never saw `REACHABLE` and opened a false P2 (ticket 234226988). Link Debug ethtool/SFP collection was empty for the same reason.
- `GET /api/workflows/:id` returned `definition: {}`, breaking the workflow Edit modal.
## Fix
Guard both sites with the same `typeof === 'string'` check that `GET /api/executions/:id` already uses.
## Verification
- Queried the production DB with the current driver: `logs` arrives as an array, `definition` as an object. Old code parses to 0 log entries; fixed code returns the real entries.
- `npx eslint` 0 errors, `npx jest` 31/31.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01HamVMDrA8RqhyxmUHgiqRp
mysql2 3.24 (pulled in by the audit fix in #35) returns MariaDB JSON columns as
JS objects. GET /api/internal/executions/:id and GET /api/workflows/:id still
called JSON.parse on the value, threw, and silently returned [] / {}. This broke
Gandalf's relay checks (false 'PBS unreachable' ticket) and the workflow edit
modal. Guard both sites with the same typeof check already used by
GET /api/executions/:id.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HamVMDrA8RqhyxmUHgiqRp
jared
merged commit 3edb2da174 into main2026-09-08 22:41:26 -04:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
mysql2 was bumped to 3.24.4 by the
npm audit fixin #35. Since mysql2 3.23, MariaDB JSON columns come back from the driver already parsed. Two endpoints still calledJSON.parseon the column value, threw, and silently fell back to an empty value:GET /api/internal/executions/:id(Gandalf M2M relay) returnedlogs: []for every execution, so Gandalf's ping-through-Pulse check never sawREACHABLEand opened a false P2 (ticket 234226988). Link Debug ethtool/SFP collection was empty for the same reason.GET /api/workflows/:idreturneddefinition: {}, breaking the workflow Edit modal.Fix
Guard both sites with the same
typeof === 'string'check thatGET /api/executions/:idalready uses.Verification
logsarrives as an array,definitionas an object. Old code parses to 0 log entries; fixed code returns the real entries.npx eslint0 errors,npx jest31/31.🤖 Generated with Claude Code
https://claude.ai/code/session_01HamVMDrA8RqhyxmUHgiqRp