Repository navigation
fix(scaffold): suppress Claude Code attribution in workspace settings - #1567
Merged
Merged
Conversation
Cloud sessions read only committed repo settings, and attribution.sessionUrl defaults to true — a separate gate from includeCoAuthoredBy — so scaffolded repos leaked claude.ai session links into commits and PR bodies. Ship a managed .claude/settings.json in the workspace template (strict JSON, banner exempt) and carry the identical block in devkit's own settings. Refs: #1562
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.
Description
Ships Claude Code attribution suppression in the downstream workspace template, so no repo scaffolded from devkit emits a
claude.aisession link — or any other built-in AI attribution — into a commit message or PR body.attribution.sessionUrldefaults totrueand is a separate gate fromincludeCoAuthoredBy, and cloud sessions (claude.ai/code, remote agents,/code-review ultra) read only what is committed in the repo — making the scaffold the single point that covers every repo, org, and contributor.Design decision (the issue's open question): option 1, a managed
assets/workspace/.claude/settings.json. Verified before writing code: across all four orgs (vig-os,exo-pet,MorePET,exoma-ch) no consumer repo has its own.claude/settings.jsontoday — the only hit is devkit's root file — so taking ownership of the whole file stomps nobody, and the absolute rule ("never, in any repo") favors the strongest guarantee. The layered split remains available later if a consumer ever needs its own settings.Type of Change
fix-- Bug fixChanges Made
assets/workspace/.claude/settings.json(strict JSON):attribution: {commit: "", pr: "", sessionUrl: false}+includeCoAuthoredBy: false(deprecated but still read — cheap insurance while both are honoured). Picked up automatically by the scaffold copy; not inPRESERVE_FILES, so upgrades regenerate it.scripts/sync_manifest.py:.claude/settings.jsonadded to_BANNER_SKIP(strict JSON — a provenance banner would corrupt it), same class as.claude/worktrees.json..claude/settings.jsoncarries the identical block (the measured leak includes devkit's mergedmainhistory), drift-gated by test.Changelog Entry
Fixed
(full entry with sub-bullets in
CHANGELOG.md)Testing
just test)Manual Testing Details
TDD: failing test committed first (
tests/test_attribution_settings.py— scaffold file exists as strict JSON, suppresses all attribution channels, is managed not preserved, is banner-exempt, and root settings match the scaffold block), then the implementation. Full suite: 1666 passed, 3 skipped locally (test_github_cli_authenticationdeselected — pre-existing host-keyring quirk unrelated to this diff, green in CI). Fulljust precommitgreen.Checklist
.claude/contents; issue + changelog carry the rationale)CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
Out of scope, per the issue: stripping the 10 existing PR-body footers (editable via
gh pr edit) and the trailers already in merged history (left alone — prevention, not rewrite). Verified against Claude Code 2.1.222's settings schema.Refs: #1562