Skip to content

perf: replace Go Loops sync with Bash - #5928

Merged
danielkov merged 2 commits into
mainfrom
perf/lightweight-loops-sync
Sep 1, 2026
Merged

perf: replace Go Loops sync with Bash#5928
danielkov merged 2 commits into
mainfrom
perf/lightweight-loops-sync

Conversation

@danielkov

@danielkov danielkov commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace the Go Loops HTTP client and reconciler with a versioned Bash script that synchronizes the transactional email manifest directly through the Loops Content API using curl and jq. Keep the Go manifest validator for source-level contract tests and a small compatibility launcher for release automation that still invokes go run.

Motivation

The release path was compiling the server email dependency graph for an operation that ultimately consists of Loops API calls. The network reconciler does not need to be part of the Go codebase or rebuilt on each promotion.

Impact

The Bash script supports read-only ID resolution and full draft/update/Guardian/publish reconciliation while preserving mutation spacing, guarded retries, managed-name checks, and atomic ID output. The local email-ID setup task uses the script directly. Existing release automation remains compatible through a standard-library-only Go launcher, whose fresh-cache build completes in approximately three seconds.

Technical details

Manifest parsing and LMX validation remain in the email/loops Go package for CI contract tests; the deleted Go code is limited to HTTP transport and reconciliation. The compatibility launcher replaces itself with Bash so signals and exit codes propagate directly, and it can locate the script from the repository, server directory, or an explicit manifest path.

@danielkov
danielkov requested a review from a team as a code owner September 1, 2026 10:56
@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ac0dd52

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 15 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread server/internal/email/templates.go Outdated
@danielkov
danielkov force-pushed the perf/lightweight-loops-sync branch from 470e8ff to ecaf39d Compare September 1, 2026 13:24
@danielkov danielkov changed the title perf: reduce Loops sync build graph perf: add build-free Loops sync script Sep 1, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 3 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread server/internal/email/loops/sync.sh
@danielkov
danielkov force-pushed the perf/lightweight-loops-sync branch from ecaf39d to 8b5d489 Compare September 1, 2026 14:06
@danielkov danielkov changed the title perf: add build-free Loops sync script perf: replace Go Loops sync with Bash Sep 1, 2026
@blacksmith-sh

This comment has been minimized.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 12 files (changes from recent commits).

Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.
Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread server/internal/email/loops/sync.sh
Comment thread server/cmd/sync-loops-email-templates/main.go
@danielkov
danielkov force-pushed the perf/lightweight-loops-sync branch from 8b5d489 to ac0dd52 Compare September 1, 2026 14:56
@danielkov
danielkov enabled auto-merge September 1, 2026 15:01
@danielkov
danielkov added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 62ad5aa Sep 1, 2026
46 checks passed
@danielkov
danielkov deleted the perf/lightweight-loops-sync branch September 1, 2026 15:09
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants