fix: remove zip64 comment and add zip64 extensible data sector#747
fix: remove zip64 comment and add zip64 extensible data sector#747Pr0methean merged 31 commits intomasterfrom
zip64 comment and add zip64 extensible data sector#747Conversation
There was a problem hiding this comment.
This PR removes the ZIP64 comment functionality from the codebase. While the changes are mostly mechanical and remove unused functionality, there is a critical logic error in the set_raw_comment method.
The removal of ZIP64 comment support changes behavior for comments exceeding 65,535 bytes - they are now silently discarded instead of being preserved. This is a breaking behavioral change that could cause data loss without any error indication to callers.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on removing the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly removes the concept of a zip64_comment, which doesn't exist in the ZIP64 specification, and instead correctly refers to the 'extensible data sector'. The changes are well-aligned with this goal. I've provided a couple of suggestions to complete the refactoring and improve the handling of long comments to prevent silent data loss.
zip64 comment and add zip64 extensible data sector
|
Hi @Pr0methean This MR removes the zip64 comment that does not exists in the spec (can you also confirm that?). Also this MR adds a test to the check extensible data. BUT we are forcing a field Technically we could use any field at the MAX value to force the file as zip64. That's in one of the latest commit If you agree with that, I think this MR is nearly ready |
|
I can confirm that there's no mention of the comment field that's specific to ZIP64, having examined all instances of the word "comment" in the APPNOTE. |
Security Policy Alert: Secret Policy ViolationThis workflow run has been blocked by StepSecurity's secrets policy because it accesses secrets and the workflow file differs from the default branch. To approve this workflow, please add the Note: The label must be added by someone other than the PR author (Its-Just-Nans) or automation bots to ensure proper security review. After the label is added, you can re-run the blocked workflow to proceed. This workflow will be automatically approved once merged into the default branch. For more information, see StepSecurity's Secret Exfiltration Policy documentation. |
@step-security-bot It'd be nice if you'd wait for the workflow-level |
|
Hi @Pr0methean I updated the MR fixing the comments For me I think this should be a major bump. But apparently (from obi1kenobi/cargo-semver-checks#1613), this is not a breaking change, and I discovered that semver in rust is definitively weird (https://predr.ag/blog/some-rust-breaking-changes-do-not-require-major-version/) If we consider this a minor bump, a compilation could break if
|
|
I guess in this case, the version bump is a judgement call where anything we choose will lead to complaints. But I suspect a minor bump will probably give us fewer complaints than a major bump in this case. |
The
zip64_commentis not part of the ZIP specifications, it was previously added and was overriding thezip64_extensible_data_sectorwithout using the correct format ofzip64_extensible_data_sectorThese methods are now doing nothing. The method
set_comment()now truncate the comment if too long (more thanu16::MAXRelated to