Skip to content

fix(opencode): use account quota pacing - #1

Draft
ramonpaolo wants to merge 9 commits into
mainfrom
fix/opencode-go-account-quotas
Draft

fix(opencode): use account quota pacing#1
ramonpaolo wants to merge 9 commits into
mainfrom
fix/opencode-go-account-quotas

Conversation

@ramonpaolo

@ramonpaolo ramonpaolo commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Objetivo

Revisar no fork a implementação baseada no PR deviffyy#42 do repositório upstream, antes de abrir qualquer PR em deviffyy/OpenQuota.

Issue upstream associada: deviffyy/OpenQuota#52

Alterações

  • mantém quotas Go vindas do endpoint account-wide do OpenCode
  • classifica HTTP 403 como assinatura Go ausente (Permission), não autenticação inválida
  • classifica respostas 5xx como erro de rede
  • evita panic durante a inicialização do client HTTP
  • atualiza fixtures para ok e rate-limited
  • restaura períodos de pacing rolling de 5 horas e semanal de 7 dias
  • mantém o período mensal sem pacing, pois o endpoint não expõe o início do ciclo
  • adiciona injeção de endpoint e cobertura HTTP/provider dos erros e do fallback local

Contexto

A branch foi baseada no head do PR upstream deviffyy#42 e rebased sobre o main atual.

Validação

  • cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
  • cargo test --manifest-path src-tauri/Cargo.toml --all-targets (540 testes aprovados)
  • pnpm lint
  • pnpm check
  • pnpm test (219 testes aprovados)
  • pnpm tauri build --debug --bundles deb
  • Aplicação aberta localmente e verificada no desktop

Próximo passo

Este PR draft serve como revisão no fork. O PR final será aberto no repositório original referenciando e corrigindo Issue #52.

dependabot Bot and others added 7 commits August 23, 2026 23:25
Bumps [zbus](https://github.com/z-galaxy/zbus) from 5.18.0 to 5.19.0.
- [Release notes](https://github.com/z-galaxy/zbus/releases)
- [Changelog](https://github.com/z-galaxy/zbus/blob/main/release-plz.toml)
- [Commits](z-galaxy/zbus@zbus-5.18.0...zbus-5.19.0)

---
updated-dependencies:
- dependency-name: zbus
  dependency-version: 5.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…dates (deviffyy#45)

Bumps the rust-patches group with 2 updates in the /src-tauri directory: [rusqlite](https://github.com/rusqlite/rusqlite) and [thiserror](https://github.com/dtolnay/thiserror).


Updates `rusqlite` from 0.40.1 to 0.40.2
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](rusqlite/rusqlite@v0.40.1...v0.40.2)

Updates `thiserror` from 2.0.19 to 2.0.20
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@2.0.19...2.0.20)

---
updated-dependencies:
- dependency-name: rusqlite
  dependency-version: 0.40.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-patches
- dependency-name: thiserror
  dependency-version: 2.0.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-patches
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ry with 11 updates (deviffyy#54)

Bumps the frontend-minor-and-patch group with 11 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte) | `5.56.8` | `5.56.10` |
| [@sveltejs/vite-plugin-svelte](https://github.com/sveltejs/vite-plugin-svelte/tree/HEAD/packages/vite-plugin-svelte) | `7.2.0` | `7.3.0` |
| [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) | `7.0.0` | `7.0.1` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.1.2` | `26.2.0` |
| [eslint](https://github.com/eslint/eslint) | `10.8.0` | `10.8.1` |
| [eslint-plugin-svelte](https://github.com/sveltejs/eslint-plugin-svelte/tree/HEAD/packages/eslint-plugin-svelte) | `3.22.0` | `3.23.0` |
| [globals](https://github.com/sindresorhus/globals) | `17.9.0` | `17.11.0` |
| [svelte-check](https://github.com/sveltejs/language-tools) | `4.7.5` | `4.7.6` |
| [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.66.0` | `8.67.0` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `8.2.1` | `8.2.2` |
| [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) | `4.1.10` | `4.1.11` |



Updates `svelte` from 5.56.8 to 5.56.10
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@5.56.10/packages/svelte)

Updates `@sveltejs/vite-plugin-svelte` from 7.2.0 to 7.3.0
- [Release notes](https://github.com/sveltejs/vite-plugin-svelte/releases)
- [Changelog](https://github.com/sveltejs/vite-plugin-svelte/blob/main/packages/vite-plugin-svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/vite-plugin-svelte/commits/@sveltejs/vite-plugin-svelte@7.3.0/packages/vite-plugin-svelte)

Updates `@testing-library/jest-dom` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](testing-library/jest-dom@v7.0.0...v7.0.1)

Updates `@types/node` from 26.1.2 to 26.2.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `eslint` from 10.8.0 to 10.8.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](eslint/eslint@v10.8.0...v10.8.1)

Updates `eslint-plugin-svelte` from 3.22.0 to 3.23.0
- [Release notes](https://github.com/sveltejs/eslint-plugin-svelte/releases)
- [Changelog](https://github.com/sveltejs/eslint-plugin-svelte/blob/main/packages/eslint-plugin-svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/eslint-plugin-svelte/commits/eslint-plugin-svelte@3.23.0/packages/eslint-plugin-svelte)

Updates `globals` from 17.9.0 to 17.11.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](sindresorhus/globals@v17.9.0...v17.11.0)

Updates `svelte-check` from 4.7.5 to 4.7.6
- [Release notes](https://github.com/sveltejs/language-tools/releases)
- [Commits](https://github.com/sveltejs/language-tools/compare/svelte-check@4.7.5...svelte-check@4.7.6)

Updates `typescript-eslint` from 8.66.0 to 8.67.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.67.0/packages/typescript-eslint)

Updates `vite` from 8.2.1 to 8.2.2
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v8.2.2/packages/vite)

Updates `vitest` from 4.1.10 to 4.1.11
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.11/packages/vitest)

---
updated-dependencies:
- dependency-name: svelte
  dependency-version: 5.56.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: frontend-minor-and-patch
- dependency-name: "@sveltejs/vite-plugin-svelte"
  dependency-version: 7.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: frontend-minor-and-patch
- dependency-name: "@testing-library/jest-dom"
  dependency-version: 7.0.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: frontend-minor-and-patch
- dependency-name: "@types/node"
  dependency-version: 26.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: frontend-minor-and-patch
- dependency-name: eslint
  dependency-version: 10.8.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: frontend-minor-and-patch
- dependency-name: eslint-plugin-svelte
  dependency-version: 3.23.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: frontend-minor-and-patch
- dependency-name: globals
  dependency-version: 17.11.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: frontend-minor-and-patch
- dependency-name: svelte-check
  dependency-version: 4.7.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: frontend-minor-and-patch
- dependency-name: typescript-eslint
  dependency-version: 8.67.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: frontend-minor-and-patch
- dependency-name: vite
  dependency-version: 8.2.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: frontend-minor-and-patch
- dependency-name: vitest
  dependency-version: 4.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: frontend-minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@ramonpaolo
ramonpaolo force-pushed the fix/opencode-go-account-quotas branch from 0725c3d to f00811e Compare August 23, 2026 21:48
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.

2 participants