Fix Impact report objective mapping guidance to match resolver outputs and available datasets#39784
Conversation
…r and objective mapping Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
…bjective mapping Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
…caping, use Set for label dedup Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
|
Hey One thing that would strengthen this before it's marked ready:
If you'd like a hand with that:
|
|
@copilot Only keep files impacted by the change, including |
…nd .lock.yml Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Done — reverted the 13 unrelated |
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. No ADR enforcement needed: PR #39784 does not have the 'implementation' label (has_implementation_label=false) and has 0 new lines of code in business logic directories (default_business_additions=0, threshold=100). |
|
✅ Test Quality Sentinel completed test quality analysis. No test files were added or modified in this PR. Test Quality Sentinel skipped. Changed files: .github/workflows/objective-impact-report.lock.yml, .github/workflows/objective-impact-report.md |
|
✅ PR Code Quality Reviewer completed the code quality review. |
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
There was a problem hiding this comment.
Pull request overview
Updates the Objective Impact Efficiency Report workflow spec to stop computing objective values via live label lookups and instead consume precomputed objective attribution/value fields intended to come from the root-level intent resolver + objective mapping pipeline.
Changes:
- Adds
*-with-objective.jsondatasets as required deterministic inputs and changes PR attribution logic to readobjective_value/objective_labelsdirectly. - Rewrites the “Objective value mapping” and “Outcome association rules” sections to rely on precomputed fields (and to exclude PRs without linked closing issues).
- Updates the compiled lockfile metadata hash to reflect the spec changes.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/objective-impact-report.md |
Reorients the report logic toward precomputed objective attribution/value fields and updates required inputs and association rules accordingly. |
.github/workflows/objective-impact-report.lock.yml |
Regenerates workflow lock metadata (body hash) for the updated markdown spec. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 4
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@copilot Address all remaining copilot review comments for the .md file and recompile the workflow. |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnose and /grill-with-docs — requesting changes on one correctness gap in the fallback path, plus three precision issues in the new rules.
📋 Key Themes & Highlights
Key Themes
- Broken fallback path: The PR removes
objective-mapping.jsoncomputation instructions but adds a fallback tomerged-prs-linked.json— a file that doesn't contain precomputed objective values. An agent following the fallback path has no instructions for computingobjective_value, risking silent wrong results. - Stale model definition: The
Objective Value =definition block (line 78) still describes live computation from labels, contradicting the new precomputed approach. - Ambiguous zero-value classification: The
objective_value === 0rule conflatesnull/absent/empty-array with a semantically different state, potentially misclassifying entries. - Rule precedence not stated: Rules 2 and 5 in "Outcome association rules" can logically conflict for certain entries; the evaluation order should be explicit.
Positive Highlights
- ✅ Excellent root-cause fix: replacing live regex/LLM lookups with deterministic precomputed fields eliminates a major source of statistical drift
- ✅
attribution_source: "none"exclusion is explicitly documented — no ambiguity on the "exclude vs. fall back to PR labels" question - ✅ The new fallback instruction (line 154) is a good safety net; it just needs the missing objective-computation guidance
- ✅ Clear separation between PR outcomes and safe-output issue outcomes throughout
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer
Comments that could not be inline-anchored
.github/workflows/objective-impact-report.md:154
[/diagnose] Fallback path is missing objective computation guidance — if *-with-objective.json files are absent, the agent has no instructions for deriving objective_value from the older merged-prs-linked.json files.
<details>
<summary>💡 Explanation and suggested fix</summary>
The PR removes the only instructions for computing Objective Value from objective-mapping.json (the pseudo-code mapping.ComputeObjectiveValue(root_labels) block is gone). When the fallback kicks in, an …
.github/workflows/objective-impact-report.md:78
[/diagnose] The model definition on this line is now stale — it says Objective Value = ... objective-mapping configuration applied to traced root labels, but after this PR objective values are read from precomputed fields, not computed live.
<details>
<summary>💡 Suggested update</summary>
Update the model definition block to reflect the new precomputed approach:
Objective Value = precomputed field from *-with-objective.json (or safe-output-issue-evaluations.jsonl for issue outcomes…
</details>
<details><summary>.github/workflows/objective-impact-report.md:140</summary>
**[/diagnose]** The `objective_value === 0` disambiguation rule has an edge case: an empty array `root_issue_labels: []` is technically "present" in JSON but contains no labels, so the condition `has root_issue_labels or labels present` and `no root labels at all` can yield opposite results for the same logical state.
<details>
<summary>💡 Suggested clarification</summary>
Be explicit about what "present" means:
If objective_value is 0:
- root_issue_labels is null, absent, or empty arra…
.github/workflows/objective-impact-report.md:152
[/diagnose] Rule 2 (exclude attribution_source: "none") and Rule 5 (objective_value === 0 with labels → unmapped) have an implicit ordering that isn't stated — a PR with attribution_source: "none" could theoretically also have root_issue_labels present (e.g., pre-populated from the PR itself), triggering both rules.
<details>
<summary>💡 Suggested clarification</summary>
Add an explicit evaluation order note such as:
> "Evaluate exclusion rules (Rule 2) before classification rules…
.github/workflows/objective-impact-report.md:137
[/grill-with-docs] Only two attribution_source values are documented ("closing_issue" and "none"), but if the Go implementation ever emits a third value (or if a future schema revision adds one), agents will silently mishandle those entries with no guidance.
<details>
<summary>💡 Suggested addition</summary>
Add an explicit catch-all rule:
- For any other attribution_source value: treat as "none" (exclude from analysis).
Or, if the enum is guaranteed exhaustive in the curre…
There was a problem hiding this comment.
REQUEST_CHANGES — spec commits to a data contract that does not exist yet and the fallback path is broken.
Blocking themes
Data contract mismatch (4 existing issues, not repeated here)
The existing review (copilot-pull-request-reviewer) already captured four correctness issues: *-with-objective.json files are not produced by the current dataset generator; safe-output-issue-evaluations.jsonl does not currently emit objective_value/objective_labels/attribution_source; the attribution_source: "artifact_labels" case is silently unhandled; and root_issue_numbers/root_issue_labels are not present in the current PR datasets. Those remain unresolved and blocking.
New issues found in this pass
-
objective_value == 0is an unsafe unmapped proxy (line 140) — if any label in the objective mapping legitimately resolves to 0, those outcomes are silently mislabeled. An explicitunmapped: trueboolean in the precomputed schema would be safer. -
Broken fallback path (line 154) — the
*-linked.jsonfallback files have noobjective_value/objective_labelsfields, and this PR removed all instructions for live objective computation. If the fallback fires, the agent silently produces a report with zero objective attribution and no error. -
zizmor: ignoreannotation displaced in lock.yml (lock.yml line 1637) — the suppression comment was moved off therun:key line onto a preceding standalone line, which zizmor does not recognize as a suppression. This is likely to break the CI security scan.
🔎 Code quality review by PR Code Quality Reviewer
Comments that could not be inline-anchored
.github/workflows/objective-impact-report.md:140
objective_value == 0 is an unreliable proxy for "unmapped" — if any label in the objective mapping legitimately resolves to value 0, those outcomes will be silently mislabeled.
<details>
<summary>💡 Suggested fix</summary>
The rule "objective_value is 0 AND labels present → unmapped" implicitly assumes that no label in .github/objective-mapping.json maps to value 0. If a label category (e.g., wontfix, chore) is explicitly assigned value 0 in the mapping, those outcomes will be fal…
.github/workflows/objective-impact-report.md:154
The fallback to *-linked.json is a dead end — those files lack the precomputed objective fields, and this spec no longer retains any instructions for computing them live.
<details>
<summary>💡 Why this silently breaks</summary>
When *-with-objective.json files are missing or empty, the spec says to fall back to merged-prs-linked.json / closed-unmerged-prs-linked.json. But:
- Those files only contain
linked_issue_numbers; they have noobjective_value,objective_labels, `root_is…
.github/workflows/objective-impact-report.lock.yml:1637
The zizmor: ignore annotation was moved off the run: key line to a standalone preceding comment; this likely breaks the suppression and will cause CI to start failing.
<details>
<summary>💡 Details</summary>
Previously the suppression was inline:
run: | # zizmor: ignore[github-env] - GITHUB_SERVER_URL is set by GitHub Actions, not user input.Now it is a standalone comment on the line above:
# zizmor: ignore[github-env] - GITHUB_SERVER_URL is set by GitHub Actions, no…
</details>
<details><summary>.github/workflows/objective-impact-report.md:64</summary>
`root_issue_labels` is listed as a field in `safe-output-issue-evaluations.jsonl`, but that field only exists for PR records — safe-output issues are resolved via `ResolveIssue()` with no root-issue tracing.
<details>
<summary>💡 Details</summary>
Line 64 asserts that `safe-output-issue-evaluations.jsonl` contains `root_issue_labels`. But this field is the output of `ResolvePullRequest()`, which traces a PR to its linked closing issue and attaches that issue's labels. Safe-output issues are r…
</details>
<details><summary>.github/workflows/objective-impact-report.md:137</summary>
The exclusion rules only handle `attribution_source: "closing_issue"` and `"none"`, but the resolver also emits `"ambiguous"` for PRs with multiple closing issues — those are silently miscounted as "no linked issue."
<details>
<summary>💡 Details</summary>
`intent.Resolver.ResolvePullRequest` has a third outcome: when a PR has multiple `closingIssuesReferences`, the ambiguous path fires and returns an `IntentRecord` with `attribution_source: "ambiguous"`, `Status: "ambiguous"`, and no populat…
</details>
<details><summary>.github/workflows/objective-impact-report.md:149</summary>
The exclusion condition "entry has no `root_issue_numbers`" is ambiguous between an absent field and an empty array `[]`, leading to opposite outcomes for ambiguous-attribution PRs.
<details>
<summary>💡 Details</summary>
The dataset-build script can serialize a PR with no resolved root issues as either:
- `"root_issue_numbers": []` (empty array present), or
- the field entirely absent from the record
"Has no `root_issue_numbers`" is ambiguous across these two representations. If the agent t…
</details>Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Addressed in I updated |
Impact Efficiency Report statistics are now aligned with the actual deterministic dataset contract and resolver flow. Instead of requiring always-present pre-enriched objective fields, the workflow now uses linked deterministic inputs first and applies optional precomputed objective fields only when those enriched files are available.
Updated:
objective-impact-report.mdmerged-prs-linked.jsonandclosed-unmerged-prs-linked.jsonas the primary required PR inputs*-with-objective.jsonfiles as optional/enhanced inputs (used when present and non-empty)safe-output-issue-evaluations.jsonlexpectations to use it for deterministic outcome/workflow attribution (not precomputed objective fields)merged-prs-linked.json, with optional enriched-objective fallback when availableobjective-impact-report.lock.yml)