Repository navigation
Preserve stored JSON in memory reads and MCP replies - #2064
yorkhellen wants to merge 42 commits into
Conversation
Stop response shaping at declared payload fields so diagnostic names and empty values in stored content survive reads and idempotent replays. Read stored JSON text because native JSON rendering omits null and empty object members. Add regression tests for payload boundaries, replay consistency and stored-value roundtrips through HTTP and MCP. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Task list rows keep their dictionary contract while response shaping uses the task model's payload boundaries. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
zlareb1
left a comment
There was a problem hiding this comment.
Stored text now supplies the memory value and its served hash. The MCP response models preserve marked payloads through normal replies and idempotency replays, while server diagnostics still trim. The added tests cover both reply channels, projected task rows, and a tags-only memory update.
zlareb1
left a comment
There was a problem hiding this comment.
Unit part 3 fails on the old memory projection assertion.
Check the raw value projection and its version-write alias, and keep byte and hash round trips for hydrated rows. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
zlareb1
left a comment
There was a problem hiding this comment.
The projection test checks the stored value, the version-write alias and the separate native JSON projection. The round-trip tests check the stored bytes and hash. The focused memory and MCP suite passes (113 tests).
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
zlareb1
left a comment
There was a problem hiding this comment.
The new response-shaping branches put server/operations/ below its CI coverage floor. Coverage job
Mark profile schemas, structured profiles, procedure metadata and learning candidates as payloads so MCP encoding keeps their stored JSON values. Cache the full handler result and encode each replay for its destination transport and toolset. Cover payload reads, cross-transport replay, audit rows and authenticated assistant calls with regression tests. Assistant probes use the real operation input models so accepted arguments reach the handler. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
zlareb1
left a comment
There was a problem hiding this comment.
The new replay cache format needs to work with a replica running the previous build. Coverage from the previous head is recorded in the existing thread. The new head needs its own CI result.
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Store large server integers as decimal strings in full MCP replay answers. Older readers replay the cache without bigint encoding; storing numbers loses precision when a JavaScript client parses the response. Keep HTTP integer restoration and opaque payload values intact. Cover the preceding reader's replay conversion at the safe integer boundary and with large positive and negative versions. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
zlareb1
left a comment
There was a problem hiding this comment.
The MCP cache preserves large version IDs for older MCP replicas. HTTP replay still exposes the raw zero date when a newer replica writes the cache and an older replica answers the retry.
Store the full result after epoch cleanup so an older HTTP replica replays the same timestamp. Keep payload boundaries through annotated containers and cover both reply channels and previous-build readers. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
An epoch string in a preceding writer's cache must produce the same default and explained reply as a fresh result. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
|
@zlareb1 The requested fixes are pushed at cf32bc2, with details in the original threads:
The final focused suite passes 236 tests with one environment skip. Format, lint, type and generator checks pass. Fresh independent review of the full diff found no code defects; hosted Actions still need maintainer approval. Please recheck this head. |
zlareb1
left a comment
There was a problem hiding this comment.
Conditional writes can fail during a rolling upgrade even when the memory revision has not changed. Cover both directions of the read and write across builds.
zlareb1
left a comment
There was a problem hiding this comment.
Pinned Biome rejects the same assertion in Chat.test.tsx on the PR merge and clean main. The check passes with the formatting repair. PR job · Main job · Repair #2107
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
zlareb1
left a comment
There was a problem hiding this comment.
The read token now agrees across builds for the original fixture. Proposal approval can still attest content the reviewer did not see. The shared embedding repair finding also still applies because the repair compares the shared projection with the full source value.
Projection tokens omit null and empty-object members and can approve a replacement the reviewer has not read. Read the complete proposal revision and hash through memory.history, and reject projection tokens during approval. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
zlareb1
left a comment
There was a problem hiding this comment.
Proposal approval now compares the full stored hash. The shared embedding repair still refuses an N-1 promotion whose native projection omitted fields. The bulk read and namespace report also return different hashes from point reads of the same row.
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
zlareb1
left a comment
There was a problem hiding this comment.
Scoping history by the proposal’s identity fixes the tombstone case. The event-view leg keeps its assertions and runs hashed-stub repair on the new build. The approval path across builds still needs a rollout path. The new mixed-version test expects the preceding server to reject the canonical hash for a proposal with null members. Keep that hash check and give clients a supported way to complete or safely defer the approval while both builds serve.
Read receipts record stored content separately from read precondition tokens. Proposal review uses identity-scoped history while retaining address navigation, rejection reasons and retries. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
The generated contracts include run.reliance and the proposal history revision filter. Run metadata retains its opaque payload marker, and read receipts retain their full-content hash binding. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
zlareb1
left a comment
There was a problem hiding this comment.
The combined wire models retain the full-value hash binding. The proposal approval thread remains open. The rollout guide requires calls to reach an upgraded server, but the dashboard still sends them through its ordinary endpoint.
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
zlareb1
left a comment
There was a problem hiding this comment.
Verification can fail across builds or display a full value as verified when only its projection was attested. Definition approval and MCP replay have separate regressions. The existing proposal acceptance finding still applies on the preceding build.
| const r = await verifyMemory(rowIdentity(identity, detail), memoryKey, { | ||
| revoke: live, | ||
| ifMatchSha256: detail.content_sha256, | ||
| ifMatchSha256: detail.canonical_content_sha256, |
There was a problem hiding this comment.
P1 — Verification and revocation of unchanged JSON can return 409 during a rolling deploy. For a value with a null member, this dashboard sends the full digest and the preceding replica compares it with the native projection's digest. The preceding dashboard can send the projected digest to a current replica and get the same failure. Preserve full-content verification in the rollout path and exercise both directions in the mixed-version gate.
There was a problem hiding this comment.
@zlareb1 Cross-build Verify/revoke remains unresolved. The untouched preceding verifier derives a different hash when its native JSON projection omits members and returns 409 for the complete-content token. Accepting the projected token would attest to content that the reviewer did not see; the full-hash guard remains enforced.
The dependency is merge-only: merge #2224 first, synchronize this branch with main, then complete the dependent full-content token rule and bidirectional gate before merging #2064. No separate release or deployment is required between those merges. The prerequisite and prototype probes do not establish compatibility of the untouched preceding verifier.
ec562d1, pushed at d90ef4e, repairs canonical hashing of present stored scalar null on this build. Its read/verify/revoke tests pass against private ClickHouse, but that result does not complete the requested mixed-version fix.
| verified_at=row.verified_at, | ||
| verification=_trust.verification_state(row.verified_by, row.verified_sha256, sha), | ||
| verification=_trust.verification_state( | ||
| row.verified_by, row.verified_sha256, _trust.row_content_sha256(row) |
There was a problem hiding this comment.
P1 — A preceding replica can verify the projected JSON and store its digest in both hash columns while retaining the full value. This read returns the full value and marks it verified because the stored projected digests agree. Compare the attestation to the full served value here and in the by-ID path. Cover an old-replica verification followed by current point and bulk reads.
There was a problem hiding this comment.
@zlareb1 Fixed in 670aad7: point, by-ID and bulk reads derive verification from the full served value. Matching projected stored digests no longer mark omitted members as verified.
Unit and persistent ClickHouse regressions cover full and projected attestations. The mixed-build gate checks the preceding verifier's attestation against a fixture retaining the full stored bytes; that build can also rewrite the raw column through its projection alias, so this fixture isolates the attestation state. The real two-build probe passes these read cases. This does not fix the separate cross-build verify/revoke 409.
| current = served_content_sha256(src.value) | ||
| if current != approved_sha256: | ||
| current = served_sha256(src) | ||
| if approved_sha256 not in (current, served_content_sha256(src.value)): |
There was a problem hiding this comment.
P2 — An edit to a member omitted by the native JSON projection can leave the projected digest unchanged. A definition approval with that digest then publishes full JSON that differs from the version the caller approved. Bind the approval to the full published value and test an intervening edit to an omitted member.
There was a problem hiding this comment.
@zlareb1 Fixed in 670aad7: definition promotion accepts only the full canonical hash. The dashboard sends canonical_content_sha256, and the SDK comments, MCP instructions and generated reference name that field.
The persistent regression rejects a projected approval and an old full approval after an omitted member changes, writes no shared row for either refusal, then publishes the complete replacement after a fresh full approval. The two-build probe checks full history review and projected approval refusal. The merged head's 88 integration tests pass (13 skipped).
| elapsed_ms=elapsed_ms, | ||
| response_body=result_dict, | ||
| response_body=recorded_body, | ||
| cache_body=recorded_body, |
There was a problem hiding this comment.
P2 — This caches the first request's argument feedback. A memory.set with an extra field zzzz, retried with the same idempotency key and an extra field qqqq, returns both names on either transport even though the retry only sent qqqq. Store the handler's result and attach transport-generated argument feedback to the request that receives it. Cover replay through HTTP and MCP.
There was a problem hiding this comment.
@zlareb1 Fixed in 670aad7: both transports cache the handler result before adding the current request's argument feedback. Replays attach only the receiving request's unknown arguments and retain handler-owned ignored_args. HTTP replay also supplies the receiving request's ignored-args header.
Regressions exercise HTTP→HTTP, HTTP→MCP, MCP→HTTP and MCP→MCP with zzzz, then qqqq, then no unknown argument. They assert one handler execution and retain the original version. Both unit and persistent ClickHouse tests pass on merged head 49388f2.
…e current request Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com> # Conflicts: # sdk/go/wire/models.gen.go # sdk/rust/src/wire_models.rs
| why("memory.verify") || | ||
| (!detail?.canonical_content_sha256 | ||
| ? "This server did not supply a full content hash. Verification is unavailable." | ||
| : null); |
There was a problem hiding this comment.
Verification fails across mixed replicas
High Severity
Verification and revocation now send only canonical_content_sha256. During a rolling deploy, that full digest does not match a preceding replica's native-projection token, and a preceding client still sends the projection token to a current replica. For JSON with null or empty-object members, both directions return 409 even though the stored value is unchanged. full_attestation_reads only verifies each build with the hash that same build already accepts.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 49388f2. Configure here.
zlareb1
left a comment
There was a problem hiding this comment.
The current head fixes the point, by-ID, and bulk attestation reads, the definition hash check, and replay feedback between current replicas.
memory.list still reports human for the projected digest in the new persisted fixture because server/memory/app/query.py:405 trusts the stored digest. The same row returns stale from memory.get. Derive the list result from the content it serves, and extend the fixture to cover the list. The attestation guide and the definition approval guide also still instruct callers to use content_sha256. For a value whose projection omits a member, both requests can return 409 on the current server. Update both examples to use canonical_content_sha256.
The verify and revoke and proposal approval rollout findings still apply.
| try { | ||
| // A definition's promotion names the text it approves: the one shown. | ||
| const approved = detail.memory_type === "definition" ? detail.content_sha256 : undefined; | ||
| const approved = detail.memory_type === "definition" ? detail.canonical_content_sha256 : undefined; |
There was a problem hiding this comment.
P1 — Read an active namespace-wide definition from the preceding server with this dashboard. The row qualifies for Share, but the response has no canonical_content_sha256, so this sends no approval hash and both builds refuse it. This also affects definitions whose projection preserves every field. Read a full-value hash through a path both builds serve or make Share unavailable before confirmation. Cover the preceding-server read in a dashboard test.
There was a problem hiding this comment.
@zlareb1 Fixed in a4a11df, pushed at 5910d05. Definition Share is disabled before confirmation when the read lacks canonical_content_sha256; the action handler also refuses that case. The dashboard regression feeds serialized preceding-server reads for both omitted-member and lossless objects, asserts no confirmation or promotion request, and checks that a supplied full hash reaches approved_sha256 unchanged. The complete dashboard suite passes 4099 tests in 338 files after synchronization with main.
| input_obj=payload, | ||
| elapsed_ms=elapsed_ms, | ||
| response_body=response_body, | ||
| cache_body=cache_body, |
There was a problem hiding this comment.
P2 — Send an HTTP write with an unknown non-typo field to this build, then retry the same request and idempotency key on the preceding build. The first reply names the field in ignored_args. The preceding HTTP replay returns the cached body unchanged, so this cache write drops the receipt on retry. Preserve the receipt across builds while keeping request-specific feedback on current replies, and add this direction to the mixed-version test.
There was a problem hiding this comment.
@zlareb1 The receipt repair is in a4a11df; 3575e78 completes its durable reverse-direction gate. The cache keeps the first normalized receipt, including ignored_args, for preceding HTTP readers. Cached response headers record handler-owned names so current HTTP/MCP readers can preserve them and attach the retry's feedback. Unmarked preceding HTTP receipts retain their names because their ownership cannot be recovered.
The mixed-version regression seeds memory.pin, writes memory.unpin with an unknown field, then replays it through the other build. Both directions require HTTP 200, X-Idempotent-Replay: true, an identical receipt and an unchanged stored version; a 409 fails the case.
Independent review found that the committed gate covered only the first direction. The correction runs both pairs and adds ten cases that first fail on the preceding gate. Either reader's 409, missing replay flag, changed feedback or changed version fails its case. The two complete gate/transport files pass 74 tests; the complete affected backend files pass 4152 tests and 320 subtests, with 30 existing skips.
Two real servers pass all eight same-field receipt checks and preserve the stored version in all 24 replays. Changed/clean retries retain first-request names in 12 cases: eight on preceding readers and four from unmarked preceding HTTP receipts on current readers. Those limitations remain explicit in the PR body; the complete hosted mixed-version matrix is not verified.
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
The source registration module binds its ClickHouse getter at import. Its unit world must patch that getter even when another test imports the module first. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
|
@zlareb1 The The attestation and definition-approval guide corrections to |
Each build must preserve the other build\u0027s first receipt. Exercise reverse-only conflicts, missing replay confirmation, feedback changes and version changes. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Complete nullable values hash as canonical JSON. Missing, truncated and high-sensitivity previews still cannot confirm attestations; projected read tokens retain their existing null convention. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Regenerate Go and Rust wire files from the merged operation models. Connect and disconnect the private ClickHouse test client for persisted scalar-null coverage. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Regenerate SDK wire files and the analyzer corpus from the merged namespace models. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Reviewed by Cursor Bugbot for commit d90ef4e. Configure here.
Recency previews cap decoded values without parsing strings again. Canonical hashes distinguish stored null from unavailable content, and verification refuses rows without complete content. Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com>
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com> # Conflicts: # sdk/go/wire/models.gen.go
Signed-off-by: zhangxiaoyu.york <zhangxiaoyu.york@bytedance.com> # Conflicts: # sdk/go/wire/models.gen.go # sdk/rust/src/wire_models.rs


Closes: #2063
Related: #2224
Merge dependency and remaining review work
Prerequisite: #2224. Merge #2224 first, then synchronize this branch with main and complete the dependent changes before merging #2064. This is a merge dependency; no separate release or deployment is required between the two merges.
The prerequisite makes memory reads and approval hashes use complete persisted JSON objects, including null and empty-object members. It also keeps snapshot refusal policies effective across that read upgrade and rollback. An untouched preceding build reads the native projection and cannot verify the complete-content token. Accepting its projected token would miss changes confined to omitted members.
This split separates the shared read and hash repair from the dependent changes in this PR. The reviewers require successful cross-build Verify/revoke and proposal approval; they did not prescribe a separate PR. After #2224 merges, its code supplies the baseline for the dependent implementation and tests.
This PR still needs to use the same complete-content token rule and commit bidirectional mixed-version gate cases against that repaired baseline. Untouched-baseline Verify/revoke and proposal approval remain unresolved; the scalar-null repair does not complete those cross-build requirements. Review requirements Verify/revoke and proposal approval remain open. Creating or merging the prerequisite does not complete them.
Local two-server probes pass ten scenarios with the repaired baseline and a prototype dependent build: Verify/revoke, omitted-member stale-token rejection, proposal approval and snapshot refusal in both directions. That prototype includes changes beyond this PR's current pushed head; those results do not establish compatibility of the current head or of an untouched preceding verifier. The scope and tests below describe the current pushed implementation.
Changelog category
Bug Fix
Changelog entry
Memory reads retain stored null and empty-object members. HTTP and MCP replies preserve caller payloads through response shaping and idempotency replay. Conditional-write read tokens remain valid across rolling builds.
Why
The native JSON projection omits members present in stored text. Recursive response shaping also removes diagnostic-named keys and meaningful empty values inside caller content. Read stored text and mark opaque payload boundaries so returned content matches written content.
Conditional writes keep the native-projection token both rolling builds accept. Stored content and approval attestations use the full canonical hash. Using a projected token for proposal approval would accept changes to omitted members that the reviewer never saw.
Scope and risk
valuetext and nativevalue_jsonfor conditional-write tokens. Point lookups, bulk lookups and report citations use the same token input. The SQL analyzer corpus is regenerated.task.listdictionaries while retaining their wire schema and selected columns.ignored_args. Record handler-owned names in the existing cached response headers. Current readers restore those names and attach the retry's feedback; preceding unmarked HTTP receipts cannot distinguish first-request names from handler names and retain both. MCP receipts retain string encoding for large server version IDs.memory.get_by_id, then reads its complete value and approval hash frommemory.historyscoped to that identity andmemory_id. Identity scoping also works when the preceding build ignores the id filter.--baseand CI's pinned bases remain unchanged.Replies can be larger because meaningful caller content remains present. Conditional-write read tokens retain the native projection's limitation: changes confined to omitted members cannot be distinguished. A full write hash retains that limit when it equals the current projection token. Stored content and attestation hashes cover the complete value. Authorization, reviewer independence and tenant scoping remain enforced.
Compatibility, rollout and rollback
memory.historyaccepts an optionalmemory_idfilter before the version limit.memory.get,memory.get_by_idand the rows inmemory.bulk_getaddcanonical_content_sha256, computed from the full returned value.memory.verify.if_match_sha256takes that full hash; the dashboard disables verification and definition Share before confirmation when a server does not supply it. No operations are added or removed.content_sha256tokens hash the native JSON projection when populated, else stored text, matching the preceding build. Conditional writes across builds use the token from a read. The preceding build can reject a full write hash when its projection differs.memory.historyasapproved_sha256. Either build can supply the complete reviewed value. The untouched preceding build refuses a full hash when its native JSON projection omits members; the dependent fix remains required on this head. Sending the projected hash would let an omitted-member replacement pass review.explain=trueretain those null fields.explain=true.Tests
At 63bd8e7, after repair 8eb1f9e and the signed-off merge of main 2c66869, the complete affected backend union passes 4712 tests across 110 files, with 31 skips and 320 passing subtests. This includes every file in the prior 98-file batch, the recency regressions and merged-main affected tests. Format, lint, type checks and all generator checks pass. Generated Go and Rust merge conflicts are regenerated from merged sources; the SQL corpus has no tracked drift.
The recency SQL-row and HTTP/MCP result-shaping regression first fails in 16 cases with 56 passing controls. Valid string writes through the live HTTP boundary first fail in nine cases with eight passing neighbors. Both sort orders preserve the values and types of JSON-looking strings, empty strings, null, booleans, numbers and containers; recency truncation distinguishes strings from containers. Raw-empty or missing content first fails two unit cases and one live case; decoded native content with empty raw text is a passing control. Unguarded verification first fails two cases with two passing guarded controls, then refuses unavailable content before any version write.
The full persistent files
test_read_verify_full_hash.py,test_memory_delete_list.py,test_memory_verify.pyand the merged-maintest_assigned_source_ch.pypass 45 tests without skips. The memory files cover legal set inputs, both list sorts, stored values and hashes, full-hash verification, scalar-null verify/revoke and repeat no-ops, replacement refusal and raw-empty refusal. Scalar-null cases seed a valid value and write serialized null through the real version-row and head-write helpers; no null set input is introduced. In-process HTTP tests and MCP result shaping preserve literal values; this is not a full MCP transport session. Cut and high previews remain unconfirmed. Legacy projected null tokens, not-found and unchanged defaults, omitted-high hashes and empty-attestation rejection remain unchanged.The final package, transport, wire/SDK, read-hash, schema, MCP shaping, docs, code.review_brief and assigned-source contract batch passes 672 tests with one skip. The earlier broader contract batch at fa50499 passes 824 tests with one skip, including MCP budgets. The analyzer passes 12 tests at the final head. The corpus has 2447 shapes, 2443 checked, four intentionally unchecked and none rejected; its existing unfiltered recall drive error remains reported.
Merged main changes frontend sources, so the full dashboard suite is rerun at 63bd8e7: 4128 tests pass across 339 files under verified Node 22 with the en-US locale. Build and bundle budget pass. The earlier supplied dashboard evidence at d90ef4e remains 4126 tests in 339 files; it is separate provenance. The prior backend evidence at that head is 4254 tests across 98 files, 30 skips and 320 passing subtests. Its null-specific regression first fails in 24 cases with 24 passing controls, then the focused files pass 119 tests and the full persistent read/verify file passes nine.
Earlier results have separate provenance: the affected backend run after the 3575e78 gate correction passed 4152 tests and 320 subtests with 30 skips; live verification at the resolved 5910d05 tree passed 63 tests across seven complete integration files. The earlier dashboard run passed 4099 tests in 338 files. These earlier results do not establish behavior of the scalar-null repair.
The complete affected backend run exposes two connected-source fixture failures that also reproduce on clean main when the registration module is imported before the fixture. The fixture explicitly supplies its ClickHouse fake to that module's imported getter; it keeps the fleet check and access-rule assertions intact.
The mixed-version receipt gate seeds a pinned row and uses the same
memory.unpinrequest across builds. It requires HTTP 200, the replay header, an identical receipt and an unchanged row version in both directions; HTTP 409 fails the test.Independent review of 5910d05 identifies a missing reverse direction in that committed receipt gate. Commit 3575e78 adds both writer/reader pairs with separate keys. Ten cases first fail on the preceding gate, then pass; either reader's conflict, missing replay confirmation, feedback change or version change fails the gate. The complete gate and cross-transport unit files pass 74 tests. Fresh independent review of 5910d05..3575e78 finds no defects in that gate correction, independently passes all 34 gate unit tests and ten direction-specific fault probes. This verdict covers the gate correction only.
Two real servers exercise all four HTTP/MCP pairings in both directions. All 24 replays preserve the stored version; all eight same-field retries retain the receipt feedback. Changed/clean argument retries return stale first-request names in 12 cases: eight when the receiver is the preceding build and four when the preceding HTTP receipt has no ownership marker. The preceding MCP writer's six retries through current readers report current feedback. The probe's zero exit checks replay identity and version, not complete feedback correctness; it is not a fully passing mixed-version feedback result.
Full mixed-version Verify/revoke and proposal approval still require #2224 to merge and the dependent implementation and durable gate to be completed. Public attestation and definition-approval guides remain in the post-release documentation draft. These limits remain open review work.
Hosted CI, the complete mixed-version matrix, full backend coverage, package matrix and browser end-to-end checks remain required. Local results do not establish hosted CI success or whole-PR approval.
AI assistance in the code
AI-generated (TRAE). The agent wrote the fix and regression tests and ran the checks listed above. Human review is pending.
Checklist
Note
Medium Risk
Changes content-hash semantics for verify, promotion, and proposal approval and expands rolling-upgrade gates; mistakes could allow wrong content to be attested or accepted across build pairs.
Overview
Memory reads now expose both
content_sha256(native JSON projection token for conditional writes across N/N−1) andcanonical_content_sha256(full stored value).memory.verify, definition promote/share, and proposalapproved_sha256must use the canonical hash so attestations and human review cannot be satisfied with a projection that hides null or empty-object changes.memory.historygains an optionalmemory_idfilter; the admin proposals flow loads identity viamemory.get_by_id(omit_high_value) then fetches the complete proposed revision and approval hash from scoped history. The memory inspector disables verify/share when the server omits the full hash.API models mark caller-owned JSON (
Payload) so HTTP/MCP shaping does not strip meaningful empty fields or diagnostic keys. History rows hash the parsed full value; move/update preconditions accept either the read token or the full write hash. SDKs, ops registry, and docs are regenerated/updated accordingly.CI runs mixed-version as a matrix (previous commit, event-views pin, legacy shared-copy pin), extends
mixed_version.pywith receipt replay, content-precondition, attestation, proposal-review, and shared-stub repair cases, and tightens dependency-review snapshot checks with Git tree proofs for generated Rust fixtures.Reviewed by Cursor Bugbot for commit 63bd8e7. Bugbot is set up for automated code reviews on this repo. Configure here.