Skip to content

feat: neutral GitHub change signals from the #23 audit - #24

Merged
diegomarino merged 9 commits into
mainfrom
feat/audit-23-neutral-signal-classes
Aug 5, 2026
Merged

feat: neutral GitHub change signals from the #23 audit#24
diegomarino merged 9 commits into
mainfrom
feat/audit-23-neutral-signal-classes

Conversation

@diegomarino

@diegomarino diegomarino commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Implements the shortlist from the #23 signal audit (see the audit matrix posted there), plus three classifier-only classes the audit's candidate list did not contemplate. Refs #23.

New delta classes (all additive, schemaVersion stays 1)

Requiring new compared fingerprint fields (base, PR labels, assignees, reviewRequests):

  • review-requests-changed (pr) — the core agent-feedback signal; sorted logins, teams as org/slug, added/removed detail. No profile payloads: names only, consumers follow up via gh.
  • assignees-changed (pr, issue) — sorted logins, added/removed detail.
  • base-changed (pr) — PR retargeted; prior CI/mergeability context refers to the old base.
  • relabeled now fires for PRs too (the PR fetch now collects labels; previously issue-only).

Classifier-only (existing fingerprint fields, zero fetch cost, id-neutral):

  • became-conflicting (pr) — inverse of became-mergeable; UNKNOWN mid-recompute still doesn't count.
  • converted-to-draft (pr) — inverse of draft-ready.
  • comments-removed (pr, issue) — count decreased; previously an opaque updated.

Compatibility

  • Upgrade suppression: the mergeStateStatus pairwise rule is generalized to an ADDITIVE_COMPARED_FIELDS list — a snapshot predating a field never fires on its first appearance, and classifiers guard the old side, so a legacy snapshot with a real concurrent change (e.g. a new comment) cannot misfire the new classes. Verified live: a field-stripped snapshot re-run against the real repo produced 0 deltas.
  • Delta ids: new compared fields enter to, so each item's id shifts once on its first post-upgrade delta — the documented id policy (ids hash the observed state), not a regression.
  • New classes are id-neutral and covered by the existing forward-compat rule.

Verification

  • npm run check green: lint, format, 281 tests (19 new: fetch normalization + fail-closed pagination, fingerprint sorting/defaults, one detector case per class, both upgrade cases, detail shapes).
  • Live smoke against diegomarino/gh-delta: GraphQL union selection (User/Bot/Mannequin/Team) validates; baseline → idempotent second run (0 deltas) → simulated pre-upgrade snapshot (0 deltas, no burst).

Deliberately not included (per the audit)

Review-comment edit detection (the one true blind spot — cost disproportionate, documented as a limitation), thread-state digest (rare offsetting-churn case), milestone/stateReason/auto-merge/Projects v2 (consumer follow-up from existing deltas).

Release notes for 0.5.0 (consumer-facing)

  • relabeled now also fires for PRs (was documented as issue-only). Route on delta.entity, never on the class alone. The contract row carries a "was issue-only before 0.5.0" note.
  • Delta ids shift once per item on its first post-upgrade delta (new compared fingerprint fields enter to). Monitors on different gh-delta versions emit different ids for the same observation — upgrade co-posting monitors together to keep cross-monitor dedupe intact. Documented in the contract's id section.

Audit follow-ups folded in (change-audit 2026-08-05)

  • 518331f — Codex P2 / audit X6: updated details apply the same additive-field suppression as the detector; no phantom null -> current rows on upgrade ticks (now also covers mergeStateStatus).
  • 0fc4c0c — X1: RUNBOOK + watch-loop prompt now list all classes (incl. baseline-state) with corrected relabeled wording; X2/X3 notes in contract.md; X4: GHES schema-age platform note; X7: became-* best-effort caveat; corrected the stale "branch deletion produces no delta" note (deletion bumps updatedAt → opaque updated, verified live).
  • f5bb320 — README JSON sample regenerated from fixtures now showcasing review-requests-changed (review approval satisfying the pending request — the documented co-occurrence with review-changed).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8af1b840fa

ℹ️ 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".

Comment thread lib/detect.mjs Outdated
@diegomarino
diegomarino merged commit a679688 into main Aug 5, 2026
3 checks passed
@diegomarino
diegomarino deleted the feat/audit-23-neutral-signal-classes branch August 5, 2026 14:25
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.

1 participant