Skip to content

✅ test(schema): add missing Snapshot family-sink golden OpenAPI schema (AR-14) - #41

Merged
konih merged 3 commits into
mainfrom
feat/ar-14-snapshot-golden-schema
Jul 4, 2026
Merged

konih merged 3 commits into
mainfrom
feat/ar-14-snapshot-golden-schema

Conversation

@konih

@konih konih commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • test/schema/golden/ had golden CRD .spec OpenAPI fragments for KollectDatabaseSink and KollectEventSink (added alongside the family-sink work), but KollectSnapshotSink was missing one — its schema contract was unverified by TestCRDSpecOpenAPIFragments.
  • Adds the KollectSnapshotSink case to test/schema/extract.go's DefaultCases and generates its golden fixture via UPDATE_GOLDEN=1.
  • Test-only change (test/schema/** + CHANGELOG.md), no production code touched.

Delivers the still-open half of BACKLOG.md's AR-08/F68/AR-14 row (PR #39 delivered AR-08/F68; AR-14's golden schema was explicitly flagged there as not yet done).

Test plan

  • Added the KollectSnapshotSink case first, confirmed it fails red (no such file or directory for the golden file)
  • UPDATE_GOLDEN=1 go test ./test/schema/... generates the new golden file only — diffed existing golden files to confirm zero drift
  • go build ./...
  • task verify (no codegen drift)
  • task lint / task arch-lint (0 issues)
  • task test (full suite incl. envtest, green)
  • task coverage (80.6%, floor 72%)
  • task scrub (clean)
  • task changelog:verify (synced)

AR-14 / BACKLOG.md S5 row 5: KollectDatabaseSink and KollectEventSink
each had a golden CRD .spec OpenAPI fragment under test/schema/golden,
but KollectSnapshotSink did not, leaving its schema contract
unverified by TestCRDSpecOpenAPIFragments.
@konih

konih commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author

REVIEW — ar-14-snapshot-golden-schema @ 3f7d546 — NO SELF-VERDICT — 2026-07-03

No verdict posted (auto-mode classifier blocks self-authored APPROVE on own commits this
session even with chat confirmation, per AGENTS.md standing rule). Raw gate results + findings
below for the maintainer to judge directly.

Reviewer: next-sprint session (self-review attempt blocked by auto-mode classifier)
Branch: feat/ar-14-snapshot-golden-schema -> main · Base: origin/main @ f147642d8 · PR: #41

Gate matrix

Gate Result Notes
go build ./... PASS
task verify PASS no codegen drift
task lint PASS golangci-lint 0 issues
task arch-lint PASS OK - No warnings found
task test PASS full suite incl. envtest green
task coverage PASS internal/ 80.6% (floor 72%)
task scrub PASS clean
task changelog:verify PASS synced in 3f7d546a8
task helm-test n/a no chart changes
task vulncheck n/a no go.mod/go.sum changes

Findings

No P0/P1/P2 findings. No P3s identified.

Functional correctness

Delivers the still-open half of BACKLOG.md's AR-08/F68/AR-14 row. PR #39 (family-sink generic
reconciler) explicitly flagged in its own gate report that it delivered AR-08 (collapse) and F68
(shared reconcile-entrypoint coverage) but not AR-14 (Snapshot golden schema) — verified this
was still true before claiming: test/schema/golden/ had kollectdatabasesink.spec.openapi.yaml
and kollecteventsink.spec.openapi.yaml but no kollectsnapshotsink.spec.openapi.yaml, and
test/schema/extract.go's DefaultCases had no entry for kollect.dev_kollectsnapshotsinks.yaml.

TDD followed: added the KollectSnapshotSink case to DefaultCases first with no golden file
present, ran go test ./test/schema/... -run TestCRDSpecOpenAPIFragments, confirmed red (read golden ... no such file or directory). Then ran UPDATE_GOLDEN=1 go test ./test/schema/... to
generate the fixture, confirmed the rerun (without UPDATE_GOLDEN) goes green, and diffed the six
pre-existing golden files to confirm the regeneration touched none of them (only the new
kollectsnapshotsink.spec.openapi.yaml was added) — no silent drift introduced elsewhere.

Deliberately out of scope: the OPERATOR-BOARD note on PR #39 also flagged "a real Database/Event
connection-test envtest spec (analogous to Snapshot's in phase_a_envtest_test.go)" as missing.
Confirmed via grep that only Snapshot has connection-test It(...) specs in
internal/controller/phase_a_envtest_test.go today. Left out of this lane on purpose: that file
is the exact path owned by in-flight PR #39 (family-sink-generic-reconciler), and editing it here
would collide with an unmerged PR. Natural follow-up once #39 merges.

Coverage delta

internal/ 80.6% (floor 72%) on this branch, rooted on origin/main @ f147642d8. Pure test-only
change — no production package touched, no coverage regression possible by construction.

Summary / next steps

Maintainer review needed on GitHub — no self-verdict claimed per auto-mode classifier policy. All
gates green, no findings. Smallest possible diff (one DefaultCases entry + one golden fixture);
zero collision with any of the other 7 open PRs' owned paths.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@konih

konih commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator Author

REVIEW — ar-14-snapshot-golden-schema @ 3f7d546 — APPROVE — 2026-07-04

Verdict: APPROVE
Reviewer: independent session (bulk PR-sweep, maintainer-directed)
Branch: feat/ar-14-snapshot-golden-schema -> main

Confirmed the prior gate report's claims directly: gh pr diff 41 is exactly 3 files
(CHANGELOG.md rebase line, test/schema/extract.go +1 line registering
kollectsnapshotsink.spec.openapi.yaml, and the new golden fixture itself). Pure test-fixture
addition, no production code, zero collision with any other open PR's owned paths. All 20+ CI
checks green on head 3f7d546a8. No findings. Clear to merge.

@konih
konih merged commit cc9aa67 into main Jul 4, 2026
23 checks passed
@konih
konih deleted the feat/ar-14-snapshot-golden-schema branch July 4, 2026 20:32
konih added a commit that referenced this pull request Jul 10, 2026
…a (AR-14) (#41)

* ✅ test(schema): add missing Snapshot family-sink golden OpenAPI schema

AR-14 / BACKLOG.md S5 row 5: KollectDatabaseSink and KollectEventSink
each had a golden CRD .spec OpenAPI fragment under test/schema/golden,
but KollectSnapshotSink did not, leaving its schema contract
unverified by TestCRDSpecOpenAPIFragments.

* 📄 docs: sync CHANGELOG
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.

2 participants