microsoft / microsoft/hve-core

fix(workflows): isolate backlog grooming safe output per candidate

Open
#2,866 0 comments 0 reactions 1 assignee View on GitHub

@rezatnoMsirhC is already working on this.

Since Sep 8, 2026.

agents bug infrastructure
Dominant language
Python
Stars
1.5k
Forks
301
Avg merge
3d 3h
Merged PRs (30d)
92

Description

The backlog-grooming worker currently serializes every candidate row in a shard into one scalar `report-data` JSON string. A single syntax error in that nested JSON prevents parsing before candidate identity can be bound, so the worker cannot safely retain the malformed candidate as a `contract_error` while continuing with valid candidates.

This occurred in [Backlog Grooming Sweep run 33838636334](https://github.com/microsoft/hve-core/actions/runs/33838636334): one malformed evidence value made the complete shard envelope unparsable. The validator correctly failed closed rather than guessing how to repair model-authored JSON, but the entire sweep wave stopped. Repeated custom safe-output calls are collected as independent items, so emitting one independently parseable result per planned candidate should reduce the failure boundary without weakening validation.

## Acceptance Criteria

- [ ] Each planned candidate is emitted through an independently parseable safe-output item, or an equivalent transport that prevents one candidate's JSON syntax error from invalidating unrelated candidates.
- [ ] Candidate identity is bound to exactly one planned shard issue before advisory fields are validated.
- [ ] A malformed candidate becomes a fixed non-advisory `{ issue, code }` diagnostic only when its identity is safely attributable; malformed or ambiguous identity still fails closed.
- [ ] Accepted rows, deferred rows, and contract-error issue IDs remain disjoint and exactly cover the planned candidate set.
- [ ] The implementation does not introduce a permissive JSON repair parser or infer missing model-authored punctuation, quoting, or boundaries.
- [ ] Aggregate, checkpoint, recovery, reducer, and publisher validation preserve strict provenance and continue blocking publication when contract errors are nonzero.
- [ ] Focused tests prove that one syntactically malformed candidate does not discard valid sibling candidates and that unbound malformed output cannot enter trusted state.
- [ ] The generated lock workflow is regenerated from its Markdown source and remains synchronized.

## Related

- #2827
- Original automated backlog grooming feature: #2558
- Failure evidence: https://github.com/microsoft/hve-core/actions/runs/33838636334

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.