Skip to content

Contribution governance: DCO + CLA two-tier model, materiality triage, public API tracking#47

Merged
cosmin-staicu merged 1 commit into
mainfrom
docs/cla-framework
Jun 29, 2026
Merged

Contribution governance: DCO + CLA two-tier model, materiality triage, public API tracking#47
cosmin-staicu merged 1 commit into
mainfrom
docs/cla-framework

Conversation

@cosmin-staicu

Copy link
Copy Markdown
Member

Why

Ahead of making this repo public, this sets up the contribution-governance model legal asked for: DCO + MIT for ordinary contributions, plus a CLA for material/strategic ones — with tooling to flag the material ones without a bot ever making the legal call.

What's in here

1. CLA + two-tier model (03f3fe7)

  • CLA.md — the Contributor License Agreement, transcribed verbatim from legal's template (verified by word-level diff).
  • CONTRIBUTING.md — when a CLA applies (material, product-critical, patent-sensitive, corporate contributor, broad commercial use) and the label-driven process.
  • .github/workflows/cla.yml — a legal/cla status check that is green by default and turns red only when a maintainer applies cla-required without cla-signed. Posts signing instructions automatically.

2. Advisory materiality triage (f52e289)

  • .github/workflows/cla-triage.yml — scans each PR for objective signals (new dependency, new src/ project, public-API change, large src/ diff, licensing-file changes, external contributor) and applies needs-cla-review + a maintainer checklist. Advisory only — it raises scrutiny, never waives it, and never sets cla-required.
  • PR template — contributor self-declaration checkbox for employer/corporate contributions.

3. Public API surface tracking (2b98036)

  • Microsoft.CodeAnalysis.PublicApiAnalyzers (4.14.0) wired into the 7 src/ libraries only (via src/Directory.Build.props).
  • PublicAPI.Shipped.txt baselined for all libraries; RS0016/RS0017 are build errors, so any public-API change must update PublicAPI.Unshipped.txt in the same PR. This makes "material = touches public API" an exact, build-enforced signal that the triage workflow keys off (replacing the earlier line-count heuristic).
  • Verified: public surface identical across net8.0 / net10.0; clean full build; negative test (an undeclared public type fails the build with RS0016).

How decisions stay human

needs-cla-review (bot) → a maintainer judges → cla-required / cla-signed (maintainer). The bot only flags candidates; the legal determination is always a person's.

Repo settings (configured outside this PR)

  • ✅ Labels created: cla-required, cla-signed, needs-cla-review.
  • ✅ Ruleset on dco-signatures (the DCO audit branch): blocks force-push + deletion, no PR/check requirement so the DCO bot keeps appending.
  • ⬜ Optional: mark legal/cla as a required status check on main (safe — green by default).

Reviewer notes

  • The triage thresholds live in env: at the top of cla-triage.yml and are easy to tune.
  • At each release, promote PublicAPI.Unshipped.txt entries into PublicAPI.Shipped.txt.

🤖 Generated with Claude Code

… triage, public API tracking

Sets up the contribution model ahead of making the repo public: DCO + MIT for
ordinary contributions, plus a signed CLA for material/strategic ones, with
tooling that flags material contributions for a maintainer while leaving the
legal decision to a human.

CLA + two-tier model:
- CLA.md: agreement transcribed verbatim from legal's template
- CONTRIBUTING.md: when a CLA applies + the label-driven process
- .github/workflows/cla.yml: legal/cla status check (green by default, red only
  when cla-required is set without cla-signed) + one-time signing comment

Advisory materiality triage (bot proposes, human disposes):
- .github/workflows/cla-triage.yml: scans each PR for objective signals (new
  dependency, new src/ project, public API change, large src diff, licensing
  files, external contributor) and applies needs-cla-review + a maintainer
  checklist. Never sets cla-required; only raises scrutiny, never waives it.
- PR template: contributor self-declaration checkbox for employer contributions

Public API surface tracking (exact, build-enforced signal):
- Microsoft.CodeAnalysis.PublicApiAnalyzers 4.14.0 wired into the 7 src/
  libraries only (src/Directory.Build.props); RS0016/RS0017 = error
- PublicAPI.Shipped.txt baselined for all libraries; surface verified identical
  across net8.0 and net10.0
- triage keys off PublicAPI.Unshipped.txt instead of a public-line heuristic

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@cosmin-staicu
cosmin-staicu merged commit cab37af into main Jun 29, 2026
7 checks passed
@cosmin-staicu
cosmin-staicu deleted the docs/cla-framework branch June 29, 2026 22:35
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