metaFromEvents is gone: nothing rebuilt an agent meta from a whole log (#1039) - #1696
Merged
Conversation
#1039) The export had no production caller — the meta is stored beside the log and refined per appended event — and it anchored updatedAt to startedAt on replay, so any future caller would have inherited a wrong last-touched time. The tests that used it as a fixture now fold their base through a real store, the way a live run does.
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.
🤖 automated — #1039, on Suleiman's "delete it rather than re-open".
What
store/agent-store.ts:metaFromEventsdeleted;store/index.tsno longer re-exports it.agent-store.test.tsused it as the fixture behind 15 fold tests (base = metaFromEvents(RUN.slice(0, 3), AT)) and had one test of the function itself;cloud-session-link.test.tsused it to fold the driver's events. Both now fold through a realAgentStore(open→appendeach event →snapshot()), which is the live path the store actually runs. The function's own test is gone with it.agent-store.SPEC.md,agent-store.test.SPEC.md: the claim that a meta rebuilt by replaying a whole log equals the live one is removed — nothing does that any more.Why
#1039: the function had no production caller, and it folded every event with
startedAt, so a rebuilt meta'supdatedAtequalledstartedAt. Rather than fix an export nobody consumes, it goes.Verified
build,typecheck,test: node 1581/0, dashboard 834/834.appendskipped) fails that test on "the meta must carry the deep link"; restored, 1/1. Emptying the 15 fold tests' base does not fail them — they refine from the base and assert on the refinement only, exactly as on main; the three seed events are context, not a contract.SPEC changes
packages/framework/src/store/agent-store.SPEC.mdIntro + TL;DR unchanged. One paragraph under "Folding events into the agent meta":
The old sentence described
metaFromEvents's replay path as a property of the store. With no replay, the true statement is the remaining one: the meta is the running fold, stored beside the log, refined per appended event.packages/framework/src/store/agent-store.test.SPEC.mdThe bullet described the deleted test.