Skip to content

AG fixture: state the commit-time conclusion the guidance rests on (#991) - #1709

Merged
erikdarlingdata merged 1 commit into
devfrom
feature/991-ag-commit-time-both-ways
Jul 26, 2026
Merged

AG fixture: state the commit-time conclusion the guidance rests on (#991)#1709
erikdarlingdata merged 1 commit into
devfrom
feature/991-ag-commit-time-both-ways

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Evidence file and CHANGELOG only, no code. Two files.

#1708 corrected the AG lag guidance to "do not derive lag from commit times at all", and cites tools/ag-fixture/VALIDATION.md. The file carried both halves of that argument - the freeze in section 6b, the quiet-database case in the last_commit_time subsection - but never drew them together. A reader who found one half could reasonably conclude the other case was safe to guard against, which is precisely the mistake #1708 was fixing.

Now stated side by side:

Condition What now - last_commit_time does Failure
Replica SUSPENDED last_commit_time freezes, so the delta stops growing exactly when replication stops Silent - understates at the moment it is worst
Replica healthy but database QUIET Nothing commits, so the delta grows without bound (measured 1757s at zero real lag) Loud - pages about an idle database

So guarding only the suspended case does not make a commit-delta trigger safe - it converts a silent failure into a noisy one. And the loud half is the likelier to actually ship, because it shows up the first time anyone points the thing at a database nobody is writing to, whereas the silent half needs someone to suspend something.

The conclusion the file now draws matches the shipped guidance: secondary_lag_seconds is the lag measure (with the finding-3 caveats), and the *_time columns are for showing an operator when something last happened, not for judging whether it is late.

Why this is worth a PR on its own

Both facts were already in the file and both were measured. What was missing was the inference between them - and that inference is the entire basis of a guidance line that has already shipped. An evidence file cited by shipped code should support the conclusion, not just the premises.

Test plan

  • Both measurements were taken on the fixture in earlier runs (the freeze under load and idle; 1757s on a SYNCHRONIZED, is_suspended = 0, zero-lag secondary). No new claims - this adds only the synthesis.
  • CHANGELOG entry plus link-ref, no duplicate refs, no conflict markers.
  • Branched off current dev (97ed4f20, post-Correct the commit-delta guidance: it fails loud, not silent (#991) #1708) and cherry-free; diff is exactly CHANGELOG.md + tools/ag-fixture/VALIDATION.md, so it cannot conflict with anything in flight.

🤖 Generated with Claude Code

#1708 corrected the AG lag guidance to "do not derive lag from commit times
at all" and cites this file. The file carried both halves of that argument but
in separate sections, never drawn together - so a reader who found one half
could reasonably conclude the other case was safe to guard against, which is
the exact mistake #1708 was fixing.

Now stated side by side: on a SUSPENDED replica last_commit_time freezes, so
now - last_commit_time stops growing exactly when replication stops (silent,
understating at the moment it is worst); on a healthy but QUIET database
nothing commits, so the same delta grows without bound (loud, measured 1757
seconds at zero real lag). Guarding only the suspended case does not make a
commit-delta trigger safe - it converts a silent failure into a noisy one. The
loud half is also the likelier to ship, since it appears the first time anyone
points it at a database nobody is writing to.

Evidence file and CHANGELOG only, no code.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@erikdarlingdata
erikdarlingdata merged commit 56c36f2 into dev Jul 26, 2026
4 checks passed
erikdarlingdata added a commit that referenced this pull request Jul 26, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@erikdarlingdata
erikdarlingdata deleted the feature/991-ag-commit-time-both-ways branch July 26, 2026 20:19
pull Bot pushed a commit to ehtick/PerformanceMonitor that referenced this pull request Jul 29, 2026
The 2026-07-26 08:02 action-pin bump moved dorny/paths-filter v3 to v4.
v4 evaluates every filter pattern as an INDEPENDENT predicate under the
default predicate-quantifier 'some' (a filter is true when any changed
file matches at least one rule), so a bare '!**/*.md' line stopped
being a subtraction and became its own rule: 'any file that is not
markdown'. Every area filter ending in that line went true for ANY
non-markdown change anywhere in the repo, and the code: filter ('**'
plus exclusions) could never be false again.

Measured consequences, straight from run logs:
- darling-pg ran the full TimescaleDB suite on every PR since the bump,
  including md-only ones. Run 30218459544 (PR erikdarlingdata#1709, two .md files):
  'Filter darling = true, Matching files: CHANGELOG.md' - CHANGELOG.md
  matched '!Darling/**/*.md' by virtue of not being a Darling markdown.
- A single root .gitignore edit built and tested every product: run
  30219202642 (throwaway PR erikdarlingdata#1714) lit lite, dashboard, AND darling,
  each reporting 'Matching files: .gitignore' via its '!**/*.md' rule.
- The erikdarlingdata#1712 docs fast path shipped unable to engage: every changed file
  matches '**', so code: was always true and setup/restore always ran.
  Its measured 1m43s md-only runs were real but came from the area
  filters (markdown matches no include), not from the fast path.

The fix keeps v4 (v3 is on the deprecated-runtime track) and removes
every bare negation instead:
- Area filters state the markdown carve-out INSIDE each include as an
  extglob - 'Darling/**/!(*.md)' - where quantifier semantics cannot
  detach it. The positive-only docs allowlist needed no change.
- The uninvertible code: filter becomes an all: counter. The classify
  step decides docs-only by all_count == docs_count, and additionally
  refuses to engage while any area filter is lit, because an area build
  step with restore skipped would run dotnet build --no-restore against
  nothing. Counts and areas derive from the same allowlist today; the
  veto exists for the day someone edits one and not the other.
- check-version-bump.yml had the identical '**'-plus-exclusions shape,
  so its md-only skip had also silently stopped working. Same counter
  fix, same allowlist, and its gate now says why.

Validation: probe commit on throwaway PR erikdarlingdata#1714 (this build.yml plus a
Darling .txt probe and a Darling .md probe) makes the filter log a
per-file truth table; results recorded in the CI-intelligence PR body.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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