feat: report remodel recipe v3 facts#45
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR extends RemodelRecipeReporter to emit v3 item improvement “facts” (availability/list, detail/cost+materials, and execution/update) while keeping legacy v2 execution reporting, and adds regression tests for edge cases (missing fleet context, malformed requirements, stale/mismatched state, conversion targets).
Changes:
- Add v3 reporting payloads for list availability, detail costs/material requirements, and execution conversion updates.
- Remove
moment-timezoneusage and switch day calculation to a Date-based JST day helper, plus stronger validation/normalization around detail data. - Expand reporter tests to cover v3 reporting, malformed requirement pairs, missing fleet context, and mismatch/stale-state scenarios.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/reporters/remodel-recipe.test.ts | Adds/updates regression tests validating v3 facts emission and edge-case handling. |
| src/reporters/remodel-recipe.ts | Implements v3 reporting, fleet context extraction, required-item normalization, and Date-based JST day computation; preserves v2 execution report. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
My review of the PR follows. Finding 1 (Medium — Flaky test dependent on wall-clock time) The test // lines 115-119 — no time arg
reporter.handle('GET', '/kcsapi/api_req_kousyou/remodel_slotlist', listBody)
reporter.handle('POST', '/kcsapi/api_req_kousyou/remodel_slotlist_detail', detailBody, {
api_id: '33',
api_slot_id: 501,
})
// lines 120-132 — no time arg
reporter.handle('POST', '/kcsapi/api_req_kousyou/remodel_slot', ...)
Fix: Pass an explicit timestamp to each Finding 2 (Low — In the execution handler at clientObservedAt: currentDetail.clientObservedAt,This sets the execution-event timestamp to the time the detail was observed (possibly much earlier), rather than the time the execution itself occurred. The This produces inaccurate timing data for v3 update records. If a user loads the detail screen, waits 10 minutes, then executes the remodel, the execution record will be stamped 10 minutes in the past. Fix: Use the clientObservedAt: time,The fix is a one-character-level change (replacing |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
I've now reviewed all 6 changed files. Let me confirm my understanding of the codebase. Findings already identified by existing reviews:
Additional finding not covered by existing reviews: Finding 3 (Low — Stale At This is the same root cause as Finding 2 (stale detail data leaking into the execution payload), but requires a different fix — Fix (line 610): Note: Finding 2 and Finding 3 should be fixed together since they share the same stale-data pattern in the same payload block (lines 603-617). All time-derived fields in the execution payload should use the execution-call |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
I've reviewed all 6 changed source files thoroughly. After cross-referencing with the existing review comments, I find no material issues beyond those already identified. Here's my independent assessment: Already-covered findings I've verified:
I found no additional vulnerabilities or correctness issues beyond these five. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Reviewed all 16 changed files against the PR diff and cross-verified every finding from 6 existing review comments — all were based on outdated or misread code (tests pass explicit timestamps, execution payload already uses |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
After a thorough analysis of all 16 changed files and the full diff, I concur with the final review comment (06:34:01Z). The earlier findings (flaky tests, stale timestamps, dropped booleans, optional chaining crashes) are all based on misread code:
No material correctness, security, or reliability issues to report. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
No material issues to report. After thorough review of all 26 changed files and cross-referencing every claim from the 16+ existing review comments against the actual source code, all previously reported findings are based on misreadings:
The v3 reporting logic, debug recorder sanitization, fleet context extraction, required-item normalization, and test coverage are all sound and well-tested. No correctness, security, performance, or reliability issues found. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
After a thorough review of all 26 changed files and independent verification of every finding from the existing review comments against the actual source code, I find no material issues to report. Every previously claimed finding is based on misreadings of the code. Key verifications:
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
After a thorough independent review of all changed source files against the actual code (not the review comments), I find no material issues to report. Every finding in the existing review comments is based on misreadings. Key verifications against the actual source:
The v3 reporting logic, debug recorder sanitization, fleet context extraction, required-item normalization, and test coverage are all sound. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
After exhaustive analysis of all 26 changed files and cross-referencing every claim from the multiple existing review comments against the actual source code, I find no material correctness, security, reliability, or maintenance issues to report. Every finding in the existing review comments is based on misreadings of the code. Key verifications against the actual source:
The PR is well-tested, handles edge cases properly, and introduces no correctness, security, or reliability regressions. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
I have now thoroughly read and verified all 18 relevant source files of this PR. After independent analysis and cross-referencing every finding from the existing review comments against the actual source code: No material correctness, security, reliability, or maintenance-risk issues to report. All findings from the existing reviews (flaky tests, stale
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
I've thoroughly reviewed all the changed files. Let me verify each existing review claim against the actual source code. All previously reported findings are based on misreadings of the code. Key verifications:
No material correctness, security, performance, or reliability issues found. The PR is well-tested, handles edge cases defensively, and the v3 reporting logic, debug recorder sanitization, fleet context extraction, and build configuration are all sound. |
| const getReporterVersion = (): string => { | ||
| const globalReporterVersion = (globalThis as { __REPORTER_VERSION__?: string }) | ||
| .__REPORTER_VERSION__ | ||
| return typeof __REPORTER_VERSION__ === 'string' | ||
| ? __REPORTER_VERSION__ | ||
| : (globalReporterVersion ?? '0.0.0-dev') | ||
| } |











Summary
Testing