Skip to content

fix: compare only observed baseline sections - #101

Open
DivyamTalwar wants to merge 1 commit into
pgrundev:mainfrom
DivyamTalwar:fix/compare-observed-baseline-sections
Open

DivyamTalwar wants to merge 1 commit into
pgrundev:mainfrom
DivyamTalwar:fix/compare-observed-baseline-sections

Conversation

@DivyamTalwar

Copy link
Copy Markdown
Contributor

What and why

Closes #100.

Unavailable or missing collector sections could be interpreted as measured zeros or empty sets, creating false connection drops, standby losses, new-query entries and archiver events. Require observable section provenance at both ends while preserving genuinely measured empty results and positive evidence in legacy snapshots. A retained positive connection gauge remains usable when only rates are unavailable.

Verification

Verified commit: 9811ed1faab48344389ba5c5a31687df272e887d.

  • Regressions fail on unchanged base behavior for missing current observations, missing baselines and empty legacy sections.
  • The real SQLite Save/reopen/offline-diff path reproduces false changes and passes with the fix.
  • Affected diff/CLI race suites, clean committed-HEAD bash scripts/gate.sh, and go test -race ./... pass.
  • Controls preserve genuine losses/additions, measured zero, legacy positive values, rate-reset connection gauges, deterministic output and input immutability.

Scope, risk and rollback

No schema, SQL, dependency or migration changes. This suppresses comparisons unsupported by observations, not genuine measurements. It is distinct from #64 (cross-reset comparability), #69 (standby multiplicity) and #87 (stored scalar extraction), though the diff edits may need reconciliation as those land. No live PostgreSQL failure is claimed. Revert the commit to restore the former comparison rules.

Checklist

  • scripts/gate.sh passes on committed HEAD; full race suite passes.
  • Read-only, privacy and deterministic-finding invariants preserved.
  • No new finding or model.Context JSON field; catalog/model schema unchanged.

Missing or unavailable observations previously became false connection drops, standby losses and new-query or archiving events. Check section provenance while retaining observed zero and positive legacy measurements. Regression coverage includes real SQLite history and input immutability.

Verification: affected packages pass with the race detector. No collector SQL, dependency or JSON schema changes. Revert this commit to restore the prior behavior.
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.

Unavailable observations become false changes in baseline comparisons

1 participant