Skip to content

chore(bestpractices): uplift to Met across the passing tier#18

Merged
aksOps merged 1 commit intomainfrom
chore/bestpractices-uplift
May 1, 2026
Merged

chore(bestpractices): uplift to Met across the passing tier#18
aksOps merged 1 commit intomainfrom
chore/bestpractices-uplift

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented May 1, 2026

Summary

Acts on the criteria you flagged. After this PR, `.bestpractices.json` reads 64 Met / 3 N/A / 0 Unmet (was 58 / 6 / 3) — full passing-tier coverage with no aspirational answers.

Per your instruction, justifications carry a URL only (no extra text) for the eight criteria where the upstream `criteria.yml` sets `met_url_required: true` — `contribution`, `contribution_requirements`, `license_location`, `release_notes`, `report_process`, `report_archive`, `vulnerability_report_process`, `vulnerability_report_private`. Every other justification is prose only.

What changed

Documentation (new files):

  • CONTRIBUTING.md — bug-report process, PR conventions, coding standards (gofmt / go vet / ESLint / TS strict / file layout / conventional commits / dependency policy), static + dynamic analysis gates, license note.
  • SECURITY.md — supported-version matrix, reporting channels (GitHub private advisory + email fallback), what to include, response-time commitments (14-day ack, 30-day assessment, 60-day fix for High/Critical, default 90-day disclosure), scope, security architecture quick reference, credit policy.

Release-notes uplift (`release.yml`):

  • Replaces `git log --pretty=format:'- %s (%h)'` with a Conventional Commit parser that groups commits into Features / Bug fixes / Performance / Refactoring / Documentation / Tests / CI / build / Chores / Other. Verified locally against the `v0.1.10..v0.1.15` range.

Dynamic analysis (`ci.yml` + `release.yml`):

  • Adds `-race` to `go test`. The race detector immediately surfaced a real test-side race in `cmd/logs_extra_test.go`: `TestTailLog_DrainsThenExitsOnContextCancel`'s goroutine still had `withFlags`' deferred restore in flight when the test returned, racing the next test's `withFlags` read. Fixed by gating test exit on a `sync.WaitGroup`. Full `-race` suite passes (918 tests across 27 packages, no remaining races).

.bestpractices.json delta

Criterion Before After
`contribution` Unmet Met (URL → CONTRIBUTING.md)
`contribution_requirements` Unmet Met (URL → CONTRIBUTING.md#coding-standards)
`vulnerability_report_process` Unmet Met (URL → SECURITY.md)
`dynamic_analysis` N/A Met (`go test -race`)
`dynamic_analysis_enable_assertions` N/A Met (race detector + Go runtime panics)
`dynamic_analysis_fixed` N/A Met (race finding fails CI; this PR fixed one)

`crypto_pfs`, `dynamic_analysis_unsafe`, `release_notes_vulns` remain N/A with their original justifications.

Test plan

  • CI green (Go build/test with `-race`, UI typecheck/test, SonarCloud, CodeQL, Scorecard, .bestpractices.json lint)
  • Once registered at bestpractices.dev, click "Save (and continue) 🤖" and confirm answers ingest cleanly

🤖 Generated with Claude Code

Author the missing documentation and infrastructure so .bestpractices.json
reaches 64 Met / 3 N/A / 0 Unmet (was 58 / 6 / 3) without aspirational
answers. Justifications carry a URL only for the eight criteria where
the upstream criteria.yml sets met_url_required (contribution,
contribution_requirements, license_location, release_notes,
report_process, report_archive, vulnerability_report_process,
vulnerability_report_private); every other justification is prose only.

New documentation:
- CONTRIBUTING.md — bug-report process, PR conventions, coding
  standards table, static + dynamic analysis gates, license note.
- SECURITY.md — supported-version matrix, vulnerability reporting
  channels (GitHub private advisory + email fallback), what to
  include, response-time commitments, scope, security architecture
  reference, credit policy.

Release notes uplift:
- .github/workflows/release.yml now parses Conventional Commit
  prefixes (feat/fix/perf/refactor/docs/test/ci/build/chore) and
  groups them into human-readable categorised sections, replacing
  the raw `git log` dump. Anything that doesn't match a known
  prefix lands in an 'Other' section so nothing is silently
  dropped. Verified locally against the v0.1.10..v0.1.15 range.

Dynamic analysis:
- ci.yml + release.yml: `go test` now runs with `-race`, Go's
  runtime data-race detector. The race detector immediately
  surfaced a real test-side race in cmd/logs_extra_test.go:
  TestTailLog_DrainsThenExitsOnContextCancel's goroutine still
  had withFlags' deferred restore in flight when the test returned,
  racing the next test's withFlags read. Fixed by gating the test
  exit on a sync.WaitGroup so the goroutine fully completes before
  the test function returns. Full -race suite passes (918 tests,
  27 packages, ~0 races).

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

sonarqubecloud Bot commented May 1, 2026

@aksOps aksOps merged commit 7a294ca into main May 1, 2026
12 checks passed
@aksOps aksOps deleted the chore/bestpractices-uplift branch May 1, 2026 11:17
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