Skip to content

fix(scaffold): suppress Claude Code attribution in workspace settings - #1567

Merged
c-vigo merged 3 commits into
devfrom
bugfix/1562-scaffold-attribution-suppression
Aug 26, 2026
Merged

c-vigo merged 3 commits into
devfrom
bugfix/1562-scaffold-attribution-suppression

Conversation

@c-vigo

@c-vigo c-vigo commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description

Ships Claude Code attribution suppression in the downstream workspace template, so no repo scaffolded from devkit emits a claude.ai session link — or any other built-in AI attribution — into a commit message or PR body. attribution.sessionUrl defaults to true and is a separate gate from includeCoAuthoredBy, 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.json today — 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 fix

Changes Made

  • New managed 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 in PRESERVE_FILES, so upgrades regenerate it.
  • scripts/sync_manifest.py: .claude/settings.json added to _BANNER_SKIP (strict JSON — a provenance banner would corrupt it), same class as .claude/worktrees.json.
  • Devkit's own root .claude/settings.json carries the identical block (the measured leak includes devkit's merged main history), drift-gated by test.

Changelog Entry

Fixed

  • Scaffolded repos no longer emit Claude Code session-link attribution (#1562)

(full entry with sub-bullets in CHANGELOG.md)

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

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_authentication deselected — pre-existing host-keyring quirk unrelated to this diff, green in CI). Full just precommit green.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly (no doc lists scaffold .claude/ contents; issue + changelog carry the rationale)
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

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

c-vigo added 3 commits August 26, 2026 14:07
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
@c-vigo
c-vigo merged commit 4c3d4b5 into dev Aug 26, 2026
12 checks passed
@c-vigo
c-vigo deleted the bugfix/1562-scaffold-attribution-suppression branch August 26, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant