Skip to content

Clean up - #8

Merged
JesseLiberty merged 1 commit into
mainfrom
CRFixes
Aug 14, 2026
Merged

Clean up#8
JesseLiberty merged 1 commit into
mainfrom
CRFixes

Conversation

@JesseLiberty

Copy link
Copy Markdown
Owner

Clean up various minor issues

Copilot AI lite review requested due to automatic review settings August 14, 2026 18:12
@JesseLiberty
JesseLiberty merged commit 4de16a6 into main Aug 14, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs small cleanup/robustness tweaks across the blog-writing workflow, focused on token-budget enforcement and reviewer error handling, plus minor comment edits in the entrypoint.

Changes:

  • Add validation for the configured total token cap in TokenCapChatClient.
  • Refactor reviewer error handling into a helper and avoid default-approving on empty agent output.
  • Update/trim configuration and middleware comments in Program.cs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
TokenCapChatClient.cs Adds runtime validation around the global token budget enforcement.
ReviewerAgent.cs Adjusts revision-cap behavior and consolidates error handling for review failures/empty output.
Program.cs Updates comments describing configuration sources and middleware behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ReviewerAgent.cs
Comment on lines 57 to 60
if (revisionNum >= ResearchState.MaxRevisions)
{
return "Uh oh - Maximum revisions reached.";
return "APPROVED - Maximum revisions reached.";
}
Comment thread TokenCapChatClient.cs
Comment on lines +56 to +59
if (maxTotalTokens <= 0)
{
throw new InvalidOperationException("Token cap must be a positive number.");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants