Docs cache: two call sites can still share a key through a helper's url parameter

オープン
#751 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
backend

調査の方向性

Start by reading src/server/providers/docs-cache-keys.test.ts (the guard from #744) and the cached-parse path in src/server/providers/google-docs.ts, especially the miss path that skips the JSON round-trip. Then trace every call site that builds a docs-cache key and find ones where a helper takes a url parameter, since those are the shapes the current test cannot distinguish. Decide between per-parse names in the key or schema-validated reads, and make the acceptance test cache two shapes at one URL and assert a reported miss rather than a TypeError.

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

説明

Problem

The BytePlus poll failed for 1h45 on 2026-11-21 because two parsers cached different shapes under one docs-cache key (#744). The guard added there, src/server/providers/docs-cache-keys.test.ts, compares key expressions as written: it cannot see two constants holding the same URL, or a helper that takes a url parameter. cachedGoogleDocs (google-docs.ts) also has its own miss path with no JSON round-trip.

Ask

Make a collision impossible, not just tested: for example have each cached parse declare a name that goes into the key, or validate the cached shape on read with the parser's own schema and treat a mismatch as a miss that is reported.

Acceptance

  • A test that caches two shapes at one URL through a helper fails loudly at the read, not with a TypeError in the caller.
主要言語
TypeScript
スター
0
フォーク
1
平均マージ
5時間 40分
マージ済み PR(30日)
193

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

TanStack/schemas のほかの issue

TanStack/schemas の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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