#338: Filter non-material upstream commits from update notifications#343
Open
#338: Filter non-material upstream commits from update notifications#343
Conversation
- Shallow git fetch + name-only diff after ls-remote detects a new SHA; when every changed path is deny-listed infrastructure (README, LICENSE, CHANGELOG, .github/, node_modules/, .build/, Makefile), the notification is suppressed and the registry baseline advances so the same commits don't re-trigger on future cooldown windows. - techpack.yaml changes always surface unfiltered — manifest edits can swap hook scripts and MCP commands, so suppressing them would be a supply-chain risk. - Fetch or diff failure surfaces the notification unfiltered (never-hide invariant); pipeline covered by pure classifier + mock-shell orchestrator + end-to-end PackRegistryFile write-back tests.
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
Upstream pack repos accumulate README, LICENSE, CI, and
.github/commits that never affect whatmcs syncinstalls. Every one of these fires the SessionStart hook's "pack update available" banner, training users to ignore it. This PR filters those commits out so the notification only fires on commits that actually change the install surface — closes the first half of #338.Changes
git ls-remotedetects a new SHA, the update check now runs a shallow fetch + name-only diff in the local pack clone and classifies the changed-path list. If every path is deny-listed infrastructure (README, LICENSE, CHANGELOG, CONTRIBUTING,.gitignore,.editorconfig, package/lock files,Makefile,Dockerfile,.github/,.gitlab/,.vscode/,node_modules/,__pycache__,.build/), the notification is suppressed and the local pack-registry baseline advances to the new remote SHA so the same commits don't re-trigger on future cooldown windows.techpack.yamlchanges are always material, regardless of what else is in the diff — a manifest edit can swap hook scripts, MCP server commands, or the install surface entirely, so silent suppression would be a supply-chain risk.ignore:field ontechpack.yamland a validate-time remediation hint ship in follow-up PRs.Test plan
swift testpasses locallyswiftformat --lint .andswiftlintpass without violationsmcs sync,mcs doctor)Manual end-to-end:
mcs pack add <a test pack>; note thecommitSHAin~/.mcs/registry.yaml.~/.mcs/update-check.jsonto bust the cache; runmcs doctor→ expect no "pack update available" notification, and expectcommitSHAin~/.mcs/registry.yamlto advance to the new upstream SHA.mcs doctor→ expect the notification.techpack.yamlonly; bust the cache; runmcs doctor→ expect the notification.Checklist for engine changes
CLAUDE.md,docs/,techpack.yamlschema inExternalPackManifest.swift)