Repository navigation
fix(samples): seed only sample checks that work out of the box - #537
Merged
Merged
Conversation
A fresh install in the default run mode seeded every Default sample, about 75 checks. Most of them target services nobody runs locally (databases, brokers, gRPC), public game servers, FTP and SFTP test servers, IPv6 or a fake domain, so the first dashboard was half red. CheckSpec gets a SeedOnInstall flag and checkerdef.SamplesToSeed keeps only the flagged samples in the Default mode. The startup job filters through it. Test and Demo modes seed everything as before, and every Default sample stays in the create-check sample picker. A fresh install now seeds 11 checks: HTTP (one.one.one.one, the GitHub home page, a JSONPath assertion on the Google Public DNS JSON API), DNS (google.com A, cloudflare.com A, the GitHub NS change detection), SSL (google.com, github.com), TCP (google.com:443, the solidping.io request/reply sample) and ICMP (1.1.1.1). Existing installs are unchanged: the samples.loaded org parameter already stops the seed from running twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #537 +/- ##
=======================================
Coverage ? 82.83%
=======================================
Files ? 1181
Lines ? 121706
Branches ? 0
=======================================
Hits ? 100817
Misses ? 20882
Partials ? 7
🚀 New features to boost your workflow:
|
fclairamb
enabled auto-merge (squash)
October 12, 2026 06:14
This was referenced Oct 12, 2026
fclairamb
added a commit
that referenced
this pull request
Oct 12, 2026
#539 implemented the same VAPID spec (2026-10-12-03) on main. Its version is kept for every file this branch only touched for that spec (webpush, db app_settings, server.go, scenario harness, dash0 subscription hook, notifications mock); the branch's duplicate implementation and its useWebPushSubscription.test.ts are dropped. #537 (SeedOnInstall) and the idle-memory spec (NeedsBrowser) both add a CheckSpec flag: both are kept. A fresh default install now seeds no browser sample, so TestStartupBrowserSamplesDisabled runs in test mode, with http-fake-stable as the enabled control, and the small-hosts docs say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fclairamb
added a commit
that referenced
this pull request
Oct 12, 2026
#539 implemented the same VAPID spec (2026-10-12-03) on main. Its version is kept for every file this branch only touched for that spec (webpush, db app_settings, server.go, scenario harness, dash0 subscription hook, notifications mock); the branch's duplicate implementation and its useWebPushSubscription.test.ts are dropped. #537 (SeedOnInstall) and the idle-memory spec (NeedsBrowser) both add a CheckSpec flag: both are kept. A fresh default install now seeds no browser sample, so TestStartupBrowserSamplesDisabled runs in test mode, with http-fake-stable as the enabled control, and the small-hosts docs say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A fresh install in the default run mode seeded every
Defaultsample of every checker, about 75 checks. Of the first 79 runs, 36 were down. Most samples target services nobody runs locally (PostgreSQL, MySQL, MSSQL, Oracle, Redis, MongoDB, ClickHouse, Kafka, MQTT, RabbitMQ, gRPC, Docker), public game servers, FTP and SFTP test servers, IMAP, SNMP, a browser check, IPv6 targets or a fake domain. The first dashboard a new user sees was half red.Fix
CheckSpecgets aSeedOnInstallflag.checkerdef.SamplesToSeedkeeps only the flagged samples in theDefaultmode.job_startup.gois 3 lines in the loop and leaves every log line alone.TestandDemomodes seed everything, as before.GetSampleConfigsis unchanged for its other users: everyDefaultsample still shows in the create-check sample picker, the schema generator and the parity tests.$.Statuseq0).A fresh install now seeds 11 checks:
http-cloudflare-dnshttp-githubhttp-google-dns-json$.Statuseq0dns-googledns-cloudflaredns-github-ns-changesssl-google-comssl-githubproxy.fjygbaifeng.eu.orgtcp-googletcp-solidping-httpsicmp-cloudflareLeft out on purpose: the localhost fake API,
api.acme.com, httpbin.org, the Claude status check (down whenever there is an incident), the custom resolver8.8.8.8:53(blocked on some networks), both IPv6 samples, and every other check type.ICMP: the checker opens an unprivileged ICMP datagram socket first and falls back to a raw socket. Docker 20.10+ sets
net.ipv4.ping_group_rangeto all groups on its default network, so the nonroot image pings withoutNET_RAW. Only one ping sample is seeded, so a host that blocks unprivileged ICMP shows one red check, not four.Existing installs are unaffected. The
samples.loadedorg parameter already stops the seed from running a second time.Docs:
intro.mdsays what thedefaultorg starts with.server/internal/checkers/AGENTS.mddocuments the flag.Test plan
checkerdef:SamplesToSeedkeeps only seeds inDefaultand with nil options, everything inTestandDemo.registry/seed_samples_test.go: seeds are HTTP, DNS, SSL, TCP or ICMP only, at most 3 per type, 10 to 15 in total, unique slugs. Each one passes its checker'sValidate. No localhost,127.0.0.1,0.0.0.0,::1, private address or IPv6 literal anywhere in the config, and noipVersion: ipv6pin. The guard itself is tested against bad inputs.test/integration: theDefaultstartup seeds exactly the 11 slugs above. TheTestmode test is unchanged and passes.go generate ./internal/checkers/schemas/...: no schema change.golangci-lint run ./...: 0 issues.make lint-agent-docspasses.go test -short ./...: all green.PORT=4974 SP_DB_TYPE=sqlite SP_DB_DIR=<empty dir> solidping servefor 95 s, results read from the SQLite DB. All 11 seeded checks wereup, with 0 down, 0 timeout and 0 error results. The samples API still lists 74 samples for the picker.🤖 Generated with Claude Code