Skip to content

Patch support - #717

Draft
rhubert wants to merge 4 commits into
BobBuildTool:masterfrom
rhubert:patchSupport
Draft

rhubert wants to merge 4 commits into
BobBuildTool:masterfrom
rhubert:patchSupport

Conversation

@rhubert

@rhubert rhubert commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Add scm-patch support.

Fixes #347.

Apply recipe-local unified diffs with exact context and bounded
unique hunk matching. Validate targets and include patch and series
contents in checkout identities and the recipe cache.

Prepare complete overlays before writing and restore originals on
write failures. Persist old patch bytes and tree fingerprints for
safe reverse updates, verified-base retries, and attic recovery
of unverified failures.

Integrate overlay status and clean-checkout handling through
explicit SCM capabilities and a shared fingerprint policy. Cover
parser, rollback, and recovery behavior through unit tests and
real Git and URL checkouts.
Delegate Jenkins plugin SCM generation through patch overlays and
schedule a serialized patch-only command after plugin checkout. Keep the
overlay bytes self-contained for that command.
Record resolved overlay manifests and patched-tree fingerprints in SCM
audit records using the shared overlay fingerprint policy. Accept these
optional fields in audit schemas, including Git, while retaining support
for records without overlay metadata.

Cover patched URL fingerprints and a real Git audit serialization round
trip. Keep audit fields out of Git SCM defaults.
Document recipe-local patch files and series manifests, checkout
identity semantics, validation rules, and bounded hunk matching.
Explain safe inline updates, transactional failure recovery,
verified base retries, creation collisions, and symlink rules.
@rhubert

rhubert commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor Author

I'm still in process of reviewing / testing...

The regular build with file:/files: seams to work as expected (including inline switching, error reporting,..) but the following items still need some manual testing:

  • Jenkins
  • series

@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.80882% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.56%. Comparing base (7baba22) to head (e9a3d38).

Files with missing lines Patch % Lines
pym/bob/scm/patch.py 90.70% 42 Missing ⚠️
pym/bob/builder.py 85.36% 6 Missing ⚠️
pym/bob/input.py 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #717      +/-   ##
==========================================
- Coverage   89.89%   89.56%   -0.33%     
==========================================
  Files          50       51       +1     
  Lines       16897    17422     +525     
==========================================
+ Hits        15189    15604     +415     
- Misses       1708     1818     +110     

☔ 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.

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.

scm: natively support patch sets

1 participant