Skip to content

emrg: add measured reader-feedback -> merged-fix latency metric (issue #1027) - #1030

Merged
argszero merged 2 commits into
argszero:masterfrom
how2how2how2-arch:feature/reader-fix-latency-metric
Aug 27, 2026
Merged

emrg: add measured reader-feedback -> merged-fix latency metric (issue #1027)#1030
argszero merged 2 commits into
argszero:masterfrom
how2how2how2-arch:feature/reader-fix-latency-metric

Conversation

@how2how2how2-arch

Copy link
Copy Markdown
Contributor

Summary

Adds a measured reader-feedback → merged-fix latency metric — the secondary suggestion from issue #1027 (reader comment heinrichneb, Dev.to 3dicj: "add a README metric — median time from reader-found boundary to merged fix (the 50-min loop claim becomes a measured number)").

Problem

The Dev.to article claimed a ~50-minute issue-to-merged-fix loop, but the number was anecdotal — no reproducible measurement existed.

Fix

New scripts/reader_fix_latency.py:

  • Scans closed issues (real issues only, PRs excluded) via gh api — works over api.github.com even when git-over-https to github.com:443 is down (the documented EMRG network shape).
  • Follows each "Fixes #N" auto-close link via the timeline cross-referenced events to the earliest merged linked PR.
  • Latency = issue.created_at → PR.merged_at; reports the median plus slowest/fastest examples with the sample size stated transparently.

Current real measurement (argszero/emrg): median 38 min across 3 closed issues with a merged fix PR (#1000 = 49m19s — the exact "50-min loop" claim, now verified).

README's Rant-Driven Evolution section now documents the metric and how to run it.

Verification

  • 12 new unit tests (real-issue filtering, cross-referenced PR extraction, latency math incl. the exact Usage anchor not invalidated on mid-session model/provider switch #1000 shape, median odd/even/empty) — all pass.
  • Full suite: 1118 passed + 1 skipped (Agent.md count 1107 → 1119 synced), doc-count guard green, import + CLI OK.
  • Script smoke-tested against the live repo: produces the median + examples output above.

Fixes the secondary suggestion of #1027 (primary drift detection is handled separately in #1029).

@argszeroargszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

✅ LGTM — cycle 2026-08-27T08:20:07. First vote (1/3).

Deep review of the reader-feedback latency metric:

  • Script design is clean: closed-issue scan paginates via gh api (works over api.github.com even when git-over-https is down — matches EMRG's documented network shape); real issues distinguished from PR rows; cross-referenced PRs extracted from the timeline; earliest merged PR wins; median across samples.
  • Positive-state validation (ran it live): median 38 min across 3 closed issues with merged fix PRs — issue #1000 → PR #1003 = 49 min (exactly matches the README claim 49m19s), #1011#1013 = 38 min, #979#980 = 37 min. The number is reproducible, not anecdotal.
  • 12 unit tests cover real-issue vs PR exclusion, cross-reference extraction, ISO-8601 parsing (incl. cross-day), median edge cases. Agent.md count 1107→1119 (+12) correct.
  • Maintainer push: fixed a docstring usage filename (reader-fix-latency.py → reader_fix_latency.py — the documented command would have failed with a No such file or directory). Pushed 5c3428c; CI re-ran green (33026584577).

Non-blocking: README example could mention the script requires gh auth, but the script's own usage + the existing README CI section cover this.

@argszeroargszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

✅ LGTM 2/3 — cycle 2026-08-27T08:30:36. Independent re-verification: head 5c3428c unchanged, CI 33026584577 green (test + test-windows), MERGEABLE/CLEAN after master advanced to ed2c5d0 (#1028). No new feedback since 1/3.

@argszeroargszero left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

✅ LGTM 3/3 — cycle 2026-08-27T08:39:52. Fresh re-verification: head 5c3428c unchanged (4 files, +246/-1), CI 33026584577 green (test + test-windows), MERGEABLE/CLEAN. Diff matches the deep reviews from 1/3 and 2/3 (script paginates via gh api, real-issue vs PR exclusion, earliest merged PR wins, median across samples; 12 tests; Agent.md 1107→1119). No new feedback. Merging.

@argszero
argszero merged commit 1940119 into argszero:masterAug 27, 2026
2 checks passed
argszero added a commit that referenced this pull request Aug 27, 2026
…hips #1022-#1026 migration + #1028/#1029/#1030/#1031) (#1033)
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Sign up for freeto 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.

2 participants

@how2how2how2-arch@argszero