Skip to content

[Fix] Restore macOS attachments and prepare v0.0.17 - #571

Merged
samzong merged 2 commits into
mainfrom
chore/release-v0.0.17
Nov 25, 2026
Merged

samzong merged 2 commits into
mainfrom
chore/release-v0.0.17

Conversation

@samzong

@samzong samzong commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Prepare the stable v0.0.17 release, restore inbox attachment reads on macOS after an app restart, and stop macOS release publishing when signing or notarization fails.

Type of change

  • [Fix] bug fix
  • [Build] CI, packaging, or tooling change
  • [Chore] maintenance

Why is this needed?

All seven workspace manifests must match the release tag. Local desktop E2E tests found that macOS leaves /dev/fd/<fd> aliases unresolved, so valid inbox attachments were rejected. In addition, .github/workflows/release.yml skipped signing when APPLE_CERTIFICATE was empty and retried with ad-hoc signing after notarization failures.

What changed?

  • Set all seven workspace manifests to 0.0.17 and move the curated unreleased notes under the dated 0.0.17 release entry.
  • Keep reading the opened file descriptor. When the descriptor path stays unresolved, resolve the requested path and require its device and inode to match the opened file.
  • Require all five Apple signing and notarization secrets in .github/workflows/release.yml, remove the ad-hoc signing retry, and pass -c.mac.type=distribution -c.mac.forceCodeSigning=true to electron-builder on macOS.
  • Read the root version in packages/desktop/test/release-scripts.test.ts and cover unresolved descriptor aliases and file replacement in packages/desktop/test/inbox-resolve.test.ts.

Architecture impact

  • Owning layer: desktop main process, workspace release metadata, and GitHub Actions release workflow.
  • Cross-layer impact: none. IPC contracts and persistence formats stay unchanged.
  • Invariants touched from docs/architecture-invariants.md: filesystem reads stay confined to <workspace>/<taskId>/inbox and read from the opened file handle.
  • Why those invariants remain protected: real-path confinement and dev/ino matching run before readFile on the opened descriptor, and the release workflow fails before verify-release or publish-release-notes can publish a draft release.

Linked issues

No linked issue.

Validation

  • pnpm lint
  • pnpm test
  • pnpm build
  • pnpm check:ui-contract
  • Manual smoke test

Commands and results:

pnpm --config.verifyDepsBeforeRun=false check -> passed (shared 34, core, desktop 402, pwa 61)
pnpm build -> passed
Desktop Playwright smoke and Gateway E2E -> 20 passed on macOS (persistence restart case failed before fix and passed after fix)
node scripts/verify-release-version.mjs --tag v0.0.17 -> all 7 workspace manifests aligned at 0.0.17
electron-builder --linux --x64 --publish never -> AppImage and deb built on Linux x64
actionlint .github/workflows/release.yml -> passed
Release workflow fault-injection probe -> missing APPLE_* secrets exit 1; injected notarization exit 42 stops after 1 run; empty keychain throws with forceCodeSigning=true and warns without it

Unverified

Remote CI on the updated commit, live Apple signing and notarization on GitHub-hosted macOS runners, Windows x64 packaging, and final v0.0.17 release assets await the remote workflow runs. No release tag exists yet.

Screenshots or recordings

Not applicable. No renderer layout or style files changed.

Release note

  • User-facing change. Release note is included below.
Restored inbox attachment reads on macOS after an app restart and required valid macOS code signing and notarization during release builds.

Checklist

  • All commits are signed off (git commit -s)
  • The PR title uses at least one approved prefix: [Feat], [Fix], [UI], [Docs], [Refactor], [Build], or [Chore]
  • The summary explains both what changed and why
  • Validation reflects the commands actually run for this PR
  • Architecture impact is described and references any touched invariants
  • Cross-layer changes are explicitly justified
  • The release note block is accurate

Signed-off-by: samzong <samzong.lu@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Hi @samzong,
Thanks for your pull request!
If the PR is ready, use the /auto-cc command to assign Reviewer to Review.
We will review it shortly.

Details

Instructions for interacting with me using comments are available here.
If you have questions or suggestions related to my behavior, please file an issue against the gh-ci-bot repository.

Execution log

Open the execution log

@github-actions github-actions Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines. labels Nov 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: samzong

Details Needs approval from an approver in each of these areas:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions github-actions Bot added approved Approved for merge needs-kind Indicates an issue or PR lacks a `kind/foo` label and requires one. labels Nov 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pr is currently missing a label matching the regular expression ^kind/, so the needs-kind label has been applied. It will be removed automatically once a matching label is added.

Execution log

Open the execution log

Signed-off-by: samzong <samzong.lu@gmail.com>
@github-actions github-actions Bot added size/L Denotes a PR that changes 100-499 lines. and removed size/M Denotes a PR that changes 30-99 lines. labels Nov 25, 2026
@samzong
samzong marked this pull request as ready for review November 25, 2026 18:10
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T18:15:19.168144Z 77630b6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@samzong
samzong merged commit 1524486 into main Nov 25, 2026
13 checks passed
@samzong
samzong deleted the chore/release-v0.0.17 branch November 25, 2026 18:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 77630b6e80

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +74 to +75
const targetStat = await stat(realTarget).catch(() => null);
if (!targetStat || targetStat.dev !== openedStat.dev || targetStat.ino !== openedStat.ino) return null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve atomic confinement checks in the unresolved-fd fallback

When /dev/fd remains unresolved, as on macOS, a process that can modify the inbox can bypass this check: initially point the attachment at an outside file so open() obtains its descriptor, replace the symlink with an ordinary inbox file during resolveValidatedPath(), then restore the outside-pointing symlink before stat(realTarget). Because stat() follows symlinks, its device/inode now matches the outside descriptor, and readFile() returns that file's contents through inbox:read-file. I reproduced this with real temporary files while emulating the unresolved descriptor alias. The fallback needs descriptor-based confinement or race-resistant traversal, plus a symlink-swap regression test, to preserve the fd-centric/no-TOCTOU requirement in docs/agent-rules/main-process.md.

AGENTS.md reference: AGENTS.md:L27-L27

Useful? React with 👍 / 👎.

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

Labels

approved Approved for merge do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-kind Indicates an issue or PR lacks a `kind/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant