Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

fix(cli): keep the commit-session trailer dedup working on git 2.39

Open Beginner friendly
#940 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
84/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
git, typescript
Domain
cli, testing-qa

Research direction

Run cd cli && npx vitest run tests/contexts/telemetry/domain/formats/commit-session-trailer.integration.test.ts and inspect the fixture and trailer-writing delegate around line 72. Ensure the fixture or delegate handles a missing trailing newline so two passes leave one trailer, then confirm the integration test passes on git 2.39.2.

Written by the indexing model from the issue text.

Description

Observed

cli/tests/contexts/telemetry/domain/formats/commit-session-trailer.integration.test.ts:72 ("never doubles a trailer a prior run already wrote") runs the trailer-writing delegate twice and asserts the trailer token appears once.

On git 2.39.2 the test fails with AssertionError: expected 2 to be 1: the fixture message has no trailing newline, so git appends the trailer without a blank-line separator; the second pass then sees no trailer block and --if-exists doNothing appends again. The same delegate on a message ending in a newline dedupes correctly.

Reproduction

  1. git --version -> 2.39.2 (or any version sharing this behavior).
  2. cd cli && npx vitest run tests/contexts/telemetry/domain/formats/commit-session-trailer.integration.test.ts -> fails alone, deterministic, also under env -i.
  3. The same test passes on newer git (CI's).

Impact

The suite reports one failure per run on machines with this git, masking real regressions in the file and eroding trust in the suite's signal. The test and its source are byte-identical to next, so the failure predates any recent change.

Suggested fix

End the fixture message with a newline, or have the delegate normalize the message before appending.

Standalone repro verified on the machine that reported it: message without trailing newline doubles the trailer; message with one dedupes.

Dominant language
TypeScript
Stars
481
Forks
45
Avg merge
10h 31m
Merged PRs (30d)
98

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ai-driven-dev/framework

All issues in ai-driven-dev/framework

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.