Repository navigation
fix(breakdown): drop never-populated 6.1 keys and report unmeasured figures as null - #2047
Conversation
…s as null Drop keys no producer ever wrote (framework policy budget and timeout keys, trace_validate_ref, critic_review.iteration, geak product cfg_hash and final_overlay_digest, kernel entry budget_remaining_sec, the RowScope declarations, warm_start duration_sec, the session_terminal package entries), report attributed/unattributed gain and run empty as null when unmeasured or not provided, and type snapshot_staleness as the string it is.
Code metrics gate: PASSEDJudged: the 18 files this change touches. Files it does not touch never fail it; anything found there is listed under Outside this change for information.
Module length warning: over 800 lines, within the 1200-line failure limit (not failing): 1
Already over at the base (backlog, not this change's): 6
102 findings in files this change does not touchOutside this change (informational): 102
...and 77 more; the job log lists every row.
Thresholds and sources: |
PR #2047 -- fix(breakdown): drop never-populated V7 keys and report unmeasured figures as nullWhat it does: Within the V7 cutover of #2023, deletes breakdown keys no producer ever set (framework policy caps, Blocking issues: none Checked: diff.txt and body.txt at 3940e27. bcc987d..3940e27 changes only the opening V7 sentence in LGTM |
1e09f4c to
9a0d168
Compare
PR #2047 -- fix(breakdown): drop never-populated 6.1 keys and report unmeasured figures as nullWhat it does: As part of schema 6.1 (the #2023 rename, now on main), the PR deletes breakdown keys no producer ever set, at their recorder and TypedDict. These are the framework policy caps, Blocking issues: none Checked: diff.txt, body.txt and title.txt at 8fe31a0. bd072f8..8fe31a0 changes only LGTM |
|
Merged the latest |
haishuok0525
left a comment
There was a problem hiding this comment.
What it does: Completes the schema 6.1 exception from #2023. It removes breakdown keys that no producer ever populated (framework policy.force_exit_budget_pct / variant_timeout_sec / overtime_kill_ratio, kernel trace_validate_ref, critic_review.iteration, geak.product.cfg_hash / final_overlay_digest, kernel entry.budget_remaining_sec, the V6RowScope declarations, warm-start duration_sec, and the session_terminal*.json package entries). Unmeasured attributed_gain_pct / unattributed_gain_pct (outcome and stack ledger, plus attributed_gain_pct_excluding_fixes) and an unreported run empty now read null instead of 0.0 / false. The reference docs, upgrade notes and breakdown SKILL.md state the extended 6.1 exception.
Blocking issues: none.
Checked:
- Removed keyword parameters: no remaining caller passes them.
kernel.pycallsbegin(...)andrecord_geak_product(...)without the removed arguments; bothrecord_proposal_reviewcallers (framework.py,intent_router.py) never passiteration; thephase_event.record_proposal_reviewsignature is separate and unchanged.record_policytakes**fields, and_framework_policy_fieldsnever supplied the removed keys. - Removed keys have no reader.
conc_sweepbudget_remaining_secandvariant_timeout_secare separate fields and remain unchanged.session_terminal*.jsonhas no producer. - Null gain consumers: the
optimizationsandattributionrenderers already guard withisinstance(..., (int, float)).stack_eventguardsexcluding_fixesandunattributedonattributed is not None. empty=None: the only producer (recipe_journal,empty=not measured) always passes a bool, so the workflow-evaluation contract's"empty": {"type": "boolean"}is not violated in practice. The contract references none of the removed keys.- The description matches the diff, and CI is green.
LGTM
Ships with the schema 6.1 declaration in fix(breakdown): rename throughput_tok_s_per_gpu to output_throughput (schema 6.1) and record per-GPU output on baseline and validation rows #2023: removes breakdown keys that no producer ever populated and reports unmeasured figures as null instead of a fabricated default.
Removed (each verified to have no producer and to be null in every audited session; the documented disposition is "removed in 6.1, never populated"):
framework_agentpolicy.force_exit_budget_pct,policy.variant_timeout_sec,policy.overtime_kill_ratio(_framework_policy_fieldsnever passes them)kernel_agenttrace_analyze_runs[].trace_validate_ref(a constantNone)critic_review.iterationon framework proposals (no caller passes it)kernel_agentgeak.product.cfg_hashandgeak.product.final_overlay_digest(never passed by the orchestrator; the other product fields stay)kernel_agententry.budget_remaining_sec(conc_sweeppoints[].budget_remaining_secis live and unchanged)V6RowScopeevent_id/ordinaldeclarations (stripped bywire_rowbefore export, never on the wire)duration_sec(recorded, never exported)session_terminal.json/session_terminal.pre.jsonfrom the session package allowlist (no producer)Null instead of a default:
outcome.validation.attributed_gain_pct/unattributed_gain_pct(and the stack ledger'sattributed_gain_pct,attributed_gain_pct_excluding_fixes) are null when no adoption could be measured, instead of0.0. A session with no adoptions no longer reports "Their contributions sum to 0.00%".framework_agentrunemptyis null when the producer did not report it, instead offalse; config runs that report it are unchanged.entry.snapshot_stalenessis typed as the string it is ("absent"/"fresh"); the producer is unchanged.docs/reference/session-breakdown.mdanddocs/reference/upgrade.mdlist the removals and the null semantics in the 6.1 section; the opening 6.1 sentence and the two compatibility-rule exceptions (Compatibility rules, Stability guarantee) now cover all three changes (the rename, the removed keys, the null defaults).main.is Nonefor the null cases; all failed on the base branch. Ran the relatedtest_sbd_v6_*,test_session_package.py,test_breakdown_renderers.py,test_reporters_smoke.pyfiles individually;ruff,lint-importsandscripts/code_metrics.pypass (code_metrics_baseline.txtlowers entries the removals shortened). Real sessions: attributed/unattributed are unchanged where measured (ds-v4-pro 1.58 / -94.04, glm52 13.18 / -69.84) and become null for sglang-glm52 (no adoptions) and vllm-dsv4pro (an unmeasurable adoption).main), but each source change is a deletion or a one-line null fix; 6 are test files and 3 are docs (the two reference docs and the breakdownSKILL.mdversioning policy, kept consistent with them).session_breakdown.json; attributed/unattributed gain and runemptyread null when unmeasured; the session package no longer reservessession_terminal*.json.