refactor(directory): Monitor の changelog データを分離し teaser と delta の重複を共通化 (R9a/R9b) - #621
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…通化 (R9a/R9b) 第 6 回レビュー Phase 6 の R9a/R9b (E16)。serviceMonitor.ts (946 行) から MANUAL_CHANGELOG と BASELINE_DATE をデータ専用の lib/directory/changelogData.ts に、 語彙の型と定数を changelogTypes.ts に移す (serviceMonitor は同じ path で再 export)。 両 teaser route の重複を lib/directory/monitorTeaser.ts の teaserChangesFor(scope) に、 両 paid monitor の delta 判定を takeDeltaSince に共通化する。挙動は不変。 実データで 6 route × 多数の query の応答 hash が分割前と同一であることを確認し、 fixture の golden (両 rail の byte 一致を含む) を commit した。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc
cipherwebllc
force-pushed
the
fix/r6-r9ab-monitor-data
branch
from
September 24, 2026 14:09
aa50b2d to
4551c8f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
第 6 回レビュー Phase 6 (完全リファクタ) の R9a と R9b です (指摘 E16)。応答を変えない抽出だけです。
lib/directory/serviceMonitor.ts(946 行) から、changelog のデータ (MANUAL_CHANGELOG・BASELINE_DATE) をデータ専用のlib/directory/changelogData.tsに、語彙の型と定数をchangelogTypes.tsに移しました。serviceMonitor.tsは 337 行になり、同じ path で再 export します。週次更新で追記する file はchangelogData.tsになります (runbook と memory は更新済み)。lib/directory/monitorTeaser.tsのteaserChangesFor(scope)に、2 つの有料 Monitor の delta 判定をtakeDeltaSinceに共通化しました。scope 付きの生イベント・scope の除去・実効記録日 (max(date, collectedAt ?? date)) 順・3 件の上限・全履歴からのlatestRecordedAtと合計・hasMore/nextChangedSinceは従来どおりです。stablecoin の teaser は、有料 Monitor の provider 行ではなく生イベントを返したままです。有料 Monitor は販売中の商品です。JPYC・USDC の 4 つの有料 route と 2 つの teaser の応答は、実データで多数の query を試して分割前と byte 単位で同一でした (レビュー役も独自に 305 通りで確認)。
固定と検証 (base = b13da8c)
tests/app/api/monitor-wire-golden.test.ts・16 件): fixture (小・空・有料上限超え) の raw text の sha256 と、JPYC と USDC の route の byte 一致。レビュー役が、data の import 先だけ変えた旧コードでも 16/16 通ることを確認しています。latestRecordedAtを page から計算する 等) をすべて検出しました。scope の除去と page からの計算は、既存テストでは検出できませんでした。既存の挙動 (本 PR では変えない)
addedイベントがあると、その entry の jpyc-services の baseline イベントが出ません (今のデータでは影響なし)。lastEventDateは、記録日ではなく発表日を使います。🤖 Generated with Claude Code
https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc