fix: preserve timely-transient metadata during full replay#918
Merged
Conversation
huangzesen
added a commit
that referenced
this pull request
Jul 14, 2026
Rescope atomic email snapshot projection to the post-#918 direct-converter ownership path.
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
Preserve every recorded holder of LingTai's timely-transient metadata families during full-history model replay:
agent_meta+guidancenotifications+notification_guidanceOnly the latest holder per family is current/authoritative. Older holders remain model-visible historical traces and must not be treated as new instructions; producer channels remain the source of truth for actionable content.
This keeps full replay from rewriting earlier serialized prefixes merely to remove small stale metadata copies. Summarize remains the only rebuild mechanism that replaces a historical tool-result body.
What changed
ToolResultBlock.contentdirectlyNo compatibility flag or shim is added; the old intermediate helper surface is removed.
LICC Notification Contract assessment
src/lingtai/services/LICC_NOTIFICATION_CONTRACT.mdv2 was reviewed because this change touches notification ownership paths.No contract version or text change is needed. This PR does not change:
It changes only the model-facing replay projection of already-recorded holders. The existing contract already says that a lingering context block is not proof of an unhandled event, which is consistent with the strengthened latest-only guidance.
Validation
Candidate commit:
5d5307053bcb83fe5d650149674aaa4af3a5adf9git diff --checkclean14dfb5aa320c4c918377f09a037aac53d6cbbac8802b79197d1ac11d4ab3b614base_agentcomment repairsREADY, with 0 blocker / 0 high / 0 medium findingsI intentionally did not run local pytest: this work was performed under a no-delete/no-cleanup boundary, and pytest's basetemp retention can delete earlier retained evidence directories. The changed tests are included for the repository CI matrix.
Open-PR overlap and merge order
Mechanical changed-file intersection and
git merge-tree --write-treechecks found clean combined trees with currently open PRs #917, #908, #887, and #877.PR #914 (
fix(notifications): prevent stale email snapshots in replay) overlaps this replay surface and is alreadyDIRTY/CONFLICTINGagainst currentmainbefore this branch is considered. Its atomic email snapshot projection remains conceptually valid, but its current implementation is based on the old filtering-helper architecture.Safe queue order:
main;This PR does not claim that the current #914 head is merge-safe.
Scope
No runtime installation or refresh, configuration/auth change, deletion/cleanup, release/tag, issue closure, or merge is performed here. This PR contains no closing references.