Skip to content

Observatory: internal PQC-readiness probe worker (ADR 0007) - #32

Merged
leonacostaok merged 2 commits into
mainfrom
feat/observatory-worker
Jul 25, 2026
Merged

leonacostaok merged 2 commits into
mainfrom
feat/observatory-worker

Conversation

@leonacostaok

Copy link
Copy Markdown
Member

Adds packages/observatory (private, unpublished) — the monthly probe worker behind the site's public /observatory page.

What it does

Probes a fixed panel of public hosts (hosts.txt, ~67 domains) once a month for PQC-hybrid key exchange (X25519MLKEM768) and certificate posture, writing idempotent per-month results + a rollup to Postgres.

Design

  • Reuses qProbe's un-gated TLS primitives (probeHybridSupport, extractNegotiated) by internal source import. It deliberately does not use runProbe, which is ownership-gated (authorizeTargets) and would refuse hosts we don't own.
  • Restrained policy enforced in code (not just documented): sequential, min interval between hosts, hard per-connection timeout, no retries, read-only handshakes, opt-out honored before any connection. See docs/adr/0007.
  • Published packages untouched: qProbe unchanged, zero-runtime-dependency and offline-boundary invariants still hold. pg is a devDependency of the observatory package only.

CLI

npm run observatory -- run --month 2026-07 (flags: --hosts, --optout, --timeout, --interval, --dry-run). Month = --month > OBS_MONTH > current UTC month, resolved inside run() (no Date at module top level).

Verification

  • tsc -p packages/observatory/tsconfig.json clean.
  • check-zero-deps and check-offline-boundary pass; root build ignores observatory.
  • Live dry-run: Cloudflare/Google hybrid=true, GitHub hybrid=false; cert fields captured.

Needs a human (ops)

  • A monthly systemd timer / cron on dl-latest running the CLI (no separate VM, per ADR).
  • DATABASE_URL in the worker's env (the website migration owns the tables; the worker CREATE TABLE IF NOT EXISTSes them defensively).
  • A pass over the hosts.txt seed list before the first real run.

Also includes a small doc commit preserving docs/openssf-best-practices.md (was a local-only file, kept so nothing is lost).

One honest note: hybrid vs negotiated KEX are two short handshakes per host (a full handshake plus a raw ClientHello), which is how qProbe defines a probe; documented in the ADR.

Adds packages/observatory (private, unpublished): a monthly worker that probes a
fixed panel of public hosts for PQC-hybrid key exchange (X25519MLKEM768) and
certificate posture, writing idempotent per-month results and a rollup to
Postgres for the site's public /observatory page.

Reuses qProbe's un-gated TLS primitives (probeHybridSupport, extractNegotiated)
by internal source import. It deliberately does NOT use runProbe, which is
ownership-gated (authorizeTargets) and would refuse hosts we do not own. The
restrained policy is enforced in code: sequential probing, a min interval between
hosts, a hard per-connection timeout, no retries, read-only handshakes, and
opt-out honored before any connection. See docs/adr/0007.

The published packages are untouched: qprobe unchanged, zero-runtime-dependency
and offline-boundary invariants still hold. pg is a devDependency of the
observatory package only.
@leonacostaok
leonacostaok enabled auto-merge July 25, 2026 02:38
Comment thread packages/observatory/src/probe.ts Dismissed
@leonacostaok
leonacostaok merged commit e7d35f4 into main Jul 25, 2026
14 checks passed
@leonacostaok
leonacostaok deleted the feat/observatory-worker branch August 19, 2026 13:52
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.

2 participants