Repository navigation
Classify verify-raw diagnostics on whole phrases, after stripping colour codes - #336
Merged
Merged
Conversation
…ripping colour codes The review of #334 found two misclassifications among failing entries. Colour codes inside the missing-object phrase produced fetch_error, and unrelated text that merely mentioned NoSuchKey produced missing_remote. Neither could report verified. _is_missing_object_diagnostic now strips ANSI sequences and collapses whitespace, matches markers only as whole phrases (not inside a longer identifier), and counts a marker only on a line that holds nothing but markers or is an error line. Invariants, each with tests: - Colour codes at any position of the missing-object message still give missing_remote (exhaustive over every insertion point). - A marker inside a longer identifier, or on a line reporting no error, gives fetch_error. - The bare markers and Wrangler's real captured output keep giving missing_remote; no status other than the missing/fetch-error split changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r1 of #336: an error line that merely mentions NoSuchKey still gives missing_remote, so the fragment overstated the fix. Say so plainly, pin that case in the parametrised test, and label the captured Wrangler bytes as the hub's observation rather than a retained log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Merged by the NZ hub (session local_e407a527) at fc9532a with --merge. Gates: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #334, fixing the diagnostic nit from its review.
The problem
chronicle verify-rawdecides betweenmissing_remoteandfetch_errorby looking for marker text in Wrangler's stderr. The review of #334 found two misclassifications. Both only affect entries that already fail, so neither could ever reportverified:fetch_error.NoSuchKeymade itmissing_remote.The fix
_is_missing_object_diagnosticinchronicle/artifacts.pynow:NoSuchKeyHandlerisn'tNoSuchKey;NoSuchKey: specified key does not exist) or is an error line (it containserror,failedor Wrangler's ✘).Known limit, pinned in a test: an error line that merely mentions a marker, such as
error: could not reach bucket; NoSuchKey handling disabled, still givesmissing_remote. Both statuses are failures, so this misnames a failure but can never pass an object.Nothing else in
verify-rawchanges.Invariants and how they're checked
missing_remote. One test inserts a colour sequence at every position of[ERROR] The specified key does not exist.fetch_error. Five cases cover this. An error line that mentions a marker is the known limit above.Code: messageline and Wrangler's real captured stderr all still givemissing_remote.Tests
tests/test_chronicle_verify_raw.py: 37 passed (25 existing, 12 new).tests/test_chronicle_artifacts.py: 36 passed.missing_remote, and the published IRD wage and salary workbook reportsverified.Repository tooling only: no source package, fact or bundle pin changes.
Review
An independent GPT-6.1 Sol review at
a1ba3a3dreturned APPROVE_WITH_NITS, with no blocking defect:Its nits, answered in
fc9532ad:It also noted, without asking for changes: constructed JSON or multi-line messages give
fetch_error, and OSC or 8-bit CSI sequences aren't stripped. None of these can produceverified; widening the matching waits for a real captured case.It marked "Needs Max: yes" because a changelog fragment is public. The hub doesn't hold on that: a developer-tool changelog line is not a public claim in the sense of Max's merge rule.
🤖 Generated with Claude Code