Skip to content

fix(postgres): default optional logging to content-safe evidence - #119

Merged
seonghobae merged 34 commits into
mainfrom
fix/privacy-safe-postgres-logging
Aug 11, 2026
Merged

fix(postgres): default optional logging to content-safe evidence#119
seonghobae merged 34 commits into
mainfrom
fix/privacy-safe-postgres-logging

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Scope

Privacy- and resource-safe defaults for the optional PostgreSQL monitoring profile. This PR keeps SQL/bind logging, query-statistics collection/preload, connection events, temporary-file events, I/O/WAL timing, function statistics, and commit timestamps opt-in or conservatively bounded, while preserving authorized business-data access. Detailed rationale, rollback, residual pg_stat_activity/CSV metadata boundaries, and PostgreSQL primary references are maintained in docs/doctoring/postgresql-logging-privacy.md.

Test-first evidence

The branch contains the earlier RED→GREEN cycles documented in its commit history, including the focused pg_stat_statements preload/shared-memory regression. Predecessor workflow results remain development provenance only.

Current exact state

  • Source head: 4ad8f74f1ab2a68e4554802a368abda2b6cd9704.
  • Independently resolved protected main: 06f88be7f7c3a3ce5e756bc3bf03f298031a0286.
  • The current head is a non-destructive merge of that exact protected-main tip into prior source 4759169a1f0956babac63efc8d5de10c6f87cb9a; the three PR-owned paths were disjoint from all protected-main changes since the prior base.
  • GitHub reports Ready and mergeable.
  • Current-head repository CI 31542858782, SAST Semgrep 31542858842, and Security Scan 31542858879 are queued. Queued evidence is not acceptance.
  • Formal reviews: none at the latest refetch. Unresolved inline review threads: zero.
  • Live organization ruleset requires central workflows and review-thread resolution, with required_approving_review_count: 0, code-owner review disabled, and no last-push approval requirement.

Repository exact-source governance #88 is now on protected main, so the previous draft prerequisite is satisfied. Do not reuse pre-#88 synthetic-merge workflow evidence. Merge only if this unchanged source head receives terminal success for every live required repository/central workflow, remains mergeable against the then-live protected base, and has zero valid unresolved findings.

Integration boundary

This branch owns only docker/postgres/postgresql.conf.custom, docs/doctoring/postgresql-logging-privacy.md, and tests/test_postgres_logging_privacy_contract.py. It does not change provider transport, schemas, checkpoint behavior, Compose, release authority, or the staged pg_cron retirement owned elsewhere. Issue #120 remains the separate container-native logging/storage-lifecycle follow-up.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a079d89d-cdc3-49bb-828d-611aa4f9584d

📥 Commits

Reviewing files that changed from the base of the PR and between 602ec07 and 50fd8f8.

📒 Files selected for processing (3)
  • docker/postgres/postgresql.conf.custom
  • docs/doctoring/postgresql-logging-privacy.md
  • tests/test_postgres_logging_privacy_contract.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae marked this pull request as ready for review August 11, 2026 22:10
@seonghobae
seonghobae merged commit bf0f5c0 into main Aug 11, 2026
34 checks passed
@seonghobae
seonghobae deleted the fix/privacy-safe-postgres-logging branch August 11, 2026 23:32

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 50fd8f8a0387c1db77974ab0de8a3abee43cff4e.

  • Head SHA: 50fd8f8a0387c1db77974ab0de8a3abee43cff4e

  • Workflow run: 31545670998

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: postgresql.conf.custom"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: postgresql.conf.custom"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: postgresql-logging-privacy.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: postgresql-logging-privacy.md"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test: test_postgres_logging_privacy_contract.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_postgres_logging_privacy_contract.py"]
  R3 --> V3["targeted test run"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 50fd8f8a0387c1db77974ab0de8a3abee43cff4e
  • Workflow run: 31545670998
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head 50fd8f8a0387c1db77974ab0de8a3abee43cff4e.

  • Head SHA: 50fd8f8a0387c1db77974ab0de8a3abee43cff4e

  • Workflow run: 31545670998

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: postgresql.conf.custom"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: postgresql.conf.custom"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: postgresql-logging-privacy.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: postgresql-logging-privacy.md"]
  R2 --> V2["docs review"]
  Evidence --> S3["Test: test_postgres_logging_privacy_contract.py"]
  S3 --> I3["regression suite"]
  I3 --> R3["Review risk: Test: test_postgres_logging_privacy_contract.py"]
  R3 --> V3["targeted test run"]
Loading

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