Skip to content

fix(credit): preserve v0.9.1 integration authorship#4678

Merged
Hmbown merged 2 commits into
mainfrom
codex/v091-credit-preservation-20260721
Jul 21, 2026
Merged

fix(credit): preserve v0.9.1 integration authorship#4678
Hmbown merged 2 commits into
mainfrom
codex/v091-credit-preservation-20260721

Conversation

@Hmbown

@Hmbown Hmbown commented Jul 21, 2026

Copy link
Copy Markdown
Owner

What changed

  • map Hunter Bown and Fred Leitz to canonical numeric GitHub noreply identities
  • resolve only the exact existing public-surface and PR fix(shell): default no-cwd shell commands to context.workspace #4673 commit identities through AUTHOR_MAP
  • retain the original commits and merge ancestry without rewriting
  • add negative tests proving changed SHAs or identities still fail

Validation

  • cargo fmt --all -- --check
  • python3 -m unittest scripts/test_check_coauthor_trailers.py
  • python3 scripts/check-coauthor-trailers.py --range origin/main..HEAD --check-authors
  • git diff --check origin/main...HEAD

This is a narrow prerequisite for direct contributor integration and PR #4675. It does not deploy, publish, tag, or release.

Hmbown and others added 2 commits July 21, 2026 15:51
Resolve Hunter Bown through the canonical GitHub noreply identity for the two exact public-surface commits already present in the integration graph. Keep the original commits and merge ancestry unchanged, and reject any changed SHA, role, name, or email.

Co-authored-by: Hunter Bown <101357273+Hmbown@users.noreply.github.com>
Signed-off-by: Hunter B <hmbown@gmail.com>
Map Fred Leitz to his canonical GitHub noreply identity and allow only PR #4673 exact commit trailer to resolve through it, preserving the reviewed contributor commit without weakening the gate for altered identities.

Co-authored-by: Fred Leitz <345780+fleitz@users.noreply.github.com>
Signed-off-by: Hunter B <hmbown@gmail.com>
Copilot AI review requested due to automatic review settings July 21, 2026 22:52
@cursor

cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@claude

claude Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Claude finished @Hmbown's task in 3m 44s —— View job


Review: preserve v0.9.1 integration authorship

  • Gather context (PR diff, custom instructions)
  • Understand the request (code review)
  • Review .github/AUTHOR_MAP changes
  • Review scripts/check-coauthor-trailers.py changes
  • Review scripts/test_check_coauthor_trailers.py changes
  • Post final review

Traced the new PRESERVED_MAPPED_IDENTITY_EXCEPTIONS gate by hand against all three added unit tests (line-by-line through validate()); the logic checks out for the cases the tests cover. No provider/model/route concerns (Python credit tooling, unrelated to the v0.8.65 EPIC #2608 invariant) and no security issues (no shell injection, subprocess still uses list args, no secret handling changed).

1. SHA authenticity is untested and I could not independently verify it (worth confirming before merge)
scripts/check-coauthor-trailers.py:60-85 hardcodes three commit SHAs (5087269..., e37df06..., 6d0ebc88...) that the exception logic trusts unconditionally. The new tests in scripts/test_check_coauthor_trailers.py:109-168 only exercise these SHAs against synthetic mod.Commit(...) objects built to match the claimed author/co-author/subject — they never check the SHAs against real git history, so nothing in this PR proves these three commits actually exist on origin/main with the exact name/email/subject encoded here. Since credit-preservation is the entire purpose of the PR, a typo'd or mismatched SHA would make an entry either silently inert or (less likely, given the exact-tuple match) misapplied to the wrong commit. I tried to confirm the SHAs myself via git cat-file -t <sha> but this checkout is shallow (only d9fdee8 is present as the tip of origin/main) and outbound git fetch --unshallow was blocked in this environment, so I couldn't complete the check. Worth the author re-confirming against the real v0.9.1 integration history (e.g. git log <sha> -1 --format='%an <%ae>%n%(trailers:key=Co-authored-by)') before merge.

2. Minor: repeated lookups in the coauthor loop (non-blocking)
scripts/check-coauthor-trailers.py:262-281 calls lookup_identity(aliases, coauthor.email, coauthor.name) and is_preserved_mapped_identity(commit, "coauthor", coauthor) once in the error-reporting loop and again in the coauthor_emails-building loop for the same coauthor. Harmless (coauthor lists per commit are tiny) but could be collapsed into one pass if you want to avoid the duplication.

Good choices:

  • The exception key is a strict 4-tuple (sha, role, normalized name, normalized email) — matches the existing LEGACY_AUTOMATION_TRAILER_EXCEPTIONS pattern in the same file, and the negative tests (test_preserved_hunter_credit_resolves_only_for_exact_commit, test_preserved_fleitz_credit_resolves_only_for_exact_commit) correctly prove a changed SHA or email still hard-fails, so the gate can't silently widen over time.
  • AUTHOR_MAP additions (.github/AUTHOR_MAP:12-15) follow the existing format and resolve to canonical numeric noreply addresses; load_author_map's own validation (exercised via setUpClass in the test file) already guards against malformed entries.
  • Docstring update at the top of the script clearly documents the new exact-SHA exception carve-out.

Note: I wasn't able to execute cargo fmt, the unittest suite, or check-coauthor-trailers.py directly in this sandbox (script execution was blocked pending approval), so I relied on manual trace-through of validate() against the new tests rather than running them. If you'd like me to actually execute the validation commands from the PR description, the --allowedTools for this job would need to permit running python3 against files under scripts/.

@Hmbown

Hmbown commented Jul 21, 2026

Copy link
Copy Markdown
Owner Author

Verified against the fetched v0.9.1 integration/contributor objects before merge:

  • 5087269606fc8847487b0a8b51ef6adffa8eb2ca: author Hunter B <hmbown@gmail.com>; subject docs(public): refresh v0.9.1 product truth; co-author Hunter Bown <hmbown@gmail.com>.
  • e37df06caeb3064b2bb9263c1c98a903738f3a0a: author Hunter B <hmbown@gmail.com>; subject docs(web): make the homepage product first; co-author Hunter Bown <hmbown@gmail.com>.
  • 6d0ebc881a8bd2469c45b25f2a606fa63681e112: author Fred Leitz <fred.leitz@gmail.com>; subject fix(shell): default no-cwd shell commands to context.workspace; co-author fleitz <fleitzo@gmail.com>.

Local validation also passed python3 -m unittest scripts/test_check_coauthor_trailers.py, python3 scripts/check-coauthor-trailers.py --range origin/main..HEAD --check-authors, cargo fmt --all -- --check, and git diff --check. The exact-SHA exceptions are intentionally narrow so the original contributor commits remain byte-for-byte intact.

@Hmbown
Hmbown merged commit c7244c7 into main Jul 21, 2026
23 checks passed
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.

2 participants