Conversation
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
…patibility Rust and Go FlatBuffers libraries produce different binary output for the same data (vtable field ordering), causing calculate_metadata_hash to return different SHA-256 hashes across languages. Replace manual JSON construction with canonical JSON libraries that automatically sort object keys per RFC 8785: - Rust: canon-json crate (serde_json Formatter) - Go: github.com/gibson042/canonicaljson-go Add root hash fixture and cross-language verification: - gen_fixture.sh and Makefile now save root hash alongside the .fb fixture - New test TestInterop_CalculateMetadataHash_CrossLanguage verifies Go's CalculateMetadataHash matches the committed Rust-generated hash - CI now checks both .fb binary and root hash match when regenerating fixture Remove unused FlatBuffers files: - Delete metadata_hash.fbs and metadata_hash_generated.rs (Rust) - Delete metadata_hash_generated.go (Go) Update CLAUDE.md: - Add documentation sync requirement - Add pre-PR test checks (only verity tests for verity changes)
|
@imlk0 ,您好,您的请求已接收,请耐心等待结果。 |
|
@imlk0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
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
calculate_metadata_hash/CalculateMetadataHashthat serialized via FlatBuffers returned different SHA-256 hashes across languages.canon-jsonin Rust,canonicaljson-goin Go) that automatically sort object keys per RFC 8785, eliminating language-specific binary differences.metadata_hash.fbs,metadata_hash_generated.rs, andmetadata_hash_generated.go.TestInterop_CalculateMetadataHash_CrossLanguageloads Rust-generated fixture and verifies Go's hash matches the committed root hash.fbbinary and the root hash against the committed fixtureChanged files
cryptpilot-verity/Cargo.toml— addcanon-json = "0.2.1"cryptpilot-verity/src/metadata/mod.rs— usecanon_json::CanonJsonSerializecryptpilot-verity/build.rs— remove metadata_hash.fbs compilationcryptpilot-verity/src/metadata/metadata_hash.fbs— deletedcryptpilot-verity/src/metadata/metadata_hash_generated.rs— deletedverity-go/go.mod/go.sum— addcanonicaljson-goverity-go/metadata/metadata_hash.go— usecanonicaljson.Marshal()verity-go/metadata/generated/metadata_hash_generated.go— deletedverity-go/metadata/metadata_hash.fbs— deletedverity-go/metadata/gen_fixture.sh— also write root hash to fileMakefile(gen-interop-fixture) — also write root hash to fileverity-go/metadata/testdata/rust.metadata.fb.hash— new committed hash fileverity-go/metadata/interop_test.go— newTestInterop_CalculateMetadataHash_CrossLanguage.github/workflows/test.yml— verify root hash in CICLAUDE.md— add documentation sync and pre-PR test requirements