Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add managed agent license limit checks#18937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deansheather merged 4 commits intomainfromdean/ai-usage-enforcement-2
Jul 22, 2025

Conversation

deansheather
Copy link
Member

  • Adds a query for counting managed agent workspace builds between two timestamps
  • The "Actual" field in the feature entitlement for managed agents is now populated with the value read from the database
  • The wsbuilder package now validates AI agent usage against the limit when a license is installed

Most of the code is new tests and updating old ones.

Closescoder/internal#777

- Adds a query for counting managed agent workspace builds between two  timestamps- The "Actual" field in the feature entitlement for managed agents is  now populated with the value read from the database- The wsbuilder package now validates AI agent usage against the limit  when a license is installed
@deansheatherdeansheather changed the titlefeat: managed agent license limit checksfeat: add managed agent license limit checksJul 21, 2025
Copy link
Contributor

@dannykoppingdannykopping left a comment

Choose a reason for hiding this comment

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

LGTM, couple minor points; I don't need to re-review.


ifnextTransition!="" {
builder:=wsbuilder.New(ws,nextTransition).
builder:=wsbuilder.New(ws,nextTransition,*e.buildUsageChecker.Load()).
Copy link
Contributor

Choose a reason for hiding this comment

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

This could panic; can you add some protection for it?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The atomic pointer is preloaded with a value before the AGPL API gets constructed, so there's no opportunity for it to be misused or ever hold nil. We also have many other atomic pointers that get dereferenced like this, such as*api.Auditor.Load() which is used in every auditable API endpoint.

}

builder:=wsbuilder.New(workspace,database.WorkspaceTransition(createBuild.Transition)).
builder:=wsbuilder.New(workspace,database.WorkspaceTransition(createBuild.Transition),*api.BuildUsageChecker.Load()).
Copy link
Contributor

Choose a reason for hiding this comment

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

Can panic

@coderabbitaicoderabbitai

This comment was marked as spam.

@deansheatherdeansheather merged commit9a6dd73 intomainJul 22, 2025
26 checks passed
@deansheatherdeansheather deleted the dean/ai-usage-enforcement-2 branchJuly 22, 2025 03:39
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@dannykoppingdannykoppingdannykopping approved these changes

@EmyrkEmyrkAwaiting requested review from Emyrk

Assignees

@deansheatherdeansheather

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Count managed agent usage and enforce limits in wsbuilder
2 participants
@deansheather@dannykopping

[8]ページ先頭

©2009-2025 Movatter.jp