Repository navigation
fix(macos): timestamp hash-pinned Developer ID signatures - #118989
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 1:22 PM ET / 17:22 UTC. ClawSweeper reviewWhat this changesThe PR resolves 40-character signing-certificate hashes through the macOS keychain before applying the existing automatic Developer ID timestamp policy, documents hash selectors, and adds a regression matrix. Merge readinessThis PR remains necessary: current main still bases automatic timestamps on the raw identity string, so a SHA-1 selector cannot match Developer ID text. The branch repairs that owner boundary, and its updated body supplies before/after real-signing evidence rather than mock-only proof. Priority: P2 Review scores
Verification
How this fits togetherThe macOS packaging script receives either a certificate name or hash and selects timestamp flags before invoking Apple’s signing tool. That signature metadata determines whether a Developer ID app can be notarized. flowchart LR
A[Signing environment] --> B[Mac packaging script]
B --> C[Certificate name or hash]
C --> D[Timestamp policy]
D --> E[Apple signing tool]
E --> F[Notarizable app signature]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +82, Docs +1, Other +6. Total +89 across 3 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase the narrow repair onto current main, retain the hash-policy regression matrix, and land once exact-head validation is green. Do we have a high-confidence way to reproduce the issue? Yes. Current main’s raw-string check establishes the failing path, and the PR body records a real before/after Developer ID signing run using the same hash-selected certificate. Is this the best way to solve the issue? Yes. Resolving only strict hash selectors through the existing keychain listing preserves name selection, non-Developer behavior, ad-hoc signing, and explicit timestamp settings. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 447895981826. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (11 earlier review cycles; latest 8 shown)
|
|
@steipete — two things here need someone with repo access or a Developer ID cert, and I have neither. Flagging rather than letting the PR sit. 1. The proof gate wants a capture I can't produce. ClawSweeper cleared the patch (diamond, no findings, best-fix affirmed) but blocked on proof: it wants a real If you have a Developer ID cert handy, the capture is short. On this branch: # hash of any Developer ID Application cert
security find-identity -v -p codesigning | grep "Developer ID Application"
# sign a throwaway bundle by HASH (not by name)
SIGN_IDENTITY=<40-hex-hash> bash scripts/codesign-mac-app.sh /path/to/Some.app
codesign -dvvv /path/to/Some.app 2>&1 | grep -E "^(Timestamp|Authority)"The same three commands on 2. Fork PRs are routed to the hosted For context on the defect itself: the If you'd rather not spend a cert on this, say so and I'll note the limitation as permanent — the harness evidence and the docs contract may be enough on their own, and that's your call to make, not mine. |
|
1. The failures are nondeterministic within a single job. The
2. They're wall-clock deadline assertions, missed by fractions of a second: 3. It reproduces on an unrelated diff. #119008 touches a different function in the same script and its 4. This diff can't reach those surfaces. It changes Root cause is the same one behind the earlier cancellation on I haven't touched the Swift tests, and won't — a test-only diff making a red suite pass is auto-close material here. If you'd like these tracked, I'm happy to file Caveat on my sampling: #119008 touches the same script, so it is not a fully independent sample. The within-job retry divergence in point 1 does not depend on it. |
|
Filed the flake as #119026 — the per-attempt suite divergence and the Nothing changed here as a result: #119026 covers the timing assertions themselves, and #119017 covers the fork-runner budget that makes them fire. This diff still stands on the harness evidence in the body. |
4d09189 to
a1d668e
Compare
a1d668e to
824bdf7
Compare
824bdf7 to
3451b96
Compare
runs-on falls back to hosted macos-26 for several cases: workflow_dispatch, run_attempt > 1, fork pull requests, and (as of the runner-backend circuit breaker landed on main the same day this PR was authored) breaker-routed GitHub-hosted fallback. timeout-minutes did not cover the fork-PR case, so fork PRs ran on the slow hosted runner with the Blacksmith-tuned 20-minute budget. Measured on PR openclaw#118989 (a fork PR): macos-swift was cancelled after 20m25s, killed mid-compile at step 1365/1416. No test executed, and the log has no swift compile error - only 'The operation was canceled.' ci-gate then fails because it lists macos-swift as required, so the PR reads red for a reason unrelated to its diff, and a contributor cannot rerun it. Make the budget follow the runner instead of the trigger: every hosted path gets 30 (folded into the same budget the circuit breaker's own hosted-fallback timeout extension already established for this job), so this doesn't reintroduce a second, competing hosted-timeout value. Blacksmith paths keep 20 unchanged. Replaces the single pinned-string guard with a table-driven test covering runs-on and timeout-minutes together across every trigger context that can route to a hosted runner.
1b7cb9e to
b1e3afc
Compare
* ci(macos): budget macos-swift by runner so fork PRs finish runs-on falls back to hosted macos-26 for several cases: workflow_dispatch, run_attempt > 1, fork pull requests, and (as of the runner-backend circuit breaker landed on main the same day this PR was authored) breaker-routed GitHub-hosted fallback. timeout-minutes did not cover the fork-PR case, so fork PRs ran on the slow hosted runner with the Blacksmith-tuned 20-minute budget. Measured on PR #118989 (a fork PR): macos-swift was cancelled after 20m25s, killed mid-compile at step 1365/1416. No test executed, and the log has no swift compile error - only 'The operation was canceled.' ci-gate then fails because it lists macos-swift as required, so the PR reads red for a reason unrelated to its diff, and a contributor cannot rerun it. Make the budget follow the runner instead of the trigger: every hosted path gets 30 (folded into the same budget the circuit breaker's own hosted-fallback timeout extension already established for this job), so this doesn't reintroduce a second, competing hosted-timeout value. Blacksmith paths keep 20 unchanged. Replaces the single pinned-string guard with a table-driven test covering runs-on and timeout-minutes together across every trigger context that can route to a hosted runner. * chore: refresh PR head (keep open for maintainer review) * ci(macos): track main's author-association runner routing Main now routes macos-swift by pull_request author_association rather than fork-ness, so the timeout predicate and its guard scenarios follow it. * ci(macos): tighten hosted runner budget coverage Co-authored-by: harjoth <[email protected]> * docs(ci): document hosted macOS budgets without merge conflicts Co-authored-by: harjoth <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: harjoth <[email protected]>
b1e3afc to
0e0a06e
Compare
|
Merged via squash.
|
…119017) * ci(macos): budget macos-swift by runner so fork PRs finish runs-on falls back to hosted macos-26 for several cases: workflow_dispatch, run_attempt > 1, fork pull requests, and (as of the runner-backend circuit breaker landed on main the same day this PR was authored) breaker-routed GitHub-hosted fallback. timeout-minutes did not cover the fork-PR case, so fork PRs ran on the slow hosted runner with the Blacksmith-tuned 20-minute budget. Measured on PR openclaw#118989 (a fork PR): macos-swift was cancelled after 20m25s, killed mid-compile at step 1365/1416. No test executed, and the log has no swift compile error - only 'The operation was canceled.' ci-gate then fails because it lists macos-swift as required, so the PR reads red for a reason unrelated to its diff, and a contributor cannot rerun it. Make the budget follow the runner instead of the trigger: every hosted path gets 30 (folded into the same budget the circuit breaker's own hosted-fallback timeout extension already established for this job), so this doesn't reintroduce a second, competing hosted-timeout value. Blacksmith paths keep 20 unchanged. Replaces the single pinned-string guard with a table-driven test covering runs-on and timeout-minutes together across every trigger context that can route to a hosted runner. * chore: refresh PR head (keep open for maintainer review) * ci(macos): track main's author-association runner routing Main now routes macos-swift by pull_request author_association rather than fork-ness, so the timeout predicate and its guard scenarios follow it. * ci(macos): tighten hosted runner budget coverage Co-authored-by: harjoth <[email protected]> * docs(ci): document hosted macOS budgets without merge conflicts Co-authored-by: harjoth <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]>
…18989) Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Closes #118740.
Fixes an issue where macOS developers signing an OpenClaw app with a Developer ID certificate selected by its SHA-1 hash produced an app without the trusted timestamp required for notarization. Signing appeared successful and displayed a local signing time, so the failure surfaced only at notarization.
Why This Change Was Made
Apple
codesignexplicitly accepts a 40-character certificate SHA-1 hash as a signing identity. Hash selection is necessary when certificates share a common name, but the previous automatic timestamp policy classified the selector text rather than the certificate it selected.Resolve hash selectors against the existing
security find-identity -p codesigning -vcontract before applying the existing Developer ID timestamp policy. Name-selected identities retain their existing fast path, non-Developer-ID and ad-hoc identities remain untimestamped, and explicit timestamp settings continue to win. Unknown hashes remain unclassified and still fail in the real signing tool.The existing timestamp retry policy handles transient Apple timestamp-service failures. Operators who intentionally require an offline, non-notarizable build retain the documented
CODESIGN_TIMESTAMP=offoverride.User Impact
Developer ID certificates now produce the same notarizable signature whether selected by name or hash, without changing iOS signing, ordinary development identities, ad-hoc signing, or explicit timestamp overrides.
Evidence
Maintainer proof used the same real Developer ID certificate, selected by its real SHA-1 hash, to sign isolated throwaway macOS app bundles through the production signing script. Certificate details were redacted.
The after result was produced by the actual
securityandcodesigntools contacting Apple's trusted timestamp service, not by mocked signing tools.Focused owner-boundary regression coverage first failed on unmodified main for both uppercase and lowercase Developer ID hashes; after the repair, all 24 signing tests pass. The seven-case table also covers Developer ID names, Apple Development hashes, unknown hashes, ad-hoc signing, and explicit timestamp opt-out.
The maintainer rewrite preserves @harjothkhara's original fix and contributor credit while reducing production growth from +16 to +6 lines and regression-test growth from +178 to +82 lines.