Skip to content

Comments

fix: small correctness and quality improvements#1020

Merged
LexLuthr merged 2 commits intomainfrom
fix/small-correctness-fixes
Feb 18, 2026
Merged

fix: small correctness and quality improvements#1020
LexLuthr merged 2 commits intomainfrom
fix/small-correctness-fixes

Conversation

@Reiers
Copy link
Contributor

@Reiers Reiers commented Feb 18, 2026

Small one-liner fixes found during codebase audit cross-check.

Changes

Bug fixes

  • ClusterTaskHistory double-scan (web/api/webrpc/cluster.go): The SQL query selects both id (history row ID) and task_id, but both were scanned into &t.TaskID — the first value was silently overwritten by the second. Now discards the unused id column.

  • Duplicate alert for sealing tasks (alertmanager/alerts.go): Sealing tasks (SDR, TreeD, etc.) with >5 failures produced the same alert line twice — once from the sealing-task check and once from the general >5 threshold check. Changed to else if so only one branch fires.

Typo fixes

  • "failed to to insert" → "failed to insert" in task_ipni.go and task_pdp_ipni.go error messages
  • "Command separated" → "Comma-separated" in --db-host / --db-host-cql CLI help text + translation catalog

Missing headers

  • Content-Type: application/json added to getSchema, getLayers (config API), and getSectors (sector API) — other handlers in the same files already set this header.

@Reiers Reiers requested a review from a team as a code owner February 18, 2026 02:17
@Reiers Reiers force-pushed the fix/small-correctness-fixes branch from c707b18 to 1b49d19 Compare February 18, 2026 02:25
- fix(webrpc): discard unused history row id in ClusterTaskHistory scan
  The SQL query selects both 'id' and 'task_id', but both were scanned
  into TaskID — the first value was silently overwritten. Use a discard
  target for the unused column.

- fix(alertmanager): prevent duplicate alert output for sealing tasks
  Sealing tasks with >5 failures were printed twice: once for being a
  sealing task and once for exceeding the threshold. Use else-if so
  only one branch fires.

- fix(indexing): fix 'failed to to insert' double-word typos
  In both task_ipni.go and task_pdp_ipni.go error messages.

- fix(api): add missing Content-Type headers on JSON responses
  getSchema, getLayers (config API) and getSectors (sector API) were
  missing Content-Type: application/json — other handlers in the same
  files already set it.

- fix(cli): 'Command separated' -> 'Comma-separated' in --db-host help
  Typo in CLI flag description and translation catalog.
@Reiers Reiers force-pushed the fix/small-correctness-fixes branch from 1b49d19 to 00c82ea Compare February 18, 2026 02:40
Copy link
Contributor

@LexLuthr LexLuthr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires minor updates.

@Reiers Reiers closed this Feb 18, 2026
@Reiers Reiers reopened this Feb 18, 2026
@LexLuthr LexLuthr merged commit adb42bc into main Feb 18, 2026
23 checks passed
@LexLuthr LexLuthr deleted the fix/small-correctness-fixes branch February 18, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants