Skip to content

ci(repo): send Sentry which Humanity grant is wrong, and check the previewnet name hourly - #55

Merged
HadiKhai merged 4 commits into
mainfrom
ci/humanity-grants-sentry-detail
Nov 24, 2026
Merged

HadiKhai merged 4 commits into
mainfrom
ci/humanity-grants-sentry-detail

Conversation

@HadiKhai

@HadiKhai HadiKhai commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

The hourly grants check only sent the humanity-grants monitor bare check-ins, so Sentry showed an error and nothing about which name or grant.

Now a failed run also sends one Sentry error event per bad name. A wrong grant gets "Grants wrong on peopl.paseo: dim2 missing storage", with the grants expected and found and each product's missing and extra grants. A name that could not be read gets its read error. Each event links the GitHub run. Events are grouped by name and outcome, so one problem stays one issue. They carry the monitor slug and the run's trace, which the check-ins now carry too, so they show with humanity-grants. A check-in has no field for text, so an ok run still sends only its check-in. check-grants.mjs writes its results to a --results file for this, and check-ins now go through the envelope endpoint, the only form that takes a trace.

The second commit adds peopl.testnet to the hourly check. No dotns CLI release can read previewnet with --env previewnet since its restart ("WRONG CHAIN"), so previewnet is read with dotns-cli 2.0.0, --stack and the stack previewnet publishes. The paseo names stay on 1.1.0, as does deploy's read-back.

The third commit gives previewnet its own leg and its own Sentry environment, previewnet, under the same humanity-grants monitor, so a previewnet reset or outage never turns the paseo monitor red or hides a real paseo break, and the alert rule can follow paseo alone. After a reset, peopl.testnet does not exist until the next deploy there, so a missing .testnet name is reported as "not deployed since the reset", a warning, and that leg's check-in stays ok. Wrong grants on a .testnet name that exists are still wrong, and a missing paseo name is still wrong. It also makes sure a failure in the events script never stops the check-in, words the event of a run with no results file by the check's outcome, and raises the timeout to 20 minutes so two slow paseo reads still fit.

Tested: vitest run scripts/ci (171 passing, 153 for the first commit alone), with all Sentry calls going to a local stub; eslint and actionlint clean. The hourly read was run against the live names 3 times, and all three names were ok, then once more as the two legs (1.1.0 on paseo, 2.0.0 on previewnet): all ok, and a .testnet name that does not exist warned and exited 0.

Refs #40

…e check failed

The hourly grants check only sent the humanity-grants monitor bare check-ins,
so Sentry showed an error with nothing about which name or grant.

check-grants.mjs now writes every name's result to a --results file: for a
wrong name, the grants expected and found and, per product, the grants
missing and extra; for an unread one, the read error. On error,
sentry-grants.mjs sends one Sentry error event per bad name from it, titled
"Grants wrong on <name>: <product> missing <grant>" or "Could not check the
grants of <name>", with the GitHub run's URL. Each is fingerprinted by
monitor, name and outcome, so a problem is one issue however long it lasts.
A run that compared nothing sends one event for the run.

The events carry the monitor (contexts.monitor.slug and the monitor.slug
tag) and the run's trace id. Check-ins now go through the envelope endpoint
as a check_in item, which is the only form that carries a trace id
(contexts.trace); the run's check-in id is that trace id. A check-in has no
field for free text, so the run URL rides on the events only.

Signed-off-by: Hadi Khairallah <hadikhairallah@outlook.com>
The hourly grants check read only peopl.paseo and peoplnext.paseo: the dotns
CLI env name for previewnet was never confirmed. It is previewnet, but no CLI
release can read there now: previewnet restarted, and 1.1.0, 1.1.1 and 2.0.0
all refuse its new chain ("WRONG CHAIN", genesis 0xf7d8… where the bundled
copy expects 0xbac9…).

dotns-cli 2.0.0 can read on a network from the stack descriptor it publishes
(--stack, no --env), which follows a restart. The hourly job now installs
2.0.0 and reads <label>.testnet that way; check-grants.mjs takes --env or
--stack before each group of names. 2.0.0 reads both paseo names exactly as
1.1.0 does. Deploy's read-back stays on 1.1.0.

Signed-off-by: Hadi Khairallah <hadikhairallah@outlook.com>
@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

dim2-pr55-sandbox00 · logs

No preview: no deployed sources changed. Add the deploy-preview label to force one.
No Paseo preview: add the deploy-paseo label to deploy one.

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Preview: peopl-pr55-preview.testnet (app + worker) · logs

https://peopl-pr55-preview.testnet.li

Open peopl-pr55-preview.testnet in a host that boots product workers (Polkadot Desktop on the matching network) to try the worker.

…ants check

The hourly check read peopl.testnet in the same run and monitor environment
as the paseo names. A previewnet reset, after which the name does not exist
until the next deploy, read as wrong grants, and a previewnet outage as an
error, so previewnet could keep the paseo monitor red and hide a real paseo
break.

The job now runs two legs, paseo (dotns-cli 1.1.0, --env paseo-v2) and
previewnet (2.0.0, --stack), each with SENTRY_ENVIRONMENT set to its network
under the same humanity-grants slug. Sentry keeps the monitor's state per
environment, so the alert rule can follow paseo alone. The previewnet leg
passes the new --not-deployed-warns: a name that does not exist is the
outcome undeployed, a "not deployed since the reset" warning, and its
check-in stays ok. Wrong grants on a name that exists are still wrong, and on
paseo a missing name is still wrong.

The events script can no longer stop the check-in: its body is guarded and
only warns, and the step goes on to the check-in even if it fails. It gets the
check's OUTCOME, so a run that found wrong grants but wrote no results says
so. The timeout is 20 minutes and max_runtime 25, which fits the paseo leg's
two reads of up to 300 s each and its setup. Tests cover each of these, and
pin dotns-cli 2.0.0's {exists, value} answer.

Signed-off-by: Hadi Khairallah <hadikhairallah@outlook.com>
… Sentry issues

A run that compared nothing had the same fingerprint in both environments,
so archiving a noisy previewnet issue also hid the paseo one. The
fingerprint now carries the environment.

Signed-off-by: Hadi Khairallah <hadikhairallah@outlook.com>
@HadiKhai
HadiKhai merged commit da540c3 into main Nov 24, 2026
9 checks passed
@HadiKhai
HadiKhai deleted the ci/humanity-grants-sentry-detail branch November 24, 2026 15:22
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