Repository navigation
feat: name the exact checks and reviews behind ci-changed/review-changed details - #12
Merged
Merged
Conversation
…ged details
Persist normalized summaries in the PR fingerprint — ciChecks (sorted
{name, status, conclusion} rows) and reviewSummary (sorted {author,
state, submittedAt, commit} rows) — so --detail can report what actually
changed instead of only an opaque digest transition, letting an agent
act without re-querying GitHub.
- ci-changed / review-changed (and the updated catch-all) details gain
added/removed/changed arrays when both fingerprint sides carry the
summaries; opaque: true remains only as the fallback for snapshots
written before summaries existed or diffs the summary cannot explain.
- canonicalizeCiRollup now derives from summarizeCiRollup, so the digest
and summary can never disagree; digests are frozen by test to stay
byte-identical with pre-summary snapshots.
- comparableFingerprint drops the summaries, keeping change comparison
and content-addressed delta ids stable across the upgrade (no phantom
deltas, same ids from legacy and new snapshots).
- Contract: DELTA_DETAIL_FIELDS gains 'changed'; docs/contract.md and
--help-json describe the named breakdown and the opaque fallback.
Resolves the two TODO(v0.2) notes in lib/cli.mjs detail rendering.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PGgDzjgxoGajZU7sHJTp81
RUNBOOK class table, the watch-loop prompt doc, and usage.md now mention that --format json --detail names the exact checks/reviews that changed, so acting agents know the second GitHub query is no longer needed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PGgDzjgxoGajZU7sHJTp81
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PGgDzjgxoGajZU7sHJTp81
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10b172304b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Two CI rollup rows can share a name (a CheckRun and a StatusContext, or duplicate check runs); keying the diff by name silently dropped rows and misreported the breakdown. Refuse to name the diff when either side repeats a key and mark the digest transition opaque: true instead, so a non-opaque detail stays authoritative. Addresses the Codex review finding on PR #12. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PGgDzjgxoGajZU7sHJTp81
Conflict in docs/contract.md programmatic API table: kept main's rows (gh-delta/list, gh-delta/registry, list/registry contract symbols) and re-added summarizeCiRollup/summarizeReviews to the fingerprint row. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PGgDzjgxoGajZU7sHJTp81
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves the two
TODO(v0.2)notes inlib/cli.mjsdetail rendering:ci-changedandreview-changeddetails previously exposed only an opaque digest transition, forcing agents to re-query GitHub to learn what changed.What changed
Persisted normalized summaries. The PR fingerprint now stores two compact, detail-only fields in the snapshot:
ciChecks— sorted{name, status, conclusion}rows (normalizes both CheckRun and StatusContext rollup shapes)reviewSummary— sorted{author, state, submittedAt, commit}rows fromlatestReviewsNamed detail breakdown. With
--detail,ci-changed/review-changed(and theupdatedcatch-all) keep their digestfrom/toand gainadded/removed/changedarrays:{ "class": "ci-changed", "field": "ci", "from": "b6e7d0bc0ba1", "to": "632f7f45b0b2", "added": [{ "name": "lint", "status": "IN_PROGRESS", "conclusion": "" }], "removed": [{ "name": "docs", "status": "COMPLETED", "conclusion": "SUCCESS" }], "changed": [{ "name": "build", "from": { "status": "COMPLETED", "conclusion": "FAILURE" }, "to": { "status": "COMPLETED", "conclusion": "SUCCESS" } }] }opaque: trueremains only as the fallback when the detail cannot name the change (afromside written before summaries existed, or a digest diff the summary does not explain).Compatibility
comparableFingerprintdrops the summaries, so a pre-summary snapshot compares equal to a current fetch of the same state; the first tick just persists the summaries.deltaIdentity, so the same observed change yields the same content-addressedidfrom legacy and new snapshots (cross-monitor dedupe survives mixed versions). Verified end-to-end.canonicalizeCiRollupnow derives fromsummarizeCiRollup(digest and summary can never disagree) and a test freezes the digest values byte-identical to the pre-summary implementation.DELTA_DETAIL_FIELDSgainschanged; noschemaVersionbump per the documented policy.Docs
docs/contract.md(detail shapes, fingerprint table, API exports),--help-jsondescription, and the agent-facing guides (RUNBOOK.md,docs/watch-loop-prompt.md,docs/usage.md) now describe the named breakdown and the opaque fallback. The README example fixtures are documented as exercising the pre-summary fallback path, so no SVG regeneration was needed.Testing
npm run checkgreen: lint, prettier, 161 tests (6 new: summarizer normalization/sorting, frozen digests, comparable stripping, named CI/review details, legacy-snapshot upgrade without phantom deltas, id stability).ghover two ticks: named diff output, legacy-snapshot upgrade (exit 0, zero deltas, summaries persisted), opaque fallback, and identical delta ids across snapshot versions.🤖 Generated with Claude Code
https://claude.ai/code/session_01PGgDzjgxoGajZU7sHJTp81
Generated by Claude Code