chore(analytics): drop the browser example.saved fallback - #387
Merged
Merged
Conversation
demtario
marked this pull request as ready for review
September 30, 2026 13:18
The API worker is the only emitter of example.saved; the editor no longer counts a Save when the response lacks the exampleSaved marker. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
demtario
force-pushed
the
chore/remove-browser-example-saved-fallback
branch
from
September 30, 2026 13:22
414e80b to
fcbb3f8
Compare
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.
Context
The API worker writes the
example.savedAnalytics Engine point on every successful Save rebuild and every rebuild response carriesexampleSaved: boolean. The editor still counted a Save itself when a response lacked that key (browserCountsSave), a fallback for an API that predates the marker. This PR removes the fallback so the API is the only emitter ofexample.saved. It removesbrowserCountsSaveand its call in the editor Save handler inrunner/apps/authoring/src, updatesrunner/docs/observability-contract.mdsection 5, and replaces the tests that pinned the fallback. All other example analytics (example.open,example.engaged,example.forked,example.shared,example.downloaded) and theexample.savedmetric definition are untouched. The API'sexampleSavedresponse key stays: production code no longer reads it, but the API tests assert it and it remains a cheap signal of whether the point was written, so removing it is left out of this PR.Timing: the fallback only protects a new browser bundle paired with an API that lacks the
exampleSavedmarker. The marker shipped with #371 (first o11y deploy, 2026-09-29, master run 36553451764), so the risky pair needs an API rollback to a pre-#371 version, which would also remove the observability stack (the o11y and api workers are bound to each other) and is not a realistic rollback. The maintainer chose to merge a few days after opening as a buffer, not because of a hard requirement. The branch was rebased onto current master (conflicts in the editor Save handler after the save-guard change and in contract section 5 resolved by keeping master's text and removing only the fallback).Types of changes
runner/) changeHow was this verified?
Deterministic tests only, no external services and no production access.
pnpm --filter @handsontable/demo-runtime buildthennode --experimental-strip-types --test pipeline/*.test.mjs: 2593 tests, 2593 pass, 0 fail (twobrowserCountsSaveunit tests removed).pnpm -r run typecheckis clean for authoring, editor-shell and both workers.E2E_TELEMETRY=1 playwright test e2e/example-analytics.spec.ts: 7 of 7 pass, with stubbed Save responses and the spec's own local build. The former "Save answered without the marker emits one browser example.saved" spec now asserts zeroexample.savedevents after a Save whose response has no marker, and it runs the real editor Save path. Revert-check: restoring the baseApp.tsxandexampleAnalytics.tsviagit checkout 263de70c8 -- <paths>makes that spec fail (expected length 0, received 1 browserexample.saved); the files were then put back.Checklist
runner/config/frameworks.json(see CONTRIBUTING.md); otherwise it won't appear on demos.handsontable.com (n/a, no example added or renamed)pnpm build(andpnpm dev) in the affected example/server-example locally (n/a, runner change; runner build, tests and typecheck run as listed above)Related issue(s):
example.savedemitter (ADR-0042 section 2, contract section 5)