You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@magpie.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2026/09/27 15:39:47 UTC

[PR] fix(contributor-growth): address adversarial-review findings and the deferred minors [magpie]

potiuk opened a new pull request, #1429:
URL: https://github.com/apache/magpie/pull/1429

   Stacked on #1426. Part 6: review follow-ups for the stack that starts at #1417.
   
   ## Summary
   
   - Copilot (gpt-5, via `magpie-adversarial-review`) reviewed each PR of the stack. This PR fixes the valid findings and every minor item deferred from the earlier whole-stack review.
   - **Tool:** area shares are now over all merged PRs (or reviews) in the window, with an `(unlabelled)` row — a single labelled PR among twenty no longer shows as "100 %" of one area; boolean or non-object weights and a repository without `owner/` are rejected; `fetch --refresh` ignores the cache, and the README documents the cache key, the conversation budgets, per-kind item ids, and that the penalty applies once per thread in each count.
   - **Identity:** a self-linked account (blog, social) counts only when it links back to the contributor's GitHub profile; Step 3 applies the identity rule explicitly before attributing anything.
   - **Briefs and reports:** the discounted value is shown next to raw, penalty and adjusted; mailing list, testing and user support are marked as collected; `contributor-to-committer` names the contributor per `real-names.md` and never with an `@`-mention; nomination flags stale or mismatched calibration.
   - **candidate-screen:** stops when there is no roster source; re-checks privacy *and* the collaborator list right before writing; replaces a same-day report by `sha` instead of failing; normalises `report_path`.
   - **calibrate:** bounds the archive query itself at the holdout date, so later thread subjects never appear in the listing.
   - **Chat:** Slack date bounds now include the first and last day; a workspace shared by several projects must list its channels; a partial Discussions count says so.
   - **Templates:** the nomination config template now matches the readiness template (substantive rule, mailing-list row, PMC rows).
   
   Findings not changed, with reasons:
   - *Penalty applied in several counts for one thread* — by design: each count is compared with its own floor; documented.
   - *Stale identity between `resolve_user` and `search_messages`* — the calls are seconds apart.
   - *Unresolved nominee handles rely on the maintainer* — the human confirms by design.
   - *Privacy check can race the write* — it is re-checked immediately before the write; the remaining check-then-write window is inherent.
   
   ## Type of change
   
   - [x] Python package (`tools/*/` with `pyproject.toml`)
   - [x] Skill change (`.claude/skills/<name>/`) — eval fixtures updated below
   - [x] Tool / bridge contract (`tools/<system>/*.md`)
   - [x] Project template (`projects/_template/`)
   
   ## Test plan
   
   - [x] `prek run --all-files` passes
   - [x] `tools/contributor-metrics`: 46 tests (new: unlabelled area share, boolean weight, repository validation, non-object weights, `--refresh`)
   - [x] `contributor-nomination`: 30/30 — new case: a self-linked blog without a link back is not used (RED before the change)
   - [x] `contributor-to-committer` 21/21, `contributor-calibrate` 7/7, `contributor-candidate-screen` 13/13
   
   ## RFC-AI-0004 compliance
   
   - [x] **HITL** — unchanged: every write is still a confirmed proposal
   - [x] **Write-access discipline** — the report write now re-checks the audience too
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(contributor-growth): address adversarial-review findings and the deferred minors [magpie]

Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #1429:
URL: https://github.com/apache/magpie/pull/1429#discussion_r4115973634


##########
tools/contributor-metrics/tests/test_cli.py:
##########
@@ -2,7 +2,7 @@
 # https://www.apache.org/licenses/LICENSE-2.0
 import json
 
-from contributor_metrics.cli import main
+from contributor_metrics.cli import fetch_items, main

Review Comment:
   ## CodeQL / Unused import
   
   Import of 'fetch_items' is not used.
   
   [Show more details](https://github.com/apache/magpie/security/code-scanning/103)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(contributor-growth): address adversarial-review findings and the deferred minors [magpie]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #1429:
URL: https://github.com/apache/magpie/pull/1429


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(contributor-growth): address adversarial-review findings and the deferred minors [magpie]

Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #1429:
URL: https://github.com/apache/magpie/pull/1429#discussion_r4115958042


##########
tools/contributor-metrics/tests/test_cli.py:
##########
@@ -167,3 +167,69 @@
         == 0
     )
     assert json.loads((tmp_path / "f.json").read_text())["floors"]["committer"]["prs_merged"] == 48
+
+
+def test_score_rejects_weights_that_are_not_an_object(tmp_path):
+    (tmp_path / "items.json").write_text(
+        json.dumps({"since": "2026-03-01", "end": "2026-08-31", "items": []})
+    )
+    (tmp_path / "w.json").write_text("[1, 2]")
+    rc = main(
+        [
+            "score",
+            "--items",
+            str(tmp_path / "items.json"),
+            "--weights",
+            str(tmp_path / "w.json"),
+            "--out",
+            str(tmp_path / "m.json"),
+        ]
+    )
+    assert rc == 2
+
+
+def test_fetch_refresh_ignores_the_cache(tmp_path, monkeypatch):
+    import contributor_metrics.cli as cli

Review Comment:
   ## CodeQL / Module is imported with 'import' and 'import from'
   
   Module 'contributor_metrics.cli' is imported with both 'import' and 'import from'.
   
   [Show more details](https://github.com/apache/magpie/security/code-scanning/102)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@magpie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org