feat: append cli_context param to altimate auth URL for PostHog session correlation - #1068
Open
altimate-harness-bot[bot] wants to merge 1 commit into
Open
feat: append cli_context param to altimate auth URL for PostHog session correlation#1068altimate-harness-bot[bot] wants to merge 1 commit into
altimate-harness-bot[bot] wants to merge 1 commit into
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
…rrelation
- Append base64url-encoded cli_context param to the register URL opened
by AltimateAuthPlugin. Context blob: { v, machine_id, cli_version }.
- machine_id is the existing stable UUID from ~/.altimate/machine-id
(already in every App Insights event). If the file is missing, log a
debug message instead of silently omitting.
- Export buildCliContext() and add 3 unit tests covering: valid context,
missing machine-id file, and whitespace trimming.
altimate-harness-bot
Bot
force-pushed
the
feat/cli-context-auth
branch
from
August 4, 2026 01:49
33de593 to
b8c72c5
Compare
saravmajestic
marked this pull request as ready for review
August 4, 2026 01:52
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
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.
Summary
Appends a
cli_contextquery param to the browser auth URL opened by the CLI during sign-in.buildCliContext()encodes{ v: 1, machine_id, cli_version }as a base64url JSON blobmachine_idis read from~/.altimate/machine-id(random UUID, non-PII) — the same value already sent to Azure App Insights telemetrycli_contextis decoded and passed toposthog.register()+posthog.alias()to link the CLI device to the authenticated userCompanion PR: AltimateAI/altimate-frontend#3106
Requested by @saravmajestic via harness
Summary by cubic
Adds a base64url-encoded
cli_contextto the CLI auth URL so the web app can link the browser session to the CLI device in PostHog. Improves analytics without sending PII.buildCliContext()encoding{ v: 1, machine_id, cli_version }(version from@opencode-ai/core/installation/version).machine_idfrom~/.altimate/machine-id; trims whitespace; if missing, setsmachine_idto""and logs a debug message.&cli_context=...to the/registerURL; adds tests for valid encoding, missing file behavior, and whitespace trimming.Written for commit b8c72c5. Summary will update on new commits.