test(blackbox): revert optimistic properties for slots a failed command never touched - #672
Merged
Merged
Conversation
…nd never touched A failed or canceled command's unmentioned slot was never touched by the agent, but the unmentioned-slot revert only fired when the slot's State differed from its snapshot. An optimistic property prediction — a patch merge applied to the model at submission — therefore survived when the command failed on a sibling before reaching the slot: the model expected merged properties the agent never wrote, while State stayed Exists on both sides. Revert properties along with state whenever either differs from the snapshot. Reverse-order processing keeps stacked reverts convergent: the oldest unmentioned snapshot is the last agent-confirmed state, and slots corrected or superseded by newer events are skipped as before.
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
Fixes the
TestProperty_ConcurrentMultiStackfailure observed on #659's CI rebase run:OrderedItemsmismatch (inventory["third","fourth"], model["third"]) on a slot whose patch command failed elsewhere.The unmentioned-slot revert in
correctModelFromCommandOutcomeonly fired when a slot's State differed from its snapshot. But an optimistic property prediction (the patch merge applied to the model at submission) survives that gate: when the command fails on a sibling before reaching the slot, the agent never touches it, State stays Exists on both sides, and the model keeps expecting merged properties the agent never wrote.Revert properties along with state whenever either differs from the snapshot. Reverse-order processing keeps stacked reverts convergent (the oldest unmentioned snapshot is the last agent-confirmed state), and slots corrected or superseded by newer events are skipped as before.
Regression test reproduces the exact shape and fails without the fix. This is the third pre-existing seed-dependent prediction gap surfaced by the strict suite this week (#658's assertions, then #670); like those, it is unrelated to #659's content but blocks its CI.