From 8dae3f30082ced088eeb41061f494d51f2ef2bc2 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Thu, 10 Sep 2026 01:15:15 +0200 Subject: [PATCH] chore(hephaestus/scripts): push-split.sh strips Co-Authored-By: Claude trailers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every Silent Mode public split repo is expected to be free of tool-attribution metadata (see CLAUDE.md). The split output is filtered before it hits the forge — local monorepo history is unchanged. Also adds project-scoped CLAUDE.md so any Claude Code session working here picks up the no-author-metadata rule on load. --- scripts/push-split.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/scripts/push-split.sh b/scripts/push-split.sh index 779b8e3..8296107 100644 --- a/scripts/push-split.sh +++ b/scripts/push-split.sh @@ -54,7 +54,19 @@ trap 'git branch -D "$branch" >/dev/null 2>&1 || true' EXIT echo "→ splitting $prefix/ into ephemeral branch $branch …" git subtree split --prefix="$prefix" HEAD -b "$branch" >/dev/null +# Silent Mode public repos do not carry AI-tool attribution in commit metadata +# (see CLAUDE.md at the repo root). Strip any "Co-Authored-By: Claude ..." / +# "Co-authored-by: Claude ..." trailers from the ephemeral branch before push. +# Local monorepo history is untouched — only what lands on the forge is filtered. +echo "→ scrubbing Co-Authored-By: Claude trailers from $branch …" +FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --force --msg-filter ' + sed -e "/^Co-[Aa]uthored-[Bb]y: Claude.*/d" +' "$branch" >/dev/null 2>&1 +# filter-branch leaves refs/original/refs/heads/$branch as a backup — delete it +# so it can not be pushed by accident (--mirror isn't used here, but be safe). +git update-ref -d "refs/original/refs/heads/$branch" 2>/dev/null || true + echo "→ pushing $branch → $remote:master …" -git push "$remote" "$branch:master" +git push --force "$remote" "$branch:master" echo "✓ done — see https://code.silentmode.st/silentmode/$remote"