Skip to content

chore: release v0.3.0 - #101

Merged
mohanagy merged 3 commits into
mainfrom
development
Jul 18, 2026
Merged

chore: release v0.3.0#101
mohanagy merged 3 commits into
mainfrom
development

Conversation

@mohanagy

@mohanagy mohanagy commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Release promotion

Promotes the validated 0.3.0 release from development to main.

Source commit: 246ec920d97aac6b56dacd8638427fb206664cce

Scope

Release 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.0 tag and GitHub Release must target the exact resulting main commit. Publication is performed only by the trusted GitHub OIDC workflow; no workstation publish or NPM_TOKEN is used.

Summary by CodeRabbit

  • New Features

    • Added configurable human or delegated-agent approval modes for confirmation-required operations.
    • Added safer profile-switching and destructive-action confirmations to the GitHub preset.
    • Added Claude Code permission guidance to miftah init without modifying client settings.
    • Improved management-tool visibility, annotations, and approval controls.
  • Bug Fixes

    • Operations now fail closed when required human confirmation cannot be presented.
    • Added clearer policy handling for unavailable or mismatched approval mechanisms.
  • Documentation

    • Updated security, configuration, CLI, architecture, preset, and release documentation.
  • Release

    • Version 0.3.0 released.

mohanagy added 2 commits July 18, 2026 17:52
* 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
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Miftah 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.

Changes

Approval and management behavior

Layer / File(s) Summary
Mechanism-bound approval flow
src/approvals/approval-store.ts, src/mcp/server/miftah-server.ts, src/audit/*, src/config/*, tests/approval-*.test.ts
Approval requests and consumption now require form or delegated-agent mechanisms, with fail-closed behavior, mechanism mismatch errors, mechanism-aware audit events, and expanded integration coverage.
Management-tool registry and visibility
src/mcp/server/management-tools.ts, src/mcp/server/miftah-server.ts, tests/management-tools-contract.test.ts, tests/mcp-wrapper.test.ts
Management tools, schemas, annotations, reserved names, and approval-mode availability are defined through a centralized descriptor registry.
Claude Code guidance and presets
src/cli/client-snippets.ts, src/cli/init.ts, src/config/presets.ts, examples/github.miftah.json, tests/client-snippets.test.ts, tests/init-command.test.ts, tests/presets.test.ts
Init prints descriptor-derived Claude Code permission guidance without modifying client settings, and the GitHub preset enables profile-switch and destructive-selection confirmation flags.
Release and documentation contracts
CHANGELOG.md, README.md, docs/*, package.json, tests/*docs-contract.test.ts, tests/release-version.test.ts
Version 0.3.0 release notes and documentation describe approval modes, profile controls, client guidance, security semantics, and updated changelog assertions.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related issues

Possibly related PRs

  • mohanagy/miftah#99 — Strong code-level overlap in approval mechanisms, management-tool descriptors, and Claude Code guidance.
  • mohanagy/miftah#59 — Introduced the init/client-snippet workflow extended here with Claude Code permission guidance.
  • mohanagy/miftah#65 — Established the one-time, connection-bound approval workflow extended with mechanism-specific handling.

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
Loading

Poem

A rabbit hops through forms and code,
With guarded keys along the road.
Profiles switch with care and light,
Claude gets hints, but not the write.
Audits mark the path they see—
Human or delegated, safely.


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Docstring Coverage ❌ Error Docstring coverage is 51.85% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description doesn't follow the repository template; it omits Summary, Security impact, and Validation details/checklist. Rewrite it using the required sections: Summary, Security impact, and Validation, and include the checklist items and exact test commands/results.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the release-promotion change.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch development

Comment @coderabbitai help to get the list of available commands.

@mohanagy

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Include delegated approval names in collision coverage.

managementToolDescriptors({ delegatedAgentApproval: false }) intentionally omits miftah_approve and miftah_deny, but those names remain reserved even when the tools are not advertised. Derive this fixture from MANAGEMENT_TOOL_NAMES or 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

📥 Commits

Reviewing files that changed from the base of the PR and between 2a6aa21 and 246ec92.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (40)
  • CHANGELOG.md
  • README.md
  • docs/architecture.md
  • docs/cli.md
  • docs/config.md
  • docs/library-api.md
  • docs/presets-and-clients.md
  • docs/security.md
  • docs/threat-model.md
  • examples/github.miftah.json
  • package.json
  • src/approvals/approval-store.ts
  • src/audit/audit-trail.ts
  • src/audit/audit-types.ts
  • src/cli/client-snippets.ts
  • src/cli/exit-codes.ts
  • src/cli/init.ts
  • src/config/presets.ts
  • src/config/schema.ts
  • src/config/types.ts
  • src/mcp/server/management-tools.ts
  • src/mcp/server/miftah-server.ts
  • src/utils/errors.ts
  • tests/approval-fallback.test.ts
  • tests/approval-store.test.ts
  • tests/audit-outcomes.test.ts
  • tests/cli-exit-codes.test.ts
  • tests/client-snippets.test.ts
  • tests/config-schema-contract.test.ts
  • tests/identity-docs-contract.test.ts
  • tests/init-command.test.ts
  • tests/management-tools-contract.test.ts
  • tests/mcp-wrapper.test.ts
  • tests/preset-docs-contract.test.ts
  • tests/presets.test.ts
  • tests/profile-leases-docs-contract.test.ts
  • tests/profile-runtime-isolation-docs-contract.test.ts
  • tests/profile-state-docs-contract.test.ts
  • tests/release-version.test.ts
  • tests/routing-context-docs-contract.test.ts

Comment thread docs/config.md Outdated
Comment thread src/mcp/server/management-tools.ts Outdated
Comment thread tests/management-tools-contract.test.ts
Comment thread tests/profile-runtime-isolation-docs-contract.test.ts Outdated
* fix: correct management tool annotations

* test: bound delegated management tools
@mohanagy

Copy link
Copy Markdown
Owner Author

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.

@mohanagy
mohanagy merged commit 1386d90 into main Jul 18, 2026
23 checks passed
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