chore: release v0.3.0 - #101
Conversation
* feat: harden approval and management tool controls * fix: bind approvals to their confirmation mechanism * docs: clarify approval management contracts * docs: clarify approval audit contracts * docs: cover approval execution boundaries * docs: complete approval contract documentation
📝 WalkthroughWalkthroughMiftah 0.3.0 adds explicit human and delegated-agent approval modes, mechanism-bound approval records and audit events, configuration-aware management-tool descriptors, Claude Code permission guidance, stricter GitHub preset profile controls, and updated release and documentation contracts. ChangesApproval and management behavior
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related issues
Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant Client
participant MiftahServer
participant ApprovalStore
participant AuditTrail
Client->>MiftahServer: Call confirmation-required MCP tool
MiftahServer->>ApprovalStore: Create form or delegated-agent approval
ApprovalStore-->>MiftahServer: Return mechanism-bound approval
Client->>MiftahServer: Retry exact operation
MiftahServer->>ApprovalStore: Consume matching approval
MiftahServer->>AuditTrail: Record mechanism and outcome
MiftahServer-->>Client: Return operation result
Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 1 warning)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/mcp-wrapper.test.ts (1)
32-41: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winInclude delegated approval names in collision coverage.
managementToolDescriptors({ delegatedAgentApproval: false })intentionally omitsmiftah_approveandmiftah_deny, but those names remain reserved even when the tools are not advertised. Derive this fixture fromMANAGEMENT_TOOL_NAMESor from descriptors with delegated approval enabled.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/mcp-wrapper.test.ts` around lines 32 - 41, The collision-test fixture currently omits reserved delegated-approval names because managementToolDescriptors is called with delegatedAgentApproval false. Update managementToolNames to derive from MANAGEMENT_TOOL_NAMES or descriptors with delegated approval enabled, ensuring miftah_approve and miftah_deny are included in collision coverage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/config.md`:
- Line 326: Update the security.approvalMode documentation to clarify that
delegated-agent mode exposes the connection-bound approval bearer only when form
elicitation is unavailable; form-capable clients continue using form approval
instead. Preserve the existing guidance about explicit delegated automation,
approval tools, retrying the exact operation, and the bearer not asserting human
identity.
In `@src/mcp/server/management-tools.ts`:
- Around line 191-202: Update the miftah_list_approvals descriptor to classify
this approvals listing operation as read-only: change its interaction and
annotations to the established observational/read-only values, including
readOnlyHint true and destructiveHint false, while leaving its inputs and
availability unchanged.
In `@tests/management-tools-contract.test.ts`:
- Around line 12-18: Update the delegated approval assertions in the
managementTools test to independently verify that both miftah_approve and
miftah_deny are absent when delegatedAgentApproval is false, rather than
checking for the pair together. Extend the annotation validation to explicitly
cover each delegated-only tool descriptor as well as the currently visible
tools.
In `@tests/profile-runtime-isolation-docs-contract.test.ts`:
- Line 35: The changelog assertions must bind each keyword check to its
corresponding issue entry instead of searching the full document. Update
tests/profile-runtime-isolation-docs-contract.test.ts:35-35 to extract or bound
the `#29` entry before checking credential;
tests/profile-state-docs-contract.test.ts:60-60 to scope active-profile
persistence to `#23`; tests/routing-context-docs-contract.test.ts:46-46 to scope
both keywords to `#20`; and tests/preset-docs-contract.test.ts:97-97 to scope
catalog and onboarding to `#19`.
---
Outside diff comments:
In `@tests/mcp-wrapper.test.ts`:
- Around line 32-41: The collision-test fixture currently omits reserved
delegated-approval names because managementToolDescriptors is called with
delegatedAgentApproval false. Update managementToolNames to derive from
MANAGEMENT_TOOL_NAMES or descriptors with delegated approval enabled, ensuring
miftah_approve and miftah_deny are included in collision coverage.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 786561f4-ca36-4f4e-befe-480b2e9663e8
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (40)
CHANGELOG.mdREADME.mddocs/architecture.mddocs/cli.mddocs/config.mddocs/library-api.mddocs/presets-and-clients.mddocs/security.mddocs/threat-model.mdexamples/github.miftah.jsonpackage.jsonsrc/approvals/approval-store.tssrc/audit/audit-trail.tssrc/audit/audit-types.tssrc/cli/client-snippets.tssrc/cli/exit-codes.tssrc/cli/init.tssrc/config/presets.tssrc/config/schema.tssrc/config/types.tssrc/mcp/server/management-tools.tssrc/mcp/server/miftah-server.tssrc/utils/errors.tstests/approval-fallback.test.tstests/approval-store.test.tstests/audit-outcomes.test.tstests/cli-exit-codes.test.tstests/client-snippets.test.tstests/config-schema-contract.test.tstests/identity-docs-contract.test.tstests/init-command.test.tstests/management-tools-contract.test.tstests/mcp-wrapper.test.tstests/preset-docs-contract.test.tstests/presets.test.tstests/profile-leases-docs-contract.test.tstests/profile-runtime-isolation-docs-contract.test.tstests/profile-state-docs-contract.test.tstests/release-version.test.tstests/routing-context-docs-contract.test.ts
* fix: correct management tool annotations * test: bound delegated management tools
|
Release gate record: current head 08b478e passed both current-head CI runs (29649398525 and 29649399828): Linux quality, Verify, every Ubuntu/macOS/Windows Node 20/22/24 job, and CodeRabbit are successful. All four CodeRabbit findings were answered with the merged PR #102 remediation and every review thread is resolved. GitHub still displays the historical CodeRabbit CHANGES_REQUESTED decision, but there is no outstanding finding behind it. The repository owner is the sole maintainer and authorized the administrator merge only to bypass that impossible self-approval requirement, never a failed check or unresolved review. |
Release promotion
Promotes the validated
0.3.0release fromdevelopmenttomain.Source commit:
246ec920d97aac6b56dacd8638427fb206664cceScope
0.3.0Release gates
PR #100 passed the complete current-head matrix: Linux quality, Verify, Ubuntu/macOS/Windows on Node 20/22/24, and CodeRabbit approval with no unresolved threads. This promotion must independently pass its own current-head checks and review gates before merge.
After merge, the
v0.3.0tag and GitHub Release must target the exact resultingmaincommit. Publication is performed only by the trusted GitHub OIDC workflow; no workstation publish orNPM_TOKENis used.Summary by CodeRabbit
New Features
miftah initwithout modifying client settings.Bug Fixes
Documentation
Release