Skip to content

feat(ignore): add reasonix ignore adapter - #2478

Merged
dyoshikawa merged 2 commits into
mainfrom
resolve-scrap-issue-2419-reasonix-ignore
Jul 29, 2026
Merged

feat(ignore): add reasonix ignore adapter#2478
dyoshikawa merged 2 commits into
mainfrom
resolve-scrap-issue-2419-reasonix-ignore

Conversation

@dyoshikawa

Copy link
Copy Markdown
Owner

Summary

Adds the Reasonix ignore adapter — the last open gap of #2419 (gaps 1-3 were closed by #2445).

.rulesyncignore patterns are now written as Read(<pattern>) entries into the [permissions] deny table of reasonix.toml (project) / ~/.reasonix/config.toml (global, via --global).

Why [permissions] deny and not [sandbox] forbid_read

SPEC.md documents deny rules as taking Claude-Code-style glob specifiers (Edit(docs/**)) and being "a hard block in every mode", while forbid_read is documented as absolute paths/directories with no glob support. Ignore patterns are globs, so deny is the only faithful target.

Ownership

The config file is already read-modify-written by the mcp (plugins) and permissions (permissions/sandbox/agent) features, so ignore is declared as a third writer in SHARED_CONFIG_OWNERSHIP with the same custom / applyIgnoreReadDenies policy .claude/settings.json uses. That policy is what already resolves the overlap: only Read(...) deny entries are replaced, other deny entries and tables are preserved, and when the permissions feature manages the Read category its explicit rules win with a warning — the "possibly from ignore feature" guard in reasonix-permissions.ts was written for exactly this and is now reachable.

reasonix.toml is never deleted by rulesync (isDeletable() returns false).

Changes

  • New src/features/ignore/reasonix-ignore.ts (+ unit tests), modeled on claudecode-ignore.ts with the TOML codec from the shared gateway.
  • reasonix registered in toolIgnoreFactories, ignoreProcessorToolTargetTuple, and the global-capable ignore targets (both scopes have a config file).
  • ignore declared on both Reasonix entries in shared-config-gateway.ts.
  • Regenerated supported-tools tables; .gitignore needed no change.
  • docs/reference/file-formats.md prose + sync-skill-docs.
  • e2e ignore spec covers generate (project + global) and import for reasonix.

Verification

  • pnpm cicheck green.
  • npx vitest run --config vitest.e2e.config.ts src/e2e/e2e-ignore.spec.ts — 58 passed.

Closes #2419

🤖 Generated with Claude Code

cm-dyoshikawa and others added 2 commits July 29, 2026 05:27
…n denies

Reasonix has no dedicated ignore file, so .rulesyncignore patterns are
written as `Read(<pattern>)` entries in the `[permissions] deny` table of
`reasonix.toml` (project) / `~/.reasonix/config.toml` (global).

`deny` is the right target rather than `[sandbox] forbid_read`: deny rules
take glob specifiers and are documented as a hard block in every mode, while
forbid_read takes absolute paths with no documented glob support.

The config file is already read-modify-written by the mcp and permissions
features, so ignore is declared as a third writer in SHARED_CONFIG_OWNERSHIP
and reuses the gateway's applyIgnoreReadDenies entry-level policy — the same
one that resolves the ignore/permissions overlap in .claude/settings.json.

Closes #2419

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…upe TOML helpers

Adds the cross-feature data-loss regressions the shared-file contract test
cannot catch (it treats arrays as leaves, so entries inside permissions.deny
could vanish undetected): ignore-written Read denies surviving a later
permissions write, permissions' explicit Read rules winning, and the mcp
plugins block surviving both.

Also extracts the TOML table/string-array narrowing that the reasonix ignore
and permissions adapters had each spelled out, and notes in the docs that
re-serialization does not preserve comments or key order.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dyoshikawa
dyoshikawa merged commit f40669e into main Jul 29, 2026
9 checks passed
@dyoshikawa
dyoshikawa deleted the resolve-scrap-issue-2419-reasonix-ignore branch July 29, 2026 13:24
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.

Follow up Reasonix upstream updates: sse MCP transport rewritten to http, retired trusted_read_only_tools/plan_mode_allowed_tools, ignore unsupported

2 participants