@getcodesentinel/codesentinel 1.43.3 → 1.43.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -339,7 +339,7 @@ Notes:
339
339
 
340
340
  - `likely_merge` (default) may merge multiple emails that likely belong to the same person based on repository history.
341
341
  - `strict_email` treats each canonical email as a distinct author, which avoids false merges but can split the same person across multiple emails.
342
- - Git mailmap is enabled (`git log --use-mailmap`). Put `.mailmap` in the repository being analyzed (the `codesentinel analyze [path]` target). Git will then deterministically unify known aliases before CodeSentinel computes ownership distributions.
342
+ - Git mailmap is enabled for both analysis history and the ownership verdict (`git log --use-mailmap` with mailmap-aware author fields). Put `.mailmap` in the repository being analyzed (the `codesentinel analyze [path]` target) and Git will deterministically unify known aliases in evolution distributions and in `owners` identity matching.
343
343
  - Evolution output includes both `authorDistributionByCommits` and `authorDistributionByChurn`, plus their derived `topAuthorShare...` and `busFactor...` fields.
344
344
  - Current scoring continues to use the commit-weighted ownership view (`...ByCommits`).
345
345
  - Logs are emitted to `stderr` and JSON output is written to `stdout`, so CI redirection still works.
@@ -951,7 +951,13 @@ The audit measures system risk, not individual performance. It emits no owner or
951
951
 
952
952
  ### Identity matching is heuristic
953
953
 
954
- Declared handles are matched to commit authors by noreply address, email local part, display name and the alias map in `.codesentinel/owners.json`. When that fails, the same person appears twice. This repository has one such case: `pnpm-workspace.yaml` is reported as drifted because the audit cannot prove that the declared `@aleixalonso` and the author `aleixalonso@hotmail.com` are the same account. A `.mailmap`, or an `aliases` entry in `.codesentinel/owners.json`, removes the ambiguity.
954
+ A declared handle covers every commit author the cascade attributes to it: the GitHub noreply address `<handle>@users.noreply.github.com`, any address whose local part is the handle, an exact normalized author name, and every identity listed in the alias map in `.codesentinel/owners.json`. When several steps match, the owner keeps all of those author ids in evidence order; the reported match kind is the highest-priority step (noreply, then email local part, then author name, then alias). This repository commits an alias entry for the two-address case, so `@aleixalonso` covers both `aleixalonso@users.noreply.github.com` and `aleixalonso@hotmail.com`.
955
+
956
+ Matching stays deliberately conservative. An address with no link to the handle — a different local part, no alias entry, and no `.mailmap` — is not guessed, so that file still drifts. Add the address to the alias map or add a `.mailmap` entry when you want the audit to treat it as the same person. Neither remedy broadens drift: an alias that never appears in a file's evidence does not make that file aligned.
957
+
958
+ `.codesentinel/owners.json` accepts two shapes: the wrapped object `{ "aliases": { "marta": ["m.gil@company.com"] }, "ignoreAuthors": ["*-bot@*"] }` and a bare alias map `{ "marta": ["m.gil@company.com"] }`. The wrapped shape is selected when either wrapped key is present; otherwise every value must be an array for the object to be read as the alias map.
959
+
960
+ `--aliases <file>` accepts a path relative to the audited repository root or an absolute path. A relative path and an absolute path inside the repository are read from the audited ref when tracked there and from the working tree otherwise. An absolute path outside the repository is read directly from disk and reported as unversioned. An explicitly requested alias file that cannot be read produces a warning and the audit runs without identity aliases; it is never a silent no-op.
955
961
 
956
962
  ### Ownership parsing and scope
957
963