docs(session): scope extension prefixes to declared mappings
The convention identifies how an edge preserves the identifiers and extension fields that it explicitly maps; it does not require every extension-owned field in every source slot to be renamed. Keep the cookbook general enough for preserved stream-start extras while retaining the exact field-owner mappings documented by each migration edge. This changes policy wording only, not the current V4 schema or conversion implementation.
This commit is contained in:
1 parent
7528528007
commit
bb81d312ae
3 files changed
+4
-4
No files matched your search
@@ -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 docs/cookbook/adding-a-session-format-version.md
|
||||
adding-a-session-format-version.md: 0f104a003e852ba485c8ca157dd91d00ce0f1711
|
||||
adding-a-session-format-version.zh.md: db68b0cd915dcbd04b0e76058b1aa7447cfd003c
|
||||
adding-a-session-format-version.md: 609d9df623006796252e56ec6f0789d1c60d4cf0
|
||||
adding-a-session-format-version.zh.md: 3102b842f2bf90b49e99444939a91147d8ce9c01
|
||||
@@ -61,7 +61,7 @@ Use native writer output as the conversion oracle: replay the same recorded LLM
|
||||
|
||||
Alpha converters may explicitly refuse historical cases without an implemented, evidenced mapping, including otherwise valid logs. Keep the source unchanged and publish no partial successor. Prefer real corpora and reproducible writers when extending support; inspect user corpora read-only and create sanitized regression fixtures.
|
||||
|
||||
Use the `plugin:` convention for historical unknown identifiers and extension-owned field names. Preserve complete original names and payloads, distinguish source and field owners to prevent collisions, and leave known core identities and opaque nested data alone. Document each exact mapping in the edge README.
|
||||
Use `plugin:` for migrated extension identifiers and explicitly mapped extension-field names. Preserve complete original names and payloads, distinguish source and field owners to prevent collisions, and leave known core identities and opaque nested data alone. Document each exact mapping in the edge README.
|
||||
|
||||
Maintain the new edge's README as its single complete transformation and admission catalog, following the [V2-to-V3 specification](../../packages/session/session-format-v2-to-v3/README.md#v2-to-v3-specification). Enumerate every converted header, event, message slot, and payload field; exact rename or collision rules; preserved ids, coordinates, references, and inherited cuts; external prerequisites; refusal and opaque-data policies; and unsupported or deferred behavior. Separate historical source conversion from native target admission, and state which codec, restorer, installed validator, and recovery policy performs each check. Record any validation that is deliberately narrower than the declared schema. Update this catalog in the same change as its code; a generated schema inventory or PR description does not replace it.
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ pnpm run gen-session-format-catalog
|
||||
|
||||
Alpha 转换器可以明确拒绝尚无已实现、有证据映射的历史场景,包括原本有效的日志。源文件保持不变,且不发布部分 successor。扩展支持时优先使用真实语料和可复现 writer;只读检查用户语料,并创建脱敏回归 fixture。
|
||||
|
||||
历史未知标识符和扩展拥有的字段名使用 `plugin:` 约定。保留完整原名称与载荷,区分来源及字段 owner 以防冲突;不改变已知核心身份或不透明嵌套数据。每个精确映射写入迁移边 README。
|
||||
对迁移的扩展标识符和明确映射的扩展字段名使用 `plugin:`。保留完整原名称与载荷,区分来源及字段 owner 以防冲突;不改变已知核心身份或不透明嵌套数据。每个精确映射写入迁移边 README。
|
||||
|
||||
参照 [V2 到 V3 规范](../../packages/session/session-format-v2-to-v3/README.zh.md#v2-to-v3-specification),将新迁移边的 README 维护为唯一完整的转换与接纳目录。枚举每个被转换的 header、事件、消息槽和载荷字段,精确重命名或冲突规则,保留的 id、坐标、引用与继承截点,外部前置证据,拒绝与不透明数据策略,以及不支持或延后的行为。将历史源转换与原生目标接纳分开,说明每项检查由哪个 codec、restorer、已安装校验器和恢复策略执行。记录刻意窄于声明 schema 的校验范围。代码变更必须同时更新此目录;生成的 schema 库存或 PR 描述不能替代它。
|
||||
|
||||
|
||||
Reference in new issue
Block a user