Repository navigation
perf: bind generic interaction append payloads [1.4] - #10123
joeyorlando wants to merge 2 commits into
Conversation
|
Archestra reviewed Archestra code reviewNeeds changes before merge · reviewed Fix the local setup action reference in #1 so the regression workflow can execute. The migration replaces payload literals with a bound JSONB parameter while keeping native casts and omitted-column defaults (
Review notesReviewed
Tests
The focused test covers the function upgrade but uses a reduced interactions table. It does not exercise the application encoder or concurrent append calls against the replacement function. Not covered
History: 1 job
|
There was a problem hiding this comment.
Needs changes before merge · Archestra review of c5a1a56 · 1 finding: 1 medium. Summary
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: $/.github/actions/setup-env |
There was a problem hiding this comment.
1. [medium] Regression workflow uses an invalid local action reference
The setup step starts its action path with $/ instead of ./.
On a pull request matching the workflow paths, GitHub Actions cannot resolve this as a local action: local action references must start with ./, while remote actions require an owner/repository and revision. The job therefore cannot reach dependency installation, migration metadata validation or the PostgreSQL regression test. The action exists at .github/actions/setup-env/action.yml, and the other workflows reference it with ./.
Recommendation:
Change the reference to ./.github/actions/setup-env.
| - uses: $/.github/actions/setup-env | |
| - uses: ./.github/actions/setup-env |
Generic interaction appends currently embed encoded values into generated INSERT SQL. Large request/response bodies therefore enlarge the SQL PostgreSQL must parse on every call. Bind the payload and generate only validated column references and native casts, preserving omitted-column defaults, cached common shapes, retry semantics and activity accounting. The migration only replaces a function; it adds no indexes and rewrites no interaction rows. The generated snapshot records the unchanged schema. Validation: the [PostgreSQL 17 CI run](https://github.com/archestra-ai/archestra/actions/runs/41562122376) passed cross-release migration-history compatibility, migration metadata validation, and the function-upgrade regression checks: encoded JSON/SQL nulls, precision, defaults, existing-row replay, invalid payload rejection and exact activity counts. The migration-check regression verifies a valid stable worktree fails in main mode and passes in release mode. The dedicated validation workflow used for these measurements has been removed from this PR; existing CI retains the migration-check regression. No local test suites were run; the broader merge-queue suite has not run. The initial synthetic generic-append benchmark improved median timing from 2.59 to 2.22 ms (~64 KB) and from 26.77 to 22.82 ms (~1 MB). These are isolated generic-path measurements, not a claim to explain all append latency. The provisional release/1.4 backport archestra-ai#10123 was closed before merge. Introducing its migration after main-only migrations would violate the migration prefix rule and cause later upgrades to skip required migrations; do not backport this migration independently.
Closed before merge: this function-only backport still introduces a new migration timestamp beyond main migrations missing from release/1.4. A later upgrade would skip those migrations under Drizzle's timestamp high-water mark. The migration prefix policy prohibits this pattern; the focused function tests alone do not validate cross-release upgrade safety.
The main-branch optimization remains in #10122. Do not ship this backport. A safe 1.4 solution requires a separately evaluated approach that preserves the supported upgrade history, rather than bypassing the migration guard.