Skip to content

♻️ refactor(sink/postgres): typed sentinel errors for Export failure stages (F61) - #50

Merged
konih merged 2 commits into
mainfrom
chore/typed-errors-postgres-f61
Jul 8, 2026
Merged

konih merged 2 commits into
mainfrom
chore/typed-errors-postgres-f61

Conversation

@konih

@konih konih commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds typed sentinel errors in internal/sink/postgres/errors.go for Export failure stages (decode, tx, upsert, bulk-upsert, stale-delete), matching the bigquery/s3 F61 pattern.
  • Replaces brittle err.Error() substring assertions in postgres sink tests with errors.Is checks against the new sentinels.
  • Error() text is unchanged byte-for-byte — pure typed-error refactor, no observable behavior change.

Delivers the postgres slice of BACKLOG.md §5 rank 7 (F61 — typed errors for brittle err.Error() asserts). F61/F62 (validation/s3) shipped via PR #34; F66 (bigquery) via PR #44.

Test plan

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

konih added 2 commits July 8, 2026 00:05
…F61)

Replace brittle err.Error() substring checks with errors.Is sentinels
for decode, tx, upsert, bulk-upsert, and stale-delete failure paths.
@konih

konih commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator Author

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/ 82.4% (floor 72%); +2.9pp vs origin/main @ 6422354c4 (79.5%)
task scrub PASS clean
task changelog:write + task changelog:verify PASS synced in 96f97ade
task helm-test n/a no chart changes
task vulncheck n/a no go.mod/go.sum changes

Head: 96f97ade · Base: origin/main @ 6422354c4

No self-merge — awaiting maintainer review.

@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

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/sink/postgres/backend.go 40.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@konih
konih merged commit 1b2c787 into main Jul 8, 2026
25 checks passed
@konih
konih deleted the chore/typed-errors-postgres-f61 branch July 8, 2026 20:26
konih added a commit that referenced this pull request Sep 10, 2026
markdownlint-cli2 0.23.2 (latest) pins smol-toml 1.7.0 exactly, so the fix goes in as an npm override next to the existing js-yaml one. Closes Dependabot alert #50.
konih added a commit that referenced this pull request Sep 10, 2026
markdownlint-cli2 0.23.2 (latest) pins smol-toml 1.7.0 exactly, so the fix goes in as an npm override next to the existing js-yaml one. Closes Dependabot alert #50.
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