Skip to content

Conversation

@mkmccarty
Copy link
Owner

No description provided.

📝 docs(contract_report): Update comment for forceRefresh clarification
🔧 fix: remove trailing whitespace in contract report comments
🔧 fix: remove trailing whitespace in contract report comments
Copilot AI review requested due to automatic review settings February 7, 2026 01:03
Copy link
Contributor

Copilot AI left a comment

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 removes the /contract-report refresh slash-command option and changes contract report generation to always force-refresh contract evaluations when fetching archives, updating related user messaging and inline documentation accordingly.

Changes:

  • Removed the refresh boolean option from the /contract-report command definition.
  • Updated error messaging and function documentation to no longer reference refresh=true.
  • Set forceRefresh to always be true in ContractReport.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

return "No contract found in this channel. Please provide a contract-id."
case errors.Is(err, ErrEvaluationNotFound):
return "Evaluation not found, if you just completed the contract please wait a few minutes and try again with refresh=true."
return "Evaluation not found, if you just completed the contract please wait a few minutes and try again."
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

This user-facing string is a run-on sentence and reads awkwardly. Consider splitting it into two sentences (e.g., end after "not found") to improve clarity.

Suggested change
return "Evaluation not found, if you just completed the contract please wait a few minutes and try again."
return "Evaluation not found. If you just completed the contract, please wait a few minutes and try again."

Copilot uses AI. Check for mistakes.
Comment on lines 344 to 348
// Always want forceRefresh true to ensure we have the latest contract evaluations,
// especially for the caller. Caching is handled at the individual API fetch level
// in processContributors.
forceRefresh := true

Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

The new comment and forceRefresh := true line include trailing whitespace; CI enforces gofmt (diff must be empty), so this will fail formatting checks. Run gofmt on this file or remove trailing spaces.

Copilot uses AI. Check for mistakes.
Comment on lines 344 to 348
// Always want forceRefresh true to ensure we have the latest contract evaluations,
// especially for the caller. Caching is handled at the individual API fetch level
// in processContributors.
forceRefresh := true

Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

Setting forceRefresh := true unconditionally disables the 1-hour on-disk cache in ei.GetContractArchiveFromAPI, so every /contract-report run will re-fetch archives for the caller and each contributor. This will deterministically increase external API traffic and latency (and may hit rate limits) compared to the previous default-cached behavior. If the intent is only to refresh the caller’s view, consider using forceRefresh=true for the caller fetch but forceRefresh=false when calling processContributors, or make refresh conditional (e.g., only when the evaluation is missing).

Copilot uses AI. Check for mistakes.
@mkmccarty mkmccarty merged commit 2864d8f into main Feb 7, 2026
12 checks passed
@mkmccarty mkmccarty deleted the mm-branch-1 branch February 7, 2026 01:10
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.

1 participant