Repository navigation
Commit c805f3e
feat(identity): hard-filter transition for missing target_application
Ships the v0.7.0 → v0.8.0 → v0.9.0 deprecation-cycle transition for
plugin application identity. Plugins that have not declared
target_application are now filtered with FilterReason.missing_target_application
at activation when the host has declared app_id, instead of producing a
warn-and-activate (the v0.7.0 deprecation behavior).
Changes:
- FilterReason gains "missing_target_application" value (state.py).
- _check_identity (manager.py) now returns severity="error" for the
host-has-app_id + plugin-missing-target row (matrix row 3 of the
v0.7.0 design doc). The v0.7.0 deprecation warning text mentioning
"v0.8.0 or later" is replaced with a direct error message naming the
host's app_id and telling the author what to declare.
- _check_identity no longer emits a warning for the both-undeclared row
(matrix row 5). Silent activate; the v0.7.0 deprecation-cycle warning
is retired now that the transition has shipped.
- _activate_with_states discriminates between mismatch and missing-target
errors by inspecting plugin.target_application, setting the correct
filter_reason ("wrong_application" or "missing_target_application").
Permissive semantics preserved: hosts that have not declared app_id see
no behavior change. The v0.6.0 min_app_version / app_version pattern
parallel still holds.
Test updates (per the "update don't delete" stop gate):
- TestBothUndeclared::test_both_undeclared_emits_warning: assertions
flipped from warning emission to silent activate (no identity_errors).
- TestPluginUndeclaredHostDeclared::test_emits_warning_and_activates:
assertions flipped from warn-and-activate to hard filter with
missing_target_application.
- TestPluginUndeclaredHostDeclared::test_warning_message_mentions_v0_8:
assertions flipped; error message references host app_id, no v0.8.0
mention anywhere in result.errors.
- TestPerCallDedup::test_two_plugins_emit_two_warnings_one_each: flipped
to error-severity assertions; both plugins filtered with
missing_target_application.
- TestPerCallDedup::test_two_manager_instances_emit_warnings_independently:
flipped to error-severity per-instance assertions.
- TestRegisterPluginWarningLogged::test_undeclared_plugin_logs_warning:
flipped to hard-filter assertion via register_plugin (plugin not
activated, get_load_errors() carries the entry).
- TestNewTypesExposed: added test_filter_reason_includes_missing_target_application.
Test function names preserved as historical markers per the stop-gate
discipline; semantic flips documented in inline comments on each.
Refs P1.1 (v0.9.0 scope), v0.7.0 design doc Decision 4 (hard-filter
transition).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent c173f5e commit c805f3e
3 files changed
Lines changed: 97 additions & 53 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
475 | 476 | | |
476 | 477 | | |
477 | | - | |
478 | | - | |
479 | | - | |
| 478 | + | |
| 479 | + | |
480 | 480 | | |
481 | | - | |
482 | 481 | | |
483 | 482 | | |
484 | 483 | | |
485 | 484 | | |
486 | 485 | | |
487 | | - | |
| 486 | + | |
488 | 487 | | |
489 | 488 | | |
490 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
491 | 494 | | |
492 | 495 | | |
493 | 496 | | |
| |||
579 | 582 | | |
580 | 583 | | |
581 | 584 | | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
582 | 593 | | |
583 | 594 | | |
584 | | - | |
| 595 | + | |
585 | 596 | | |
586 | 597 | | |
587 | 598 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
174 | 177 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 178 | + | |
| 179 | + | |
182 | 180 | | |
183 | 181 | | |
184 | | - | |
| 182 | + | |
185 | 183 | | |
186 | 184 | | |
187 | 185 | | |
188 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
193 | | - | |
194 | | - | |
195 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
196 | 198 | | |
197 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
198 | 206 | | |
199 | 207 | | |
200 | 208 | | |
201 | | - | |
202 | | - | |
| 209 | + | |
203 | 210 | | |
204 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
205 | 215 | | |
206 | 216 | | |
207 | 217 | | |
208 | 218 | | |
209 | | - | |
210 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
211 | 226 | | |
212 | 227 | | |
213 | 228 | | |
| |||
233 | 248 | | |
234 | 249 | | |
235 | 250 | | |
236 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
237 | 256 | | |
238 | 257 | | |
239 | 258 | | |
| |||
242 | 261 | | |
243 | 262 | | |
244 | 263 | | |
245 | | - | |
246 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
247 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
248 | 272 | | |
249 | 273 | | |
250 | 274 | | |
251 | 275 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
257 | 280 | | |
258 | 281 | | |
259 | 282 | | |
| |||
263 | 286 | | |
264 | 287 | | |
265 | 288 | | |
266 | | - | |
267 | | - | |
| 289 | + | |
| 290 | + | |
268 | 291 | | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
273 | 296 | | |
274 | 297 | | |
275 | 298 | | |
276 | 299 | | |
277 | 300 | | |
278 | 301 | | |
279 | 302 | | |
280 | | - | |
| 303 | + | |
281 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
282 | 309 | | |
283 | 310 | | |
284 | 311 | | |
285 | | - | |
286 | | - | |
| 312 | + | |
287 | 313 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
296 | 321 | | |
297 | 322 | | |
298 | 323 | | |
| |||
398 | 423 | | |
399 | 424 | | |
400 | 425 | | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
401 | 433 | | |
402 | 434 | | |
403 | 435 | | |
| |||
0 commit comments