Skip to content

Carry the browser's stored_id on chtype.Device - #44

Open
TomK wants to merge 1 commit into
masterfrom
device-stored-id
Open

TomK wants to merge 1 commit into
masterfrom
device-stored-id

Conversation

@TomK

@TomK TomK commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

The device id the browser persists is available to paymentauth on every authed request and reaches app-device on the init path — but nothing carried it to Assemble, so updateAppCharge sends an empty one (StoredId: "", hardcoded).

The same device therefore produces two app-device rows: one from init carrying the id, one from the charge carrying none. Device.Reference is hashed over the stored id among other things, so they can't dedupe.

Field 27 on chtype.Device, so it rides with the device block wherever that already goes rather than needing new plumbing per call site.

Notes for review

Go only. Regenerated with protoc-gen-go v1.36.12 against the repo's existing v1.36.11 output, so the churn is one version header plus the field.

PHP deliberately not regenerated. generate.sh does rm -rf golang && rm -rf php and regenerates both, and I don't know which protoc produced the committed PHP — a bulk regeneration risked an unreviewable diff across the whole package. Nothing PHP-side needs this field, so it wants a deliberate regeneration by whoever owns that SDK. Worth knowing the two languages are now momentarily out of step on one field.

Also note generate.sh asserts libprotoc 3.21.12, which is not what has actually been generating this repo (v7.34.1).

Rollout

Needs a tag (v1.18.0 → next) before paymentauth and Assemble can consume it. Both of those PRs are open and blocked on it:

  • lucidcube/chargehive-paymentauth — populate it from the authed request
  • lucidcube/chargehive-assemble — read it in updateAppCharge instead of sending ""

🤖 Generated with Claude Code

The device id the browser persists is available to paymentauth on every authed
request, and reaches app-device on the init path - but nothing carried it to
assemble, so the charge path sent an empty one. The same device then produced two
app-device rows, one from init with an id and one from the charge with none, since
Device.Reference is hashed over the stored id among other things.

Field 27 on chtype.Device, so it rides with the device block wherever that already
goes rather than needing new plumbing per call.

Regenerated Go only, with protoc-gen-go v1.36.12 against the repo's existing
v1.36.11 output, so the churn is one version header. PHP is generated from these
protos too and is NOT regenerated here: generate.sh does a full rm -rf of both
languages, and I do not know which protoc produced the committed PHP, so a bulk
regeneration risked an unreviewable diff. Nothing PHP-side needs this field; it
wants a deliberate regeneration by whoever owns that SDK.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant