fix(tia): persist graph on detached HEAD - #1844
Open
calebdw wants to merge 2 commits into
Open
Conversation
calebdw
force-pushed
the
calebdw/push-owkpumrmwusw
branch
from
August 11, 2026 03:29
1aeae06 to
4779cf9
Compare
Consolidate duplicated CI environment detection logic from Snapshot and BaselineSync into a shared Pest\Support\Ci class. This reduces duplication and provides a single source of truth for CI detection, including comprehensive environment variable checks for all major CI providers.
calebdw
force-pushed
the
calebdw/push-owkpumrmwusw
branch
from
August 17, 2026 20:36
4779cf9 to
b794a6b
Compare
Detached HEAD is common in valid TIA recording environments, not just unsafe throwaway states. GitLab CI checks out commits detached by default, which prevented baseline publisher jobs from writing graph.json at all. Local workflows that use tools like jj can also leave Git HEAD detached while still expecting Pest to record and reuse the TIA graph. Suppressing all writes in those cases makes --tia appear to run successfully while silently producing an empty baseline. Always allow graph writes and deletions, using the configured or fallback branch name when Git cannot report a current branch.
calebdw
force-pushed
the
calebdw/push-owkpumrmwusw
branch
from
August 17, 2026 22:26
b794a6b to
63427c7
Compare
Contributor
Author
|
@nunomaduro, I came across this while testing the GitLab tia work---this is needed to support recording tia in gitlab ci |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What:
Description:
This updates TIA so detached HEAD checkouts can still persist the dependency graph.
Detached HEAD is not necessarily an unsafe or throwaway state. GitLab CI checks out commits detached by default, which prevents a TIA baseline publisher job from writing
graph.json. Local workflows that use tools like jj with colocated Git repositories can also leave Git HEAD detached while still expecting Pest to record and reuse the TIA graph.Previously, TIA suppressed graph writes, deletes, and
--freshpurges when HEAD was detached. That made--tiaappear to run successfully while silently producing an empty baseline. This removes that suppression and continues to use the configured or fallback branch name when Git cannot report a current branch.The detached-head reclamation tests were updated to assert the new intended behavior: detached HEAD runs can rebuild, refresh, and replace unreadable TIA state.
Thanks!