Skip to content

Fix duplicate checker accuracy and add regression coverage - #32

Merged
0x5t4l1n merged 1 commit into
mainfrom
fix/duplicate-check-correctness
Oct 23, 2026
Merged

0x5t4l1n merged 1 commit into
mainfrom
fix/duplicate-check-correctness

Conversation

@0x5t4l1n

Copy link
Copy Markdown
Collaborator

Summary

Fix incorrect duplicate-check results for moved/deleted payload files and misleading PR line numbers. Compare complete merge-base/head contents so diff-like payload prefixes and truncated patches cannot hide additions.

Preserve whitespace in exact comparisons and report whitespace-only matches as advisory. Only exact duplicates fail the check and apply the duplicate label. Unreadable or incomplete payload data now causes an error instead of a successful partial scan.

Add an offline regression suite and a read-only CI workflow. Update contributor guidance and replace copied, unrelated instructions in eight category READMEs with context-specific validation guidance.

Motivation / Security-Research Context

Payload whitespace and protocol framing can affect behavior. Contributors need accurate locations and reliable duplicate checks without executing payloads.

Affected Category

Repository automation and documentation. No payload files changed.

Duplicate Check

Not applicable to payload additions: no payload entries were added or removed. Existing duplicate groups were left for contextual review.

Validation Performed

  • python -m unittest discover -s scripts -p 'test_*.py' -v: 13 tests passed on Python 3.10.
  • Covers real line numbers, diff-like prefixes, truncated patches, deleted-file moves, extension changes, file reordering, additional exact occurrences, whitespace advisory status/labels, diverged target branches, unreadable files and incomplete API content.
  • git diff --cached --check: passed before commit.
  • All tests use synthetic text and mocked GitHub responses; no payload execution or target interaction.
  • Existing working-directory payload deletions were excluded by using a separate worktree.

The existing privileged duplicate-check workflow intentionally runs base-branch code, so this PR's new implementation is exercised by the new regression workflow and will take effect in that workflow after merge.

Source Attribution and References

N/A; fixes based on repository review and synthetic reproductions.

AI-Assisted Contribution Disclosure

  • AI tools assisted with this contribution.
  • Tool/model: Codex; exact model version unknown.
  • Provider: OpenAI.
  • What it helped with: Repository review, implementation, regression tests, documentation and PR preparation.
  • Human validation performed: No human validation claimed; maintainer review is pending. Automated validation is listed above.

Licensing and Originality

Changes are original repository maintenance and contain no credentials, secrets, or private/customer data. Submitted under the repository's MIT License.

Responsible Use Confirmation

This change only reads synthetic or repository text and is consistent with the authorized-testing-only scope in DISCLAIMER.md.

@github-actions github-actions Bot added documentation Improvements or additions to documentation maintenance Changes to CI workflows or repository automation labels Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ No duplicate payload entries detected

Checked 0 normalized entries from added/modified payload files on the latest push.

Posted automatically by the Duplicate Payload Check workflow.

@0x5t4l1n
0x5t4l1n merged commit b8e34f6 into main Oct 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation maintenance Changes to CI workflows or repository automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant