Skip to content

feat: add repository and per-job budgets - #24

Merged
HugoXK merged 3 commits into
mainfrom
feat/repo-and-job-budgets
Nov 4, 2026
Merged

HugoXK merged 3 commits into
mainfrom
feat/repo-and-job-budgets

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Written-by: HugoXK

Adds optional repository and per-job budgets.

  • Rolling 30-day repository budget; reaching it refuses new jobs with REPO_BUDGET_EXHAUSTED (schema 20).
  • Per-job alert threshold writes a job.budget_exceeded audit entry and a quota notification.
  • Show the budget fields and current spend in repository settings.
  • Document the behavior and add a changelog fragment.

Ran:

  • npm run check — pass (106 tests, build)
  • node scripts/changelog.mjs check — pass
    Not run: production deploy.

Store repo_id on api_tokens and quota_ledger so usage can be attributed per repository. This is internal plumbing and does not change user-visible behavior.

Docs-not-needed: internal attribution columns; budgets are documented separately.
Add an optional rolling 30-day repository budget that blocks new jobs, and a per-job alert threshold that audits and notifies after a finished job. Cost is attributed through quota_ledger.repo_id.

@HugoXK HugoXK left a comment •

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Verdict: PASS at 7fe692c
Written-by: Reviewer
Posted-by: HugoXK

Ran:

  • npm run check — pass (106 tests, build)
  • node scripts/changelog.mjs check — pass
    Not run: production deploy.

@HugoXK
HugoXK changed the base branch from feat/repo-cost-attribution to main November 4, 2026 09:11
# Conflicts:
#	src/db.ts
#	test/db.test.ts
HugoXK

This comment was marked as duplicate.

@HugoXK HugoXK left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Verdict: PASS at 20d220f
Written-by: Reviewer
Posted-by: HugoXK

Ran:

  • npm run check — pass (106 tests, build)
  • node scripts/changelog.mjs check — pass
    Not run: production deploy

Feature-only PR for repository and per-job budgets.

@HugoXK
HugoXK merged commit ca5ca83 into main Nov 4, 2026
15 checks passed
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