Skip to content

fix(ci): migrate sdk-e2e fixture to connectorFromFile (unbreak main)#1048

Merged
buremba merged 1 commit into
mainfrom
feat/fix-sdk-e2e-connector
May 25, 2026
Merged

fix(ci): migrate sdk-e2e fixture to connectorFromFile (unbreak main)#1048
buremba merged 1 commit into
mainfrom
feat/fix-sdk-e2e-connector

Conversation

@buremba
Copy link
Copy Markdown
Member

@buremba buremba commented May 25, 2026

Why main is red

main has been red since #1043 (refactor(cli): explicit connectorFromFile, drop ./connectors scan). That PR removed the ./connectors auto-discovery and migrated every examples/*/lobu.config.ts to declare connectors explicitly via connectorFromFile(...).

But the sdk-e2e gate doesn't use examples/ — it scaffolds its own hermetic fixture inline in a scripts/sdk-e2e.sh heredoc (deliberately: a zero-dep, no-network local connector so the gate can assert the full compile→install→spawn→sync→persist path deterministically). Because that fixture lives in a shell script and not the examples tree, the #1043 migration sweep missed it.

Result: the fixture's ./connectors/pulse.connector.ts was no longer discovered → connection pulse referenced an uninstalled connector sdke2e-pulseapply halted on first failure → the sdk-e2e job failed on main and every branch cut from it.

error: connector "sdke2e-pulse" referenced by connection "pulse" is not installed in the org
error: Apply halted on first failure.

Fix

Declare the connector explicitly in the fixture's defineConfig, mirroring exactly what #1043 did to the examples:

-import { defineAgent, defineConfig, ... } from "@lobu/cli/config";
+import { connectorFromFile, defineAgent, defineConfig, ... } from "@lobu/cli/config";
...
-export default defineConfig({ ..., connections: [pulseConn], watchers: [digest] });
+export default defineConfig({ ..., connectors: [connectorFromFile("./connectors/pulse.connector.ts")], connections: [pulseConn], watchers: [digest] });

E2E (red → green)

Red (pre-fix, on main): ❌ SDK e2e FAILED: auto-apply did not complete (skipped/halted?) — connector sdke2e-pulse not installed.

Green (this branch, bash scripts/sdk-e2e.sh, Node 22):

✓ lobu run auto-applied the project (Apply complete)
✓ connector sync ran the compiled connector and emitted events (items=1, event_count=1)
✓ watcher reaction ran and saved its assertable side effect (SDKE2E_REACTION_OK)
✓ re-apply is idempotent (no deletes on a stable config)
✅ SDK lifecycle e2e PASSED

Summary by CodeRabbit

  • Documentation
    • Enhanced configuration examples to explicitly demonstrate connector registration patterns with clearer inline guidance.

Review Change Stack

…./connectors scan)

PR #1043 removed the ./connectors auto-discovery in favor of explicit
connectorFromFile(), and swept every examples/*/lobu.config.ts over — but
the sdk-e2e gate scaffolds its own hermetic fixture inline in a shell-script
heredoc (not in examples/), so the migration missed it. The fixture's local
pulse.connector.ts was no longer discovered, so connection "pulse" referenced
an uninstalled connector "sdke2e-pulse" → apply halted → main went red.

Declare the connector explicitly to match the new API.
@buremba buremba enabled auto-merge (squash) May 25, 2026 20:40
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dfde59a7-1fe1-4e44-b38a-034414c9c002

📥 Commits

Reviewing files that changed from the base of the PR and between cae142a and 7f939a4.

📒 Files selected for processing (1)
  • scripts/sdk-e2e.sh

📝 Walkthrough

Walkthrough

The SDK E2E script's generated lobu.config.ts fixture is updated to demonstrate explicit local connector registration. The import adds connectorFromFile, documentation clarifies the connector wiring pattern, and the config now registers the pulse connector through a connectors array using connectorFromFile("./connectors/pulse.connector.ts").

Changes

E2E Fixture Connector Registration

Layer / File(s) Summary
E2E fixture explicit connector registration
scripts/sdk-e2e.sh
Added connectorFromFile import, expanded documentation comments explaining local connector and connection wiring, and added connectors: [connectorFromFile("./connectors/pulse.connector.ts")] to the defineConfig call to explicitly register the pulse connector module.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A fixture springs to life so bright,
With connectors registered just right,
From file to config, now plain to see,
No auto-scan, just clarity!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides excellent context (why main is red, the fix, and E2E validation), but lacks the required 'Test plan' section with validation checkboxes. Add a 'Test plan' section documenting which checks were actually run (e.g., sdk-e2e.sh success, typecheck, etc.).
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main fix: migrating the sdk-e2e fixture to explicitly use connectorFromFile, which unblocks the broken main branch.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/fix-sdk-e2e-connector

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

@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@buremba buremba merged commit d8454a9 into main May 25, 2026
18 checks passed
@buremba buremba deleted the feat/fix-sdk-e2e-connector branch May 25, 2026 21:15
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