Skip to content

Dev#2066

Merged
pikonha merged 4 commits into
mainfrom
dev
Jul 17, 2026
Merged

Dev#2066
pikonha merged 4 commits into
mainfrom
dev

Conversation

@pikonha

@pikonha pikonha commented Jul 17, 2026

Copy link
Copy Markdown
Member

Note

Medium Risk
Proposal status may be slightly stale when RPC fails (indexed fallback), which affects governance UX but avoids outages; timelock caching behavior changed from per-client to shared base logic.

Overview
Reduces RPC pressure and hard failures when serving live proposal status across many DAO governor clients.

GovernorBase now owns timelock delay caching: DAOs implement fetchTimelockDelay() (uncached reads) while getTimelockDelay() caches the result and dedupes concurrent in-flight fetches—important when getProposalStatus runs per proposal on list endpoints. getProposalStatus catches RPC errors (e.g. rate limits) on timelock/grace and quorum reads and returns the indexed DB status with a warn log instead of failing the whole request with 500.

The global error handler includes viem’s shortMessage in unhandled-error log lines. eRPC api-limit budgets in dev/prod gain waitTime: 5s so throttled clients wait briefly instead of failing immediately. API 1.5.5 with a unit test for concurrent timelock dedupe.

Reviewed by Cursor Bugbot for commit 1575b90. Configure here.

pikonha and others added 4 commits July 17, 2026 11:55
- GovernorBase caches the timelock delay and shares one in-flight fetch
  across concurrent callers, replacing per-client cache boilerplate
- getProposalStatus falls back to the indexed status on RPC failures
  (e.g. eRPC 429s) instead of failing the request with a 500
- errorHandler logs the error cause (viem shortMessage) instead of a
  bare "unhandled error"
- eRPC api-limit budget gets waitTime: 5s so per-IP bursts queue
  instead of being rejected with 429/-32005

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fix(api): dedupe timelock delay reads and survive RPC rate limits
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
anticapture-storybook Ready Ready Preview, Comment Jul 17, 2026 3:03pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
anticapture (dev) Ignored Ignored Jul 17, 2026 3:03pm

Request Review

@github-actions github-actions Bot added the API label Jul 17, 2026
@railway-app
railway-app Bot temporarily deployed to anticapture-infra / anticapture-pr-2066 July 17, 2026 15:04 Destroyed
@pikonha
pikonha merged commit 727e35d into main Jul 17, 2026
14 of 59 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1575b90764

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +81 to +86
protected async fetchTimelockDelay(): Promise<bigint> {
return (await this.readContract({
abi: this.abi,
address: this.address,
functionName: "EXECUTION_DELAY",
})) as bigint;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Apply the RPC fallback to TORN's status override

For a TORN proposal whose voting period has ended, TORNClient.getProposalStatus bypasses the new base implementation and still awaits getQuorum, getTimelockDelay, and getExecutionExpiration without catching failures. If any of those RPC reads is rate-limited, status hydration in onchainProposals.ts still rejects and the endpoint returns 500 rather than the indexed status, so this DAO does not receive the fallback introduced by this commit.

Useful? React with 👍 / 👎.

Comment thread apps/api/package.json
{
"name": "@anticapture/api",
"version": "1.5.4",
"version": "1.5.5",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use a changeset instead of directly bumping the API version

The root AGENTS.md requires every PR to dev to include a changeset (or an empty one) and explicitly says that Changesets owns package versions and changelogs. This commit bumps @anticapture/api and edits its changelog without adding or consuming any .changeset file relative to its parent, bypassing the documented release flow and causing the repository's changeset check to reject the change.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant