Commit fcf2139
committed
v1.7.2: fix 2 bugs surfaced by v1.7.1 live test
Live testing on @longevityboris's Article (id 2056280764447113305) caught
two real bugs in v1.7.1.
1. **`settings.disable_fxtwitter` opt-out was silently rejected.** The
config struct had the field but the `config set` allowlist
(`SETTABLE_KEYS`) and the `config get` matcher both missed it, so
`xmaster config set settings.disable_fxtwitter true` returned a
config_error and the flag was never written. Users who wanted strict
v2-only behavior couldn't opt out. Fixed by adding the key to both
surfaces.
2. **Bad tweet IDs to `xmaster analyze` silently analyzed the digit
string as text** instead of erroring. When `parse_tweet_reference`
matched a 19-digit string but the X API returned 400/404, the fallback
`Err(_) => text.to_string()` swallowed the error and scored "9999..."
as 19 chars of text. Now errors are propagated with the upstream API
error message — users get a clear "tweet not found / bad ID" instead
of a confusing fake-score.
Verified:
- `config set settings.disable_fxtwitter true` writes successfully; the
next `xmaster read <article_id>` returns NO `article` field.
- `config set settings.disable_fxtwitter false` re-enables and `article`
reappears.
- `xmaster analyze 9999999999999999999` errors cleanly with the X API's
HTTP 400 message; `xmaster analyze 2056280764447113305` still scores
the full Article body (45 / D, 6387 chars).
99 unit + 29 integration tests pass; clippy clean.1 parent 049030e commit fcf2139
4 files changed
Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
185 | 187 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 188 | + | |
190 | 189 | | |
191 | 190 | | |
192 | 191 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
237 | 238 | | |
238 | 239 | | |
239 | 240 | | |
| |||
387 | 388 | | |
388 | 389 | | |
389 | 390 | | |
| 391 | + | |
390 | 392 | | |
391 | 393 | | |
392 | 394 | | |
| |||
0 commit comments