Repository navigation
Commit 931a0ab
fix(tests): stale shop_for_data assertion; chore(release): bump version to 6.1.12 (#351)
* ISSUE-93: declassify_metadata_element raises when its Optional body is omitted
`MetadataExpert.declassify_metadata_element(guid, classification_name, body=None)`
declares `body` as Optional but calls `.model_dump()` on it unconditionally, so
omitting it raises `AttributeError: 'NoneType' object has no attribute
'model_dump'` and the classification is left in place.
Worse than an ordinary signature bug because the failure is silent at the
caller. A caller that wraps the call defensively — reasonable, since removing a
classification that is already absent should not be fatal — swallows the
AttributeError and believes the removal happened. Measured live: kinds before
['Task'], declassify raises, kinds after ['Task'].
In our case the element then carried TWO kind classifications at once
(['Task', 'PersonalProject']) and a check that only asked "is the new
classification present?" reported success. The wrong-but-plausible state was
invisible until the element was read back for BOTH names.
Workaround verified: passing `{"class": "MetadataSourceRequestBody"}` explicitly
makes it work (kinds after: []). Candidate fix is to default the body when None,
matching the declaration.
`classify_metadata_element` and `reclassify_metadata_element` sit beside it with
the same Optional body declaration and are worth checking — we pass a body to
both so we have not hit them.
Logged, not fixed, per the standing rule for this repo.
Found in trellis/packages/resource-explorer's investigation reclassifier, which
now passes the body and additionally asserts the OLD classification is gone
rather than only that the new one arrived.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
* fix(tests): update stale shop_for_data catalog-search assertion; chore(release): bump version to 6.1.12
test_handle_shop_for_data_option_success asserted the Digital-Product-Catalog-MyE
search call's params as {"search_string": "*"} only. PR #346 added a
metadata_element_subtypes: ["DigitalProduct", "DigitalProductFamily"] filter to
that call; the test was never updated to match, so it failed deterministically
(not flaky) on every run since -- this is what blocked the v6.1.11 release
workflow's PyPI publish step (build never ran; see release run 34252940497).
Also bumps to 6.1.12: PyPI already had a 6.1.11 published at 2026-09-08T02:15
UTC, ~14.5h before this repo's v6.1.11 tag/PR merged, with different (older)
content -- a pre-existing version collision unrelated to this fix. 6.1.12 is
the first clean, unused version number.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KYNxABE3SRUT5cXbpmrfU2
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
---------
Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 48d7319 commit 931a0ab
3 files changed
Lines changed: 65 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
202 | 259 | | |
203 | 260 | | |
204 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
106 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
| |||
0 commit comments