Skip to content

The submodule fixture commits as somebody, and a failed git says what git said - #154

Merged
HackingGate merged 1 commit into
mainfrom
submodule-fixture-identity
Sep 9, 2026
Merged

The submodule fixture commits as somebody, and a failed git says what git said#154
HackingGate merged 1 commit into
mainfrom
submodule-fixture-identity

Conversation

@HackingGate

Copy link
Copy Markdown
Owner

main has been red since run 34017238390. The same two tests fail in every job that runs the suite -- coverage, pre-commit, prek, scan engine -- and pass on every contributor's machine.

tests/supply_chain_cli.rs:148
  a_bumped_submodule_pointer_expands_into_the_members_own_manifests
  a_submodule_that_is_not_checked_out_is_refused_rather_than_widened
    git ["commit", "-q", "--allow-empty", "-m", "the member's lock moves"] failed

The cause

with_a_submodule builds a source repository, gives it user.name and user.email, and adds it as a submodule. Both tests then commit into root/sub -- which is the clone git submodule add made, not the source. A clone carries none of the source repository's local config, so that commit borrowed whoever was configured globally.

A developer machine has somebody configured globally. CI has nobody. The clone is now handed the same identity the fixture gives every other repository it builds.

Why it took a local repro to find

The fixture's git helper sent stderr to Stdio::null() and asserted "git {args:?} failed". Six minutes of CI reported back the one fact the reader already had -- that the command failed -- and discarded the sentence naming the cause, which was Please tell me who you are. It now prints what git said and which directory it said it in.

Verification

Run the whole suite with GIT_CONFIG_GLOBAL and GIT_CONFIG_SYSTEM pointed at /dev/null, which is the condition CI runs under:

$ GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null cargo test
807 passed, 0 failed

Before this change, that command reproduces CI exactly -- the same two tests, the same line. cargo fmt --check, cargo clippy --all-targets -- -D warnings and cargo run -- scan are clean, and the suite is 807/0 with a normal git config too.

https://claude.ai/code/session_01HertdiAvdNKGyjR91jvRUM

… git said

Two tests have been failing on main since #143's run, in every job that runs
the suite -- coverage, pre-commit, prek and scan engine -- and passing on every
contributor's machine.

`with_a_submodule` gives an identity to the source repository it builds and
then adds that repository as a submodule. The tests commit into `root/sub`,
which is the CLONE `git submodule add` made, and a clone carries none of the
source's local config. So the commit borrowed whoever was configured globally:
a developer machine has somebody, and CI has nobody. The clone is handed the
same identity the fixture gives everything else it builds.

The second half is why this took a local repro to find. The `git` helper sent
stderr to `Stdio::null()` and asserted `"git {args:?} failed"`, so eleven
minutes of CI reported back the one fact the reader already had -- that the
command failed -- and threw away the sentence naming the cause. It now prints
what git said and which directory it said it in.

Verified by running the whole suite with GIT_CONFIG_GLOBAL and
GIT_CONFIG_SYSTEM pointed at /dev/null, which is the condition CI runs under:
807 passed, 0 failed. The same suite was 2 failed before this change.

Claude-Session: https://claude.ai/code/session_01HertdiAvdNKGyjR91jvRUM
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 3f87bdfc-a6f4-435b-9b21-3722c4c1b1fd

📥 Commits

Reviewing files that changed from the base of the PR and between c3741d4 and 7045413.

📒 Files selected for processing (1)
  • tests/supply_chain_cli.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.26%. Comparing base (87dd28d) to head (7045413).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #154      +/-   ##
==========================================
- Coverage   93.39%   93.26%   -0.14%     
==========================================
  Files          38       38              
  Lines       14677    15276     +599     
==========================================
+ Hits        13708    14247     +539     
- Misses        969     1029      +60     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@HackingGate
HackingGate merged commit 5d59ef6 into main Sep 9, 2026
12 checks passed
@HackingGate
HackingGate deleted the submodule-fixture-identity branch September 9, 2026 14:45
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