Skip to content

Keep the caller's request fingerprint in durable creation receipts - #697

Draft
prettygirlisnotme wants to merge 1 commit into
ThinkFlowLab:mainfrom
prettygirlisnotme:feat/core-receipt-fingerprint
Draft

prettygirlisnotme wants to merge 1 commit into
ThinkFlowLab:mainfrom
prettygirlisnotme:feat/core-receipt-fingerprint

Conversation

@prettygirlisnotme

Copy link
Copy Markdown
Contributor

A client can now include an optional fingerprint of its original request when it sends a creation command. Durable creation receipts keep that fingerprint alongside the existing command fingerprint. A client can read it back after reconnecting, before deciding whether to resume the original request. Existing commands and receipts that omit the field stay readable.

I checked the HTTP path with an isolated project. After restarting the service, the same request returned the original receipt, changing the fingerprint returned a conflict, and the project still had one event. The base rejected the new field. This patch changes receipt metadata and does not change the UI.

Local checks at 066d90d929fb953deee693cf04f68bd9b58a0739 over 93bd25b08a53633c08a9d904b1043e8cf6c2de65: 136 storage, creation API and Agent gateway tests passed, and the generated contracts are in sync. Candidate CI runs are pending publication. The base Release run failed because a new Ark test is absent from the Python shard manifest.

Author pre-review 93/100 (scope 3, correctness 3, validation 2, claim evidence 3, simplicity 3). Independent pre-review 93/100 on the same base and head. The reviewer reran three storage regressions and contract generation. The generated schema matches the base after omitting the 108 appearances of the new field. No linked issue.

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COMMENT(非表决) 066d90d Refs #304

技术意见:建议修改后复审。

当前证据暂定 85/100,非批准分(范围 3、正确性 2、验证 2、主张证据 3、简洁度 3)。普通 creation commit 的路径合理:我核对了保存、重读、回执一致性约束,以及 schema 去掉新增字段后的结构与 base 完全一致。现有测试覆盖重启后的 rename 回执,以及同 command ID 改 fingerprint 或 payload 时拒绝。还有一个范围需要收实:pipeline 命令会在 POST 回执返回这个字段,但不走可供 receipt.get 重读的 commit log。我在返回回执的位置留了建议。

另外,同一 head 的 Release 因主线 Ark shard 漏登记失败(#695),与这个回执分支是两个问题。未独立启动服务或跑测试。

English: 85/100 provisional. The commit-log path retains the fingerprint, but pipeline responses do not make it recoverable via receipt lookup.

Dot,代表 @david6666666。非表决评审,Draft 不进入合入。

)
return CommandReceipt(commandId=command.commandId, projectId=command.projectId,
inputFingerprint=fingerprint, status='applied',
inputFingerprint=fingerprint, clientIntentFingerprint=command.clientIntentFingerprint, status='applied',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的 pipeline POST 会返回 clientIntentFingerprint,但持久化的 pipeline execution/operation 只存 inputFingerprint,重连后的 receipt.get 又只读 creation commit log。客户端会看到初次回执有字段,却无法按 PR 的约定在重连后取回。建议这轮把字段的承诺和入口收窄到有 durable receipt 的命令;如果 pipeline 也要支持,请从实际持久记录读回,并补 start/control 的重启回归。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants