Repository navigation
Conversation
Failure-Class: new
There was a problem hiding this comment.
🟡 Changes recommended
The identity contract accepts malformed metadata and cannot distinguish different dirty worktrees at the same commit.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds signed source receipts to named macOS bundles and validates them through /health and the E2E harness.
Changes:
- Adds receipt generation, plist stamping, Swift parsing, and health validation.
- Updates full/fast bundle flows and fault-test fixtures.
- Documents and registers source-identity verification.
File summaries
| File | Description |
|---|---|
desktop/macos/run.sh |
Stamps receipts before signing. |
desktop/macos/scripts/desktop-build-identity.sh |
Generates and embeds source identity. |
desktop/macos/scripts/desktop-health-check.py |
Validates health identity. |
desktop/macos/scripts/desktop-core-harness.sh |
Compares runtime and checkout identity. |
desktop/macos/Desktop/Sources/Automation/DesktopBuildIdentity.swift |
Parses receipt metadata and defines health payload. |
desktop/macos/Desktop/Sources/DesktopAutomationBridge.swift |
Exposes identity through /health. |
desktop/macos/Desktop/Tests/DesktopBuildIdentityTests.swift |
Tests receipt parsing. |
desktop/macos/Desktop/Tests/DesktopAutomationBridgeRouteTests.swift |
Tests health response identity. |
desktop/macos/tests/test-desktop-build-identity.sh |
Tests stamping and validation. |
desktop/macos/tests/test-fault-suite-launch-env.sh |
Updates fault launch fixtures. |
desktop/macos/tests/test-fault-suite-owned-app-cleanup.sh |
Updates cleanup fixtures. |
desktop/macos/e2e/SKILL.md |
Documents receipt inspection. |
desktop/macos/e2e/CORE_E2E.md |
Documents evidence binding. |
desktop/macos/e2e/flows/harness-smoke.yaml |
Covers the new identity source. |
.github/checks-manifest.yaml |
Registers the deterministic guard. |
.github/failure-classes/FC-runtime-evidence-without-artifact-identity.json |
Records the failure class. |
desktop/macos/changelog/unreleased/20260917-desktop-build-identity.json |
Adds changelog metadata. |
Review details
- Files reviewed: 17/17 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| let schemaVersion = infoDictionary[schemaVersionInfoKey] as? NSNumber, | ||
| schemaVersion.intValue == metadataSchemaVersion, |
| identity = { | ||
| "schemaVersion": 1, | ||
| "revision": revision, | ||
| "workingTreeState": "dirty" if status.stdout else "clean", |
| "expected source identity is not revision-specific: " | ||
| f"{expected_source_identity}" | ||
| ) | ||
| if source_identity != expected_source_identity: |
|
Reviewed against #13126 — this is a well-executed fix, and the fail-closed design is the right call. What I verified in the diff:
One small gap, not blocking: The agent-guidance updates in Because this changes the CI checks manifest and the bundle-signing pipeline and adds a field to the unauthenticated — automated review on behalf of the Omi maintainers by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Desktop bug-fix heuristic 3/5 (fix + closes #13126 + clear symptom narrative) -- owner-override eligible. CI clean, no abuse signals found in diff (checked scripts for eval/shell=True/secrets, none). mergeStateStatus UNKNOWN after refetch -- approve only per override b, not merged.
|
Follow-up on the same head ( My earlier review asked for maintainer sign-off on three surfaces: the CI checks manifest, the bundle-signing pipeline, and the new field on the unauthenticated What I re-verified on this pass, beyond the earlier audit:
One acknowledged trade-off, not a blocker: Agent-guidance note: Cleared from the automation side; merge timing stays with the maintainers. — automated review on behalf of the Omi maintainers by AI on behalf of David |
What changed and why
Closes #13126.
Named macOS bundles now embed a versioned source receipt before codesigning and expose it through the unauthenticated automation
/healthresponse. The receipt contains the full source commit andclean/dirtyworking-tree state; missing, partial, or malformed metadata fails closed asunknown.The desktop E2E harness now compares that runtime receipt with its own checkout before accepting flow evidence, so a reused pool slot or bundle from another worktree cannot be mistaken for the revision under review. Both full bundle creation and executable-only fast rebuilds refresh the receipt before signing.
Product invariants affected
none
How it was verified
bash desktop/macos/tests/test-desktop-build-identity.shbash desktop/macos/tests/test-desktop-core-harness-readiness-teardown.shbash desktop/macos/tests/test-fault-suite-launch-env.shbash desktop/macos/tests/test-fault-suite-owned-app-cleanup.shdesktop/macos/tests/test-*.shlauncher checks (excluding the two documented live named-bundle checks)DEVELOPER_DIR=/Applications/Xcode_26.6.app/Contents/Developer xcrun swift test --package-path desktop/macos/Desktop --filter 'DesktopBuildIdentityTests|DesktopAutomationBridgeRouteTests.testUnauthenticatedHealthReportsBackendAndRuntimeProtocolIdentity'DEVELOPER_DIR=/Applications/Xcode_26.6.app/Contents/Developer OMI_APP_NAME=omi-build-identity OMI_AUTOMATION_PORT=47931 ./run.sh --yolo --no-wait/Applications/omi-build-identity.appthrough the real full-bundle path, then refreshed the final revision through the executable-only fast path.OMI_AUTOMATION_PORT=47931 ./scripts/omi-ctl healthsourceIdentity.revision=a57dda02053811419053d4983ce69c90e33fdbcd,workingTreeState=clean, andschemaVersion=1./usr/libexec/PlistBuddyagainst the installedInfo.plistpluscodesign --verify --deep --strict /Applications/omi-build-identity.appDEVELOPER_DIR=/Applications/Xcode_26.6.app/Contents/Developer ./scripts/desktop-core-harness.sh --tier 1 --bundle omi-build-identity --port 47931Tests
DesktopBuildIdentityTestscovers clean, dirty, missing, partial, and malformed metadata.DesktopAutomationBridgeRouteTestscovers the real unauthenticated health encoder and explicitunknownfallback in an unstamped XCTest host.test-desktop-build-identity.shexercises the production plist stamper and the same health validator called by the E2E harness, including stale-revision andunknown-identity rejection cases.desktop-build-source-identityregisters the guard in the deterministic local/CI check manifest.Failure class (fixes)
Failure-Class: new
Failure-class transition narrative (only when needed)
The violated contract was that revision-specific runtime evidence must be owned by the executing artifact, while the workflow previously borrowed identity from the checkout doing the inspection.
FC-runtime-evidence-without-artifact-identitymakes the canonical guard a signed, versioned bundle receipt plus fail-closed runtime comparison; the production stamper, Swift parser, health route, harness validator, and deterministic tests are the supporting evidence.New guards (only when adding a check or ratchet)
This guard would have caught the ambiguity reported in #13126 before a reused E2E bundle could support a revision-specific claim. It is implemented as a shared primitive rather than a one-off check: full builds, fast rebuilds,
omi-ctl health, and the tiered harness all use the same receipt contract.