Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

adversarial-review.md

79 lines5.7 KB

1# Adversarial review
2​
3**Use when:** a model, oracle, or proposed law needs a concrete challenge.
4​
5**Inputs:** one artifact or candidate, its sources, claimed domain, and success
6criterion. Prefer a fresh reviewer that has not seen the author's desired
7verdict. Without that separation, report a self-critique rather than independent
8validation. Delegation remains subject to the task's authorization and tools.
9​
10## Operation
11​
12Start with a plausible way this account could be wrong. Select the relevant
13levels; they are different questions, not a mandatory sequence:
14​
15| Level | Attack |
16| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
17| Enforcement | Find a legal history or wrong output that the model, generator, driver, or recorder cannot distinguish. Can the intended production path remain unexercised while the test passes? |
18| Formulation | Find an omitted precondition, excessive guarantee, wrong checkpoint, or ambiguous observation. Try a correct alternative implementation as well as a wrong one. |
19| Suitability | Question whether the promised behavior is desirable, safe, or conventional. Name the external contract, standard, user consequence, or engineering reason that makes the objection applicable. |
20| Composition | Find obligations that conflict, duplicate each other, or require a shared ordering or authority rule. Use the tension or restructuring card if that is the material uncertainty. |
21| Concepts | Question the chosen identity, state, ownership, or boundary distinctions. Describe the same case without relying on its current names and check what is lost or becomes visible. |
22​
23For a suspected information gap, use [law discovery](law-discovery.md#operation),
24step 5.
25​
26### Locate the repair
27​
28The attack level names what to challenge. Once evidence shows a problem, use
29this table to locate the repair:
30​
31| Finding or question | Possible repair location |
32| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
33| Production disagrees with an accepted law. | Production code. |
34| The reference predicts behavior the accepted law does not allow. | Reference model. |
35| An accepted law over-promises, under-promises, or conflicts with another law. | Authorized contract decision, then model and test updates. |
36| The law needs information the production path lacks at the promised checkpoint. | Provider, protocol, architecture, or an authorized contract decision. |
37| The check rejects an allowed intermediate observation or accepts a wrong one. | Evaluation: checkpoint, history grammar, driver, recorder, or comparison. |
38| Correct behavior still fails the user's need. | Requirement and its suitability for the intended use. |
39​
40These locations can overlap. Name the evidence for each before choosing a
41repair; an assertion change cannot resolve a code defect or supply missing
42information.
43​
44An accepted contract remains an obligation even if the current path lacks the
45information needed to meet it. A repair might require additional provider
46data. Moving the promised checkpoint or narrowing the guarantee needs an
47authorized contract decision; changing an assertion supplies no data.
48​
49For each material attack, name the broken claim and construct a small legal
50history or concrete failure scene. State the competing expected observations,
51the evidence that could decide between them, and a possible repair condition.
52Check that the attack is within scope and that its standard actually applies.
53An outside-domain case may motivate a scope change; label that proposal.
54​
55When execution is authorized and practical, run the discriminating experiment.
56A hostile control must reach the intended comparison to demonstrate rejection.
57Use the oracle guide's calibration and mutant-outcome rules. A source-level
58argument can remain useful when execution is unavailable; label it accurately.
59For a systematic search across plausible wrong implementations, use the
60[mutant gap hunt](mutant-gap-hunt.md) to design semantic edits and classify
61survivors.
62​
63**Return:** supported defects, design objections, and untested hypotheses as
64separate kinds of finding, with sources, witnesses, outcomes, and repair
65conditions. For bugs, identify the test gap that permitted the class of failure.
66​
67**Control:** explain what would defeat the criticism. Check whether the attack
68would also reject a valid implementation or depend on a condition the contract
69excludes. Do not presume a defect merely because the stance is adversarial.
70​
71**Distortion:** generic pessimism, irrelevant external standards, author capture,
72or treating a preferred design as evidence of a current correctness bug.
73​
74**Stop when:** the material attacks have evidence or an explicit unresolved
75experiment. No supported finding is a valid result. Challenging a law does not
76silently replace it.
77​
78Adapted from Field Lab's hostile failure assay; DB's version also permits
79explicit criticism of the candidate's standard and conceptual organization.