You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(ai): pin sync report range to precise commit SHAs
Record start and end SHAs from the --summary output so follow-up syncs
can start exactly where the previous run ended, regardless of whether
the range was tag-based, commit-based, or a past-to-past date window.
Output: `HASH|DATE|AUTHOR|SUBJECT|LINES_ADDED+LINES_DELETED` (one per line, oldest first).
86
+
Output: `HASH|DATE|AUTHOR|SUBJECT|LINES_ADDED+LINES_DELETED` (one per line, oldest first — the script uses `--reverse`).
87
+
88
+
**Capture the range bounds from the summary output** — the first line's hash is `START_SHA` (oldest commit in range), the last line's hash is `END_SHA` (newest). These are the actual commits the report covers, regardless of whether the user asked for a date range, tag range, or commit range.
89
+
90
+
This is critical for reproducibility: `END_SHA` is exactly where the next sync run should start from, and `START_SHA` anchors the beginning to a precise ref even when the user specified a fuzzy bound like `--days 30` or `--since 2026-03-12`.
87
91
88
92
Based on the commit count:
89
93
-**≤ 8 commits** → step 3a (direct analysis)
@@ -168,7 +172,7 @@ Save to `$REPORT_NAME` in the project root.
-**Commits scanned**: N (after filtering out version bumps and merges)
@@ -203,6 +207,14 @@ Save to `$REPORT_NAME` in the project root.
203
207
204
208
Commits within each priority section should be in chronological order (oldest first).
205
209
210
+
**Range line**: always pin both ends to precise linked SHAs — never leave "HEAD" or a bare date. Use `START_SHA` and `END_SHA` from step 2 (the first and last hashes of the `--summary` output). The `<range-label>` is a human-readable description of how the user specified the range:
-`--days 30` → `last 30 days (2026-03-12..2026-04-11) ([\`abc1234\`](...) → [\`def5678\`](...))`
215
+
216
+
This precision is critical for follow-up syncs — `END_SHA` becomes the exact starting ref (`--from <END_SHA>`) for the next run, regardless of whether the range ended at HEAD, a tag, or a past date.
217
+
206
218
### 5. Offer to create an issue
207
219
208
220
After writing the report, ask the user if they want to publish it as a GitHub issue in this repository. If yes, create the issue using `gh`:
0 commit comments