Skip to content

fix(link-daintree): correct family-gate fallback in fan-out import#152

Open
jobordu wants to merge 2 commits intomainfrom
release/0.43.0
Open

fix(link-daintree): correct family-gate fallback in fan-out import#152
jobordu wants to merge 2 commits intomainfrom
release/0.43.0

Conversation

@jobordu
Copy link
Copy Markdown

@jobordu jobordu commented May 3, 2026

Summary

  • Fix fan-out import logic in /nf:link-daintree where presets were silently skipped because findVanilla() returned [] when the inferred family didn't match any vanilla slot's provider field
  • When family match exists → use it; when it doesn't → fall back to all candidates (not an empty array)

Test plan

  • Run /nf:link-daintree with a Daintree config that has presets for an agent whose vanilla slots have provider=claude (not anthropic) — confirm presets are imported, not skipped
  • Re-run /nf:link-daintree — confirm idempotency (existing preset-linked slots updated in place, no duplicates)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • CLI installer now uses manifest-driven detection for improved setup reliability.
  • Bug Fixes

    • Fixed preset fan-out fallback behavior to properly handle provider selection.
    • Fixed JSON conflict-marker parsing issue.
    • Fixed default retry settings configuration.
  • Chores

    • Version 0.43.0 released as stable (previously pre-release).
    • Version 0.43.1 released with fallback behavior refinement.

jobordu and others added 2 commits May 2, 2026 20:02
Changelog:
- refactor(install): manifest-driven CLI detection — providers.json shipped empty, populated at install time
- fix(formal): resolve merge conflict markers in .planning JSON files
- fix(formal): give max_retries a safe default in oauth-rotation.pm

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When inferring a family from preset env (e.g. ANTHROPIC_* → "anthropic"),
the findVanilla() pool construction erroneously returned [] instead of
all candidates when no vanilla slot matched the inferred family. This
caused all presets to be skipped when providers have mainTool=claude but
provider="claude" (not "anthropic").

Fix: change pool construction from:
  familyMatch.length ? familyMatch : (family ? [] : candidates)
to:
  familyMatch.length ? familyMatch : candidates

The family gate is still respected when matches exist; when it doesn't,
we correctly fall back to all candidates sorted by daintree_preset_id
then numeric suffix.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 3, 2026 08:25
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d3e5d965-0dcd-4da5-8609-8e91d42c6134

📥 Commits

Reviewing files that changed from the base of the PR and between 35d1118 and defeb43.

⛔ Files ignored due to path filters (2)
  • docs/assets/terminal.svg is excluded by !**/*.svg
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • CHANGELOG.md
  • commands/nf/link-daintree.md
  • package.json

Walkthrough

This PR releases version 0.43.0 and documents associated changes. The package version is bumped from 0.43.0-rc.1 to 0.43.0, the CHANGELOG.md is updated with release notes for versions 0.43.1 and 0.43.0, and the link-daintree.md documentation is updated to reflect the fallback behavior change in the fan-out import script.

Changes

Release v0.43.0 & Documentation Updates

Layer / File(s) Summary
Version Bump
package.json
Version updated from 0.43.0-rc.1 to 0.43.0 to mark stable release.
Technical Documentation
commands/nf/link-daintree.md
Fan-out import script's findVanilla() fallback behavior documented: when family is specified but yields no matches, now falls back to all mainTool === agentName candidates instead of empty pool.
Release Notes
CHANGELOG.md
Version 0.43.1 (2026-05-03) and 0.43.0 (2026-05-02) release notes added, documenting link-daintree fallback fix, CLI installer manifest-driven detection change, formal JSON merge-marker parsing fix, and oauth-rotation max_retries safe default.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description includes a clear summary section explaining the bug fix, a test plan with specific reproduction steps, and covers the essential what and why. However, it lacks the structured format sections from the template (What, Why, Testing checklist, Checklist items, Breaking Changes). Restructure the description to follow the template format with labeled sections for What, Why, Testing platform checkboxes, and Checklist items to ensure consistency with repository standards.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: fixing the family-gate fallback logic in the link-daintree fan-out import feature, which is the primary focus of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/0.43.0
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch release/0.43.0

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the /nf:link-daintree fan-out import behavior so inferred “family” mismatches no longer result in an empty vanilla pool (and therefore silently skipped preset imports).

Changes:

  • Adjust findVanilla() fallback behavior to use all vanilla candidates when no family match exists.
  • Bump shipped version strings/metadata from 0.43.0-rc.1 to 0.43.0.
  • Add a changelog entry describing the fix (as 0.43.1).

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Updates package version to 0.43.0.
package-lock.json Updates lockfile version fields to 0.43.0.
docs/assets/terminal.svg Updates the rendered version label to v0.43.0.
commands/nf/link-daintree.md Fixes family-gate fallback in findVanilla() to avoid dropping presets on mismatch.
CHANGELOG.md Adds a 0.43.1 entry documenting the fix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
{
"name": "@nforma.ai/nforma",
"version": "0.43.0-rc.1",
"version": "0.43.0",
Comment thread CHANGELOG.md
Comment on lines +9 to +19
## [0.43.1] - 2026-05-03

### Fixed
- fix(link-daintree): fan-out fallback logic no longer silently drops presets when no vanilla provider has a matching `provider` field — the family gate is now correctly bypassed when the inferred family doesn't match any vanilla slot, falling back to all candidates sorted by daintree_preset_id then numeric suffix

## [0.43.0] - 2026-05-02

### Changed
- refactor(install): manifest-driven CLI detection — `providers.json` now shipped empty and populated at install time from `~/.claude.json` MCP servers and PATH auto-detection

### Fixed
Comment thread CHANGELOG.md
## [0.43.1] - 2026-05-03

### Fixed
- fix(link-daintree): fan-out fallback logic no longer silently drops presets when no vanilla provider has a matching `provider` field — the family gate is now correctly bypassed when the inferred family doesn't match any vanilla slot, falling back to all candidates sorted by daintree_preset_id then numeric suffix
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.

2 participants