Skip to content

docs: add CONTRIBUTING.md and a PR template - #90

Merged
anthmFS merged 2 commits into
mainfrom
docs/contributing
Aug 13, 2026
Merged

docs: add CONTRIBUTING.md and a PR template#90
anthmFS merged 2 commits into
mainfrom
docs/contributing

Conversation

@anthmFS

@anthmFS anthmFS commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Adds CONTRIBUTING.md and a PR template. Neither repo had either.

Why

The same few mistakes keep arriving from different people, and all of them are
caught by scripts/run-ci.sh — which nothing told anyone to run. Recent
examples, four different authors:

  • commits pushed to main reddening 8 gates at once
  • a test file shipped entirely unannotated (44 typecheck errors) even though
    the mypy config says in a comment that "a new untyped test fails the gate"
  • three tests with no assertion in the body at all
  • __all__ appended to instead of sorted — twice
  • a PR that reimplemented a fix merged the week before, because nobody looked
    at the open PRs

Two things a contributor cannot possibly discover

Installing requirements-dev.txt is load-bearing beyond running the tests.
mypy's answer depends on which packages are importable. A # type: ignore that
is required with sentence-transformers installed is an unused-ignore error
without it. Skip the install and your checker grades different code than CI's,
so a gate reds on lines you never touched. (Hit this repeatedly while fixing
the release gates; it is why ruff is pinned exact, and mypy arguably should
be too.)

Fork PRs cannot run CI at all. They receive no repository secrets, so the
porting-sdk checkout dies in ~6s on Input required and not supplied: token.
Nothing in the patch can fix it, and it reads exactly like a broken
contribution. All four of the recent outside PRs failed this way and had to be
re-homed onto an in-repo branch. The doc tells contributors to expect it, run
the gates locally, and say so.

What it deliberately does not do

It does not restate the engineering rules. Those are enforced by the gates, and
the fuller ruleset lives in infrastructure an outside contributor cannot see —
so anything needing that repo (the surface oracle) is phrased as "flag it in
the PR, a maintainer lands it" rather than as a task assigned to someone
without access.

Scope

Master copy. The other nine ports should carry a language-adapted version —
six of the eight points are portable; the commands are per-language.

Verification

ROOT-HYGIENE and DOC-LINKS clean. Full run-ci passes except the four known
environment artifacts: TYPECHECK/TEST at main's baseline, and SURFACE-NATIVE /
SEMVER-DIFF which hardcode a sibling ../porting-sdk lookup and cannot resolve
from the temporary worktree this was built in. Doc-only change; no code paths
touched.

🤖 Generated with Claude Code

https://claude.ai/code/session_015dYktt85Ltj3oK9gG5VBww

The same handful of mistakes keeps arriving from different people: pushing
without running the gates, tests that assert nothing, new test functions
without annotations, `__all__` appended instead of sorted, and work duplicated
because nobody checked the open PRs. Every one of those is caught by
`scripts/run-ci.sh`, which nothing told anyone to run.

Neither repo had a CONTRIBUTING.md or a PR template.

Two things worth calling out, because a contributor cannot discover either:

- Installing `requirements-dev.txt` is load-bearing beyond running the tests.
  mypy's answer depends on which packages are importable — a `# type: ignore`
  that is required with sentence-transformers installed is an unused-ignore
  error without it — so skipping the install grades different code than CI.
- Pull requests from forks cannot run CI at all. They receive no repository
  secrets, so the setup step that needs one fails in seconds with
  "Input required and not supplied: token". That is not something the
  contributor can fix, and it looks exactly like a broken patch. The doc says
  to run the gates locally and note it; a maintainer re-runs from a branch.

Deliberately does not restate the engineering rules — those are enforced by
the gates, and the fuller ruleset lives in infrastructure an outside
contributor cannot see. Anything requiring that repo (the surface oracle) is
written as "flag it, a maintainer lands it" rather than as a task.

Master copy: the other nine ports carry a language-adapted version.
Two gates caught this, both correctly.

ROOT-HYGIENE keeps a public port root clear of anything not on its allowlist,
and a new tracked root file is exactly what it exists to stop. `.github/` is
where GitHub looks for CONTRIBUTING.md anyway — it surfaces identically from
the PR and issue UI — so the file moves rather than the gate being widened.

DOC-AUDIT resolves every symbol referenced in docs against the surface oracle,
and the assertion example cites `pytest.raises`. Recorded in
DOC_AUDIT_IGNORE.md as third-party, next to the other test-helper entries.

Both were verified locally BEFORE this push and both passed — because the check
ran before the files were staged, and both gates only see tracked files. Which
is a fair demonstration of the guide's own first rule: run scripts/run-ci.sh,
which stages nothing and reads the tree the way CI does.
@anthmFS
anthmFS merged commit f6ef38b into main Aug 13, 2026
5 checks passed
@anthmFS
anthmFS deleted the docs/contributing branch August 13, 2026 17: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