Conversation
The three dedicated-database panels printed `{lagSeconds}s` raw, so a zero
came out as `0s` -- a claim of exact currency that only PostgreSQL can
actually make. MySQL reports Seconds_Behind_Source in whole seconds and
MongoDB derives its lag from the oplog timestamp's second granularity, so
neither can tell "caught up" from "900ms behind", and the reading carries no
engine to tell them apart. `< 1s` is true on every engine.
Sub-second readings now render in milliseconds through calculateTime, which
is what the backend started publishing once it stopped rounding the reading
to whole seconds. Cross-region already published the raw float, so that panel
was printing six decimals.
CrossRegionStatus.lagSeconds is widened to number | null to match what the
endpoint returns when no reading was taken.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Console (appwrite/console)Project ID: Sites (1)
Tip Silent mode disables those chatty PR comments if you prefer peace and quiet |
Greptile SummaryThe PR introduces a shared replication-lag formatter so unknown readings display as Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/fea..." | Re-trigger Greptile |
appwrite/console now refuses any action referenced by a moving tag: every job in this repository dies at "Set up job" with "the actions ... are not allowed in appwrite/console because all actions must be pinned to a full-length commit SHA". It fails before checkout, so the whole repository's CI is down, not just this branch -- the last green Tests/E2E run was 2026-08-26. Every pin is the commit the moving tag resolves to today, so nothing changes behaviourally; the version each SHA corresponds to is in a trailing comment. publish.yml and dockerize-profiles.yml are covered too: they run on release rather than on a pull request, so the policy would have surfaced there as a failed publish instead of a failed check. main carries a different set of workflow files (production.yml and staging.yml exist there, and publish.yml differs), so it needs the same fix separately. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…cated-db-lag-display
CI state: two repo-wide blockers, one fixed here, one not mine to fixNeither is caused by this diff. The last green 1. Action pinning — fixed in this PREvery job died at
That is before checkout, so no PR in this repository can run at all.
2.
|
| attempt | result |
|---|---|
Merge feat-dedicated-db in (this PR is now up to date with its base) |
still 15 |
bun update (compatible versions only) |
15 → 12, clears the critical, still fails the gate |
The remaining twelve need bun update --latest — major bumps of @sveltejs/kit, sass, eslint and postcss — or npm-style overrides pinning the transitive versions. Either is a dependency-posture decision for this repo, and I am not going to make a SvelteKit major bump inside a replication-lag display fix on a WIP branch, unverified. I reverted the bun update rather than leave a partial lockfile change that does not clear the gate.
So this PR cannot go green until the audit is resolved. The lag change itself is verified: vitest 94 pass (the new formatReplicationLag tests seen red first), prettier and eslint clean, svelte-check adds no new errors.
console-stage is a downstream Sites deployment and fails because build does.

What
The three dedicated-database panels printed
{lagSeconds}sraw, so a zero came out as0s— a claim of exact currency that only PostgreSQL can actually make. The replication-lag column read0son every healthy replica of every engine.New
formatReplicationLagin$lib/helpers/timeConversion:null/undefined-0< 1s0.184184ms77s901mWired into
updateHAStatus,updateReadReplicasandupdateCrossRegion.Why
< 1sand not0sThe reading carries no engine, and
0does not mean the same thing on all three:Seconds_Behind_Sourcein whole seconds.optimeDate, which carries the oplog Timestamp's second granularity.Measured on fra1 prod:
db-6a674ee6001d5a176b00-0printsSeconds_Behind_Source: 0while streaming, anddb-qafullmongo-0'soptimeDatelands on.000Z. So on two engines out of three a0covers everything up to a second.< 1sis true on all three;0sis wrong on two.Passing the engine down so PostgreSQL could show a literal
0swas considered and dropped — it threads a field through three components to sharpen one edge case, and< 1sis not wrong for PostgreSQL either.Sub-second readings render through the existing
calculateTime, which already formats under-a-second as milliseconds. That is what the backend started publishing once it stopped rounding to whole seconds (appwrite-labs/edge#1281). Cross-region already published the raw float, so that panel was printing six decimals today.CrossRegionStatus.lagSecondsis widened tonumber | nullto match what the endpoint returns when no reading was taken.Base branch
Targets
feat-dedicated-db, notmain— all three components exist only on that branch.Verified
formatReplicationLagtests seen red against a broken formatter (0mswhere< 1swas expected) and green with it.vitest src/lib/helpers/timeConversion.test.ts: 94 pass.prettier --checkandeslinton all five changed files: clean.svelte-check: zero new errors, measured by running it onorigin/feat-dedicated-dband on this head with the same clean install and diffing. Both report300 ERRORS 114 WARNINGS 167 FILES_WITH_PROBLEMS. The diff is five added and five removed, and they are the same five errors inupdateReadReplicas.svelteshifted one line by the added import (32→33, 40→41, 54→55, 83→84, 118→119).Those 300 are pre-existing SDK-shape mismatches (
Property 'listReadReplicas' does not exist on type 'Compute',Property 'create' does not exist on type 'Projects', and so on).@appwrite.io/consoleis installed from a branch URL rather than a version, so it moves under the lockfile — worth knowing before reading any type-error count on this branch as a signal.Also: this PR has been merged up to date with
feat-dedicated-db.Not verified
updateHAStatus.svelte(thesyncMode/initialSyncModedeclarations) are unrelated to this change. They were already failing the repo's ownprettier --check .before this branch.🤖 Generated with Claude Code