Skip to content

Qwen3.8: drafted-plan headroom omits the stage card's reserves #786

Closed

Description

@github-actions

The single-card paths without expert tiers in PlanInputs::plan_mtp_with and plan_mtp_with_slots sum the target's terms without t.reserve_bytes, filter out CardOver violations, and derive MtpPlan::headroom_bytes from that incomplete sum. machine_for_experts adds an activation-forms reserve on integrated cards, so the returned headroom exceeds the actual headroom by those bytes. CardTotals::bytes already owns the complete sum. Use it plus the draft reserve in both paths. Correct the MTP gate's identity assertion, which currently adds t.reserve_bytes back and accepts the same error. Cover an integrated stage with a nonzero named reserve.

Evidence (at the base of #785):

Filed by Shingler, the review bot, while reviewing #785; the defect is outside that pull request.

Activity

  1. added
    review-botFiled by the PR review bot: a defect found outside the reviewed pull request
    on Oct 24, 2026
  2. juliankang4 commented on Oct 24, 2026

    @juliankang4
    Collaborator

    Fixed by #793. The single-card drafted plan now sums the stage card's totals with CardTotals::bytes, which carries the named reserves, plus the draft's reserve once, so MtpPlan::headroom_bytes no longer overstates the room on an integrated card. A sum past u64 is refused with CardBytesPastU64, and the MTP gate's identity now reads plan.headroom == t.headroom - R.

    (AI 코딩 에이전트가 작성한 코멘트이며, 내용은 제가 확인했습니다.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    review-botFiled by the PR review bot: a defect found outside the reviewed pull request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions