Skip to content

feat: share resource capacity validation#20

Merged
intel352 merged 1 commit into
mainfrom
refactor/resource-capacity-core
May 25, 2026
Merged

feat: share resource capacity validation#20
intel352 merged 1 commit into
mainfrom
refactor/resource-capacity-core

Conversation

@intel352
Copy link
Copy Markdown
Contributor

Summary

  • Add a core ResourceCapacity DTO for worker CPU/memory/disk capacity.
  • Add ValidateResourceLimitsAgainstCapacity to centralize CPU, memory, and workspace limit checks.

Verification

  • RED: GOWORK=off go test ./protocol -run TestValidateResourceLimitsAgainstCapacity -count=1 failed before implementation with missing API symbols.
  • GOWORK=off go test ./protocol -run TestValidateResourceLimitsAgainstCapacity -count=1
  • git diff --check
  • GOWORK=off go test ./... -count=1

Adversarial Review

  • Preserves the existing behavior that unknown capacity values do not reject limits.
  • Keeps workflow-compute-specific Capabilities out of compute-core; callers adapt into ResourceCapacity.
  • Centralizes arithmetic and error strings without changing scheduler policy.

@intel352 intel352 merged commit 9f5ce75 into main May 25, 2026
4 checks passed
@intel352 intel352 deleted the refactor/resource-capacity-core branch May 25, 2026 18:27
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