Skip to content

fix(v2): /contribute @<id> targets a specific contract (R-2) + unknown-token warning#49

Merged
jurby merged 1 commit into
mainfrom
fix/v2-contribute-by-id
May 31, 2026
Merged

fix(v2): /contribute @<id> targets a specific contract (R-2) + unknown-token warning#49
jurby merged 1 commit into
mainfrom
fix/v2-contribute-by-id

Conversation

@jurby
Copy link
Copy Markdown
Contributor

@jurby jurby commented May 31, 2026

Summary

Implements the R-2 follow-up from the 2026-05-31 E2E run (docs/proposals/v2-multi-contract-id-attribution.md): a multi-contract person who shares one GitHub handle (e.g. bob-arch + bob-pm, both github: bob-arch-e2e) was previously unaddressable — the shared handle resolves to a single contract, so the other could never be credited (it derived 0h in the E2E).

Fix

  • load_people_map now maps each person id → itself (id wins over any github/email/name collision; ids are unique → collision-free). So /contribute @<id> reliably credits that exact contract. Previously @<id> only worked "by accident" via the unmapped-token fallback.
  • aggregate_signals warns on stderr when a /contribute token matches neither a github handle nor a person id — a typo previously vanished silently (credited as-is → engine awards 0h).
  • Docs: docs/contribute-directive.md documents @<person-id> and the multi-contract guidance.

Verification (isolated demo, shared handle)

  • /contribute @bob-pm (id) → credits bob-pm 8h ✓ (was reachable only by accident before).
  • /contribute @bob-shared (shared handle) → resolves to one contract (documented as ambiguous → use @<id>).
  • Unknown token @bob-pmmstderr warning ✓.

Testing

  • pytest -m "not e2e" tests/553 passed (+2 new in test_detect_contributors.py), 0 failures.

Note / not in this PR

  • Commit-author attribution for multi-contract people who also share an email still resolves first-match (local_evidence._resolve_person); use a distinct email per contract or /contribute @<id> to disambiguate. Tracked separately.

🤖 Generated with Claude Code

… unknown token

detect_contributors.load_people_map now maps each person id to itself (id wins
over github/email/name collisions), so `/contribute @<id>` reliably credits a
specific contract for multi-contract people who share a github handle (R-2:
bob-arch + bob-pm both `github: bob-arch-e2e`). aggregate_signals now warns on
stderr when a token matches no github handle or person id, so typos no longer
silently earn 0h. Verified end-to-end: `/contribute @bob-pm` credits bob-pm (8h)
under a shared handle; an unknown token warns. Docs: docs/contribute-directive.md.
Tests: test_detect_contributors.py. Implements docs/proposals/v2-multi-contract-id-attribution.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jurby jurby merged commit 712eba5 into main May 31, 2026
@jurby jurby deleted the fix/v2-contribute-by-id branch May 31, 2026 19:10
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