-
Notifications
You must be signed in to change notification settings - Fork 0
fix(coverage): admit protected-base test retirement #1218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
67fa35a
fix(coverage): admit protected-base test retirement
seonghobae c24d0e9
test(coverage): prevent sibling-source test bypass
seonghobae 996446f
Merge latest main into replay guard branch
seonghobae da4be4d
Merge remote-tracking branch 'origin/main' into fix/replay-guard-base…
seonghobae a3e2dfc
Merge remote-tracking branch 'origin/main' into fix/replay-guard-base…
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # PR-head replay guard: protected-base alignment | ||
|
|
||
| ## Observed failure | ||
|
|
||
| LineageWeave pull request 258 exact head | ||
| `6dc040c6b3ea0bfc4424bb7afb11b8afd7205d77` failed central OpenCode coverage | ||
| run `32528869351`. The replay guard found that five commits after the newest | ||
| protected-base-descended merge removed three files, including | ||
| `tests/test_lineage_contract.py`. | ||
|
|
||
| The exact protected base | ||
| `ef6f5a5ffcb467bd935dc1e53acc0029669b0bd7` already omitted both that test and | ||
| its same-subject runtime module. The head also omitted both. No path had been | ||
| restored to pre-merge content, the head did not replay an earlier tree, and the | ||
| three-file delta stayed below the conservative bulk-replay threshold. The | ||
| test-regression signal nevertheless treated every post-merge test deletion as | ||
| protected-base evidence loss. | ||
|
|
||
| ## Decision and security boundary | ||
|
|
||
| The guard now distinguishes one base-alignment case from an evidence | ||
| regression. A test absent from the exact protected base is not reported as | ||
| regressed only when a non-test file with the same logical subject and language | ||
| suffix is deleted in the same post-merge range and that source is also absent | ||
| from the protected base, with no same-subject source remaining in the exact | ||
| head. This admits removal of a feature-only source/test pair that aligns the | ||
| head with the protected branch without letting a same-named documentation or | ||
| sibling-source deletion excuse a code-test deletion. | ||
|
|
||
| The following cases remain blocking: | ||
|
|
||
| - a test or same-subject source present on the protected base is removed; | ||
| - a feature-only test is removed while its source remains; | ||
| - a retained test file loses declared test cases without a replacement test | ||
| file; | ||
| - the head exactly replays a pre-merge tree, restores a path to its pre-merge | ||
| content, or crosses the conservative bulk-deletion thresholds. | ||
|
|
||
| This boundary follows NIST SSDF's root-cause and verification practices while | ||
| preserving GitHub's guidance that privileged pull-request workflows must treat | ||
| pull-request state as untrusted input. The decision is based only on immutable | ||
| Git objects from the validated base, merge anchor, and head; no pull-request | ||
| code executes during classification. | ||
|
|
||
| ## Verification | ||
|
|
||
| - A new Git-history regression reproduces a feature-only source/test pair, | ||
| merges the exact protected base, removes the pair, and requires a passing | ||
| replay decision. | ||
| - Existing regressions continue to require failure for protected-base source | ||
| and test removal, test-only deletion, weakened retained tests, exact replay, | ||
| targeted unmerge, and bulk deletion. | ||
| - The patched guard passes against the observed LineageWeave base/head pair and | ||
| reports no regressed protected-base test path. | ||
| - The focused replay-guard suite, complete central Python quality suite, | ||
| docstring coverage, workflow validation, and diff hygiene run on the final | ||
| tree. | ||
| - The project-local uv environment declares pip because the existing bounded | ||
| include regression invokes `python -m pip` for its hash preflight; verification | ||
| no longer depends on an unrecorded manual venv seed. | ||
|
|
||
| ## References | ||
|
|
||
| GitHub. (n.d.). *Secure use reference*. GitHub Docs. Retrieved August 22, 2026, | ||
| from https://docs.github.com/en/actions/reference/security/secure-use | ||
|
|
||
| Souppaya, M., Scarfone, K., & Dodson, D. (2022). *Secure software development | ||
| framework (SSDF) version 1.1: Recommendations for mitigating the risk of | ||
| software vulnerabilities* (NIST Special Publication 800-218). National | ||
| Institute of Standards and Technology. https://doi.org/10.6028/NIST.SP.800-218 |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.