GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: isolate repository fixtures and restore Windows reference coverage by Byron · Pull Request #2341 · gitpython-developers/GitPython

Conversation

@Byron

@Byron Byron commented Nov 5, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Tasks

  • refackiew

Created by Codex on behalf of Byron. Byron will review before this is ready to merge.

GitPython's Windows CI exposed invalid reference paths in a PathLike test,
while its test fixtures depended on the source checkout's history and refs.
This work makes PR, post-merge, and source-archive test runs exercise the same
inputs, and restores portable reference-argument coverage.

  • Generate GitPython histories, submodule scenarios, GitDB packed/loose objects,
    and benchmark repositories from fixture scripts. Preserve the existing test
    scenarios through named revisions, remove the history bootstrap, and run CI
    after removing source Git metadata.
  • Use PurePosixPath for Git reference names so Windows keeps forward slashes
    while retaining PathLike coverage and production reference validation.
  • Fingerprint package and benchmark harness sources without requiring source
    Git metadata. Report actual processed-object counts in GitDB benchmark rates.

The benchmark workload is now generated, so old history-based timings are not
comparable. Local validation for the review fixes: seven comparison tests and
five GitDB performance tests pass; an output check verifies totals and rates
against the 90-object fixture. The harness-only regression failed before the
fix. Ruff lint and formatting checks pass. CI is running on the updated head.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot AI balanced review requested due to automatic review settings November 5, 2026 07:22
Copilot started reviewing on behalf of Byron November 5, 2026 07:25
View session
Copilot AI reviewed Nov 5, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for this test-only change to make Git reference-path coverage platform-independent.

No open issues 🎉

What changed in this PR

This test-only change fixes Windows failures in PathLike revision-argument coverage without changing production reference validation.

Changes:

  • Use PurePosixPath for Git reference names so separators remain forward slashes on every platform.
  • Preserve PathLikeMock coverage and retain native Path for filesystem operations.

Reviewed by GitHub Copilot.

File Description
test/​test_refs.py Import PurePosixPath and use it in the revision-argument test parameterization.

Review effort: Balanced

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot AI balanced review requested due to automatic review settings November 5, 2026 08:42
Copilot started reviewing on behalf of Byron November 5, 2026 08:43
View session
Copilot AI reviewed Nov 5, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

🟡 Changes recommended

Benchmark fingerprints omit harness changes, allowing misleading workload comparisons, while throughput calculations use iteration limits rather than actual processed counts, inflating reported rates.

2 open issues
  • Medium severity Report actual processed object counts in performance metrics · New
  • Medium severity Include benchmark harness sources in the comparison fingerprint · New

Review effort: Balanced

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread gitdb/gitdb/test/fixtures/repository.sh Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/performance/bench_repository.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Byron
Byron force-pushed the fix-ci branch from 861f649 to 0919fed Compare November 5, 2026 08:58
Byron and others added 3 commits November 5, 2026 09:59
@Byron @codex
test(refs): use POSIX paths for Git reference names
9bfb816
<!-- agent -->
Restore Windows CI coverage for `PathLike` revision arguments. The test
introduced in `6de90f1c` uses `Path("refs/heads/main")`, which emits
backslashes on Windows. Those are invalid Git reference names, so resolving
`SymbolicReference` fails during ref-name validation in all four
files/reftable and SHA-1/SHA-256 variants. The same failures were already
present in PR #2336, before the unrelated `patch_env()` change in PR #2340.

Use `PurePosixPath` for the test's Git reference names, which use forward
slashes on every platform. It still implements `os.PathLike`, preserving
coverage through `SymbolicReference` and direct and nested `merge_base()`
arguments alongside `PathLikeMock`. Keep native `Path` for filesystem
operations elsewhere in the module and preserve production validation.

Assisted-by: GPT 6.1 Sol
Co-authored-by: GPT 6.1 Sol <[email protected]>
@Byron @codex
test: isolate repository fixtures from checkout history
0901035
Took a quick look, pretty zoomed out, but think it's
a desirable change as finally the test-suite is independent
of the input repository or state.

<!-- agent -->
Make PR and post-merge test results independent of checkout depth, refs,
and history. The shared test repository and dependency clone sources
previously came from the source checkout, requiring historical objects
and a bootstrap script even though setup already used `gix.testtools`.

Generate small repositories from scratch through `gix.testtools`, with
named root, release, merge, conflict, rename, date, and submodule states.
Adapt legacy assertions to those scenarios while retaining merge,
serialization, traversal, index, remote, and nested-submodule coverage.
Make dirty-submodule removal checks explicit for staged, unstaged, and
untracked data, including dry runs.

Remove the source-history environment override, dependency factory,
checkout lock cleanup, and bootstrap script. The main CI suites now use
shallow checkouts and remove source `.git` metadata before pytest. Add a
regression that initializes the shared fixture from a source copy without
Git metadata, and document the isolation requirement. Hash raw parser
samples in cache arguments to avoid archive filename limits on cold runs.

Assisted-by: GPT 6.0 Astra
Co-authored-by: GPT 6.0 Astra <[email protected]>
@Byron @codex
test(gitdb): generate standalone packed and loose object fixtures
f7633d8
<!-- agent -->
GitDB tests previously opened the source checkout's `.git` directory or
`GITDB_TEST_GIT_REPO_BASE`, making their input depend on clone history.
Give each test class a disposable repository generated by a fixture
script, with packed history and additional loose objects. Isolate Git
configuration and identity during setup and register class cleanup.

Run the script with Bash so the standalone suite retains Python 3.8
support without adding a GixPython dependency. Remove the history override
and full-depth checkout from dependency CI, remove source `.git` before
running the suite, and document the new setup.
Use the actual database size when writing a pack instead of the unrelated
iteration count, which the smaller fixture exposed.

Assisted-by: GPT 6.0 Astra
Co-authored-by: GPT 6.0 Astra <[email protected]>
@Byron
Byron force-pushed the fix-ci branch from 0919fed to f7633d8 Compare November 5, 2026 08:59
Copilot AI balanced review requested due to automatic review settings November 5, 2026 09:03
@Byron Byron changed the title test(refs): use POSIX paths for Git reference names test: isolate repository fixtures and restore Windows reference coverage Nov 5, 2026
Copilot started reviewing on behalf of Byron November 5, 2026 09:07
View session
@Byron @codex
fix(benchmarks): address review feedback on workload comparisons and …
7e8aa8c
…counts

<!-- agent -->
Address benchmark review feedback on the generated fixtures. Copilot noted
that "performance tests still report their iteration limits of 1,000–10,000
as processed counts" even though the fixture has only 90 packed objects.
Use the existing streaming counters and clamp list-based limits to the
available SHA count so both totals and throughput reflect completed work.

Copilot also requested: "Include the benchmark harness sources in the
fingerprint, and add a harness-only change to the digest regression test."
Hash the Python sources in `test/performance` alongside `VERSION` and `git`.
This prevents comparing different timed workloads that return the same
result. Extend the generated source fixture and document the digest scope.

Assisted-by: GPT 6.0 Astra
Co-authored-by: GPT 6.0 Astra <[email protected]>
Copilot AI reviewed Nov 5, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded that would block approval.

No open issues 🎉

2 resolved since last review
  • Medium severity Include benchmark harness sources in the comparison fingerprint
  • Medium severity Report actual processed object counts in performance metrics

Review effort: Balanced

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Byron
Byron force-pushed the fix-ci branch from e851c89 to 7e8aa8c Compare November 5, 2026 09:23
@Byron
Byron merged commit 34dfb13 into main Nov 5, 2026
67 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Byron
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.