Skip to content

fix(desktop): sign zip data descriptors - #54877

Closed
Dante-dan wants to merge 1 commit into
anomalyco:devfrom
Dante-dan:debug-zip-compat
Closed

Dante-dan wants to merge 1 commit into
anomalyco:devfrom
Dante-dan:debug-zip-compat

Conversation

@Dante-dan

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #54828

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Enable Zip.js data descriptor signatures for exported debug logs. macOS ditto rejects the unsigned descriptors produced by the default writer options.

How did you verify your code works?

  • Ran the issue’s two-entry reproducer on macOS: default options failed with Couldn’t read pkzip signature; signed descriptors extracted successfully with ditto, including the manifest and log.
  • Desktop packaging tests: 7 passed (bun test --timeout 30000 electron-builder.config.test.ts).
  • Desktop typecheck: passed (bun run typecheck). Root bun run check: lint/SDK docs completed with warnings and no errors; workspace typechecks could not complete because Astro telemetry in the posts/www packages tried to write outside the sandbox (EPERM). A retry with telemetry disabled had the same environment failure.
  • Finder / Archive Utility GUI and a full desktop export were not exercised.

Screenshots / recordings

No UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good: the change is minimal and correct.

On Linux I ran the #54828 reproducer against the same ZipWriter setup as writeZip. On the base, each entry's data descriptor starts with the CRC. With this change, every descriptor starts with PK\x07\x08. The zip still reads back through zip.js ZipReader and unzip -t. dataDescriptorSignature is a documented option in the pinned zip.js 2.7.62, and the desktop typecheck passes. I couldn't check ditto or Archive Utility because that needs macOS; your macOS ditto test covers it.

Public API: unchanged. The exported zip remains a standard zip; only the optional descriptor signature is added.

No concerns.

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

desktop: "Export debug logs" zip can't be opened by macOS Archive Utility

1 participant