test(blackbox): activate discovery and model its ingestion deterministically - #659
Open
JeroenSoeters wants to merge 1 commit into
Open
test(blackbox): activate discovery and model its ingestion deterministically#659JeroenSoeters wants to merge 1 commit into
JeroenSoeters wants to merge 1 commit into
Conversation
…tically The suite's formas never marked the target Discoverable, so every forced discovery ended at "no discoverable targets" and ingested nothing: the unmanaged-inventory expectations, the discovery model transition, and the unmanaged drift absorption were all dead surface. Worse, the old trigger applied the ingestion transition whenever any sync command happened to be observed in its window, arming expectations for rows that were never ingested. The target is now discoverable and the trigger is deterministic. Discovery ingests every cloud entry inventory does not know, which includes orphans a failed or canceled command left behind, and an ingested orphan is not derivable from generated inputs; so the trigger only performs discovery when no commands are in flight, after sweeping every cloud entry that is neither in inventory nor a tracked out-of-band resource. What remains for discovery to find is then exactly the model's tracked set: the trigger records the predicted ingestion and waits for the unmanaged inventory to converge on it, retrying the trigger since discovery pauses while a user changeset runs. Iteration hygiene grows the matching teeth: the reset now sweeps cloud entries a previous iteration left behind on every exit path, and purges ingested unmanaged rows by deleting their cloud entries and letting a forced sync absorb the deletions, since the managed-only destroy cannot remove them. The mid-iteration orphan sweep spares tracked out-of-band resources so it cannot delete something a later discovery is expected to find.
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.
Why
The suite's formas never marked the target
Discoverable, soForceDiscoveralways ended at "No discoverable targets found" and ingested nothing. The whole unmanaged-inventory surface —ApplyDiscoveryToUnmanaged, the expectation side ofCheckUnmanagedModelVsInventory, the unmanaged drift absorption added in #656 — was structurally dead. Worse, the old trigger applied the ingestion transition whenever any sync command happened to be observed in its 10-second window, arming expectations for rows that were never ingested (a latent flake source).What
OpTriggerDiscoveryperforms real, modeled ingestion. Discovered probe runs exercise 5-6 genuine ingestions per 25 chaos iterations.ApplyDiscoveryToUnmanaged) and waits for the unmanaged inventory to converge, retrying the trigger since discovery pauses during user changesets. This mirrors the drift-op design from test(blackbox): compute drift end states deterministically instead of tolerating a sync window #656: out-of-band effects absorb synchronously under quiescence, and the model computes the end state.$unmanagedrows. The mid-iteration orphan sweep now spares tracked out-of-band resources so it cannot delete something a later discovery is expected to find.Each of the three probe failures en route pinpointed one of these: unswept cross-iteration cloud leftovers being ingested, surviving
$unmanagedrows orphaned by the new sweep, and an orphaned cross-stack create being ingested as a duplicate-NativeID unmanaged row.Verification
TestProperty_FullChaosgreen twice at 25 checks with 5 and 6 real ingestions respectively; the four other property suites green at 8 checks; full model unit tests green.go vetclean underpropertyandintegrationtags.Fixes the gap tracked in PLA-714 (internal).