Skip to content

Fix procedure-hitl metadata guard warning from PR #121#128

Merged
dereknorrbom merged 1 commit intodevfrom
fix/pr121-hitl-metadata-guard
Mar 18, 2026
Merged

Fix procedure-hitl metadata guard warning from PR #121#128
dereknorrbom merged 1 commit intodevfrom
fix/pr121-hitl-metadata-guard

Conversation

@dereknorrbom
Copy link
Contributor

Summary

Follow-up fix for a remaining GitHub Code Quality warning on PR #121 in dashboard/lib/procedure-hitl.ts.

Change

Adjusted parseMessageMetadata guard conditions to avoid redundant/null-impossible comparisons while preserving behavior:

  • After early if (!metadata) return null, object guard now checks only typeof metadata === 'object' && !Array.isArray(metadata).
  • For parsed JSON, keep explicit null-safe object narrowing with typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed).

Validation

  • npx jest lib/__tests__/procedure-hitl.test.ts --runInBand
    • Result: 6 passed

Related

@dereknorrbom dereknorrbom requested a review from a team as a code owner March 18, 2026 16:53
@dereknorrbom dereknorrbom requested review from endymion and removed request for a team March 18, 2026 16:53
@dereknorrbom dereknorrbom merged commit 1656e28 into dev Mar 18, 2026
9 checks passed
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.

1 participant