Repository navigation
feat(finance): add an overnight agent for counterparty news the workflow sends to review - #30
Merged
Merged
Conversation
…low sends to review agent.py runs the news workflow, then gives Claude each article in the review queue to dig into: the borrowers' credit files and the workflow's own event check with the link fixed. A judge in code checks every quote, borrower and event, and allows only the outcomes each review reason permits; everything lands in the credit analyst's queue. recipe.py and its results are unchanged. Over 5 runs each, N-04 and N-07 came out as expected every time. A-01, written to land between the alert and filed scores, was filed by the workflow on every run, so it never reached the agent; the README reports it as a miss. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The post isn't published yet, so its links returned 404, and its claims will change in the blog update. The README now links the root README's test and states each point on its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The judge runs the fixed-link event check for every candidate on a suggested link's row; finding_checked only when the pick's check differs from every other candidate's and agrees with the agent. Identical checks (N-04) are call_not_checked; N-04's expected outcome changes for that reason. - Quotes are whole words, at least quote_min_words (4), from one field value or note, never field labels; a link's article quote contains the mention. - suggest_not_a_borrower needs an article quote and one from the candidate's file. - Scores on other outcomes must be null or match the workflow's own number. - A retry where every SIE call fails keeps the first pass; those articles go to the analyst as sie_failed. A refusal still stops the run. - read_credit_file, lookups and quote sources reach only the row's candidates and borrowers a lookup returned for a name or ticker the article prints. - review_notes.md escapes text through md_safe and fences the note; the judge rejects links and HTML in the note. - Tool input is validated against each tool's fields instead of catching TypeError. - Each borrower's judge check runs once per job; result.checks holds only the final submission's checks. - Claude errors: 408/409 and timeouts are transient, anything else stops the run with the error's message first; cost is priced on response.model. - README: retry path in the chart, figures of two or more digits, honest job count, new numbers from 5 live runs after the fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A response from a fallback model now shows up in cost.json as unpriced, not priced at figures nobody checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rparundekar
force-pushed
the
feat/agent-counterparty
branch
from
November 11, 2026 02:48
87b3974 to
abf77ee
Compare
Collaborator
Author
Self-reviewTwo review passes ran on this PR. One read the code: correctness, silent failures, tests and comments. The other covered security and checked the README against the code. Every finding below was fixed in 551eb47 and abf77ee. Each fix has a selfcheck case that fails if the fix is undone. Important (5, all fixed)
Suggestions (all fixed)
Reruns after the fixes (5 live runs)
|
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.
What this does
Adds
agent.pybeside the counterparty news workflow. This is the guide's overnight fallback: articles the workflow sends to review go to Claude. Claude reads the borrowers' credit files and reruns the workflow's own event check with the link fixed. A judge in code then checks every quote, borrower and event, and allows only the outcomes that each review reason permits. Everything goes to the credit analyst's queue, and nothing becomes an alert.Live results (5 runs each, using SIE Serverless, 10 Nov 2026)
10 of 15 jobs came out as expected.
recipe.pyis unchanged, and its outputs are identical before and after. Depends on the docs PR.🤖 Generated with Claude Code