Repository navigation
Commit effee6d
committed
test(runtime): pin that an unknown metadata.taskless key is tolerated
The generator asked whether a capture survives discovery with an
unrecognised key under `metadata.taskless`, before depending on it. The
answer is yes, and the honest form of that answer is that it works by
ACCIDENT: `assessCaptureRule` checks the fields it needs and never
rejects the ones it does not know, and ast-grep treats `metadata` as
opaque. Neither is a decision anyone wrote down, so neither was a
promise.
Verified end to end before claiming it — a capture carrying
`metadata.taskless.note` passes `verify` AND still fires under `check`,
which is the assertion that matters. A dropped capture verifies clean
and finds nothing, and finding nothing is what a passing run looks like.
This test holds the tolerance in place. The generator writes a
demonstration disclaimer into the rule rather than only into the HTTP
response, because a note in an envelope is gone the moment the rule
reaches disk — which is exactly when a reader with no memory of asking
for a demo needs to know what it is.
Confirmed it bites by making the assessor reject unknown keys, the way a
schema-based rewrite plausibly would: it fails, and passes again when
restored.1 parent e6c438a commit effee6d
1 file changed
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
62 | 130 | | |
63 | 131 | | |
64 | 132 | | |
| |||
0 commit comments