Repository navigation
./mfc.sh context: what to re-read to check a diff - #2036
Closed
sbryngelson wants to merge 11 commits into
Closed
sbryngelson wants to merge 11 commits into
sbryngelson wants to merge 11 commits into
Conversation
…ces, add --output
Map CI diffs onto the PR's merge base (--root on a merge-base worktree), not the tip of master; flag hunks that do not match the source; list changed lines outside any routine, deleted files and untracked new files; read src paths relative to the repo; make git diff immune to user diff settings; do not crash on blank hunk lines; drop a file's old expansion when Fypp fails.
|
Claude Code Review Head SHA: dd61ce7 Files changed:
Findings:
|
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.
Summary
On long tasks, re-reading drifts: the agent works from memory of the code and misses details exploration does not surface. Three kinds recur: Fypp-generated copies of a changed line (#1823's
c_sum_Yi_Phiwas private in one HLLC copy and shared in the other), module variables set as a side effect elsewhere (dir_idx,is1), and every call site a macro change affects (#2018)../mfc.sh contextprints that set for a diff.Report sections:
#:def): call sites, direct or through wrapper macros, filtered to those passing the arguments the change touchesHow
context_expand.pyruns Fypp itself withcmake/Fypp.cmake's flags (a test fails if they drift) and the includes the build generates (get_generated_files,Case.get_fpp), into a cache keyed by content underbuild/context. No build or compiler is needed.context.pymaps diff lines through Fypp's# N "file"markers, mapping continuation lines to their statement and counting copies as separate appearances, so one macro expansion is not reported as several.Claude review
The review workflow gets the report as extra reading (
.claude-review/context.md). The step runs this checkout's tool on a worktree of the PR's merge base (--root,--expand base), so the diff's old-side line numbers point at the code they came from, and no PR code runs in the privileged job. If it fails the review still runs, with a warning in the log.The re-read rule in
.claude/CLAUDE.mdnow points at the command.Testing
toolchain/mfc/test_context.py;./mfc.sh precheckpasses (796 toolchain tests).#:for HYPObodydir_idx,is1,isxset bys_populate_riemann_states_variables_buffers,dir_idxbys_initialize_cbcOMP_PARALLEL_LOOP)reduction/copy/default, including all six loops #2018 changed (420 sites unfiltered)s_compute_dt, its caller and callees,q_cons_tsset bys_tvd_rkands_save_datas_assign_default_values_to_user_inputskept apart, plus declaration changes listed as not in a routineLimits
f_*are missed as callers.--expand base, a routine the PR appends is attributed to the routine before it.build/contextis not pruned.