Repository navigation
[pulse] pin the container unlink paths that need no model - #2355
Open
VladimirMakaev wants to merge 1 commit into
Open
VladimirMakaev wants to merge 1 commit into
VladimirMakaev wants to merge 1 commit into
Conversation
`pop_front` and `pop_back` needed a model because unlinking a node writes the node's successor through the node's own back link, which cannot be related to the sentinel. The other paths that unlink do not have that problem, and the point of these tests is that they must not grow it. `remove` and `unique` unlink by splicing, so no successor is written through a node's own back link. The matched nodes are spliced into a local list and destroyed when it goes out of scope, so what these cases rest on is the absence of that write, not the survival of the elements. A forward list is singly linked, so removing its head writes the sentinel's own field instead of going through a back pointer, and the shape cannot arise at all. Each case holds a reference across the call, or calls twice, so a model that invalidated the elements rather than the one element that goes would make them report. Checked by modelling `remove` as a pop: `list_ref_across_remove_ok` reports, and goes quiet again when that is undone. `unique` and `resize` are unconditionally safe: `unique` keeps the first of each run and `resize(4)` only erases from the tail, so the front always survives. The rest are silent for a plainer reason than a precondition that never fires: nothing models `remove`, `remove_if` or `forward_list`, so no finding arises on those paths at all, latent or manifest. The suite runs with `--pulse-report-issues-for-tests`, whose latent channel is live and already carries latent expectations, and these cases are silent under it. The forward-list cases are forward-looking pins: nothing models `forward_list` today, so they cannot be falsified until something does. ## Test plan Ran the four C++ Pulse suites that compile this file, on this commit applied to current main: `direct_cpp_pulse_test`, `direct_cpp_pulse-11_test`, `direct_cpp_pulse-17_test` and `direct_cpp_pulse-20_test`. All four pass and no expectation file changed, which is the property these cases exist to pin: they are silent today and must stay silent.
VladimirMakaev
marked this pull request as ready for review
December 2, 2026 15:41
This branch has not been deployed
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.
pop_frontandpop_backneeded a model because unlinking a node writes the node's successorthrough the node's own back link, which cannot be related to the sentinel. The other paths that
unlink do not have that problem, and the point of these tests is that they must not grow it.
removeanduniqueunlink by splicing, so no successor is written through a node's own backlink. The matched nodes are spliced into a local list and destroyed when it goes out of scope, so
what these cases rest on is the absence of that write, not the survival of the elements. A forward
list is singly linked, so removing its head writes the sentinel's own field instead of going
through a back pointer, and the shape cannot arise at all.
Each case holds a reference across the call, or calls twice, so a model that invalidated the
elements rather than the one element that goes would make them report. Checked by modelling
removeas a pop:list_ref_across_remove_okreports, and goes quiet again when that is undone.uniqueandresizeare unconditionally safe:uniquekeeps the first of each run andresize(4)only erases from the tail, so the front always survives. The rest are silent for aplainer reason than a precondition that never fires: nothing models
remove,remove_iforforward_list, so no finding arises on those paths at all, latent or manifest. The suite runswith
--pulse-report-issues-for-tests, whose latent channel is live and already carries latentexpectations, and these cases are silent under it. The forward-list cases are forward-looking
pins: nothing models
forward_listtoday, so they cannot be falsified until something does.Test plan
Ran the four C++ Pulse suites that compile this file, on this commit applied to current main:
direct_cpp_pulse_test,direct_cpp_pulse-11_test,direct_cpp_pulse-17_testanddirect_cpp_pulse-20_test. All four pass and no expectation file changed, which is theproperty these cases exist to pin: they are silent today and must stay silent.