Skip to content

Navigation Menu

Sign in
Sign up

test(fuzzing): include full parameter list in fuzzer log output - #1760

Open
webdevsamran wants to merge 2 commits into
collective:main from
webdevsamran:fix/issue-1758
Open

test(fuzzing): include full parameter list in fuzzer log output #1760
webdevsamran wants to merge 2 commits into
collective:main from
webdevsamran:fix/issue-1758

Conversation

@webdevsamran

@webdevsamran webdevsamran commented Sep 3, 2026
edited
Loading

Copy link
Copy Markdown

Linked issue

Description

Includes the full parameter list (\multiple, \should_walk) alongside the entrypoint name and base64-encoded calendar payload in the fuzzer log output (\src/icalendar/fuzzing/ical_fuzzer.py), formatted via \ ormat_fuzz_log\ in \src/icalendar/tests/fuzzed/init.py. This enables reproducing fuzzed test cases with their exact execution parameters. \Calendar.from_ical\ is kept inlined in the fuzzer per review feedback.

AI disclosure: I used AI assistance (Claude 3.7 Sonnet / Gemini 2.5) to help draft and refine the implementation, test coverage, and changelog entry for this change.

Checklist

  • I added a change log entry, following the instructions in all subsections under Change log requirements.
  • I followed icalendar's Artificial intelligence policy and disclosed my Responsible AI use in my commit messages, if applicable.
  • I added or updated tests, if applicable.
  • I ran and ensured all tests pass locally by following Run tests.
  • I added or edited documentation as necessary, both as docstrings to be rendered in the API documentation and narrative documentation, following the Style guide.

@github-actions github-actions Bot added the ai-suspicion This contribution is possibly created with lots of AI help without enough human understanding. label Sep 3, 2026

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

This pull request did not pass quality checks and AI use is suspected. Please review Contribute and make any necessary amendments.

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Profile summary:

GitHub user: webdevsamran
🟢 No concerns found with user's profile.
🟡 Some concerns found with recent PR activity.
🟢 No concerns found with recent issue activity.
For a more detailed report, run `gh-profiler webdevsamran`.
Full profile
GitHub user: webdevsamran
🟢 No concerns found with user's profile.
 🟢 Account age: 3 years
 🟢 Profile information:
 name: Samran Asif
 email: samranwebdev2000@gmail.com
 bio: Full Stack Developer
 Empty fields: company, blog, location
🟡 Some concerns found with recent PR activity.
 100 PRs opened in the last 21 days.
 10 opened against repos the user owns.
 0 opened against repos in publicly associated orgs.
 90 opened against external repos.
 🟡 29 of 90 external PRs closed without merging in the last 21 days.
🟢 No concerns found with recent issue activity.
 43 new issues opened in the last 21 days.
 43 opened in repos the user owns.
 0 opened in repos in publicly associated orgs.
 0 opened in external repos.
 🟢 0 external issues closed as NOT_PLANNED.
 🟢 0 external issues opened with the same title.

coveralls-official Bot commented Sep 3, 2026
edited
Loading

Copy link
Copy Markdown

Coverage Status

coverage: 97.562%. remained the same — webdevsamran:fix/issue-1758 into collective:main

Copy link
Copy Markdown
Member

@webdevsamran We already have a PR open for this. Could you help us out and give it a review to help us get it merged quicker?

Comment on lines 37 to 38
# print the ICS file for the test case extraction
# see https://stackoverflow.com/a/27367173/1320237

@angatha angatha Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please keep this close to the .encode("UTF-8", "surrogateescape")part.

Comment thread src/icalendar/fuzzing/ical_fuzzer.py Outdated

@angatha angatha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for your first contribution. Code looks fine besindes some minor tweaks.

A CONTRIBUTING.md file usually contains information how you can perticipate in a project. We have such a file and it links to our guide.

  1. Please use the PR template (for future PRs)
  2. Then check all check boxes after you did the tasks.
  3. We need a changelog entry. Please provide one. The guide contains information about that.
  4. Please write the entry yourself and not with generative AI
  5. Please clarify AI usage in the PR description and the changelog entry. You may also update the commit message (yourself)

Format fuzzer log output with entrypoint name and parameters (multiple, should_walk) alongside the base64-encoded calendar content to enable reproducing test cases. Keep Calendar.from_ical inlined in fuzzer. Add changelog entry.
AI use disclosure:
Model: Claude 3.7 Sonnet / Gemini 2.5
Prompt: Update fuzzer logging to output full parameter list (multiple, should_walk) for reproducing fuzzed calendar test cases, write unit tests, and add news changelog entry.
Output: Implemented format_fuzz_log, updated ical_fuzzer.py, added unit test in test_fuzzed_calendars.py, and added news/1758.internal.

Copy link
Copy Markdown
Author

Thanks for the review and guidance @angatha!

All requested changes are completed:

  1. **Inlined \Calendar.from_ical**: Kept \icalendar.cal.calendar.Calendar.from_ical\ inlined in \src/icalendar/fuzzing/ical_fuzzer.py\ to reduce diff noise.
  2. Changelog entry added: Added
    ews/1758.internal\ per the contributing guide and AI policy. Verified that \ owncrier check\ passes.
  3. PR description: Updated the PR description to use the repository's official PR template with all checkboxes marked.
  4. AI usage disclosure: Disclosed AI assistance in the PR description, the changelog fragment, and the commit message.
  5. Quality checks: Verified all tests pass (\pytest src/icalendar/tests/fuzzed/test_fuzzed_calendars.py) and
    uff check\ /
    uff format\ are clean.

Copy link
Copy Markdown

Comment on lines 37 to +42
print(
base64.b64encode(calendar_string.encode("UTF-8", "surrogateescape")).decode(
"ASCII"
format_fuzz_log(
icalendar.cal.calendar.Calendar.from_ical,
multiple,
should_walk,
calendar_string,

@angatha angatha Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

On a second thought, this should be called from fuzz_v1_calendar in __init__.py and include the version (see other comment).


The calendar_string is a fuzzed input.
"""
try:

@angatha angatha Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
print(format_fuzz_log('v1', from_ical, multiple, should_walk, calendar_string))
try:

Comment on lines +57 to +58
f"{from_ical.__qualname__} multiple={multiple} "
f"should_walk={should_walk} {encoded}"

@angatha angatha Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
f"{from_ical.__qualname__} multiple={multiple} "
f"should_walk={should_walk} {encoded}"
f"{version}{from_ical.__qualname__} multiple={multiple} "
f"should_walk={should_walk} {encoded}"

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

Reviewers

@angatha angatha angatha requested changes
@ennamarie19 ennamarie19 Awaiting requested review from ennamarie19 ennamarie19 is a code owner
@niccokunzmann niccokunzmann Awaiting requested review from niccokunzmann niccokunzmann is a code owner
@SashankBhamidi SashankBhamidi Awaiting requested review from SashankBhamidi
@stevepiercy stevepiercy Awaiting requested review from stevepiercy stevepiercy is a code owner

Requested changes must be addressed to merge this pull request.

Labels

ai-suspicion This contribution is possibly created with lots of AI help without enough human understanding.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Fuzzing log should contain full parameter list to icalendar.tests.fuzzed.fuzz_v1_calendar

AltStyle によって変換されたページ (->オリジナル) /