Skip to content

Fix the isMaker declaration: optional, and boolean not bool - #146

Merged
thebentern merged 1 commit into
masterfrom
fix/ismaker-optional-boolean
Sep 19, 2026
Merged

thebentern merged 1 commit into
masterfrom
fix/ismaker-optional-boolean

Conversation

@thebentern

@thebentern thebentern commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

CI has been red on master since fb74988 — all three jobs (quality, build, static). Two separate mistakes in the same one-line field declaration:

-  isMaker: bool; // Optional indicator for maker tier 
+  isMaker?: boolean; // Optional indicator for maker tier
  • bool is not a TypeScript type. It should be boolean, which is what every other boolean field in DeviceHardware uses. On its own this is error TS2304: Cannot find name 'bool'.
  • 6d54be9 dropped the ?. fb74988 originally added the field as isMaker?:, which was correct — the comment literally says "Optional", every other non-core field in the interface is optional, and exactly one of the 117 entries sets it. Making it required produced error TS2741: Property 'isMaker' is missing on all 116 entries that don't.

There was also a trailing space after maker tier, which is what biome ci was failing on in the quality job.

Verified

check result
biome ci clean (3 pre-existing warnings, non-failing)
pnpm build (prisma + tsc) clean, dist/index.js present
typecheck:v2 clean
pnpm validate OK — 117 devices, 216 links, 35 softDevice variants, 4 erase images
determinism check OK
frozen.sha256 / binaries.sha256 OK
router tests 62/62

No data change

Checked rather than assumed — the rebuilt DEVICE_HARDWARE is 39685 B, etag 53c18168b074a0d6f6189c8046373134, byte-identical to what api.meshtastic.org is serving right now. isMaker: true stays on AXIOMETA_GENESIS_MINI.

One thing worth knowing

Deploy stayed green through all of this and shipped the broken tree. deploy.yml runs build:data / build:static / validate through tsx, which strips types without checking them — only CI typechecks. So a type error in resource.ts reaches production silently, and CI is the only signal. Production was never functionally broken here, but it could have been.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Device hardware data can now be handled when the maker status is unavailable, improving compatibility with incomplete resource information.

CI has been red on master since fb74988, on all three jobs. Two separate mistakes in
the same one-line field declaration:

  - `bool` is not a TypeScript type. It should be `boolean`, which is what every other
    boolean field in DeviceHardware uses. This alone is `error TS2304: Cannot find
    name 'bool'`.
  - 6d54be9 then dropped the `?`. fb74988 had added the field as `isMaker?:`, which was
    right -- the comment says "Optional", every other non-core field in the interface is
    optional, and exactly one of the 117 entries sets it. Making it required turned into
    `error TS2741: Property 'isMaker' is missing` on all 116 entries that do not.

There was also a trailing space after "maker tier", which is what `biome ci` was
failing on in the quality job. Removed.

Verified: `biome ci` clean, `pnpm build` (tsc) clean, `typecheck:v2` clean, validate OK
at 117 devices, determinism check passes, both golden hash sets OK, 62/62 router tests.

No data change, and that is checked rather than assumed: the rebuilt DEVICE_HARDWARE is
39685 B with etag 53c18168b074a0d6f6189c8046373134, byte-identical to what
api.meshtastic.org is serving right now. isMaker: true stays on AXIOMETA_GENESIS_MINI.

Worth noting for next time: Deploy stayed green through all of this and shipped the
broken tree, because deploy.yml runs build:data/build:static/validate via tsx, which
strips types without checking them. Only CI typechecks. So a type error in resource.ts
reaches production silently and the signal is CI alone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 5e73631c-3fca-4c16-a698-82cc2bc572d1

📥 Commits

Reviewing files that changed from the base of the PR and between 2fbe479 and 692f8f1.

📒 Files selected for processing (1)
  • src/lib/resource.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

DeviceHardware contract

Layer / File(s) Summary
Update DeviceHardware declaration
src/lib/resource.ts
DeviceHardware.isMaker changed from required bool to optional boolean.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: rcarteraz

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making isMaker optional and changing its type from bool to boolean.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the type with care
isMaker may now be absent there
Boolean paths are clear and bright
The contract fits its shape just right
Soft paws approve the change tonight

Comment @coderabbitai help to get the list of available commands.

@thebentern
thebentern merged commit 311cc40 into master Sep 19, 2026
5 checks passed
@thebentern
thebentern deleted the fix/ismaker-optional-boolean branch September 19, 2026 01:26
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