feat(connect): classify config access + macOS TCC denial remediation (US2)#707
Merged
Conversation
…(US2) Classify each client-config access into accessible/absent/denied/malformed strictly from the OS error class (errors.Is on fs.ErrPermission / fs.ErrNotExist), never from string matching (Spec 075 FR-003/FR-011). - access.go: AccessOutcome, classifyAccess(err), typed *AccessError (Error()+Unwrap, errors.As-friendly) and canonical remediationText with the tccutil reset command + prod/dev bundle ids (FR-005). - GetStatus: a denied content read now resolves AccessState=denied and surfaces Remediation instead of a plain "not connected" (FR-004). - Connect/Disconnect: a permission denial anywhere in the read/backup/write chain returns a typed *AccessError with remediation; other error semantics (unknown client, already-exists, malformed) are preserved. - backup.go: failure paths keep wrapping the OS cause with %w so denials reach the Connect/Disconnect classifier. Tests (TDD, -race green): classifyAccess four-outcome table, AccessError unwrap/As, remediationText contents, GetStatus denied-surfaces-remediation, Connect denied-returns-AccessError. Related #696
Deploying mcpproxy-docs with
|
| Latest commit: |
c2a00d8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://11b52333.mcpproxy-docs.pages.dev |
| Branch Preview URL: | https://075-us2-access-classify.mcpproxy-docs.pages.dev |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📦 Build ArtifactsWorkflow Run: View Run Available Artifacts
How to DownloadOption 1: GitHub Web UI (easiest)
Option 2: GitHub CLI gh run download 27714402246 --repo smart-mcp-proxy/mcpproxy-go
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
US2 (Spec 075) — access classification + EPERM/TCC remediation surfacing
Implements
specs/075-macos-tcc-connectUS2 (FR-003/004/005/011, tasks T013–T019), building on US1 (#706).What changed
internal/connect/access.go(new) —AccessOutcome,classifyAccess(err)(derives the outcome strictly from the OS error class viaerrors.Is(err, fs.ErrPermission)/fs.ErrNotExist, never string matching — FR-011), typed*AccessError(Error()+Unwrap,errors.As-friendly), andremediationTextbuilding the canonical message withtccutil reset SystemPolicyAppData+ prod/dev bundle ids (FR-005).GetStatus— a permission-denied content read now resolvesAccessState=deniedand populatesRemediation, instead of reporting a plain "not connected" (FR-004).Connect/Disconnect— a denial anywhere in the read/backup/write chain returns a typed*AccessErrorwith remediation; unknown-client / already-exists / malformed semantics are preserved.backup.go— failure paths keep wrapping the OS cause with%wso a denial propagates to the Connect/Disconnect classifier (documented).The four outcomes (accessible/absent/denied/malformed) are now distinct and surfaced; denials are actionable.
Tests (TDD, all
-racegreen)access_test.go:TestClassifyAccess(four-outcome table incl. EPERM/EACCES/wrapped),TestAccessError_ErrorAndUnwrap,TestRemediationText,TestGetStatus_DeniedSurfacesRemediation(T014),TestConnectDenied_ReturnsAccessError(T015).Verification
go build ./cmd/mcpproxy✅ andgo build -tags server ./cmd/mcpproxy✅go test ./internal/connect/... -race✅golangci-lint v2.5.0 --config .github/.golangci.yml internal/connect/...→ 0 issues ✅Scope notes
access_state/remediationJSON fields already exist onClientStatus(added additively in US1); this PR only populates them — no wire-schema change.Related #696