Skip to content

Malformed schema fields/relationships JSON silently degrades to an empty list with only an eprintln! diagnostic, now largely moot on the platforms it worried about #3001

Closed

Description

@mstomar125

Problem

An end user would never notice or investigate this either way (no UI surfacing on any platform), and the specific "diagnostic invisible on Windows" premise this finding's mitigation-severity reasoning relied on has already been closed by an unrelated, more recent PR (#2614) that redirects both the Windows daemon and release-GUI stdio to persistent log files.

Root cause

SchemaNode::from_node (packages/nodespace-types/src/schema.rs:440) prints via eprintln! on a genuine JSON parse failure rather than surfacing an error, deliberately, to avoid failing an entire unrelated batch read. The function's own doc comment (added 2026-08-18) claims this diagnostic "is not airtight... on Windows... and a release desktop-app build has no console at all" — but PR #2614 (merged 2026-09-14, citing this exact diagnostic by name) already redirects the Windows daemon's stdio and the release-GUI's stdio to persistent log files (nodespace-app.log/nodespace-app-error.log), closing the specific gap the doc comment describes. The doc comment itself is simply stale. More fundamentally, on no platform does this eprintln! ever reach the application UI — it only ever lands in a log file, which an ordinary end user never checks — so the underlying design tradeoff was already universal, not two-platform-specific as characterized.

Suggested fix

Update SchemaNode::from_node's stale doc comment now that PR #2614 already covers the Windows/release-GUI cases it worried about; if this diagnostic should ever be user-visible, surface it through a real logging facility with a UI-level indicator rather than eprintln!.


Found via the 2026-09-25 full-repo code sweep (finding #58 of 84 in CODE_SWEEP_FINDINGS_2026-09-25.md). Severity: low. Category: risky.

Activity

  1. self-assigned this
    on Sep 25, 2026
  2. added
    sweep
    on Sep 25, 2026
  3. removed their assignment
    on Sep 25, 2026
  4. malibio commented on Sep 27, 2026

    @malibio
    Collaborator

    Fixed in 092ef7e — updated the stale doc comment on SchemaNode::from_node's parse_fields/parse_relationships diagnostic. It no longer claims Windows/release-GUI-specific invisibility (that gap was closed by #2614); now states the diagnostic is universally log-file-only and never reaches the UI on any platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    foundationsweep

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions