Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

relay: a float-spelled timestamp is rejected, which the capture accepts

オープン 初心者向け
#960 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust, typescript
領域
api, backend

調査の方向性

crates/nostream-core/src/messages.rs:474-494を読み、created_atの解析をkindの分岐と比較してください。src/schemas/base-schema.ts:23-27で、キャプチャが整数についてどのような動作を受け入れるか確認してください。範囲内で小数部分がゼロのタイムスタンプを受け入れ、実際に小数部分のある値は無効のままにします。1700000000.0が受け入れられ、小数部分のあるタイムスタンプが拒否されることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

bug factory rewrite rust

A created_at written in float spelling — 1700000000.0, or any value a JSON encoder emits with a fractional part of zero — is rejected by the port and accepted by the capture.

Port: crates/nostream-core/src/messages.rs:474-486 matches Value::Number and requires as_i64(), which returns None for a float, then errors with Invalid timestamp. kind two fields later already handles this correctly (:491-494), rejecting only a float whose fract() != 0.0.

Capture: src/schemas/base-schema.ts:23-27 — z.number().int().min(0).refine(Number.isSafeInteger …). In JavaScript there is no float/int distinction after parsing: 1700000000.0 is the number 1700000000, Number.isInteger is true, and the value passes.

So the two disagree on an encoding nobody writes by hand but encoders emit routinely. A client that serialises with a floating-point formatter is rejected here and accepted there.

Fix direction: mirror the kind branch — accept a Value::Number whose f64 has a zero fractional part and lies in range. Keep rejecting a genuine fraction.

Measured on rewrite/main at 740ef69: pre-existing, outside #950–#952's diff, and not made more reachable by it.

主要言語
TypeScript
スター
829
フォーク
234
平均マージ
17時間 47分
マージ済み PR(30日)
91

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cameri/nostream のほかの issue

cameri/nostream の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。