Skip to content

fix(ci): refuse a committed .claude/settings.json in sandbox-lint - #1675

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/sandbox-lint-committed-settings
Oct 16, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/sandbox-lint-committed-settings

Conversation

@potiuk

@potiuk potiuk commented Oct 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Why. Since feat(setup): ship the framework's agent settings as a template #1671 (Stop committing the framework's own .claude/settings.json; ship it as a template #1639), this repository's agent settings ship as tools/agent-isolation/claude-settings.template.json and .claude/settings.json is gitignored, so the sandbox-lint workflow stopped watching that path. A PR can still force-add the file; Claude Code would then load the committed copy for everyone who checks the repository out, and CI would never lint it, so it could weaken the sandbox around the linted template.
  • What.
    • .claude/settings.json is back in the workflow's pull_request and push path filters.
    • A new step, Refuse a committed .claude/settings.json, fails while the file is tracked, and points the author at the template, the baseline and git rm --cached.
    • The .asf.yaml note on why the job is not a required check lists the path.

Type of change

  • Skill change
  • Tool / bridge contract
  • Python package
  • Groovy reference impl
  • Cross-cutting
  • Documentation
  • Project template
  • CI / dev loop (sandbox-lint workflow, .asf.yaml comment)

Test plan

  • prek run --all-files passes
  • The step's condition in a throwaway repository: passes with the file untracked, refuses once it is force-added

Notes for reviewers


Gen-AI disclosure: prepared with the assistance of Claude Code (Claude Opus 5); reviewed by the author.

🤖 Generated with Claude Code

Since apache#1639 the repository's agent settings ship as a template and
.claude/settings.json is gitignored, so sandbox-lint stopped watching
that path. A PR could still force-add it, and Claude Code would load the
committed copy for everyone who checks the repository out, without CI
ever linting it.

The workflow runs again when .claude/settings.json changes, and a new
step fails while the file is tracked, pointing the author at the
template and the baseline instead.

Generated-by: Claude Opus 5
@github-actions github-actions Bot added the family:ci .github workflows, prek, validators label Oct 16, 2026
@potiuk
potiuk merged commit 4a07965 into apache:main Oct 16, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

family:ci .github workflows, prek, validators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant