Skip to content

♻️ refactor(sink/bigquery): typed sentinel errors for Export failure stages (F66) - #44

Merged
konih merged 5 commits into
mainfrom
chore/typed-errors-bigquery-f66
Jul 8, 2026
Merged

konih merged 5 commits into
mainfrom
chore/typed-errors-bigquery-f66

Conversation

@konih

@konih konih commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces string-matched err.Error() assertions in internal/sink/bigquery tests with errors.Is against new sentinel errors (ErrDecodePayloadFailed, ErrMergeUpsertFailed, ErrDeleteStaleFailed, ErrEmulatorInsertFailed), wrapped through the existing classifyError path.
  • Error() text is unchanged byte-for-byte — pure typed-error refactor, no observable behavior change.
  • Delivers the bigquery slice of BACKLOG.md §5 rank 7 (F61/F62/F66 — typed errors for brittle err.Error() asserts). F61/F62 (validation/s3) already shipped via PR ♻️ refactor(validation,sink): typed errors for family-sink and s3 empty-payload #34.

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.7% (floor 72%)
task scrub PASS clean (verified diff vs origin/main manually — nothing staged post-commit)
task changelog:verify PASS synced in 67d1ad9a4
task helm-test n/a no chart changes
task vulncheck n/a no go.mod/go.sum changes

Test plan

  • go build ./...
  • task verify
  • task lint / task arch-lint
  • task test (full suite incl. envtest)
  • task coverage (80.7%, floor 72%)
  • task scrub
  • task changelog:write + task changelog:verify

@konih

konih commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator Author

Gate matrix (chore/typed-errors-bigquery-f66 @ 67d1ad9)

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.7% (floor 72%)
task scrub PASS clean
task changelog:verify PASS synced in 67d1ad9a4
task helm-test n/a no chart changes
task vulncheck n/a no go.mod/go.sum changes

No self-verdict posted (auto-mode classifier blocks self-authored APPROVE on own commits). Findings: none — pure typed-error refactor, Error() text unchanged byte-for-byte, confirmed via full existing test suite passing unmodified plus new errors.Is assertions. Awaiting maintainer review/merge on GitHub.

konih added 2 commits July 8, 2026 00:35
…stages (F66)

Replaces string-matched err.Error() assertions in tests with errors.Is against
new ErrDecodePayloadFailed/ErrMergeUpsertFailed/ErrDeleteStaleFailed/
ErrEmulatorInsertFailed sentinels, wrapped through the existing classifyError
path. Error() text unchanged byte-for-byte.
@konih
konih force-pushed the chore/typed-errors-bigquery-f66 branch from 67d1ad9 to 4d5b2dc Compare July 7, 2026 22:38
@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 8, 2026

Copy link
Copy Markdown
Collaborator Author

REVIEW — /kollect-mr-review

Verdict: APPROVE

Scope: Typed sentinel errors for BigQuery Export failure stages (F66) — decode-payload, merge-upsert, delete-stale, emulator-insert.

Gate matrix: GitHub CI green on head 1ec72df12: required preflight ✅ + test ✅, test-integration ✅, full suite green.

  • Correctness: Four errors.New sentinels wrapped via fmt.Errorf("%w: %w", ErrX, err) (Go multi-error wrap); sentinel text matches the prior fmt.Errorf prefixes byte-for-byte, so classifyError and all observable messages are unchanged. Enables errors.Is classification. ✅
  • TDD: Test updates assert stage errors via errors.Is. ✅
  • Conflicts: CHANGELOG-only, regenerated post-merge-commit. ✅

Non-blocking: vulncheck red = GO-2026-5856 (stdlib, repo-wide, non-required) — tracked as separate Go 1.26.5 bump.

Merging via merge-commit.

@konih
konih merged commit 4d20c05 into main Jul 8, 2026
24 of 25 checks passed
@konih
konih deleted the chore/typed-errors-bigquery-f66 branch July 8, 2026 21:13
konih added a commit that referenced this pull request Jul 10, 2026
♻️ refactor(sink/bigquery): typed sentinel errors for Export failure stages (F66)
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