Skip to content

chore: upgrade dippin-lang to v0.17.0, add conditional node support#57

Merged
clintecker merged 1 commit intomainfrom
chore/dippin-lang-v0.17.0
Apr 4, 2026
Merged

chore: upgrade dippin-lang to v0.17.0, add conditional node support#57
clintecker merged 1 commit intomainfrom
chore/dippin-lang-v0.17.0

Conversation

@clintecker
Copy link
Copy Markdown
Collaborator

@clintecker clintecker commented Apr 4, 2026

Summary

Consumes all 4 upstream fixes from dippin-lang v0.17.0 (dippin-lang#3):

Test plan

  • go build ./... passes with dippin-lang v0.17.0
  • go test ./... -short — all 14 packages pass
  • dippin doctor pipeline/testdata/simple.dip pipeline/testdata/complex.dip — Grade A
  • Pre-commit quality gates pass

Closes #18, #22, #3, #36

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Workflows now recognize conditional nodes and support clearer inline edge/label syntax and flattened retry settings.
  • User-facing Changes
    • Updated workflow defaults: model and fidelity values adjusted; provider set for agent init; verification step now echoes success; default human choice changed to "approved".
  • Bug Fixes
    • Visualization now renders conditional nodes correctly (avoids unknown-node errors).
  • Tests
    • Added coverage for conditional node handling.
  • Chores
    • Updated a module dependency to a newer compatible version.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b4131cd6-2f25-4b5c-93a2-135f04bfb454

📥 Commits

Reviewing files that changed from the base of the PR and between 94ee223 and 4bc907e.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (5)
  • go.mod
  • pipeline/dippin_adapter.go
  • pipeline/dippin_adapter_test.go
  • pipeline/testdata/complex.dip
  • pipeline/testdata/simple.dip
✅ Files skipped from review due to trivial changes (2)
  • pipeline/testdata/simple.dip
  • go.mod
🚧 Files skipped from review as they are similar to previous changes (1)
  • pipeline/dippin_adapter.go

Walkthrough

Updated Go module dependency to dippin-lang v0.17.0, added support for conditional nodes (rendered as diamond shapes) in the Dippin adapter, and migrated pipeline test fixtures to the canonical edge and retry syntax while adjusting some fixture fields.

Changes

Cohort / File(s) Summary
Dependency Update
go.mod
Bumped github.com/2389-research/dippin-lang from v0.16.0 to v0.17.0.
Adapter: node-kind mapping & config handling
pipeline/dippin_adapter.go
Added ir.NodeConditional"diamond" mapping and updated extractNodeAttrs to recognize ir.ConditionalConfig/*ir.ConditionalConfig as a valid (no-op) config case.
Test changes: fixtures
pipeline/testdata/simple.dip, pipeline/testdata/complex.dip
Migrated edge annotations from bracketed [...] form to inline label: / canonical syntax; flattened nested retry { ... } into top-level retry_policy, max_retries, retry_target; updated model/fidelity/provider/tool/agent fields and adjusted edge labels/restarts in complex.dip.
Tests: adapter coverage
pipeline/dippin_adapter_test.go
Added test case for ir.NodeConditional asserting the adapter maps it to the "diamond" shape.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • 2389-research/dippin-lang#3 — Addresses conditional node kind and fixture syntax; this PR similarly adds conditional node handling and migrates test fixtures.

Possibly related PRs

  • 2389-research/tracker#53 — Also modifies pipeline/dippin_adapter.go's node-kind→shape mapping; directly related.
  • 2389-research/tracker#54 — Related changes to adapter tests and config extraction behavior; strongly connected.

Poem

🐰 I hopped through maps and dotted lines,
A diamond gleamed where branching shines.
Brackets shed for tidy label: cheer,
Retries flattened, fixtures clear.
Pipelines hum — the rabbit's near.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: upgrading dippin-lang to v0.17.0 and adding support for conditional nodes.
Linked Issues check ✅ Passed The PR addresses issue #18 by migrating testdata from bracket edge syntax to canonical keyword syntax (when/label:), preventing silent misparsing by the parser.
Out of Scope Changes check ✅ Passed All changes align with the stated objectives: dependency upgrade, conditional node support, testdata migration to keyword syntax, and retry config flattening per upstream fixes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ 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 chore/dippin-lang-v0.17.0

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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pipeline/dippin_adapter.go`:
- Around line 108-115: The adapter is missing a handler for ConditionalConfig
which causes FromDippinIR to return ErrUnknownConfig when dippin-lang supplies a
non-nil ConditionalConfig; add a case for ir.NodeConditional /
(*ir.ConditionalConfig) in extractNodeAttrs (it can be a no-op returning the
same attrs) so Conditional nodes are accepted, and update tests by adding
{ir.NodeConditional, "diamond", nil} to TestFromDippinIR_AllNodeKinds and ensure
TestExtractNodeAttrs_NilPointerConfig covers the nil *ir.ConditionalConfig path.
🪄 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: CHILL

Plan: Pro

Run ID: 9cc8712f-9981-4e69-bcc8-e34a99756590

📥 Commits

Reviewing files that changed from the base of the PR and between 56c1454 and ed132df.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (4)
  • go.mod
  • pipeline/dippin_adapter.go
  • pipeline/testdata/complex.dip
  • pipeline/testdata/simple.dip

Comment on lines +108 to 115
ir.NodeAgent: "box", // → codergen
ir.NodeHuman: "hexagon", // → wait.human
ir.NodeTool: "parallelogram", // → tool
ir.NodeParallel: "component", // → parallel
ir.NodeFanIn: "tripleoctagon", // → parallel.fan_in
ir.NodeSubgraph: "tab", // → subgraph
ir.NodeConditional: "diamond", // → conditional (pure routing, no LLM call)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Read-only checks in repo to confirm current adapter handling and test coverage.

# 1) Confirm conditional shape mapping and config-switch coverage.
rg -nP --type=go -C3 'NodeConditional|extractNodeAttrs|ErrUnknownConfig|case\s+\*?ir\..*Config' pipeline/dippin_adapter.go

# 2) Check whether test fixtures currently exercise "conditional" nodes.
rg -nP -C2 '\bconditional\b' pipeline/testdata

Repository: 2389-research/tracker

Length of output: 2523


🌐 Web query:

In github.com/2389-research/dippin-lang v0.17.0, what concrete type is stored in ir.Node.Config for nodes where Kind == ir.NodeConditional, and is it ever non-nil?

💡 Result:

No public information found on github.com/2389-research/dippin-lang or its v0.17.0 release. The repository appears private or non-existent. The tracker repo at github.com/2389-research/tracker mentions "dippin-lang" as the language for .dip pipeline files and tools like "dippin test", "dippin doctor", "dippin simulate", but provides no IR details or source code defining ir.Node.Config for NodeConditional nodes.

Citations:


🏁 Script executed:

# Search for ConditionalConfig or similar conditional-related configs
rg -nP --type=go 'ConditionalConfig|ir\.Conditional' .

# Check for any test files or examples with conditional nodes
fd --type=go -name '*test*' pipeline/ | xargs rg -l 'conditional' 2>/dev/null

# Look for any comments or TODOs about conditional handling
rg -nP --type=go 'TODO|FIXME|conditional' pipeline/dippin_adapter.go

Repository: 2389-research/tracker

Length of output: 2840


🏁 Script executed:

# Check imports in dippin_adapter.go to see what ir types are available
head -30 pipeline/dippin_adapter.go

# Search for ConditionalConfig in all files (no type restriction)
rg -n 'ConditionalConfig' .

# Look at the conditional handler to understand what config is expected
cat -n pipeline/handlers/conditional.go | head -100

# Check the adapter test file for conditional examples
rg -n -A5 -B5 'NodeConditional|conditional' pipeline/dippin_adapter_test.go

Repository: 2389-research/tracker

Length of output: 2841


🏁 Script executed:

# Check go.mod to see what version of dippin-lang is required
rg -n 'dippin-lang' go.mod

# Look at the handler registry to see what handlers are registered
rg -n 'conditional' pipeline/handlers/ | head -30

# Check if there's any documentation about ConditionalNode or what config it expects
find . -name '*.md' -o -name '*.txt' | xargs rg -l -i 'conditional.*config|conditionalconfig' 2>/dev/null

# Look at how conditional nodes are created in test fixtures
rg -B10 -A10 'NodeConditional' pipeline/testdata/ 2>/dev/null | head -50

Repository: 2389-research/tracker

Length of output: 1160


🏁 Script executed:

# Check what IR types are actually exported/available from dippin-lang
rg -n 'ir\.' pipeline/dippin_adapter.go | grep -E '(Config|Node)' | head -20

# Look at the full adapter test to see if conditional nodes are tested
cat -n pipeline/dippin_adapter_test.go | head -200

# Search for any test fixtures with conditional nodes
find pipeline/testdata -name '*.dip' -o -name '*.json' | xargs rg -l 'conditional' 2>/dev/null

Repository: 2389-research/tracker

Length of output: 7383


🏁 Script executed:

# Check if ConditionalConfig exists anywhere or if conditionals always have nil config
rg -n 'type.*Config struct' . --type go | grep -i conditional

# Look at what config types are defined in the test
rg -n 'ir\..*Config{}' pipeline/dippin_adapter_test.go

# Check if there's a nil config pattern for conditional nodes
rg -n 'Config: nil' pipeline/dippin_adapter_test.go

# See if conditional nodes appear anywhere with explicit config assignments
rg -B5 -A5 'NodeConditional' pipeline/dippin_adapter_test.go

Repository: 2389-research/tracker

Length of output: 174


🏁 Script executed:

# Check if ConditionalConfig exists anywhere
rg 'ConditionalConfig' . --type go

# Look at the test file for NodeConditional
rg -n 'NodeConditional' pipeline/dippin_adapter_test.go

# Check test case for conditional - see what config is used
rg -B10 -A10 'NodeConditional' pipeline/dippin_adapter_test.go

# Look at all Config assignments in the test file
grep -n 'Config:' pipeline/dippin_adapter_test.go

Repository: 2389-research/tracker

Length of output: 3141


🏁 Script executed:

# Search entire test file for any conditional node test
cat pipeline/dippin_adapter_test.go | grep -n 'Conditional'

# Look at the test for all node kinds more carefully - does it include conditional?
sed -n '84,149p' pipeline/dippin_adapter_test.go

Repository: 2389-research/tracker

Length of output: 1704


🏁 Script executed:

# Check the nil config handling in extractNodeAttrs
sed -n '156,160p' pipeline/dippin_adapter.go

# Check if there's a test for nodes with nil config (especially conditionals)
rg -B5 -A10 'nil \*.*Config|Config: nil' pipeline/dippin_adapter_test.go | head -50

Repository: 2389-research/tracker

Length of output: 1393


Add ConditionalConfig handler to extractNodeAttrs and test coverage.

The shape mapping for NodeConditional: "diamond" exists, but the adapter is missing critical infrastructure:

  1. No ConditionalConfig handler: extractNodeAttrs lacks a case for ConditionalConfig (or pointer variant). If dippin-lang v0.17.0 provides a non-nil config, FromDippinIR will fail with ErrUnknownConfig.
  2. No test coverage: TestFromDippinIR_AllNodeKinds omits NodeConditional from its test cases, and TestExtractNodeAttrs_NilPointerConfig doesn't test the nil ConditionalConfig case.

Add the missing case to the extractNodeAttrs switch (even if it's currently a no-op), and add {ir.NodeConditional, "diamond", nil} to the test suite to verify end-to-end compatibility.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pipeline/dippin_adapter.go` around lines 108 - 115, The adapter is missing a
handler for ConditionalConfig which causes FromDippinIR to return
ErrUnknownConfig when dippin-lang supplies a non-nil ConditionalConfig; add a
case for ir.NodeConditional / (*ir.ConditionalConfig) in extractNodeAttrs (it
can be a no-op returning the same attrs) so Conditional nodes are accepted, and
update tests by adding {ir.NodeConditional, "diamond", nil} to
TestFromDippinIR_AllNodeKinds and ensure TestExtractNodeAttrs_NilPointerConfig
covers the nil *ir.ConditionalConfig path.

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

Upgrades the tracker’s Dippin language dependency to dippin-lang v0.17.0 and updates internal fixtures/adapter behavior to align with upstream syntax and IR changes (including conditional “diamond” nodes).

Changes:

  • Bump github.com/2389-research/dippin-lang from v0.16.0 to v0.17.0.
  • Update .dip test fixtures to remove bracket edge syntax and flatten retry config.
  • Add ir.NodeConditionaldiamond shape mapping in the Dippin IR adapter.

Reviewed changes

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

Show a summary per file
File Description
pipeline/testdata/simple.dip Updates edge syntax away from bracket annotations.
pipeline/testdata/complex.dip Updates defaults/models/fidelity, flattens retry config, and rewrites edge annotations/conditions.
pipeline/dippin_adapter.go Adds conditional node kind mapping to diamond for handler compatibility.
go.mod Upgrades dippin-lang to v0.17.0.
go.sum Adds checksums for dippin-lang v0.17.0.

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

Comment on lines +47 to +48
approve -> done when ctx.outcome = success label: approved
approve -> init when ctx.outcome = fail label: retry restart: true
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

The routing from the human "approve" node uses when ctx.outcome = success/fail, but the tracker human handler returns outcome=success for normal choice submissions and edge selection prioritizes conditions before preferred-label routing. As a result, approve -> done when ctx.outcome = success will always win and the retry edge becomes effectively unreachable. Consider removing these when conditions and routing purely by edge labels, or change the conditions to key off ctx.preferred_label / ctx.human_response instead of ctx.outcome so the user’s selection can actually drive branching.

Suggested change
approve -> done when ctx.outcome = success label: approved
approve -> init when ctx.outcome = fail label: retry restart: true
approve -> done label: approved
approve -> init label: retry restart: true

Copilot uses AI. Check for mistakes.
human approve
label: "Approve?"
mode: choice
default: yes
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

human approve sets default: yes, but the outgoing edges are labeled approved and retry. In tracker, default maps to default_choice and is used as the preferred label; if it doesn’t match an outgoing edge label, routing can fail or fall back to non-deterministic edge selection. Update the default to match one of the outgoing edge labels (or rename the edge labels to yes/no if that’s the intended UI).

Suggested change
default: yes
default: approved

Copilot uses AI. Check for mistakes.
Comment on lines +108 to 115
ir.NodeAgent: "box", // → codergen
ir.NodeHuman: "hexagon", // → wait.human
ir.NodeTool: "parallelogram", // → tool
ir.NodeParallel: "component", // → parallel
ir.NodeFanIn: "tripleoctagon", // → parallel.fan_in
ir.NodeSubgraph: "tab", // → subgraph
ir.NodeConditional: "diamond", // → conditional (pure routing, no LLM call)
}
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

ir.NodeConditional is now supported in the kind→shape mapping, but there isn’t an adapter test exercising this new kind. The existing TestFromDippinIR_AllNodeKinds table in pipeline/dippin_adapter_test.go is a good place to add a NodeConditional case to prevent regressions in shape/handler mapping and ensure FromDippinIR stays compatible with dippin-lang updates.

Copilot uses AI. Check for mistakes.
- Bump dippin-lang v0.16.0 → v0.17.0
- Add ir.NodeConditional → "diamond" shape mapping in adapter (#22)
- Fix testdata/simple.dip: bracket edge syntax → when/label keywords (#18)
- Fix testdata/complex.dip: nested retry block → flat attrs, bracket
  edge syntax → when/label keywords (#18, #3)

Closes tracker-side of #18, #22, #3. #36 is linter-side only (no
tracker change needed).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.


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

edges
start -> generate
generate -> done [label: "success"]
generate -> done label: success
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

Edge label values here are unquoted (e.g., label: success). In the rest of the repo and in README examples, edge labels are consistently written as strings (e.g., label: "approve"), which avoids ambiguity and keeps syntax consistent when labels contain spaces or reserved words. Consider quoting these edge labels (e.g., label: "success").

Suggested change
generate -> done label: success
generate -> done label: "success"

Copilot uses AI. Check for mistakes.
@clintecker clintecker merged commit d62d979 into main Apr 4, 2026
6 checks passed
@clintecker clintecker deleted the chore/dippin-lang-v0.17.0 branch April 4, 2026 02:23
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.

fix(pipeline): edge bracket syntax [label: ...] silently misparsed by dippin-lang

2 participants