← Back to Pull requests

fix(quota): preserve work obligations across narrative labels #5950

Closed
unknown closed this pull request without merging on Oct 09, 2026 18:09 UTC
View on GitHub
unknown unknown commented on Oct 08, 2026 07:00 UTC
Author

Problem and result

A historical run with valid surface_only delivery facts requires advance_primary_outcome_or_write_blocker. Adding dependency_observation to its free-text classification instead routed the same work into a monitor lane and removed that follow-through obligation. Even authored progress_scope=goal was ineffective because status compaction dropped it.

This change removes classification/status substring inference from the shared work-lane read adapter and preserves explicit scope through compact history. Both quota routing and heartbeat guidance now retain typed obligations when only narrative text changes.

Boundary and compatibility

  • The existing TypeScript delivery-history owner still decides follow-through. Python status/work-lane code only preserves and consumes that result; no new decision owner, capability, RPC, provider, permission or persisted-state schema is introduced.

  • Writer scopes goal|agent_lane remain distinct from the existing explicit local primary_goal|dependency_observation read contract. Explicit local scope remains supported. Missing historical scope defaults to ordinary advancement; unknown explicit values retain their prior non-dependency behavior. No history is rewritten.

  • Intentional behavior correction: legacy classification/status prose can no longer select dependency-observation routing. Typed Todo monitor due/quiet rules and User gates still select their existing obligations. Updated tests/smokes and the bilingual accepted RFC checkpoint disclose this change.

  • Existing CLI JSON/Markdown and shared heartbeat consumers are affected. This repairs an internal read adapter; no new user configuration or frontend/Lark operation is introduced. No full frontend, Lark, or live-agent journey is claimed.
  • Validation

  • Current base: 21707b7fb64123df02e730bf7959192010f85a1b; proposed head: 07fbc7be09885e77d8a2d4224cd411aa0e2ab6d8. The immutable counterexample baseline was 5cb9e4b8222a94a24a38ad2d7163e32322c11f73; this same change was rebased without conflicts after #5882/#5861 merged.

  • The identical four production CLI A/B cases fail on both the original baseline and latest 21707b7 at the changed obligation/lane, then pass on head. Fixtures hold typed run/Todo/quota facts fixed and vary only narrative classification, across missing and authored goal scope with ordinary and surface_only outcomes.

  • Built wheel and sdist each pass the four actual CLI cases. Latest-base installed package provenance and seven production-source hashes match; no source-checkout fallback.

  • After the latest-main rebase, 67 focused work-lane, delivery, real CLI and output-budget checks pass. Earlier-base validation additionally passed 119 focused regressions, 27 output-budget cases, four affected durable smokes and documentation governance. Latest premerge semantic checks pass. Independent review accepts the bounded semantic correction. agent_lane is covered by compaction unit tests; full agent-lane CLI and promoted-provider journeys were not added.

  • Risk-based premerge: direct checks, 9/10 catalog checks, 8/8 risk checks and the public boundary pass. The sole failure is the existing dashboard status budget. The identical standalone workload measures 22,560 characters on both base and head, above the unchanged 22,500 ceiling; the canary startup context measured 22,728 separately. The failure is retained, with no budget increase or semantics compression. CI/merge readiness is not claimed.
  • The related future-facing pass retires the duplicate prose-derived authority at the existing shared adapter, so its heartbeat caller needs no second classifier. Broader work-lane migration remains separate. All fixtures are synthetic; no active Goal, production provider, model job or external send was used. Generated lock files and raw evidence are excluded. Maintainer merge only.

    Diff: 486 lines (+364 / -122) across 6 files Reviewer: BigDataDZ Review duration: 2108m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 486 lines diff across 6 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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.370
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #5950"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 47.3% (MEDIUM) · Higher = larger blast radius
    47.3%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 18.7% · Safe to merge
    18.7%