Commit 48b0b0e
committed
backup: #904 v13 - claude v12 doc fix + two carry-over cleanups
## Claude v12 mandatory: writeAndPublish godoc missed v12 cleanup
The godoc described only the temp-file deferred cleanup but omitted
the new stale-<output>.fsm removal added in v12. A future reader
auditing the on-disk state after self-test mismatch would see only
the temp-file cleanup documented and need to grep for cfg.outputPath
to discover the second removal. Expanded the godoc to call out both.
## Claude v12 carry-over: canonicalizeInput swallowed os.Open error
The test helper used "f, _ := os.Open(tmpOut)" and passed nil to
DecodeSnapshot if the open failed, producing a panic or misleading
decode error instead of a clean t.Fatalf. Fixed: check the error
explicitly and defer the Close. CodeRabbit flagged this on v11/v12.
## Claude v12 carry-over: test name contradicted its assertion
TestCLISelfTestMismatchWritesSidecarWithMatchedFalse asserted
os.IsNotExist on the sidecar — the encode never ran on the
manifest-floor path it exercises. Name renamed to
TestCLIManifestFloorLeavesNoStaleSidecar to match the actual
assertion. The real "sidecar IS written with matched=false on
self-test mismatch" behavior is now pinned end-to-end by
TestCLIWriteAndPublishRemovesStaleFSMOnSelfTestMismatch (v12) which
drives a real self-test mismatch through the new corruption seam.
Docstring updated to explain the rename history.
## Caller audit per CLAUDE.md semantic-change rule
All v13 changes are doc/identifier/error-handling only. No public
or package-private function signature, error semantics, or return
contract changed. Renamed test has no callers (Go testing framework
discovers by prefix). canonicalizeInput's error handling is strictly
safer — any open failure now surfaces at the failure site.
Tests + lint green.1 parent 5a2f214 commit 48b0b0e
2 files changed
Lines changed: 28 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
318 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
279 | 283 | | |
280 | 284 | | |
281 | 285 | | |
282 | 286 | | |
283 | 287 | | |
284 | 288 | | |
285 | | - | |
286 | 289 | | |
287 | 290 | | |
288 | 291 | | |
| |||
457 | 460 | | |
458 | 461 | | |
459 | 462 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
465 | 469 | | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
472 | 477 | | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
479 | 484 | | |
480 | 485 | | |
481 | 486 | | |
| |||
0 commit comments