refactor(fetch): diff roster against previous git revision instead of embedded snapshot#33
Open
howlsome wants to merge 2 commits into
Open
refactor(fetch): diff roster against previous git revision instead of embedded snapshot#33howlsome wants to merge 2 commits into
howlsome wants to merge 2 commits into
Conversation
… embedded snapshot Removes `prev_roster_snapshot` from changelog.json — previously a ~13 KB copy of the full roster committed twice daily. Changelog generation now diffs the current roster against `git show HEAD:data/roster.json`, falling back to null (no entries generated) on the first ever run. Closes #7
Deploying relentless with
|
| Latest commit: |
38cd4f8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b00d3cec.relentless-2cp.pages.dev |
| Branch Preview URL: | https://issue-7-drop-prev-roster-sna.relentless-2cp.pages.dev |
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
Closes #7
changelog.jsonpreviously embedded a full copy of the roster (~13 KB) asprev_roster_snapshotto diff against on the next fetch run. This copy was committed twice a day alongside every data snapshot, inflating repo size significantly over time.scripts/fetch.ts: Added aloadPrevRosterFromGit()helper that runsgit show HEAD:data/roster.jsonand parses the result, returningnullif unavailable (e.g. on the very first run, where no entries would be generated anyway). The changelog diff now uses this instead of the embedded snapshot. Removedprev_roster_snapshotfrom both the write path (changed roster) and the no-change pass-through write.data/changelog.json: Removed the now-redundantprev_roster_snapshotfield from the file (~1,056 lines / ~13 KB gone).The
ChangelogFiletype insrc/lib/types/changelog.tsalready did not includeprev_roster_snapshot, so no type changes were needed.Test plan
pnpm lintpassespnpm test:unitpasses (325 tests)