fix: harden audit follow-ups and ignore .hermes#706
Conversation
Ignore Hermes agent scratch, tighten MeshCore pubkey prefix checks and starred localStorage parsing, and fix roomMessages false friends plus audited zh English residue.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe changes add fail-safe diagnostics for Reticulum artifact reads, validate persisted starred messages, centralize MeshCore public-key prefix handling, update localization quality coverage and translations, and ignore the ChangesReticulum artifact diagnostics
Starred message persistence validation
MeshCore public-key prefix validation
Localization and repository updates
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/renderer/lib/meshcoreRepeaterRpcCommon.ts (1)
71-87: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse the shared prefix-length constant throughout the contract.
MESHCORE_PUBKEY_PREFIX_LENis introduced here, butnormalizePubKeyPrefix()andpubKeyPrefixesEqual()still hard-code6. A future contract change could then make extraction accept a different length than matching does.Proposed follow-up
- if (prefix instanceof Uint8Array && prefix.length === 6) { + if (prefix instanceof Uint8Array && prefix.length === MESHCORE_PUBKEY_PREFIX_LEN) { ... - if (ArrayBuffer.isView(prefix) && prefix.byteLength === 6) { + if (ArrayBuffer.isView(prefix) && prefix.byteLength === MESHCORE_PUBKEY_PREFIX_LEN) { ... - if (Array.isArray(prefix) && prefix.length === 6) { + if (Array.isArray(prefix) && prefix.length === MESHCORE_PUBKEY_PREFIX_LEN) { ... - if (a.length !== 6 || b.length !== 6) return false; + if ( + a.length !== MESHCORE_PUBKEY_PREFIX_LEN || + b.length !== MESHCORE_PUBKEY_PREFIX_LEN + ) return false; ... - for (let i = 0; i < 6; i++) { + for (let i = 0; i < MESHCORE_PUBKEY_PREFIX_LEN; i++) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/renderer/lib/meshcoreRepeaterRpcCommon.ts` around lines 71 - 87, The shared prefix-length contract is inconsistent because normalizePubKeyPrefix() and pubKeyPrefixesEqual() still hard-code 6. Update both functions to use MESHCORE_PUBKEY_PREFIX_LEN for extraction and comparison, preserving their existing behavior while ensuring all prefix matching uses the same constant.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/main/support-bundle.test.ts`:
- Around line 135-152: Ensure the console.debug spy created in the
support-bundle test is always restored by wrapping the test body after spy
creation in a try/finally block, moving debugSpy.mockRestore() into finally.
Preserve the existing artifact setup and assertions while guaranteeing cleanup
when any assertion or operation fails.
In `@src/renderer/locales/zh/translation.json`:
- Around line 3306-3312: Remove the remaining English text from the Chinese
locale by translating the GPIO and POSIX timezone labels at
src/renderer/locales/zh/translation.json:3306-3312, rebroadcast mode labels at
:3324-3332, display-option labels at :3343-3352, RRC hub selection and favorite
actions at :4388-4397, and remaining RRC room controls and statuses at
:4410-4417; preserve the existing translation keys and descriptions.
---
Nitpick comments:
In `@src/renderer/lib/meshcoreRepeaterRpcCommon.ts`:
- Around line 71-87: The shared prefix-length contract is inconsistent because
normalizePubKeyPrefix() and pubKeyPrefixesEqual() still hard-code 6. Update both
functions to use MESHCORE_PUBKEY_PREFIX_LEN for extraction and comparison,
preserving their existing behavior while ensuring all prefix matching uses the
same constant.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c6238ed9-3f2e-4200-9d05-e7ffb9832ec4
📒 Files selected for processing (19)
.gitignorescripts/check-i18n-quality.mjssrc/main/support-bundle.test.tssrc/main/support-bundle.tssrc/renderer/lib/chatPanelProtocolStorage.test.tssrc/renderer/lib/chatPanelProtocolStorage.tssrc/renderer/lib/meshcoreRepeaterLoginRpc.tssrc/renderer/lib/meshcoreRepeaterPrefixPushRpc.test.tssrc/renderer/lib/meshcoreRepeaterPrefixPushRpc.tssrc/renderer/lib/meshcoreRepeaterRpcCommon.tssrc/renderer/lib/meshcoreRoomLoginRpc.tssrc/renderer/locales/de/translation.jsonsrc/renderer/locales/es/translation.jsonsrc/renderer/locales/fr/translation.jsonsrc/renderer/locales/id/translation.jsonsrc/renderer/locales/ja/translation.jsonsrc/renderer/locales/nl/translation.jsonsrc/renderer/locales/ru/translation.jsonsrc/renderer/locales/zh/translation.json
Restore the support-bundle console spy in finally, use the shared pubkey prefix length constant consistently, and translate adjacent zh labels.
|



Summary
.hermes/agent scratch in.gitignore.requireContactPubKeyPrefix), validate starred message localStorage entries, and debug-log skipped support-bundle Reticulum artifacts.appPanel.roomMessagesMeshCore Room false friends across locales, cover the key in i18n quality checks, and translate audited zh radioPanel/rrc English residue.Test plan
Summary by CodeRabbit
Bug Fixes
Localization
appPanel.roomMessageskey.