Repository navigation
Spec 002: today's order within a day is Reviewed, Authored, Created - #213
Merged
Merged
Conversation
T019's run found pdf-export's edit history printing Created above Authored on one day where today's report prints Authored above Created. Today's groups a day's edits into a hash map with computeIfAbsent, which puts a new key at the head of its bucket; Created, Authored and Reviewed share one and are added in that order, so they come out reversed: Modified, Revised, Edited, Reviewed, Authored, Created. Research R2 had inferred put's order. A test of editHistory over all six kinds on one day, seen failing before the fix; the fixture-graph test's expected order corrected with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Spec 002 (
specs/002-analysis-report), T007's rule, found by T019's comparison with today's report. This is a single-PR fix.The bug: on a day with several kinds of edit, pdf-export printed Created above Authored, and today's report prints Authored above Created. This happened in 4 of 25 and 8 of 50 reported pathways on T019's run.
Why: today's report (the deployed analysis-report library) groups a day's edits with
Collectors.groupingByinto aHashMapkeyed by the action.groupingByfills it withcomputeIfAbsent, which puts a new key at the head of its bucket. Created, Authored and Reviewed share a bucket and are added in that order, so they come out reversed. The order within a day is therefore Modified, Revised, Edited, Reviewed, Authored, Created. Research R2 had inferred the order thatputgives. I reproduced this with the same collectors on Java 11, and it agrees with today's PDFs.Changes
ACTION_ORDERinsrc/report/edits.ts.editHistoryover all six kinds on one day, seen failing before the fix.🤖 Generated with Claude Code