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

build-train: record output (dist) hash in the cache entry

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
build-system

調査の方向性

Start with workspace.ts around isStale at line 403 and find recordBuilt and distOracle; first inspect the cache entry shape and input manifest work tracked in #480, plus the stats fast path in #481. Add output digest and dist stats validation, then verify the listed fault cases: truncated, deleted, stale but present, and interrupted dist writes. Done means mismatches trigger rebuilds and unchanged dist files avoid full rehashing.

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

説明

ready-for-agent

What to build

isStale only checks the dist entry exists (existsSync(join(member.dir, distEntry)), workspace.ts:403) — a truncated, corrupted, or externally-deleted-then-touched dist stays "fresh". Record the output hash alongside the input hash and verify integrity on judgement.

  • In recordBuilt: after a successful build, hash the dist output (per distOracle(member.dir) entry point — entry file plus whatever the config emits, or a bounded hash of the dist tree) and store it in the cache entry.
  • In isStale: input-hash match and dist-exists and dist-hash match → fresh. Dist hash mismatch/missing → stale (rebuild), never trusted.
  • Bound the cost: hashing dist every run is the same file-read profile as the input tree; the #481 stats fast path should cover dist files too (record dist file stats, rehash dist only when they drift).

This is the prerequisite for restoring dists from a remote cache (#484): without output verification, a corrupted or interrupted restore is undetectable. It is also the train's answer to "output hermeticity" — actions whose outputs are validated against recorded digests.

Blocked by

#480 (cache entry shape and input-manifest work land first).

Status

  • Output hash recorded in the cache entry post-build
  • isStale verifies dist integrity; mismatch rebuilds
  • Dist stats fast path (no full dist rehash when unchanged)
  • Fault-injection tests: truncated dist, deleted dist file, stale-but-present dist, interrupted write
  • Changeset added
主要言語
TypeScript
スター
5
フォーク
3
平均マージ
10時間 12分
マージ済み PR(30日)
102

環境構築

はじめの一歩

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

NEARBuilders/everything-dev のほかの issue

NEARBuilders/everything-dev の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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