Repository navigation
Keep multi-line captures in their bullets, tolerate ghost reviewers, and share sensor context - #142
Conversation
…ewers - A multi-line capture broke the Markdown bullet list it was rendered into; continuation lines are now indented to stay inside the item. The renderer's eleven entry sections and two changed-file sections go through one helper each, with byte-identical output for single-line entries. - The review sensor failed the whole snapshot on an approval from a deleted account (null author) or on a commit GitHub no longer has. Such an approval cannot be a current human approval, so it is left out. A non-JSON error response now reports its HTTP status instead of "invalid JSON". - Repository snapshots resolve the base ref once instead of once per part. - Both sensors read their run context through one sensorRunContext, so the review sensor now validates the session, plan digest, repository, and HEAD like the gate sensor; both sign steps read reports through one readReport. Refs #133
PR Summary by QodoHarden review sensors and preserve multi-line artifact bullets
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can enable the Remediation agent and Qodo fixes findings in a dedicated fix PR |
Qodo FixerNo findings are available for this PR yet. Findings appear here once Qodo has reviewed the PR. |
|
No new reviewable changes. Local finding reconciliation was skipped because merge history is not supported. Unverified local findings were preserved. |
Summary
Part of #133. Fixes three defects in the adapters and the Markdown renderer, and removes duplication in the sensor scripts and the renderer. It does not touch any file that another open #133 PR changes.
Line count: 37,675 → 37,718 (+43). The code shrinks: the renderer goes from 359 to 295 lines, and the sensor scripts share one context and one report reader. The three new regression tests add back more lines than were removed. This PR is about correctness, not size.
Related issue
Refs #133 (defect 13 and audit findings on the adapters; the tracking issue stays open)
Defects fixed
-bullet, so a second line fell out of the list. This affected change-brief, PR summary, and handoff artifacts. Continuation lines are now indented to stay inside their item. New test:tests/unit/artifact-render.test.ts.authorisnull(GitHub's ghost user), or whosecommitisnull. Neither can be a current approval by an identified human, so they are now left out. New test ingithub-review-sensor.test.ts, which fails on the old code.GitHub GraphQL review query failed: HTTP 502. New test, which fails on the old code.Changes
section(title, bullets(entries.filter(...)))blocks become oneentrySection(title, entries, kinds, empty)helper, and the two changed-file sections onechangedFilesSection. A golden comparison over all three artifact kinds, with and without entries, was byte-identical for single-line bodies.sensorRunContext()is the one reader of the GitHub Actions run context: session, plan digest, repository, ref, HEAD, and run URI.gateSensorContext()builds on it with the gate-only rules (branch refs only, and the declared gate).refs/pull/....readReport().git rev-parseprocesses per snapshot, and all three parts now agree on the same base.Impact
The review sensor's snapshot now omits ghost and commit-less approvals, and its HTTP error text changes. The snapshot format is unchanged.
Validation
npm run checkRisk and recovery
Low risk. Each fix is local. The review sensor change can only drop approvals that could never have counted as current human approval. Revert the commit to restore previous behavior.
Reviewer guidance
entrySection: the continuation-line indentation is the only output change.sensorRunContext: the review scripts' newly added validation must not reject what the review sensor actually produces.refs/pull/...refs stay allowed, since the branch-only rule applies to the gate sensor alone.Checklist
origin/main.