Skip to content

feat(review): read back the reviewer packet identity, the reviewer words and the decision latency - #980

Open
HugoXK wants to merge 2 commits into
mainfrom
dev3/794-reviewer-packet
Open

HugoXK wants to merge 2 commits into
mainfrom
dev3/794-reviewer-packet

Conversation

@HugoXK

@HugoXK HugoXK commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Written-by: Fledge Platform Dev-3

Fixes #794

The review record carried three identities it never read back: a packet hash with no revision, a reviewer's instruction parsed by nobody, and an override sentence naming no decision. The trend also counted every review of a work item as a first-decision sample and did not measure overrides at all.

  • AdversarialRecord reads baseSha/tipSha; the job page names the tip beside the packet hash, and a record written before the reader existed says "revision not recorded" rather than printing a hash that belongs to no revision.
  • The review callback accepts followUps[].instruction through the same redaction and REVIEW_INSTRUCTION_MAX normaliser the webhook path uses, so the follow-up goal carries "Reviewer asked:" and the job page reads it back; a review with no body produces the goal it produced before.
  • work_item.review_outcome records the review job, its score, the model and the tip that review covered; job.merge_review_override names the same decision.
  • The trend takes one first-decision sample per work item and reports the override rate over recorded changes-requested decisions, with its own denominator and — when there is none.

Branch dev3/794-reviewer-packet, two commits, no force, no rebase, no new branch, no second PR:

  • 9aae6544418994c41d0470d6412136b84e155dc7 — the feature, cut at c3d16bbc51bc04e0fc405f1f4e6c0e7bc1868439 from a bundle the author served (sha256 94a90034…, verified with git bundle verify), tree c08e69f5c32f22c9bfd25168605b830973f23d85, published by the Lead.
  • cacfee84719d6a4c1e2b8050cd5d4113c86bd52b — the coverage follow-up, appended on top of 9aae6544 by the author through the GitHub connector (a file-level write; the connector can add a commit but cannot place an existing object), tree d06088652d55883833d4cbc9cecd4e729a3190a8, parent 9aae6544. Its two blobs read back from the API (b88fc100871159e55613becc89186bfd1e3c726b, fc648a9cdd9be9723307e9a666771ee1f3f13c88) are byte-identical to the blobs the gates below ran against; no src/ line changed in it, so the risk tier is unchanged.

Large-PR: 10 files, 866 changed lines — one change (read the reviewer packet identity back, carry the reviewer's words, and measure the first decision and the override rate) plus the tests for it; the second commit is test-only coverage of the first, and there is no unrelated edit in the diff.

main has since moved to 9094444d622f673e18fc6f48ac8b003d3209f6bd (#978 merged), which touched only mock/ — no file in this branch's ten is in that set, so there is no overlap to resolve.

Ran (author, at tree d0608865 — the tip's tree):

  • node scripts/coverage-diff.mjs --base c3d16bbc --head HEAD --floor 80 — ok, 150/150 changed lines covered (100%, floor 80%). This is the fix for the coverage red at the previous tip, which named src/db.ts:142-149, :158-168, :171-174, src/jobs/service.ts:3880-3890 and src/views/pages.ts:1375; those paths are now executed by the three new cases.
  • npm run check — exit 0, 2623/2623 tests, lint, typecheck, build
  • red first: at c3d16bbc with only the three new suites, 9 fail / 1 pass of 10 — the pass is the no-instruction control, which must already hold
  • node scripts/risk-gate.mjs --base c3d16bbc — T3, basis src/db.ts
  • node scripts/changelog.mjs check — 48 fragments ok

Not run: a live deployment or a production database.

Risk: T3 (src/db.ts, src/jobs/service.ts, src/lib/adversarialReview.ts).
Rollback: revert the squash commit; the added columns are ignored by the reverted reader and the trend falls back to the previous computation. No data is rewritten.
Docs: docs/architecture.md, docs/ui.md.
Changelog: changelog.d/794.changed.md.

…rds and the decision latency (#794)

The review record carried three identities it never read back: a packet hash
with no revision, a reviewer's instruction parsed by nobody, and an override
sentence naming no decision. The trend also counted every review of a work item
as a first-decision sample and did not measure overrides at all.

- `AdversarialRecord` reads `baseSha`/`tipSha`; the job page names the tip beside
  the packet hash, and a record written before the reader existed says "revision
  not recorded" rather than printing a hash that belongs to no revision.
- The review callback accepts `followUps[].instruction` through the same
  redaction and `REVIEW_INSTRUCTION_MAX` normaliser the webhook path uses, so the
  follow-up goal carries "Reviewer asked:" and the job page reads it back; a
  review with no body produces the goal it produced before.
- `work_item.review_outcome` records the review job, its score, the model and the
  tip that review covered; `job.merge_review_override` names the same decision.
- The trend takes one first-decision sample per work item and reports the
  override rate over recorded changes-requested decisions, with its own
  denominator and `—` when there is none.

Red first: at `c3d16bbc` the three new suites are 9 fail / 1 pass of 10; the
passing one is the no-instruction control, which must already hold. `npm run
check` at the tip: 2620/2620 tests, lint, typecheck, build.

Written-by: Fledge Platform Dev-3
Docs: docs/architecture.md, docs/ui.md
…y page (#794)

Cover the lines the coverage gate named: the review callback that writes the
decision row, the formatter and its reader for that row, and the page that
labels a decision recorded before the identity existed. No src/ line changes;
the diff is two test files.

Written-by: Fledge Platform Dev-3

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: record the reviewer packet identity, the reviewer words and the decision latency

1 participant