Skip to content

fix: avoid keychain in MCP device snapshot#123

Merged
haasonsaas merged 1 commit intomainfrom
codex/agentd-mcp-device-snapshot-smoke-20260508
May 8, 2026
Merged

fix: avoid keychain in MCP device snapshot#123
haasonsaas merged 1 commit intomainfrom
codex/agentd-mcp-device-snapshot-smoke-20260508

Conversation

@haasonsaas
Copy link
Copy Markdown
Contributor

Summary

  • avoid constructing Submitter from the read-only MCP device snapshot path
  • share a direct local batch stats collector across MCP and submitter diagnostics
  • add regression coverage for counting .json and encrypted .agentdbatch files without touching keychain-backed crypto setup

Local verification

  • swift test (159 tests, 0 failures)
  • swift build -Xswiftc -warnings-as-errors
  • xcrun swift-format lint --strict --recursive Sources Tests Package.swift && git diff --check
  • python3 scripts/mock_chronicle.py --self-test Tests/Fixtures/chronicle
  • python3 scripts/macos_availability_audit.py
  • python3 scripts/sparkle_appcast.py self-test
  • python3 scripts/validate_release_metadata.py && python3 scripts/validate_pr_title.py 'fix: avoid keychain in mcp snapshot'
  • debug MCP smoke matrix: help/config, initialize/tools/list, JSON-RPC errors, snapshot, activity, diagnostics, activity CLI JSON/Markdown
  • scripts/package_app.sh
  • codesign --verify --strict --deep --verbose=2 'dist/EvalOps agentd.app'
  • packaged app MCP smoke: tools/list, device snapshot, diagnostics artifacts, endpoint redaction, local batch stats
  • AGENTD_INSTALL_APPLICATIONS=0 scripts/permission_smoke.sh --no-launch --no-install-applications

@cursor
Copy link
Copy Markdown

cursor Bot commented May 8, 2026

PR Summary

Low Risk
Low risk: diagnostics-only code now gathers local batch stats via filesystem enumeration instead of constructing Submitter, reducing unintended Keychain access. Main risk is minor miscounting of batch files due to the new shared collector/filtering logic.

Overview
The MCP agentd_device_snapshot path no longer constructs a Submitter (and therefore no longer touches Keychain-backed crypto/auth setup) just to compute queued local batch stats; it now reads stats directly from the local batches directory.

Local batch file enumeration/stats collection is refactored into shared helpers (LocalBatchFile.collect and LocalBatchStats.collect) and Submitter.localBatchStats() delegates to the new collector. Adds a regression test ensuring stats count both plaintext .json and encrypted batch files while ignoring unrelated files, without requiring Keychain access.

Reviewed by Cursor Bugbot for commit 13bda3f. Bugbot is set up for automated code reviews on this repo. Configure here.

@haasonsaas haasonsaas merged commit ea5342b into main May 8, 2026
4 checks passed
@haasonsaas haasonsaas deleted the codex/agentd-mcp-device-snapshot-smoke-20260508 branch May 8, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant