mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-18 05:43:42 +00:00
The runner did not build on illumos, Solaris, NetBSD and OpenBSD: `internal/pkg/disk` called `unix.Statfs`, which `golang.org/x/sys/unix` lacks on illumos, Solaris and NetBSD (they have `statvfs(2)`) and exposes with `F_`-prefixed fields on OpenBSD. Each now has an implementation matching its syscall. FreeBSD and DragonFly report a negative available-block count once root writes into the reserved blocks. It wrapped to ~16 EiB free, so the disk health check and cache eviction saw plenty of space exactly when the disk was full. A shared helper clamps it to zero and absorbs the per-platform integer types. CI only built for the host, which let this and https://gitea.com/gitea/runner/pulls/1098 through. `make cross-check` vets code and tests on one target per distinct set of platform files, plus linux/arm for its 32-bit syscall fields, and runs as its own job in parallel to the others. It also surfaced docker-only tests lacking the docker build tag, which are fixed too. Assisted-by: Claude Code:claude-opus-5-5 Co-authored-by: rosekanari <[email protected]>
20 lines
1.9 KiB
Markdown
20 lines
1.9 KiB
Markdown
- Never assume, verify before claiming
|
|
- Use `make help` to find available development targets
|
|
- PR descriptions: minimal, only what and why, no task lists or file listings
|
|
- Reference issues and PRs by full URL, not by number
|
|
- Use Conventional Commits for commit messages and PR titles, plus the `enhance` type for user-facing enhancements
|
|
- Add an `Assisted-by: AGENT_NAME:MODEL_VERSION` trailer to commit messages, never `Co-Authored-By` or `Signed-off-by`
|
|
- Attribute agent authorship on one trailing line in issue and pull request comments, never as a PR description section
|
|
- Never force-push, amend, or squash unless asked. Use new commits and normal push for pull request updates
|
|
- Comments: write almost none, short and preferably same-line, explaining why for a future reader. Never narrate code, the change or the prompt. Preserve existing ones that still apply
|
|
- Add the current year into the copyright header of new `.go` files
|
|
- Read `DEVELOPMENT.md` for internals and conventions
|
|
- Ensure no trailing whitespace in edited files
|
|
- Run `make fmt` after `.go` edits, `make tidy` after `go.mod` edits, and `make checks` for the non-lint source checks
|
|
- Lint what changed with `make lint-go`, and `make lint-go-windows` for Windows and platform-split files. Run `make cross-check` after platform-split edits
|
|
- Fix the cause rather than disabling a linter or weakening a test. Where unavoidable, use the narrowest scope with a trailing comment giving the reason
|
|
- Run single go tests with `go test -run '^TestName$' ./modulepath/`. `make test` self-skips the integration tests without docker or network, `make test-dind` runs the daemon-facing tests against the built dind image
|
|
- Write the fewest, fastest tests covering the behavior, extending an existing one where possible. Prefer unit tests where logic is testable in isolation
|
|
- Wait on a deterministic condition rather than `sleep`
|
|
- Update the files under `docs/` when behavior documented there changes
|