Boost: build the pairing core in a new packages/boost
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- react-native, typescript
調査の方向性
Start with the pairing design in blocked issue #53; it must be accepted before this work can proceed, and the issue says the QR fields and code test vectors come from that design. Then read the layouts of other packages, packages/core/src/schema.ts, packages/core/src/erase.ts, and the named schema test. Done means tests cover each listed behavior, the migration applies forward, and the listed gates pass.
索引モデルが issue の本文から書いたものです。
説明
Why
Both sides of pairing (US-BOOST-01, FR-MOVE-01) need the same rules: the QR payload, the 6-digit code from the handshake, a flow that fails closed, and a record of paired devices (ENT-PairedDevice). Written once in a pure package, they're tested on Node and shared by the phone, the desktop app and, later, changing phones (EP-13).
What to do
Create packages/boost (new), or the name the pairing design picked: pure TypeScript, no network and no React Native, depending on @hermit/core. Lint already refuses fetch, XMLHttpRequest and WebSocket under packages/ (eslint.config.js). Follow the other packages' layout: package.json, tsconfig.json, src/, test/, vitest.
Tests first, in packages/boost/test/:
- The QR payload. Encode and decode the fields the design fixed, with a version. Refuse unknown versions, missing fields and payloads too big for the QR.
- The 6-digit code. Derive it from a handshake hash exactly as the design says, and pass the design's test vectors, with leading zeros kept.
- The flow. A small state machine: waiting, connected, codes shown, confirmed, failed. A mismatch, a cancel, a timeout or a second connection ends in failed. Paired needs both confirmations.
- Paired devices. A store over
SqlPortforpaired_devices(id, kind, public key, paired at), with a new forward-only migration inpackages/core/src/schema.tsthat takes the next free id. Make sure Delete everything removes it (packages/core/src/erase.ts). - Signed log events, if the design records pairing: the new event in
packages/cage/src/audit.ts, with a hash of the device key and never a name or an address.
The transport stays out. The core takes a handshake hash and bytes, and returns decisions. The adapters on each side bring the network.
Done when
pnpm --filter @hermit/boost testpasses, with a test for each point above, written before the code.- The migration applies forward from the current schema, as
packages/core/test/schema.test.tschecks. - The gates pass.
How to check
pnpm --filter @hermit/boost test
pnpm --filter @hermit/core test
pnpm check:privacy && pnpm typecheck && pnpm lint && pnpm test
node scripts/guard/check.mjs --patterns scripts/guard/patterns.txt
Depends on
- Blocked by the design in #53.
Keep in mind
- Keys never leave the phone. The store keeps public keys only; private keys stay in the platform's secure store, in the adapters.
- Pin new dependencies exactly. The packages already use
@noble/curvesand@noble/hashes. - Test keys and vectors are generated in the test or taken from the design. Never a real key.
- The multi-bot work adds migrations too. Rebase, and take the next free id.
- A change in
packages/cagegets a maintainer's review (CODEOWNERS). - Open a pull request only once everything under Depends on is accepted or merged, and a maintainer has said so here (AGENTS.md: code for a feature without an accepted issue may be closed).
- 主要言語
- TypeScript
- スター
- 11
- フォーク
- 0
- 平均マージ
- 10分
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
DojoCodingLabs/hermit のほかの issue
-
docs good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
DojoCodingLabs/hermit#73 ·
メンテナーはふだん 1 日以内に返信
-
device-lab
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
DojoCodingLabs/hermit#45 ·
メンテナーはふだん 1 日以内に返信
-
device-lab
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
DojoCodingLabs/hermit#44 ·
メンテナーはふだん 1 日以内に返信
-
device-lab
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DojoCodingLabs/hermit#43 ·
メンテナーはふだん 1 日以内に返信
-
agent-friendly docs good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
DojoCodingLabs/hermit#39 ·
メンテナーはふだん 1 日以内に返信
DojoCodingLabs/hermit の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
superlinked/sie#1033 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
remix-run/react-router#15838 ·
メンテナーはふだん 1 日以内に返信
-
area/ci bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
melgarafael/DeskcommCRM#5290 ·
メンテナーはふだん 1 日以内に返信