Skip to content

feat: retire injected FaceTime helper - #50

Closed
RomneyDa wants to merge 1 commit into
mainfrom
feat/capture-only-facetime-bridge
Closed

RomneyDa wants to merge 1 commit into
mainfrom
feat/capture-only-facetime-bridge

Conversation

@RomneyDa

Copy link
Copy Markdown
Member

Summary

Retire the unsupported FaceTime/Phone dylib-injection path and make the native package capture-only.

The package now ships only the out-of-process facetime-audio-capture binary plus release metadata. It preserves the working process audio tap and paired audio-device path while removing helper sources, private framework headers, LLDB injection scripts, helper IPC artifacts, and helper-specific tests.

Why

FaceTime and Phone are Apple platform binaries. macOS library validation rejects a Developer-ID-signed helper with mapping process is a platform binary, but mapped file is not. Debug-enabled SIP permits attachment but cannot make third-party code platform-signed, so the injected design is not viable for normal users.

The coordinated OpenClaw change uses explicit operator-assisted call attachment and keeps call control out of process: openclaw/openclaw#158392

Validation

  • Native harness: 42/42 tests passed.
  • bash scripts/test-native.sh: passed, including real PCM pipe-loss and generation-bound signaling.
  • make native-archive && make native-verify: passed.
  • Release archive verified as capture-only.
  • Branch is 1 commit ahead of and 0 behind current main.

No SIP change, reboot, debugger access, or injected dylib is required by this package.

@RomneyDa
RomneyDa requested a review from a team as a code owner September 29, 2026 05:13
@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P1 Urgent regression or broken agent/channel workflow affecting real users now. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 29, 2026
@clawsweeper

clawsweeper Bot commented Sep 29, 2026

Copy link
Copy Markdown

Codex review: blocked before merge. Reviewed September 29, 2026, 1:16 AM ET / 05:16 UTC.

ClawSweeper review

What this changes

Removes the injected FaceTime call-control helper and its build and IPC paths, and changes the native archive and Homebrew formula to distribute only out-of-process audio capture and metadata.

Merge readiness

⛔ Blocked before merge - 11 items remain

Keep this PR open. The capture-only direction addresses the stated macOS limitation, but the current plugin and Homebrew release path still depend on the retired package contract.

Priority: P1
Reviewed head: 6c98c953c6440732754b2af73733ab00e27972f8
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The direction is coherent and the diff removes substantial unsupported code, but release-verifier regressions and the unresolved upgrade contract limit readiness.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR reports native harness, PCM fault, and archive checks for the retained capture path, so the external-contributor proof gate does not apply. The release handoff separately calls for clean-macOS permission and operator attach/detach acceptance before publication; no stored-data contract changes.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR reports native harness, PCM fault, and archive checks for the retained capture path, so the external-contributor proof gate does not apply. The release handoff separately calls for clean-macOS permission and operator attach/detach acceptance before publication; no stored-data contract changes.
Evidence reviewed 10 items Introduced package contract: The PR changes the release builder to package the capture executable and metadata without the helper artifacts.
Affirmative plugin dependency: The PR body explicitly identifies the coordinated OpenClaw plugin change at openclaw/openclaw#158392; this makes the plugin's native-package contract relevant to the review.
Current plugin rejects the new archive: The plugin requires a readable helper dylib, helper build ID, and native-protocol.env before returning the capture path. The proposed four-file archive omits all three.
Findings 3 actionable findings [P1] Gate removal of helper artifacts on a compatible plugin rollout
[P2] Reject additional checksum records
[P2] Restore capture runpath validation
Security Needs attention Ambiguous checksum sidecars pass verification: Additional checksum records are ignored after the first, weakening the release metadata contract; the archive bytes are still checked against that first record.
Build-machine runpaths are no longer rejected: The capture executable's LC_RPATH values are no longer inspected, allowing nonportable runtime search paths through independent release verification.

How this fits together

The native capture executable receives audio from an Apple-signed FaceTime media process and streams PCM to the OpenClaw FaceTime plugin. The plugin owns operator approval, call lifecycle, and realtime media; Homebrew distributes the signed native archive.

flowchart LR
A[FaceTime media process] --> B[Native audio capture]
C[OpenClaw Mic route] --> B
B --> D[PCM stream]
D --> E[OpenClaw FaceTime plugin]
E --> F[Realtime session]
G[Signed release archive] --> B
Loading

Decision needed

Question Recommendation
What release order will keep existing FaceTime installations usable while the native archive, OpenClaw plugin, and Homebrew tap switch to the capture-only contract? Coordinate the rollout: Stage the compatible plugin and tap profile, establish the upgrade order, and publish the native archive after clean-macOS acceptance.

Why: The current plugin rejects the proposed archive, the current tap profile cannot install it, and publication precedes the tap handoff gate; choosing the rollout order requires release-owner intent.

Before merge

  • Gate removal of helper artifacts on a compatible plugin rollout (P1) - The current OpenClaw plugin requires the helper dylib, build ID, and protocol file before returning the capture executable. This archive removes all three, so publishing it to existing plugin users makes their FaceTime workflow fail. Establish the compatible upgrade path before this becomes a native release.
  • Reject additional checksum records (P2) - The verifier now reads the first non-empty checksum line without checking that it is the only one. A sidecar with a correct first record and conflicting additional records passes, whereas the previous release contract rejected it. Restore the single-record check.
  • Restore capture runpath validation (P2) - The replacement dependency check inspects otool -L output but no longer inspects LC_RPATH. A signed capture binary carrying a build-machine runpath can now pass release verification; retain the former runpath rejection for the capture executable.
  • Resolve security concern: Ambiguous checksum sidecars pass verification - Additional checksum records are ignored after the first, weakening the release metadata contract; the archive bytes are still checked against that first record.
  • Resolve security concern: Build-machine runpaths are no longer rejected - The capture executable's LC_RPATH values are no longer inspected, allowing nonportable runtime search paths through independent release verification.
  • Resolve merge risk (P1) - Publishing the capture-only package before a compatible OpenClaw plugin reaches users makes the current plugin reject the installed native package and stops FaceTime setup or capture.
  • Resolve merge risk (P1) - The tap's current formula still requires deleted helper files. The release workflow would publish the GitHub release and then fail the Homebrew handoff until the tap profile is updated.
  • Resolve merge risk (P1) - The release verifier now accepts extra checksum records and no longer rejects build-machine LC_RPATH entries in the capture executable.
  • Resolve merge risk (P1) - The release handoff still calls for clean-macOS capture permission and operator attach/detach acceptance before first publication; the PR reports harness and archive validation, but no such live call result.
  • Complete next step (P2) - Restore the verifier guards and obtain an approved plugin, tap, and native upgrade sequence before merge or publication.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

  • [P1] Gate removal of helper artifacts on a compatible plugin rollout — scripts/build-native-release.sh:78-80
  • [P2] Reject additional checksum records — scripts/verify-native-release.sh:19-25
  • [P2] Restore capture runpath validation — scripts/verify-native-release.sh:59-62
  • [low] Ambiguous checksum sidecars pass verification — scripts/verify-native-release.sh:19
  • [medium] Build-machine runpaths are no longer rejected — scripts/verify-native-release.sh:59
Agent review details

Security

Needs attention: The patch adds no new privileged execution path, but it weakens two checks in the signed-release artifact verifier.

Review metrics

Metric Value Why it matters
Release inventory 7 files → 4 files The smaller archive changes the native package contract consumed by the plugin and Homebrew.
Diff size 47 files; +149/−4603 lines Most removed code is the retired helper and its tests, while the release verifier is substantially rewritten.

Merge-risk options

Maintainer options:

  1. Repair and coordinate before release (recommended)
    Restore the two verifier checks and agree on a plugin, tap, and native upgrade sequence before publishing the new archive.
  2. Pause the capture-only landing
    Hold this PR if the companion plugin and tap changes cannot be made ready for a safe user upgrade.

Technical review

Best possible solution:

Restore the verifier's checksum and runpath guards, then stage the compatible plugin and tap profile with an explicit upgrade order and clean-macOS release acceptance.

Do we have a high-confidence way to reproduce the issue?

Yes for the compatibility failure: the current plugin requires three files omitted by the new archive. The verifier regressions are also visible in source; no macOS call was executed in this read-only review.

Is this the best way to solve the issue?

No as submitted. Retiring injection fits the documented platform constraint, but the package transition needs a compatible rollout and the release verifier should retain its unrelated safeguards.

Full review comments:

  • [P1] Gate removal of helper artifacts on a compatible plugin rollout — scripts/build-native-release.sh:78-80
    The current OpenClaw plugin requires the helper dylib, build ID, and protocol file before returning the capture executable. This archive removes all three, so publishing it to existing plugin users makes their FaceTime workflow fail. Establish the compatible upgrade path before this becomes a native release.
    Confidence: 0.97
  • [P2] Reject additional checksum records — scripts/verify-native-release.sh:19-25
    The verifier now reads the first non-empty checksum line without checking that it is the only one. A sidecar with a correct first record and conflicting additional records passes, whereas the previous release contract rejected it. Restore the single-record check.
    Confidence: 0.98
  • [P2] Restore capture runpath validation — scripts/verify-native-release.sh:59-62
    The replacement dependency check inspects otool -L output but no longer inspects LC_RPATH. A signed capture binary carrying a build-machine runpath can now pass release verification; retain the former runpath rejection for the capture executable.
    Confidence: 0.94

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6bdd4f73a26f.

Labels

Label changes:

  • add P1: A capture-only release would break the current FaceTime plugin's native-package check for existing users.
  • add merge-risk: 🚨 compatibility: The proposed archive removes artifacts that the current plugin requires before it will use capture.
  • add merge-risk: 🚨 security-boundary: The rewritten release verifier drops checksum-record cardinality and capture runpath checks from artifact admission.
  • add merge-risk: 🚨 automation: The unchanged tap profile differs from this PR's formula, so the post-publication Homebrew handoff gate would fail.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The MEMBER-authored PR reports native harness, PCM fault, and archive checks for the retained capture path, so the external-contributor proof gate does not apply. The release handoff separately calls for clean-macOS permission and operator attach/detach acceptance before publication; no stored-data contract changes.

Label justifications:

  • P1: A capture-only release would break the current FaceTime plugin's native-package check for existing users.
  • merge-risk: 🚨 compatibility: The proposed archive removes artifacts that the current plugin requires before it will use capture.
  • merge-risk: 🚨 automation: The unchanged tap profile differs from this PR's formula, so the post-publication Homebrew handoff gate would fail.
  • merge-risk: 🚨 security-boundary: The rewritten release verifier drops checksum-record cardinality and capture runpath checks from artifact admission.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The MEMBER-authored PR reports native harness, PCM fault, and archive checks for the retained capture path, so the external-contributor proof gate does not apply. The release handoff separately calls for clean-macOS permission and operator attach/detach acceptance before publication; no stored-data contract changes.

Evidence

Security concerns:

  • [low] Ambiguous checksum sidecars pass verification — scripts/verify-native-release.sh:19
    Additional checksum records are ignored after the first, weakening the release metadata contract; the archive bytes are still checked against that first record.
    Confidence: 0.97
  • [medium] Build-machine runpaths are no longer rejected — scripts/verify-native-release.sh:59
    The capture executable's LC_RPATH values are no longer inspected, allowing nonportable runtime search paths through independent release verification.
    Confidence: 0.91

What I checked:

Likely related people:

  • RomneyDa: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • omarshahine: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • SebTardif: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore the checksum-record and capture LC_RPATH checks in the release verifier.
  • Document and approve the plugin, tap, and native release order against the existing installed package contract.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

steipete commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for identifying the platform-library-validation failure and developing the out-of-process fallback. We are retaining the injected helper for systems where the actual loader permits it, so this removal-only proposal is superseded by #53.

The replacement keeps both artifacts, checks the current security state, selects injection only after confirmed initialization, and otherwise selects out-of-process capture. It documents the host's operator-assisted admission boundary and credits your contribution. No system security settings are changed.

@steipete steipete closed this Oct 1, 2026
steipete added a commit that referenced this pull request Oct 2, 2026
…#53)

Keep the injected FaceTime/Phone helper and ship it beside the out-of-process facetime-audio-capture binary. Add `facetime-audio-capture --select-backend [--app FaceTime|Phone]`, which checks SIP, existing Developer Tools authorization and successful helper initialization, and selects injection only where the OS permits it; stock systems fall back to capture. Replaces #50.

Live verification on a SIP-disabled Mac is still outstanding; stock-system behavior and selection logic are covered by native checks and tests.

Co-authored-by: Dallin Romney <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P1 Urgent regression or broken agent/channel workflow affecting real users now. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants