Skip to content

CI matrix, hooks, test-methodology registry, lint enforcement - #4

Open
Kiran01bm wants to merge 5 commits into
kiran01bm/p0-foundationsfrom
kiran01bm/ci-foundations
Open

CI matrix, hooks, test-methodology registry, lint enforcement#4
Kiran01bm wants to merge 5 commits into
kiran01bm/p0-foundationsfrom
kiran01bm/ci-foundations

Conversation

@Kiran01bm

Copy link
Copy Markdown
Collaborator

Summary

CI and test-methodology foundations. Stacked on kiran01bm/p0-foundations.

What

  • GitHub Actions CI: build, golangci-lint, PostgreSQL 14–18 test matrix (testcontainers), docs-only gating, all-green sentinel job.
  • Git hooks (make setup): pre-commit and pre-push gates.
  • Coverage invariant + TM-* test-methodology registry in docs/testing.md (lifecycle fixtures, two-oracle SQL tests, real fault injection, convergence oracle).
  • Mechanical style rules moved into .golangci.yml; judgment maxims kept in AGENTS.md.

Why

The coverage invariant and the version matrix are merge gates for every later phase; they need to exist before the first core package lands.

Compose-based local database mirrors the CI matrix (PG_DSN path in the
harness); docs-only PRs skip the heavy jobs behind a fail-open filter
with a single ci-ok required status; pre-commit/pre-push hooks give
fast local feedback and skip cleanly on Markdown-only changes. A
TLS-only server harness proves the verify-full CACertPath path live
(trusted CA encrypts, plaintext and untrusted CA fail closed) — the
one peer-CI pattern (pg-delta) applicable to Phase 0. docs/testing.md
records Phase 0 coverage, Phases 1-7 test obligations including the
topology patterns surveyed from peer-tool CIs, and the vanilla
PostgreSQL vs real-Aurora validation boundary. The lint config adopts
SchemaBot's proven linter set plus gofmt/goimports formatters, with a
staged-files lint-fix pre-commit flow ported from the same repo.
Compose-based local database mirrors the CI matrix (PG_DSN path in the
harness); docs-only PRs skip the heavy jobs behind a fail-open filter
with a single ci-ok required status; pre-commit/pre-push hooks give
fast local feedback and skip cleanly on Markdown-only changes. A
TLS-only server harness proves the verify-full CACertPath path live
(trusted CA encrypts, plaintext and untrusted CA fail closed) — the
one peer-CI pattern (pg-delta) applicable to Phase 0. docs/testing.md
records Phase 0 coverage, Phases 1-7 test obligations including the
topology patterns surveyed from peer-tool CIs, and the vanilla
PostgreSQL vs real-Aurora validation boundary. The lint config adopts
SchemaBot's proven linter set plus gofmt/goimports formatters, with a
staged-files lint-fix pre-commit flow ported from the same repo.
AGENTS.md stays canonical for agent guidance: CLAUDE.md, GEMINI.md,
.cursorrules, .goosehints, and copilot-instructions.md are symlinks to
it, and review-agent checks live in .agents/checks/review.md.
Make the testing bar explicit and binding: same-PR tests, regression-first
bug fixes, real-DB core validation, full-matrix CI as a merge gate, and a
coverage ratchet (numeric gate wired when Phase 1 lands core code).

Add eight phase-tagged test-methodology invariants (TM-1..TM-8) mined from
the pgroll / pg_repack / pg-delta suites: lifecycle fixtures, two-oracle
SQL tests, real fault injection asserting durable state, an adversarial
schema corpus, the convergence oracle for declarative diff,
mutation-direction coverage, correctness-asserting benchmarks, and a
compiled-binary e2e CI path — plus seeded generative DDL as the
beyond-peers goal.
…S.md

Doc comments on exported symbols, no init(), no package-level mutable
state, and no ctx-in-struct move to .golangci.yml (revive,
gochecknoinits, gochecknoglobals, containedctx) so prose stays short.
New maxims (panic policy, SQLSTATE error matching, goroutine lifetimes,
injected clock, comment hygiene, OSS hygiene) ported from schemabot's
AGENTS.md and Go community style canon, mirrored into the review checks.
The action's default binary is built with an older Go than the module
targets and cannot load the v2 config; SHA-pinning also satisfies the
semgrep and zizmor unpinned-action checks.
@Kiran01bm
Kiran01bm marked this pull request as ready for review August 5, 2026 09:35
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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