Skip to content

feat(organization): publish the repository settings contract (ADR-0040) - #91

Merged
bketelsen merged 2 commits into
mainfrom
fluent/repository-settings-contract
Aug 18, 2026
Merged

bketelsen merged 2 commits into
mainfrom
fluent/repository-settings-contract

Conversation

@bketelsen

Copy link
Copy Markdown
Contributor

Summary

ADR-0040 and the contract it publishes: organization/contracts/repository-settings/v1.json, validated by organization/schemas/v1/repository-settings.schema.json.

Version one is organization-wide — every enrolled repository must match every value:

  • repository: delete branch on merge, suggest updating branches, no auto-merge, all merge methods, MERGE_MESSAGE/PR_TITLE merge commit and PR_TITLE/COMMIT_MESSAGES squash defaults, wiki/projects off, issues on, no web sign-off
  • actions: workflow token read, cannot approve PRs
  • security: Dependabot alerts + security updates, secret scanning + push protection, private vulnerability reporting
  • default_branch_ruleset: active, no bypass, PR required (0 approvals), conversation resolution, strict required checks, no deletion/force push, no merge queue, no classic protection — the Fluent ADR-0056 v1 shape
  • tag_ruleset: v*, no deletion/force update, creation restricted
  • metadata: license + description required, frostyard topic
  • labels: fluent

Deliberately not in v1 (observed, not required): visibility, discussions, code scanning, exact required-check names. Fluent reads and proposes drift; scripts/apply-repo-settings.sh (follow-up PR) applies; Fluent holds no admin credential.

Validator: new path/kind, invariants (required checks ⇒ PR required; tag ruleset must protect something), 1 valid + 4 rejection fixtures. Spec section, organization README, docs index.

Merge order

Fluent's validator rejects unrecognized organization/ paths, so merge the matching Fluent PR (bundled schema + path recognition) first, then this.

Verification

npm run check green: organization authority valid: 5 declarations … 7 valid fixtures, 18 rejection fixtures, 9/9 tests.

Survey that motivated it (2026-08-18, all five fleet repos): no default-branch ruleset or protection anywhere; workflow tokens write + can-approve on 4/5; secret scanning off everywhere; Dependabot alerts off on fluent; delete-branch-on-merge only on updex; no license on core/fluent.

🤖 Generated with Claude Code

organization/contracts/repository-settings/v1.json fixes, organization-wide,
the GitHub repository settings every enrolled repository must match: merge
hygiene, the default-branch ruleset (the Fluent ADR-0056 shape plus required
conversation resolution), a v* tag ruleset, Actions token permissions,
security features, metadata, and the labels the fleet depends on. Schema,
valid and rejection fixtures, validator support (path, kind, invariants:
required checks imply a required pull request; the tag ruleset must protect
something), spec section, organization README. Fluent reads and proposes;
scripts/apply-repo-settings.sh (next) applies.

Co-Authored-By: Claude Fable 5 <[email protected]>
…tory settings contract

Human-run, dry-run by default, idempotent: plans and (with --apply) makes the
exact GitHub API calls the contract implies — repository PATCH for merge
hygiene, features, and security_and_analysis; topics; Actions workflow
permissions; vulnerability alerts; private vulnerability reporting; the
default-branch ruleset (needs --required-checks) and the v* tag ruleset
(admins bypass so make bump still tags); missing labels. Never deletes a
ruleset it did not create; reports rather than writes license, description,
and classic protection.

Co-Authored-By: Claude Fable 5 <[email protected]>
@bketelsen
bketelsen merged commit 0204519 into main Aug 18, 2026
2 checks passed
@bketelsen
bketelsen deleted the fluent/repository-settings-contract branch August 18, 2026 19:56
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