← Back to Pull requests

feat(update): wire CPU period/quota/share into update, support negative quota #3683

Open
unknown opened this pull request with 410 lines diff across 5 files
View on GitHub
unknown unknown commented on Aug 09, 2026 11:14 UTC
Author

Description


  • Wire --cpu-period / --cpu-quota / --cpu-share in youki update into the actual cgroup update

  • Accept negative values (e.g. -1) for --cpu-quota to remove the quota limit, matching runc's behavior

  • Wire --cpu-burst / --cpu-idle into the update as well, rejecting --cpu-idle values other than 0/1

  • Unskip the update CPU contest tests now covered by youki (cpu_burst_test, update_cgroup_cpu_idle_test, update_cpu_period_without_previous_limits_test, update_cpu_quota_without_previous_limits_test)

  • Fix cpu_burst_test's --memory 100M step to use a raw byte count (104857600), since youki's --memory doesn't support unit-suffix parsing yet (unlike runc's RAMInBytes); this only surfaced once the test started running against youki
  • Part of #3676

    @utam0k @saku3 cpu_burst_test ports runc's test verbatim, but its --memory 100M step needed changing to a raw byte count since youki's --memory has no unit-suffix parsing yet. Is that an acceptable stopgap, or should this test stay runc-only until --memory supports suffixes?

    Type of Change


    <!-- Mark the appropriate option with an [x] -->
  • Bug fix (non-breaking change that fixes an issue)

  • New feature (non-breaking change that adds functionality)

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

  • Documentation update

  • Refactoring (no functional changes)

  • Performance improvement

  • Test updates

  • CI/CD related changes

  • Other (please describe):
  • Testing


    <!-- Describe the tests you ran and/or added to verify your changes -->
  • Added new unit tests

  • Added new integration tests

  • Ran existing test suite

  • Tested manually (please provide steps)
  • Related Issues


    <!-- Link any related issues using the GitHub issue syntax: #issue-number
    If there is no open issue for this, please add details of the problem or open a new issue. -->
    Fixes #3676

    Additional Context


    <!-- Add any other context about the pull request here -->
    unui tests check (youki version: 0.7.0)
    running 4 tests
    test commands::update::tests::build_cpu_sets_negative_quota ... ok
    test commands::update::tests::build_cpu_sets_all_fields ... ok
    test commands::update::tests::build_cpu_rejects_invalid_idle ... ok
    test commands::update::tests::none_when_no_flags ... ok
    
    test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 18 filtered out; finished in 0.00s
    

    contest check (youki version: 0.7.0)
    $ just test-contest update
    # Start group update
    1 / 9 : cpu_burst_test : ok
    2 / 9 : set_cpu_period_without_quota_invalid_test : ok
    3 / 9 : set_cpu_period_without_quota_test : ok
    4 / 9 : set_cpu_quota_without_period_test : ok
    5 / 9 : update_cgroup_cpu_idle_test : ok
    6 / 9 : update_cgroup_v2_common_limits_test : skipped
            test cannot run in the current environment (run_all, parallel)
    7 / 9 : update_cpu_period_without_previous_limits_test : ok
    8 / 9 : update_cpu_quota_without_previous_limits_test : ok
    9 / 9 : update_pids_limit_test : skipped
            test cannot run in the current environment (run_all, parallel)
    # End group update
    
    Validation successful for runtime /home/kohei/work/youki/youki
    

    Diff: 410 lines (+307 / -103) across 5 files Reviewer: utam0k Review duration: 75520m
    All Vouch review confidence checks passed
    Residual risk 0.29 = Change Risk (0.52) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 410 lines diff across 5 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    44%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.360
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #3683"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 51.9% (MEDIUM) · Higher = larger blast radius
    51.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 44.7% · Lower = rushed or shallow review
    44.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 28.7% · Safe to merge
    28.7%