Skip to content

chore(cla): add a Contributor License Agreement and its CLA Assistant check (needs owner OK) - #2813

Merged
devswha merged 7 commits into
mainfrom
chore/cla
Nov 5, 2026
Merged

devswha merged 7 commits into
mainfrom
chore/cla

Conversation

@devswha

@devswha devswha commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • CLA.md: the Ovis Contributor License Agreement (Apache ICLA and Project Harmony based). Contributors keep their copyright and grant the maintainer copyright and patent licenses, including the right to license their contributions under other terms.
  • .github/workflows/cla.yml: the CLA Assistant Lite action (contributor-assistant/github-action v2.6.1, pinned by SHA). On every PR it checks the commit authors; an author who has not signed is asked to comment I have read the CLA Document and I hereby sign the CLA once. Signatures are stored in this repository, in signatures/cla.json on a dedicated cla-signatures branch. devswha, GitHub App bots (*[bot]) and web-flow are allowlisted. The action turns * into an unanchored regex, so there is no bot*-style prefix pattern (it would also exempt a person named robotics).
    • pull_request_target, so a fork's PR is checked without approving a CI run; the job never checks out or runs the PR's code (the action reads commit authors through the API), runs on a GitHub-hosted runner, 5-minute timeout.
    • A guard step (bash with pipefail, so an API failure fails it) runs first and fails the check when: the PR has more than 100 commits (the action reads only the first 100); any commit (all pages) has no linked GitHub account as author (the action would otherwise use the free-text git author name, which the allowlist could accept); or the account that opened the PR authors none of its commits. That last rule closes a forged-author bypass: commit authors are matched by email, so a PR whose commits all claim devswha's email would otherwise pass unsigned; now the opener must author a commit and so must sign. Maintainer commits pushed onto a contributor's branch still pass, since the contributor has their own commits.
    • Permissions: actions, contents and pull-requests write, which the action uses (rerun, signature file, comments). statuses: write from the action's README is left out: the action at this SHA never sets a commit status.
    • No concurrency group: a queued signing comment must never be cancelled by a later event.
  • CONTRIBUTING.md: one sentence pointing to the CLA and how to sign.
  • scripts/ci-setup.test.ts: adds the new action to the list of allowed external actions, and matches uses: as a whole word (a key such as statuses: must not be read as an action reference).
  • changelog.d/contributor-license-agreement.md.

Before merging (needs owner OK)

  1. The signature branch cla-signatures already exists with signatures/cla.json = {"signedContributors":[]} (commit 7e8d148).
  2. Optionally make CLA a required check once it has run on a PR.

Existing contributors are asked to sign on their next PR; merged contributions are unaffected. Right after the merge, each open PR from an outside author gets one comment asking its author to sign (the sign comment is recorded at once, since the workflow also runs on comments).

Validation

  • bun run check fast: passed (workflow syntax incl. actionlint, generated types and themes, typecheck, build, unit tests).
  • bun test scripts/ci-setup.test.ts: passed (action pinned to a full SHA with a # vX.Y.Z comment, no checkout).
  • The guard step's script, run with bash -eo pipefail against the live API: passes for this PR, feat(sidebar): count in both heads, tighten PC rows and mark the filter with a glass #2999 (outside author only), feat(sidebar): resize and fold PCs and Agents #2944 (outside author plus maintainer commits). With a stubbed gh: fails for a PR whose commits all claim devswha but were opened by someone else, for 101 commits, for an unlinked commit, and when either API call fails; passes for the maintainer and a [bot] opener.
  • actionlint 1.7.12: no findings.
  • Skipped: bun run check full (no server, client or shared code changed). The workflow itself only runs from main, so it is first exercised on the PR after merge.

Fixes #2817

… check

Contributors sign CLA.md once by commenting on their first pull request; signatures are stored on the cla-signatures branch. The maintainer and bots are allowlisted.
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between cbdcafa and 1cea790.

Files selected for processing: 5

  • .github/workflows/cla.yml
  • CLA.md
  • CONTRIBUTING.md
  • changelog.d/contributor-license-agreement.md
  • scripts/ci-setup.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Workflow change: owner-approved (delegated). The cla-signatures branch still has to be created before merge (see the PR body).

@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Review findings and how each was resolved

Reviewers: omo (BLOCK at 3dea23a) and Codex (Terra 6.1, xhigh). One fix round.

Fixed in this push:

  • HIGH (both, reproduced from the pinned action's src/checkAllowList.ts): * patterns become unanchored regexes, so bot*, dependabot* and github-actions* exempted humans like robotics or abbott. The allowlist is now devswha,*[bot],web-flow; [bot] cannot appear in a person's login.
  • HIGH (Codex, CLA wording): the agreement covered only Contributions submitted after signing, which could leave out the PR the contributor signs on. Section 10 now also covers unmerged earlier Contributions, including that PR.
  • Setup (Codex): the signature branch is now seeded with signatures/cla.json = {"signedContributors":[]} (PR body, step 1), so a missing file is never the first run's problem.

Accepted and not changed. These are limits of contributor-assistant/github-action v2.6.1 (archived upstream), which oh-my-openagent's identical setup shares:

  • An unlinked commit email falls back to the git author name, which a contributor sets freely; the check reads commit identity, not the PR opener. The maintainer still reviews every PR before merging.
  • Only the first 100 commits and the first 30 PR comments are read; Co-authored-by trailers are not checked.
  • Two signatures written at the same moment can conflict. recheck recovers. A concurrency group is left out on purpose, because GitHub drops runs queued behind it, including signing comments.
  • Signatures record user ID, comment and PR, but not the CLA version. Bump the CLA's version line and require signing again if its terms ever change.
  • Corporate signing goes through an issue by hand. The check only knows individual signers.

No follow-up issue: none of these is a reproduced, user-facing MEDIUM.

@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Re-review at cd9a63f: resolved

  • HIGH (omo, reproduced): a commit whose email is not linked to a GitHub account is identified by its free-text git author name, so devswha or x[bot] as that name passed the allowlist. Fixed: a guard step before the action fails the check when any PR commit, across all pages, has no linked GitHub author.
  • MEDIUM (omo, reproduced): only the first 100 commits were read. The same guard paginates through every commit.
  • The committer fallback (LOW) is closed by the same guard.
  • LOW, unchanged: unpaginated comments, and a write conflict when two people sign at the same moment (recheck recovers).

bun run check fast passed at the new head.

@devswha

devswha commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Re-review at 4233818: remaining findings (fix rounds used up; not changed in this PR)

  • MEDIUM, reproduced: the action reads signatures for the first 100 commits only. The guard checks linked authors on every page but not their signatures. Follow-up: CLA check reads signatures for the first 100 commits of a pull request only #2817. The PR body no longer says the guard covers this.
  • MEDIUM, not reproduced: a commit authored with someone else's linked email (including the maintainer's public one) is attributed to that account, and the PR opener is not required to sign. The fix would be to require the opener too.
  • MEDIUM, not reproduced: only the first 30 PR comments are read, so on a busy PR the workaround is to sign on a new PR.
  • LOW: concurrent signatures can conflict (recheck recovers); the job's if matches the comment exactly, so trailing spaces or punctuation skip it; CONTRIBUTING still names the MIT license next to the CLA's relicensing grant (accurate today, worth rewording later).
  • Setup: the cla-signatures branch must exist before merge (PR body, step 1).

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying ovis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3c8b3c9
Status: ✅  Deploy successful!
Preview URL: https://b394a075.ovis.pages.dev
Branch Preview URL: https://chore-cla.ovis.pages.dev

View logs

@devswha

devswha commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner Author

Review notes (Codex gpt-6.1-terra xhigh, two rounds)

CodeRabbit did not review the current head; these reviews stand in for it.

Round 1 (4233818), fixed in 3c8b3c9:

Round 2 (3c8b3c9), not changed (one fix round only):

  • HIGH (not reproduced live): a PR that devswha opens from an outsider's branch whose commits claim devswha's email passes without the outsider signing. It needs the maintainer to open that PR himself. A possible fix: also require the head repository's owner of a cross-repository PR to author a commit, as the opener must. Tracked in ci(cla): require a cross-repository PR's head owner to sign, and cover co-authors #3020.
  • MEDIUM, the guard and the action read the PR separately, so a push between them can make them see different commits. The push's own synchronize run checks the new head again, so the latest result covers it.
  • MEDIUM, a PR whose opener authored none of its commits (submitting someone else's patch) is blocked until the opener adds a commit. This is intended and CLA.md says so.
  • Still open from round 1: co-authors (Co-authored-by) and distinct committers are not checked (the action checks one identity per commit), and the action reads only the first page of PR comments when it looks for a signing comment.

CLA is not a required check, so none of these can block a merge on their own.

@devswha

devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Merge note: merged on the owner's go ("cla 는 머지해"). Required checks green, omo CLEAR at 1cea790, Codex Terra xhigh two rounds (impersonation by another person's email and >100-commit PRs fixed; the remaining case is handled by #3032), actionlint clean, threads resolved. Maintainer and bot commits are not blocked; signatures are stored in signatures/cla.json on the cla-signatures branch. Fixes #2817.

@devswha
devswha merged commit c72a895 into main Nov 5, 2026
13 checks passed
@devswha
devswha deleted the chore/cla branch November 5, 2026 22:32
devswha added a commit that referenced this pull request Nov 5, 2026
… PR (needs owner OK) (#3032)

Fixes #3020. Stacked on #2813 (`chore/cla`), which adds
`.github/workflows/cla.yml`; this PR's base is `chore/cla` so the diff
shows only the follow-up. Merge #2813 first, then retarget this to
`main`.

## What changed

The guard step in `cla.yml` already requires the account that opened a
PR to author one of its commits. When the maintainer (`devswha`) opened
a PR from someone else's fork whose commits all used an email linked to
`devswha`, every identity was exempt and the check passed without the
fork's owner signing.

- When the opener is exempt (`devswha` or a `*[bot]`) and the PR's head
is another repository whose owner is not exempt:
- a personal fork's owner must author one of its commits (same rule and
message shape as for the opener), so the action asks them to sign;
- a fork with no personal owner (an organization's fork, or a deleted
fork) fails, with a message asking the contributor to open it from their
own account.
An outside opener is covered by the existing opener rule, so a
contributor working on someone else's fork is not blocked.
- `scripts/cla-workflow.test.ts` runs the guard step from the workflow
file with `gh api` answered from fixtures through `jq` (as `gh --jq`
does): nine cases, three of which failed on the previous guard (a fourth
covers the review fix).

## Not changed, and why

- **Co-authors:** agents co-author commits as ordinary GitHub user
accounts, not `[bot]` ones. On `main`, `Claude ...
<[email protected]>` links to `claude`, Cursor to `cursoragent`, Amp
to `ampagent`, and `sisyphus-dev-ai` (all `type: User`), across hundreds
of commits. Requiring linked co-authors to sign would block most
contributor PRs unless we keep a hand-made list of agent accounts. The
action also records a signature only from a commit author, so a
co-author could not sign on the PR anyway. CLA section 2 already makes
the signing contributor identify third-party work.
- **Committers distinct from the author:** a committer re-applies
someone else's commit (rebase, cherry-pick); authorship, which the
action checks, is the contribution.
- **First page of PR comments:** that lookup is inside the pinned
action; the guard cannot change it.

## Validation

- `bun test scripts/cla-workflow.test.ts scripts/ci-setup.test.ts`: 28
pass (before the fix: 3 of the new cases failed).
- The new `jq` fields checked against the real API on #2944, #2983
(forks) and #3018 (same repository).
- `bun run check fast` passed at the head (unit: 12221 pass, 0 fail;
typecheck, build, workflow syntax, actionlint ok). Browser and
integration suites not run locally (workflow-only change).
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.

CLA check reads signatures for the first 100 commits of a pull request only

1 participant