feat(rfc_tools): enforce Git LFS tracking for media assets - #15
Draft
jtmcdole wants to merge 1 commit into
Draft
Conversation
jtmcdole
commented
Sep 13, 2026
Member
Author
There was a problem hiding this comment.
cleanup: sharing logging and process runner across other binaries, testing.
jtmcdole
commented
Sep 13, 2026
Member
Author
There was a problem hiding this comment.
cleanup for process runner sharing
jtmcdole
commented
Sep 13, 2026
Member
Author
There was a problem hiding this comment.
this is the source of truth for what should be placed into gitlfs.
jtmcdole
force-pushed
the
git_lfs
branch
2 times, most recently
from
September 13, 2026 16:13
6937ecb to
3d065b6
Compare
jtmcdole
commented
Sep 13, 2026
| - name: Checkout Code | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 |
Member
Author
There was a problem hiding this comment.
dropped any magic around fetch-depth because it was breaking assumptions. this isn't going to be a big tree, so silly optimization gone.
jtmcdole
commented
Sep 13, 2026
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: ${{ github.event_name == 'pull_request' && 0 || 1 }} | ||
| fetch-depth: 0 |
Member
Author
There was a problem hiding this comment.
ditto: we need the full checkout.
RFC media assets (such as screenshots) must be tracked via Git LFS. Committed raw binary blobs permanently bloat Git history—even if deleted in subsequent commits. This change introduces automated verification tooling and CI enforcement: - Configures case-insensitive Git LFS tracking in .gitattributes. - Adds LfsVerifier and bin/lfs_verify.dart to ensure media files are tracked with 'filter=lfs' and backed by valid Git LFS pointers. - Uses 'git lfs fsck --pointers' directly against Git revision trees, eliminating false positives from smudged working-copy binaries and avoiding temp-file disk I/O. - Supports PR diff auditing (--base-branch) and full-tree auditing at HEAD, with an opt-in --audit-intermediate-commits flag for non-squash workflows. - Adds an automated GitHub Actions workflow (.github/workflows/lfs-verify.yml) reporting failures via inline PR annotations.
flutteractionsbot
added this pull request to stack #17
September 13, 2026 16:45
jtmcdole
removed this pull request from stack #17
September 13, 2026 16:52
jtmcdole
added this pull request to stack #19
September 13, 2026 16:52
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.
RFC media assets (such as screenshots) must be tracked via Git LFS (Large File Storage). Committed raw binary blobs permanently bloat Git history, even when deleted in subsequent commits.
.gitattributesusing case-insensitive bracket globs (*.[pP][nN][gG], etc.), mapped to filter=lfs.git lfs fsck --pointersdirectly against Git revision trees in the object database, reducing false positives.lfs-verify.ymlwith inline GitHub Actions error annotations (::error file=...::).Flow:
flowchart TD A["bin/lfs_verify.dart"] --> B["LfsVerifier.verify()"] B --> C{"Check Prerequisites"} C -->|"git-lfs missing"| Err["Fail Fast: Exit 1<br/>(Prompt 'git lfs install')"] C -->|"git-lfs present"| D{"Execution Mode"} D -->|"--base-branch (PR Mode)"| E["verifyPullRequest()"] D -->|"Default (Trunk Mode)"| F["verifyTrackedFiles()"] E --> G["git diff & populateAttributeFilters()<br/>(Batched in slices of 100)"] F --> H["git ls-files & populateAttributeFilters()<br/>(Batched in slices of 100)"] G & H --> J{"Audit Scope"} J -->|"Default PR Mode (Squash)"| K["git lfs fsck --pointers HEAD<br/>(Scoped to PR-modified files)"] J -->|"--audit-intermediate-commits"| L["git lfs fsck --pointers mergeBase..HEAD"] J -->|"Trunk Mode (main)"| M["git lfs fsck --pointers HEAD<br/>(All tracked files)"] K & L & M --> N["parseFsckOutput()<br/>(Extracts file path & diagnostic detail)"] N --> O["LfsVerificationResult<br/>(isSuccess, issues, checkedCount)"] O -->|"Issues Detected"| P["GitHub Actions Annotations<br/>::error file=...::<br/>& Actionable Remediation Guidance"] O -->|"Zero Issues"| Q["Exit 0: Verification Passed"]