Merge origin/master into worktree/pr2177-export-fixes-20260811
Refresh PR #2258 onto master at 5427cbcc19 so the session-log export fixes are evaluated and mergeable against the current repository.\n\nPreserve master's SDK-toolchain removal, client theme bootstrap, and Python finish-reason changes intact. The only textual overlap is the generated config-catalog pairing record: both English and Chinese catalogs merge cleanly with the PR's compression setting and master's package moves, so regenerate that sidecar from the merged owners instead of choosing either stale hash.
This commit is contained in:
@@ -2,5 +2,5 @@
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write packages/session/user-id/README.md
|
||||
README.md: 31a72f5e7b58b90b165b16374c2301389cbe2ca0
|
||||
README.zh.md: 013097b3038c43ff740660ef9159ca2b13f7b743
|
||||
README.md: eb50bb06af52b3d977068b73388361bc1c25087f
|
||||
README.zh.md: 54287676c4e524c2458e4bab7e6bb3f52850ff25
|
||||
|
||||
@@ -4,7 +4,7 @@ English | [中文](README.zh.md)
|
||||
|
||||
Shared anonymous identity for session telemetry and direct feedback acknowledgement. `getOrCreateAnonymousUserId()` returns a random UUID v4 scoped to one harness home, persisted as the bare line `$DSH_HOME/.userid` (`~/.dsh/.userid` when `DSH_HOME` is unset). The OpenTelemetry backend reports it as Resource `user.id`; `/feedback` includes the same value in its acknowledgement so an operator can correlate a submitted session and user with exported telemetry.
|
||||
|
||||
The identity is never derived from the hostname, network address, git remote, or another identifying source. Deleting `.userid` resets the identity on the next process launch. Separate harness homes have separate identities, and the dsh-sdk launcher telemetry intentionally keeps its own unrelated store.
|
||||
The identity is never derived from the hostname, network address, git remote, or another identifying source. Deleting `.userid` resets the identity on the next process launch. Separate harness homes have separate identities.
|
||||
|
||||
## Storage contract
|
||||
|
||||
@@ -26,4 +26,4 @@ None; this package never contributes to a model request.
|
||||
|
||||
- **No recovery after deletion** — loss mints a new anonymous identity by design; recovery would require stable derivation material that weakens anonymity.
|
||||
- **Best-effort concurrency** — a reader landing in the narrow interval between a concurrent process's exclusive create and completed write can use a different in-memory UUID for that run; later launches converge on the persisted value.
|
||||
- **No cross-home identity** — different `$DSH_HOME` values cannot be correlated, and this package does not unify the separate dsh-sdk launcher telemetry identity.
|
||||
- **No cross-home identity** — different `$DSH_HOME` values cannot be correlated.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
会话遥测与直接反馈确认共用的匿名身份。`getOrCreateAnonymousUserId()` 返回一个限定于单个 harness home 的随机 UUID v4,并以裸行形式持久化到 `$DSH_HOME/.userid`(未设置 `DSH_HOME` 时为 `~/.dsh/.userid`)。OpenTelemetry 后端将其作为 Resource 的 `user.id` 上报;`/feedback` 在确认文本中包含同一个值,以便运维人员将所报告的会话和用户与导出的遥测相关联。
|
||||
|
||||
该身份绝不从 hostname、网络地址、git remote 或其他可用于识别身份的来源派生。删除 `.userid` 后,下次启动进程时会重置身份。不同 harness home 拥有不同身份,dsh-sdk launcher telemetry 则刻意使用与此无关的独立存储。
|
||||
该身份绝不从 hostname、网络地址、git remote 或其他可用于识别身份的来源派生。删除 `.userid` 后,下次启动进程时会重置身份。不同 harness home 拥有不同身份。
|
||||
|
||||
## 存储契约
|
||||
|
||||
@@ -26,4 +26,4 @@
|
||||
|
||||
- **删除后无法恢复**:身份丢失后会按设计生成新的匿名身份;若要恢复身份,就需要稳定的派生材料,这会削弱匿名性。
|
||||
- **Best-effort 并发**:如果读取方恰好落在并发进程完成独占创建但尚未写完的狭窄时间窗内,本次运行可能使用不同的内存 UUID;后续启动会收敛到已持久化的值。
|
||||
- **没有跨 home 身份**:不同 `$DSH_HOME` 值之间无法关联,本包也不会统一 dsh-sdk launcher telemetry 的独立身份。
|
||||
- **没有跨 home 身份**:不同 `$DSH_HOME` 值之间无法关联。
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
* and never derived from the hostname, network address, git remote, or any
|
||||
* other identifying source. It is scoped to the harness home, not the
|
||||
* machine: every process sharing one `$DSH_HOME` reports the same id, and
|
||||
* deleting the file mints a fresh identity on the next launch. The dsh-sdk
|
||||
* launcher telemetry keeps its own separate store.
|
||||
* deleting the file mints a fresh identity on the next launch.
|
||||
*
|
||||
* Reads and writes are synchronous so boot-time and command consumers can
|
||||
* use one API. The result is memoized per resolved file path: one process
|
||||
|
||||
Reference in New Issue
Block a user