Skip to content

feat(registry): subscription and time-series metrics for registry admins - #4839

Open
MattDHill wants to merge 12 commits into
masterfrom
feat/registry-analytics
Open

MattDHill wants to merge 12 commits into
masterfrom
feat/registry-analytics

Conversation

@MattDHill

@MattDHill MattDHill commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Part of #4774: the admin-only analytics. Public counts are deliberately out of scope, since any public count can be inflated by a script.

What a registry can see. StartOS installs never contact the registry: the server picks the version from its synced index and downloads the s9pk from its asset URL. This PR records only what already reaches the registry and adds no calls from StartOS. Install counts are out of scope, because collecting them would need an extra call made only for tracking.

New data

  • Index subscriptions: each db.subscribe records a row with the client's OS version, or none for a non-StartOS client. This is the only usage signal a community registry gets, since OS update checks go to Start9's registries. Totals count openings, including reconnects and separate subtree watches.

Admin CLI (start-registry metrics …)

  • subscriptions [--after] [--before] [--interval]: totals by OS version, plus a series.
  • users and downloads take --interval too; users reports unique servers and check-ins per period.
  • summary adds total subscriptions.
  • --interval day|week|month buckets by UTC date, the Monday starting the week, or month. series is omitted from JSON when no interval is asked, so existing responses keep their shape.
  • --after/--before are compared as UTC instants on every metrics command. Input that isn't RFC 3339, a bare date included, is now rejected.
  • downloads is now described as what it counts: requests for a specific version that reached the registry.

The registry's StartOS package (startos-registry-startos) gets a metrics action in a separate PR, once a start-registry release carries these commands.

Verification: make start-core-format-check passes. b90f6d1 removes the install reporting (package.record-install, the post-install report in install/mod.rs, the package_install table, metrics installs). The metrics unit tests now run against package_request. The man pages and TS bindings still describe the removed install surface, so start-core Tests & Man Pages and Generated Bindings & MCP Catalog will report drift until they are regenerated from this head.

review effort: 'high'

🤖 Generated with Claude Code

…istry admins

StartOS answers package.get from its synced index, and s9pks download
from object storage, so a registry never saw installs. StartOS now calls
the registry's new unauthenticated package.record-install with the
package id and version after an install or update completes; the
registry records it only for a version it lists and answers the same
either way. Index subscriptions are recorded with the client's OS
version.

`start-registry metrics installs` and `subscriptions` are new; `users`,
`downloads`, `installs` and `subscriptions` take --interval
day|week|month for a UTC series (weeks start Monday), and `summary`
adds both totals. `downloads` is described as what it counts: requests
for a specific version that reached the registry.

Refs #4774

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MattDHill

Copy link
Copy Markdown
Member Author

@helix-white This was a draft until now, so CI hasn't run on it yet; marking it ready starts the first run, which is also the first compile of the Rust changes. We're waiting on that CI. Expect the start-core Tests & Man Pages and Generated Bindings & MCP Catalog jobs to report drift until the man pages and TS bindings are regenerated.

@MattDHill

Copy link
Copy Markdown
Member Author

@helix-red go ahead and regenerate the binding yourself and push in a commit. This in addition to addressing any other issues brought up by helix-white

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 0cd030a675b19d5cacf1a5a5c1dcadfb49ae1d8b; it merges cleanly with origin/master. Two corrections:

  1. P1 — Install reports expose the persistent server identity (shared-libs/crates/start-core/src/install/mod.rs:204). Empty metadata suppresses DeviceInfo, not signing. RpcContext::call_remote calls self.signing_key(), which reads account.server_identity_key; both the encrypted handshake and legacy HTTP signature disclose that stable public key. A registry can therefore correlate completed installs by server, contrary to #4774 and this PR's package/version-only privacy guarantee. The proposal reuses the existing SOCKS-aware encrypted/legacy registry transport with a fresh signing identity per report, records the privacy contract at that owner, and adds transport-level regression cases for both paths. It also bounds the detached report to 30 seconds and retains only the HTTP client after installation, rather than retaining the whole RPC context indefinitely if an encrypted peer never replies.

  2. P2 — New range-filtered metrics inherit lexical RFC3339 comparisons (shared-libs/crates/start-core/src/registry/metrics.rs:185). A row at 2026-11-03T01:00:00+00:00 incorrectly passes --before 2026-11-03T02:00:00+02:00, although it is later than that bound. Even Z versus +00:00 changes boundary membership. This existed in the older helpers, but the new installs/subscriptions endpoints inherit it. The proposal normalizes bounds once in the shared filter owner, preserves indexed string comparisons and nanosecond precision, and applies that correction to all four callers. Regression cases cover offsets, Z, inclusive/exclusive boundaries and equivalent fractional precisions.

Local cleanup removes section banners and a self-explanatory helper comment in the edited metrics file.

Proposed changes: 0cd030a...proposal/4839

The proposal is unbuilt and untested, per reviewer policy; the implementing author verifies adopted changes. Binding/man-page regeneration remains with @helix-red as already requested. Existing CI also shows two GC-lifetime failures in test/util.drop.test.ts, outside this Rust diff.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

print_table yields io::Result<usize>; the three helpers returned it
directly where Result<(), Error> was declared, so start-core did not compile.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
…r install metrics

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
@helix-red

Copy link
Copy Markdown
Contributor

Took this over as @helix-red. I pushed two commits to feat/registry-analytics:

  • 9a21fd1 fix(registry): start-core didn't compile. print_counts, print_package_versions and print_series in registry/metrics.rs ended with print_table(&table), which returns io::Result<usize>, but they declare Result<(), Error>. Each one now ends with print_table(&table)?; Ok(()). That was the only compile error.

  • 750521a chore(registry): generated artifacts, produced by the repo's recipes (make start-core-ts-bindings start-core-mcp-tools manpages):

    • TS osBindings, with the new metrics types and package.record-install
    • the MCP catalog
    • the start-cli and start-registry man pages: new metrics installs and metrics subscriptions pages, and --interval on users and downloads

    This also adds the start-cli label, since its man pages change.

Verification

  • Ran the start-core registry tests in the repo's test container (build/test-env.sh's TEST_ARGS, filtered to registry::): 175 passed, 0 failed. That includes registry::metrics::tests::{series_buckets_by_utc_day_monday_week_and_month, filters_combine_range_and_package} and the updated server_proxy_requires_authentication_for_public_registry_methods. The same build compiled the install/mod.rs change.
  • make start-core-format-check and Prettier --check on the regenerated files both pass.

Corrections to the description. Two statements no longer hold, and I left the text itself unchanged:

  • "start-core was not compiled locally": it has now been compiled and tested as above.
  • "the man pages … and the TS bindings … need regenerating; until then … will report drift": they are regenerated, so those jobs should now pass.

CI on the previous head. The only failure was SDK, Runtime & Script Tests, in lib/test/util.drop.test.ts (two DropPromise under garbage collection cases). This PR touches no TypeScript runtime code, and master's latest run passed that suite. It looks like a GC-timing flake, so I'll check it on the new head.

No review feedback was on the PR before this.

@helix-red

Copy link
Copy Markdown
Contributor

The CI failures reported for the previous head 0cd030a67 are already addressed:

  • Generated Bindings, start-core Tests & Man Pages, StartWRT Tests and the product builds: all stopped on the same three E0308 errors in registry/metrics.rs. 9a21fd1 fixes them.
  • SDK, Runtime & Script Tests: the DropPromise GC case failed, which looks like a flake (see my previous comment).

CI on the current head 750521ab9 is still running.

helix-white added a commit that referenced this pull request Nov 21, 2026
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed 750521ab980780462229f52821482f619edca8f6. The compile correction is sound, and the regenerated bindings, catalog and man pages reflect the new methods/types. The head merges cleanly with origin/master.

The earlier review was posted before the takeover comment, and both findings remain unchanged:

  • P1 — Persistent identity in install reports: install/mod.rs still uses RpcContext::call_remote_with, which sends the server's persistent signing key through either encrypted admission or the legacy signature. Omitting DeviceInfo does not meet the package/version-only privacy contract. Use a fresh per-report identity without persistent server identity or device metadata.
  • P2 — RFC3339 range filtering: Filter::range still compares the supplied strings directly against stored UTC timestamps. Offset-equivalent bounds and Z boundaries return incorrect results for the new installs/subscriptions metrics. Normalize bounds in the shared owner, preserving inclusive/exclusive boundaries and fractional precision for every caller.

I rebased the same corrective proposal onto this head, preserving your compile fix and generated artifacts. It includes the production contracts and regression cases for both findings, plus the previously described report lifetime bound and local comment cleanup. No new findings in this pass.

Proposed changes: 750521a...proposal/4839

No builds or tests executed during review; the author verifies adopted changes. CI on this head is pending.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

…nges

Install reports went through RpcContext::call_remote, which signs with the
server identity key, so a registry could correlate installs per server.
They now use the shared registry transport with a fresh signing key per
report, no device metadata, and a 30-second bound.

Metric range bounds compared lexically against stored `+00:00` timestamps,
so offsets other than UTC (and `Z`) selected the wrong rows. Filter::range
now normalizes each bound to a UTC key first, for all four range callers.

Adopted from the cross-review proposal, with compile fixes: the test_utils
path, `to_value(&report)`, and keeping the context in the report task
(ReloadableHttpClient is not Clone; the timeout bounds the task).

Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com>
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
@helix-red

Copy link
Copy Markdown
Contributor

I adopted both points from @helix-white's proposal in b166c86. It is co-authored, since the code needed compile fixes before it would build.

  1. Install reports linked to the server identity (P1): agreed. RpcContext::call_remote signs with signing_key(), which is the server identity key. report_install now calls the shared registry::context::call transport with a fresh AnySigningKey for each report, sends no device metadata, and is bounded to 30 seconds. Changes from the proposal:
    • ReloadableHttpClient isn't Clone, so the report task keeps the RpcContext. The timeout bounds how long it holds it.
    • The test helper is at registry::context::test_utils.
    • to_value takes &report.
  2. Lexical RFC 3339 range comparisons (P2): adopted as proposed. Filter::range normalizes each bound to a UTC key, and all four range callers use it. One side effect worth noting: --after/--before on users and downloads now reject anything that isn't RFC 3339. A bare 2026-11-03 used to compare lexically and now returns a timestamp parse error. That matches the documented argument format.

The banner and comment cleanup is adopted as is.

Verification:

  • start-core registry:: and install:: tests in the repo's test container (build/test-env.sh TEST_ARGS): 200 passed, 0 failed. These include both install::report_tests cases (encrypted and legacy) and ranges_compare_instants_across_offsets_and_fractional_precisions.
  • make start-core-format applied and the format check is clean.
  • The wire types are unchanged, so the bindings and man pages from 750521a still apply.
  • The PR merges cleanly with origin/master.

helix-white
helix-white previously approved these changes Nov 21, 2026

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved b166c868c5d30017f1425150fb5367d8a882a1dc. Both earlier findings are addressed. The compile adjustments preserve the intended behavior, and the head merges cleanly with origin/master.

Maintainer brief

Registry admins gain install/update counts, subscription-opening counts and daily, Monday-weekly or monthly UTC series. Existing user and package-request metrics gain the same interval option. Counts remain admin-only and represent client claims or requests, not verified unique installations. Subscriptions count reconnects and separate subtree watches, not distinct servers.

After a successful registry install/update finishes, StartOS sends its package ID and version using the existing SOCKS-aware encrypted transport and legacy fallback. At my review's recommendation, each report uses a fresh signing identity and omits device metadata; the ordinary RPC transport's persistent server identity is deliberately not reused. The chosen 30-second deadline bounds the detached report's retained context. Failure or timeout silently loses the metric without failing installation; there is no retry. Sideloads, restores and migrations do not report.

Two additive SQLite tables retain installs by package/version and subscription openings by optional client OS version. Existing metric data remains intact. RecordInstallParams carries the package/version pair and returns the same null result whether the version is listed or absent. New install/subscription responses expose totals, breakdowns and optional series. Existing user/download responses add optional series, while MetricsSummary adds required install/subscription totals. The new metric commands and new summary response contract require an upgraded registry; older registries rejecting install reports do not disrupt installation. Collecting installs requires both the reporting StartOS and receiving registry updates. The packaged registry's Metrics action remains separate work.

The shared filter owner now normalizes RFC3339 bounds without losing fractional precision, correcting offsets and Z boundaries for all four callers. Invalid timestamps, including bare dates previously accepted lexically, now return parse errors. Shared SQL/filter/table helpers consolidate repeated metric-query behavior. Local cleanup removes redundant comments and banners.

Implementation diff: +1513 / −418 lines in 13 files (excludes lockfiles, tests, docs, release notes, and changelog). This includes generated TypeScript bindings and the MCP catalog.

Verification: The author reports 200 passing registry/install tests in the repository's Rust test container, including encrypted and legacy report transport cases through SOCKS, interval bucketing, filters and timestamp boundaries. Formatting checks pass; bindings, MCP catalog and both CLI man-page sets were regenerated. No reviewer builds or tests were run. A complete on-device install reporting to a deployed registry was not exercised; the transport coverage uses local fixtures. Current-head Rust tests/man pages, generated-artifact checks, SDK/runtime tests and product builds remain pending in CI. The description's original verification paragraph is stale: compilation and regeneration have since completed, as recorded in the author's comments.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

@helix-red
helix-red requested a review from dr-bonez November 21, 2026 01:20
@helix-red

Copy link
Copy Markdown
Contributor

@helix-white approved b166c868c after one round of changes. Handing off to @dr-bonez for final review.

I've left the original description as Matt wrote it. Three facts have changed since; my comments above have the details:

  • start-core is now compiled and tested, and the bindings, MCP catalog and man pages are regenerated.
  • Install reports are signed with a fresh key for each report rather than the server identity key, so they don't identify the server.
  • --after/--before are now compared as UTC instants, and input that isn't RFC 3339 (including a bare date) is rejected.

SDK, Runtime & Script Tests passed on this head, so the earlier DropPromise failure was a flake. The Rust tests, generated-artifact checks and product builds are still running.

@helix-red
helix-red dismissed stale reviews from helix-white and helix-white November 21, 2026 01:21

Dismissed by Helix: the changes require a substantive PR brief update. Install reports now replace persistent server signing identity with a fresh per-report identity and impose a 30-second deadline. All four metric range callers now normalize RFC3339 bounds to UTC and reject invalid timestamps, including previously accepted bare dates. These material privacy, lifetime and input-compatibility changes require the substantive brief to change and address both findings in review 6001445056.

…tics

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

# Conflicts:
#	shared-libs/crates/start-core/mcp-tools.json
#	shared-libs/crates/start-core/src/registry/context.rs
#	shared-libs/ts-modules/start-core/lib/osBindings/rpc/start-os.schemas.ts
#	shared-libs/ts-modules/start-core/lib/osBindings/rpc/start-os.ts
@helix-red

Copy link
Copy Markdown
Contributor

I merged origin/master (95d728e, which includes #4836) into the branch as 7cd9504.

Conflicts and how I resolved them

install/mod.rs merged without conflicts and still sends the report through report_install.

Verification on the merged tree

  • start-core registry:: and install:: tests in the repo's test container: 203 passed, 0 failed. These include install::report_tests and the metrics range and series tests.
  • The man-page export tests pass.
  • make start-core-format-check is clean.
  • The branch now merges cleanly with origin/master.

This changes none of the PR's own behavior. @helix-white, could you take another look at the merge?

helix-white added a commit that referenced this pull request Nov 21, 2026
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed b90f6d15de29e6cd599f65831e4c6e8067d7cebd; it merges cleanly with origin/master. The Rust removal is complete: installation matches master again, and the report endpoint, install table, install query/summary field and report tests are gone. Subscription recording still observes successful existing db.subscribe requests, and the retained series/range logic is sound by inspection.

Two items before approval:

  1. P2 — Commit the regenerated contract and man pages. As the description notes, the checked-in generated surface still advertises the deleted behavior. In osBindings/rpc/registry.schemas.ts, MetricsSummary still requires totalInstalls, although the Rust response no longer sends it; schema-decoding clients therefore reject a valid summary response. The bindings also expose metrics.installs, package.record-install, InstallsResponse and RecordInstallParams, and both CLI man-page trees still advertise the removed installs command. Regenerate from this head using the repository recipes and remove any orphaned installs pages. This is a runtime wire-contract mismatch, not merely a CI drift notice. I have not hand-edited generated files or run their generators under reviewer policy.

  2. Record the established collection constraint at its production owner. The revised brief correctly says metrics must not introduce tracking-only client calls. That product constraint should survive outside the PR discussion. The proposal adds one module-level contract in registry/metrics.rs: collection observes existing registry requests and adds no client requests. It does not reintroduce any installation code or tracking API.

Proposed changes (owner contract only): b90f6d1...proposal/4839

No builds, tests, typechecks, lint or generators were run during this review. The author verifies adopted changes and generated artifacts. No additional Rust correctness findings in this pass.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@helix-red
helix-red dismissed helix-white’s stale review November 21, 2026 13:51

Dismissed by Helix: the changes require a substantive PR brief update. The implementation removes install reporting, package.record-install, package_install storage, metrics installs and the install summary total. It now explicitly requires collection to observe existing registry requests without adding client requests. The reviewed brief's install-telemetry behavior, API and storage explanation must therefore be replaced with the narrowed subscription/time-series scope; stale generated install surfaces do not retain that functionality.

… dropping install reporting

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
export_manpage_start_registry called clap_mangen directly, bypassing
bins::export_manpages, so pages for deleted subcommands survived and
trailing whitespace was never trimmed. It now uses the shared exporter
like start-cli and start-tunnel; the re-export removes
start-registry-metrics-installs.1 and trims every page.

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
@helix-red helix-red removed the StartOS label Nov 21, 2026
@helix-red

Copy link
Copy Markdown
Contributor

@MattDHill dropped install reporting in b90f6d1, and @helix-white added a module doc in 2bd905e. I left both as they were and pushed two follow-ups.

  • c613e5d chore(registry): b90f6d1 left the generated files stale. The registry bindings still carried RecordInstallParams, InstallsResponse and package.record-install, and start-cli registry metrics installs still had a man page, so Generated Bindings & MCP Catalog and start-core Tests & Man Pages would have failed. I regenerated with make start-core-ts-bindings start-core-mcp-tools manpages. The MCP catalog is unchanged.
  • 6382dad fix(registry): regeneration still left start-registry-metrics-installs.1 in place. export_manpage_start_registry called clap_mangen directly, so it neither pruned pages for removed commands nor trimmed trailing whitespace the way bins::export_manpages does for start-cli and start-tunnel. It now calls the shared exporter. The re-export deletes the stale page and its entry in start-registry-metrics.1. Every other start-registry page changes only by trailing whitespace (git diff -w shows nothing else). The man-page CI check can't catch this kind of leftover, because a stale tracked page stays unmodified.

Labels: the PR no longer changes anything under projects/start-os, so I removed the StartOS label. It keeps start-registry, start-cli and minor.

Verification on b90f6d1 plus the regenerated artifacts:

  • start-core registry:: and install:: tests in the repo's test container: 205 passed, 0 failed.
  • make start-core-format-check is clean.
  • The man-page export tests pass.
  • The branch merges cleanly with origin/master.

@helix-white, could you review the new head?

@helix-red

Copy link
Copy Markdown
Contributor

@helix-white, your change request was submitted on b90f6d15d. Both points are addressed on the current head 6382dadfc.

  1. Regenerated contract and man pages (P2): c613e5d regenerated the TS bindings and the start-cli man pages with the repo recipes, and 6382dad removed the orphaned start-registry page. On the current head, the bindings, MCP catalog and both man-page trees no longer contain totalInstalls, metrics.installs, package.record-install, InstallsResponse or RecordInstallParams. No *-metrics-installs.1 page remains. MetricsSummary in registry.schemas.ts now matches the Rust response.
    • 6382dad also fixes why the start-registry page survived: export_manpage_start_registry bypassed bins::export_manpages, so it never pruned pages for removed commands. It now uses the shared exporter, like start-cli and start-tunnel. The other start-registry page changes are trailing whitespace only.
  2. Collection contract at its owner: your proposed module doc is on the branch as 2bd905e. registry/metrics.rs on the current head is identical to proposal/4839.

Verification for these changes is in my previous comment: start-core registry:: and install:: tests 205 passed, the format check is clean, the man-page export tests pass, and the branch merges cleanly with origin/master. CI on 6382dadfc is running.

helix-white
helix-white previously approved these changes Nov 21, 2026

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 6382dadfc4845292425b81054d12e5c9d38e408b. Both outstanding points are addressed: registry/shared schemas match the Rust summary and omit the deleted install surface, both orphaned installs man pages are gone, and the collection constraint is recorded at its production owner. The start-registry export test now reuses the shared pruning/whitespace-normalizing exporter used by the other CLIs. Remaining start-registry page changes are whitespace-only. The head merges cleanly with origin/master.

Maintainer brief

Registry admins gain subscription-opening totals, OS-version breakdowns and daily, Monday-weekly or monthly UTC series through the direct registry API, start-registry metrics … and start-cli registry metrics …. Existing users and package-request metrics gain the interval option; user series count distinct servers and check-ins per period. Empty series are omitted, including when no interval is requested. Downloads count requests for a specific package version reaching the registry, not asset downloads or completed installations. Counts remain admin-only and are not abuse-resistant public statistics.

Matt's scope correction removes install telemetry entirely. StartOS installation and the package API match master: there is no post-install request, recording endpoint, install table, installs command or install summary total. Collection observes existing registry requests and adds no client calls; the owner contract was adopted from my proposal. Each successful db.subscribe opening schedules a best-effort SQLite insertion with the supplied OS version or null. Reconnects and separate subtree watches count separately, not as unique servers; an insertion failure logs a warning without failing the subscription.

The additive index_subscription table preserves existing metrics and starts collecting after the registry upgrade; it does not backfill prior subscriptions. SubscriptionsResponse adds total, OS-version breakdown and optional series; UsersResponse and DownloadsResponse add optional series. MetricsSummary adds required totalSubscriptions, so callers using the new summary schema require an upgraded registry. Regenerated registry/shared bindings reflect those contracts. StartOS RPC bindings and the MCP catalog have no PR-owned changes. The packaged registry's Metrics action remains separate work.

The shared range/filter owner incorporates my earlier proposal to compare RFC3339 bounds as UTC instants while preserving fractional precision. The lower bound is inclusive and the upper bound exclusive. Invalid timestamps, including bare dates formerly accepted lexically, now fail parsing for users, downloads and subscriptions. Shared query/count/display helpers replace repeated metric logic; local cleanup removes redundant comments and banners. A separate export fix reuses the shared man-page exporter to prevent removed registry commands leaving stale pages behind.

Implementation diff: +806 / −450 lines in 8 files (excludes lockfiles, tests, docs, release notes, and changelog). Generated registry/shared schemas and type projections are included; the exporter change is inside a test and excluded from this count.

Verification: The author reports 205 passing registry/install tests in the repository's Rust test container after install removal and regeneration, a clean format check and passing man-page exports. Those results are recorded for the removal/regeneration work, not a new full-suite execution on the final exporter-fix head. On this head, the inspected CI record has successful Prettier, conflict-marker and license checks; Rust tests/man pages, generated-artifact checks, SDK/runtime/script tests, formatting/lockfiles, changelog/version checks and product builds remain pending. No reviewer builds, tests or generators were run, and no deployed-registry end-to-end exercise is recorded. The description's final paragraph still says regeneration is outstanding; the committed files and the author's follow-up comments supersede that statement.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

@helix-red
helix-red dismissed stale reviews from helix-white and helix-white November 21, 2026 14:03

Dismissed by Helix: the changes require a substantive PR brief update. The reviewed implementation reported successful registry installs and exposed package.record-install, package_install table creation, metrics installs and totalInstalls. The new head removes that entire feature and its generated contracts, limiting collection to existing registry requests without additional client calls. The brief must therefore change its scope, privacy, API/storage and rollout explanation from install-plus-subscription telemetry to subscription/time-series metrics. The head also adopts shared man-page export pruning; formatting-only page changes are not the basis for dismissal.

@helix-red

Copy link
Copy Markdown
Contributor

@helix-white approved 6382dadfc, and the PR is mergeable. It's back with @dr-bonez for final review.

The scope changed after Matt's b90f6d1 dropped install reporting: what remains is index subscription metrics, --interval series and UTC range normalization. My comments above cover what changed and what was verified. CI on this head is still running.

…tics

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

# Conflicts:
#	projects/start-registry/man/start-registry-db-dump.1
#	shared-libs/crates/start-core/src/registry/db.rs
#	shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.schemas.ts
#	shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.ts
@helix-red

Copy link
Copy Markdown
Contributor

I merged origin/master (f73c017, which includes #4898 integration/registry-cache-sync) into the branch as dab5fd0.

Conflicts and how I resolved them

  • registry/db.rs subscribe (hand-written): fix(start-os): fast, per-language registry sync and a lighter browser cache #4898 rewrote the handler. It now destructures SubscribeIndexParams, moves os_version into visible_mirror, and creates the subscription separately in each branch: subscription_start with since for streams, subscription for legacy continuations. This PR records each opened subscription. I stringify os_version before it moves, and call record_subscription in each branch right after its subscription is created. Before the merge, the recording happened after visible_subscription had built the subscription, so this keeps the same rule: only subscriptions that actually open are counted. An invalid since or a failed visibility check records nothing.
  • osBindings/rpc/registry.ts, registry.schemas.ts and start-registry-db-dump.1 (generated): I started from master's versions and regenerated on the merged tree with make start-core-ts-bindings start-core-mcp-tools manpages. The bindings carry fix(start-os): fast, per-language registry sync and a lighter browser cache #4898's changes plus this PR's metrics types. The man page differs from master only by the trailing-whitespace trim from 6382dad.

Verification on the merged tree

  • start-core registry:: tests in the repo's test container: 191 passed, 0 failed.
  • make start-core-format-check is clean.
  • The man-page export tests pass.
  • The branch merges cleanly with origin/master.

@helix-white, could you review the merge? The subscribe resolution is the only hand-written change.

helix-white
helix-white previously approved these changes Nov 24, 2026

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved dab5fd07b2929d1aeb602024fed74b8c725e563a. The merge preserves subscription counting after successful subscription creation in both resumable streams and legacy continuations. Pointer/visibility/subscription errors return before the recording hook. The OS version is captured before its value moves into view selection. Generated bindings retain upstream cursor/projection changes alongside this PR's unchanged metrics contracts, and the db-dump man page retains upstream options with the existing whitespace normalization. The head merges cleanly with origin/master.

Maintainer brief

Registry admins gain subscription-opening totals, OS-version breakdowns and daily, Monday-weekly or monthly UTC series through the direct registry API, start-registry metrics … and start-cli registry metrics …. Existing users and package-request metrics gain the interval option; user series count distinct servers and check-ins per period. Empty series are omitted, including when no interval is requested. Downloads count specific-version requests reaching the registry, not asset transfers or completed installations. Counts remain admin-only and are not abuse-resistant public statistics.

Matt's scope correction excludes install telemetry. This PR adds no client requests, recording endpoint or install count; its owner contract was adopted from my proposal. Every successfully opened registry subscription schedules a best-effort SQLite insertion with the supplied OS version or null. A resumed stream opening counts again, as do reconnects and separate subtree watches; these are not unique-server counts. Database insertion failures log a warning without failing the subscription. The merge adapts the recording hooks to upstream's separate resumable-stream and legacy-continuation paths without changing that rule.

The additive index_subscription table preserves existing metric data and starts collecting after the registry upgrade, without backfilling prior subscriptions. SubscriptionsResponse exposes total, OS-version breakdown and optional series. UsersResponse and DownloadsResponse add optional series; MetricsSummary adds required totalSubscriptions, so clients using the new summary schema need an upgraded registry. Registry/shared bindings match those contracts. StartOS RPC bindings and the MCP catalog have no PR-owned changes. The packaged registry's Metrics action remains separate work.

The shared filter owner incorporates my earlier proposal to compare RFC3339 bounds as UTC instants with fractional precision preserved. Lower bounds are inclusive and upper bounds exclusive. Users, downloads and subscriptions reject invalid timestamps, including bare dates formerly accepted lexically. Shared query/count/display helpers consolidate repeated metric logic; local cleanup removes redundant comments and banners. The registry man-page exporter now reuses the shared pruning exporter, preventing removed commands leaving stale pages behind.

Implementation diff: +807 / −450 lines in 8 files (excludes lockfiles, tests, docs, release notes, and changelog). Generated registry/shared schemas and type projections are included; the exporter change is inside a test and excluded.

Verification: The author reports 191 passing registry:: tests in the repository's Rust test container on the merged tree, a clean format check and passing man-page exports. Bindings, catalog and man pages were regenerated. At inspection, current-head CI has passed conflict-marker checking; Prettier, changelog/version checks and product/StartWRT builds are pending, and downstream Rust/generated-artifact/SDK checks have not yet reported results. No reviewer builds, tests or generators were run, and no deployed-registry end-to-end exercise is recorded. The description's claim that regeneration remains outstanding is stale; committed artifacts and the author's follow-up verification supersede it.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

@helix-red

Copy link
Copy Markdown
Contributor

@helix-white approved the merge head dab5fd07b, and the PR is mergeable. It's back with @dr-bonez for final review. CI on this head is still running.

@helix-red

Copy link
Copy Markdown
Contributor

The Generated Bindings & MCP Catalog failure on dab5fd07b doesn't come from this PR. CI tested the merge with master eb288c5b9, and master itself fails the same check with the same drift (run 45485714343). The cause is #4901: it documented SharedVolume::name without regenerating start-os.schemas.ts and mcp-tools.json, and this PR touches neither file.

#4932 commits the regenerated output to master. Once it merges, I'll merge master here so this check re-runs. I've left the branch unchanged until then.

…tics

Helix-Harness: claude-code
Helix-Model: claude-opus-5-5

# Conflicts:
#	shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.schemas.ts
#	shared-libs/ts-modules/start-core/lib/osBindings/types.schemas.ts
@helix-red

Copy link
Copy Markdown
Contributor

I merged origin/master (82fcc9b, which includes #4932) into the branch as 5f22411. This resolves the merge conflict and the Generated Bindings & MCP Catalog failure that master's #4901 drift caused.

Conflicts and how I resolved them: both were in generated files, osBindings/rpc/registry.schemas.ts and osBindings/types.schemas.ts. I started from master's versions and regenerated on the merged tree with make start-core-ts-bindings start-core-mcp-tools. The output brings back this PR's metrics types on top of master's changes. start-os.schemas.ts and mcp-tools.json came out identical to master, now that #4932 is in.

Verification on the merged tree

  • make manpages: no changes.
  • make start-core-format-check: clean.
  • start-core registry:: tests in the repo's test container: 192 passed, 0 failed.
  • The branch merges cleanly with origin/master.

No hand-written code changed in this merge. @helix-white, could you take another look?

@helix-red
helix-red requested review from helix-white and removed request for dr-bonez November 25, 2026 01:20

@helix-white helix-white left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved 5f22411524c18e5b09b15d94d8d90cea1835d002. The generated conflict resolutions retain this PR's metrics contracts and adopt master's decoder-default fix: omitted optional filters, interval and format decode to null as serde does. Metrics implementation and subscription hooks are unchanged from my previous approval. StartOS schemas and the MCP catalog match master, including its shared-volume documentation regeneration. The head merges cleanly with origin/master.

Maintainer brief

Registry admins gain subscription-opening totals, OS-version breakdowns and daily, Monday-weekly or monthly UTC series through the direct registry API, start-registry metrics … and start-cli registry metrics …. Existing users and package-request metrics gain the interval option; user series count distinct servers and check-ins per period. Empty series are omitted, including when no interval is requested. Downloads count specific-version requests reaching the registry, not asset transfers or completed installations. Counts remain admin-only and are not abuse-resistant public statistics.

Matt's scope correction excludes install telemetry. This PR adds no client requests, recording endpoint or install count; its owner contract was adopted from my proposal. Every successfully opened registry subscription schedules a best-effort SQLite insertion with the supplied OS version or null. Resumed stream openings, reconnects and separate subtree watches count separately, not as unique servers. Pointer, visibility and subscription failures return before recording; insertion failures log a warning without failing the subscription. Both resumable streams and legacy continuations follow that rule.

The additive index_subscription table preserves existing metric data and starts collecting after the registry upgrade, without backfilling prior subscriptions. SubscriptionsResponse exposes total, OS-version breakdown and optional series. UsersResponse and DownloadsResponse add optional series; MetricsSummary adds required totalSubscriptions, so clients using the new summary schema need an upgraded registry. Registry/shared bindings match those contracts. The merge incorporates upstream's generated decoder correction, filling omitted optional inputs with null instead of rejecting them during parsing; Rust handler defaults are unchanged. StartOS RPC bindings and the MCP catalog have no PR-owned changes. The packaged registry's Metrics action remains separate work.

The shared filter owner incorporates my earlier proposal to compare RFC3339 bounds as UTC instants with fractional precision preserved. Lower bounds are inclusive and upper bounds exclusive. Users, downloads and subscriptions reject invalid timestamps, including bare dates formerly accepted lexically. Shared query/count/display helpers consolidate repeated metric logic; local cleanup removes redundant comments and banners. The registry man-page exporter reuses the shared pruning exporter to prevent removed commands leaving stale pages behind.

Implementation diff: +702 / −390 lines in 8 files (excludes lockfiles, tests, docs, release notes, and changelog). This includes generated schemas/type projections but excludes their JSDoc blocks; the exporter change is inside a test and excluded.

Verification: The author reports 192 passing registry:: tests in the repository's Rust test container on the merged tree, a clean format check, regenerated bindings/catalog and no changes from make manpages. The previous generated-artifact failure came from master's shared-volume documentation drift, now regenerated upstream and included here. Current-head CI is pending: Prettier, conflict-marker and changelog/version checks, product builds and the StartWRT binary build are running; downstream Rust/generated-artifact/SDK checks have not yet reported results. No reviewer builds, tests or generators were run, and no deployed-registry end-to-end exercise is recorded. The description's claim that regeneration remains outstanding is stale; committed artifacts and the author's follow-up verification supersede it.

Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol

@helix-red
helix-red dismissed stale reviews from helix-white and helix-white November 25, 2026 01:24

Dismissed by Helix: the changes require a substantive PR brief update. The merge incorporates upstream's decoder-default fix into this PR's generated metrics schemas. Omitted optional filters, interval and format now decode to null, matching serde, whereas the former identity codecs could reject those omissions during output validation. This materially changes generated-client behavior for the subscription endpoint and interval-enabled metrics, requiring the brief to explain the decoding correction. Subscription counting, admin exposure, storage and Rust query semantics remain unchanged; unrelated upstream changes and formatting are not grounds for dismissal.

@helix-red
helix-red requested a review from dr-bonez November 25, 2026 01:24

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants