Repository navigation
fix(audit): record outcome-unknown purchases with a distinct audit status - #54
Merged
Merged
Conversation
…meUnknown Refs #49 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…atus A purchase failing with common.ErrOutcomeUnknown (a lost EC2 or Redshift response) is audited as unknown instead of error, on both the returned-error and result.Error paths, matched with errors.Is. The stderr line reads OUTCOME UNKNOWN. README and CHANGELOG document the new status. Closes #49 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Member
Author
|
Gate verdict (independent adversarial review, Opus 5.5, money-path audit semantics): APPROVE at 4e23422. Local evidence (fresh clone at the exact head, GOTOOLCHAIN=go1.26.9, macOS):
|
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.
Summary
common.ErrOutcomeUnknown(a lost EC2 or Redshift response: the commitment may exist) is now audited asunknowninstead oferror, on both the returned-error path and theresult.Errorpath. Matched witherrors.Is, never by message text.mcp purchase OUTCOME UNKNOWNinstead ofFAILED.statusmust handle it.The tool response is unchanged: it still carries the library's error text, which says to reconcile before retrying. No new response field.
Verification (mocks only)
go test -shorton./tools,./cmd/...,.pass; golangci-lint 0 issues. New testTestExecutePurchaseAuditStatusForOutcomeUnknownreads the audit JSONL back: deep-wrapped sentinel returned as the error givesunknown, sentinel inresult.Errorgivesunknown, a plain error giveserror, the sentinel's text without the sentinel giveserror, success givessuccess. Mutations each fail the test: matching on message text, dropping the result path, hard-codingerroron the error path.Closes #49
🤖 Generated with Claude Code
Summary by CodeRabbit
unknownin JSONL, and the diagnostic displaysOUTCOME UNKNOWN.