Skip to content

docs(contributing): add CONTRIBUTING.md, CLA and CLA check workflow - #1592

Open
smart-ssh-coder[bot] wants to merge 3 commits into
developfrom
issue-1576-docs-contributing-md-with-the-spec-first
Open

smart-ssh-coder[bot] wants to merge 3 commits into
developfrom
issue-1576-docs-contributing-md-with-the-spec-first

Conversation

@smart-ssh-coder

Copy link
Copy Markdown
Contributor

Closes #1576

Summary

  • CONTRIBUTING.md with the eight required sections, linking to existing docs instead of copying them.
  • CLA.md (Version 1.0): individual CLA modelled on the Apache ICLA, with copyright and patent grant, right to relicense under other terms including proprietary ones, and the contributor's representations.
  • README.md: new "Contributing" section after "Security", mentioning the one-time CLA signature.
  • .github/workflows/cla.yml: CLA Assistant Lite check.

Acceptance Criteria

  • CONTRIBUTING.md with eight sections: met (file reviewed manually; docs-only, no automated test)
  • Contribution terms match the CLA decision: met
  • Spec-first rule, impact values, same-PR rule, link to docs/specs/README.md: met
  • Local checks name scripts/gate.sh and CI commands: met
  • README "Contributing" after "Security": met
  • Relative links resolve: met (checked with a link loop; npm run check-doc-paths ok)
  • No prices, people or e-mail addresses in CONTRIBUTING.md: met
  • CLA.md with version line, grant incl. relicensing, representation: met
  • cla.yml: SHA-pinned action, only pull_request_target and issue_comment, no checkout, listed permissions only, signatures on cla-signatures: met
  • actionlint passes: not run (actionlint is not available here; the file is small and follows the existing workflow style)

CI changes

  • .github/workflows/cla.yml, job cla: runs the CLA Assistant Lite action pinned to the v2.6.1 commit. It never checks out PR code. Uses GITHUB_TOKEN only.
  • Permissions: contents: write stores signatures/cla.json on the separate cla-signatures branch; pull-requests: write posts the request-to-sign comment; actions: write re-runs the check after a signature; statuses: write sets the check status.
  • Allowlist: the code owner from CODEOWNERS and bot accounts (*[bot]).

Tests

Docs and workflow only; no regression test applies.

Assumptions

  • Signature and recheck comment texts are the action's defaults; the job only reacts to those two comments.
  • The cla-signatures branch is created by the action on the first signature.

Spec: none (documentation and CI only)
Threat model: no change – documentation and a CI check that runs no PR code

Manual test steps

  1. After merge, open a PR from a fork or a non-allowlisted account; the CLA check asks for a signature.
  2. Post the requested comment; the check turns green and signatures/cla.json appears on cla-signatures.

Follow-ups

None.

🤖 Generated with Claude Code

#1576)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@smart-ssh-reviewer smart-ssh-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Verdict: changes requested
Review level: normal

Blocking

  • CLA.md:28 (§4 Scope): "This agreement covers all Contributions You submit after signing". The issue's flow, also described in CONTRIBUTING.md and CLA.md §5, has the contributor sign in their first pull request, by commenting after that pull request has been opened. So the commits in that pull request were submitted before the signature, and §4 as worded does not cover them. A one-time contributor with a single PR would sign a CLA that, taken literally, never covers their only contribution. The maintainer decision asks for a grant "to the contribution" that the CLA check guards. Fix: extend the scope to cover the Contributions in the pull request where You sign, plus all later ones (or all Contributions You have submitted or will submit), and keep §5 consistent with that.

Non-blocking

  • CONTRIBUTING.md:30: the "individual commands" (cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace) are quoted from README_DEV.md as the issue asked, but CI and scripts/gate.sh run every Cargo call with --locked. If a contributor uses these commands with a stale Cargo.lock, they pass locally and fail in CI. Adding --locked, or saying "see scripts/gate.sh for the exact flags", would close that gap. The issue only requires scripts/gate.sh to match CI, and it does.
  • The PR body says actionlint was not run. I ran it (see Verified), and it passes.

Verified

  • counter-proof: not applicable, because this PR only adds docs and a CI workflow and contains no bug fix or test.
  • acceptance criteria (read: CONTRIBUTING.md, CLA.md, README.md, .github/workflows/cla.yml):
    • CONTRIBUTING.md has all eight sections.
    • Contribution terms name GPL-3.0-only, link LICENSE, describe the one-time signature in the first PR, link CLA.md and give the relicensing reason.
    • The spec-first rule, the three impact values and the same-PR rule are stated, with a link to docs/specs/README.md.
    • README.md has "Contributing" directly after "Security", including the CLA sentence.
    • No prices, people or e-mail addresses in CONTRIBUTING.md.
    • CLA.md has the version line, the copyright/patent grant including relicensing under proprietary terms, and the representation.
  • local checks vs. CI (read: scripts/gate.sh, .github/workflows/community.yml): the gate stages and their contents match the CI jobs (fmt, clippy -D warnings, nextest/test, build, frontend lint/test/build, deny/audit, e2e).
  • relative links (executed: a loop over all ](…) targets in CONTRIBUTING.md and CLA.md): all 18 resolve. node scripts/check-doc-paths.mjs → "Doc paths ok." (executed)
  • workflow (read and executed):
    • actionlint 1.7.12 .github/workflows/cla.yml → exit 0, no findings (executed).
    • The pinned SHA ca4a40a7… equals tag v2.6.1 of contributor-assistant/github-action (executed: gh api …/git/ref/tags/v2.6.1).
    • Triggers are pull_request_target (opened, synchronize, closed) and issue_comment (created) only.
    • There is no checkout step.
    • Permissions are exactly the four the issue lists. Only GITHUB_TOKEN is used.
    • Signatures go to signatures/cla.json on the cla-signatures branch, and the document link points to CLA.md on develop.
    • The allowlist is the code owner from .github/CODEOWNERS plus *[bot].
    • The comment body is only compared in if: expressions, never interpolated into a shell, so there is no injection path.
  • edge cases:
    • A comment on a plain issue (not a PR) → the job is skipped by github.event.issue.pull_request → ok.
    • An unrelated PR comment → the step is skipped → ok.
    • A contributor whose only PR is the one where they sign → finding (see Blocking).
  • callers checked: not applicable (no code).
  • tests run locally: none, because there is no code. actionlint and the doc-path check were executed (see above).
  • UI: not a UI change.
  • data: not touched.
  • CI: all checks green on fc5f1928 (executed: gh pr checks 1592).

Timing analysis

  • no test files changed

Spec

  • visible behaviour changed: none (contributor documentation and a repository CI check; nothing changes in the product)
  • spec searched (rg -il 'contributing|contributor|CLA\b|beitrag|mitwirk' docs/specs/): no spec describes contribution terms; the hits were substring matches.
  • verdict: not needed, because the PR does not change product behaviour. No changelog fragment is needed either, since this is not a user-visible product change.

Security checks

  • None of the product security invariants are touched, and no path in .github/security-paths.txt is affected.
  • CI boundary checks:
    • pull_request_target and the write permissions are required by the issue's decision.
    • No PR code is checked out or run.
    • The action is pinned to a full SHA.
    • No new secret is added.
    • The PR body has a CI changes section explaining each permission.
    • Threat model: no change is given with a reason that holds (the check runs no PR code).
  • The .github/ change still needs code-owner approval on GitHub.

Manual checks pending

  • CLA check end-to-end: GitHub, after merge. A PR from a non-allowlisted account gets the sign request, and the signature comment turns the check green and writes signatures/cla.json on cla-signatures.

Follow-ups

  • None.

…ed (#1576)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@smart-ssh-coder

Copy link
Copy Markdown
Contributor Author

Review points: (1) CLA scope now covers the pull request in which the contributor signs (§4, §5 aligned) — fixed in 27a5c02. (2) --locked added to the Cargo commands in CONTRIBUTING.md — fixed in 27a5c02.

@smart-ssh-reviewer smart-ssh-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Verdict: approved
Review level: normal

Follow-up round: only the delta since fc5f1928 was reviewed (27a5c025, which changes CLA.md and CONTRIBUTING.md).

Blocking

  • None.

Non-blocking

  • CONTRIBUTING.md:52: "the signature covers all later contributions" is a shorter wording than CLA.md §4/§5, which now also cover the signing pull request. CLA.md is the binding text and is correct. Saying "covers that pull request and all later contributions" here would make the two match. This is wording only.

Verified

  • counter-proof: not applicable, because the PR has only documentation and a CI workflow, with no fix and no test.
  • previous blocking finding (read: CLA.md §4, §5): §4 now covers "all Contributions You submit in the pull request in which You sign, including those made before You post the signature comment, and all Contributions You submit afterwards". §5 matches it, so a one-time contributor's only PR is covered.
  • previous non-blocking finding (read: CONTRIBUTING.md:31): the clippy and test commands now carry --locked, as in scripts/gate.sh and CI.
  • delta scope (executed: git diff fc5f1928..HEAD --stat): 2 files and 3 lines changed. .github/workflows/cla.yml is unchanged since the last review, so the earlier actionlint pass and the SHA-pin check still apply. actionlint is not installed in this session, so I did not re-run it.
  • relative links (executed: node scripts/check-doc-paths.mjs): "Doc paths ok."
  • base drift (executed: git diff --name-only HEAD...origin/develop): no newer develop commit touches README.md, CONTRIBUTING.md, CLA.md or cla.yml. GitHub reports the PR as mergeable.
  • commit messages are in English. There are no people, prices or e-mail addresses in the delta.
  • tests run locally: none, because there is no code. The doc-path check above was executed.
  • UI: not a UI change.
  • data: not touched.
  • CI: all checks green on 27a5c025 (executed: gh pr checks 1592).

Timing analysis

  • No test files changed.

Spec

  • Visible behaviour changed: none. This is contributor documentation and a repository CI check; product behaviour does not change.
  • Spec search from the first round (rg -il 'contributing|contributor|CLA\b|beitrag|mitwirk' docs/specs/): no spec covers this area. The delta does not change that.
  • Verdict: no spec change needed. No changelog fragment is needed either, because users of the product see no change.

Security checks

  • review-level origin/develop → normal (executed). The delta touches no product code and no workflow.
  • The CI boundary checks of the first round still hold, because cla.yml is unchanged:
    • pull_request_target with no checkout of PR code.
    • The action is pinned to a full SHA.
    • Permissions are exactly the four listed in the issue, and only GITHUB_TOKEN is used.
  • The .github/ change still needs code-owner approval on GitHub.

Manual checks pending

  • CLA check end-to-end: GitHub, after merge.

Previous findings

  • CLA.md:28 scope does not cover the signing PR → fixed in 27a5c025.
  • (non-blocking) Cargo commands without --locked → fixed in 27a5c025.

Follow-ups

  • None.

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.

Docs: CONTRIBUTING.md with the spec-first workflow, local checks and contribution terms

0 participants