Skip to content

chore(sdk): bump @protolabsai/sdk 0.3.1 → 0.3.4 (fixes protoCLI#307) + smoke test#3870

Merged
mabry1985 merged 1 commit into
mainfrom
chore/bump-sdk-0.3.4
May 26, 2026
Merged

chore(sdk): bump @protolabsai/sdk 0.3.1 → 0.3.4 (fixes protoCLI#307) + smoke test#3870
mabry1985 merged 1 commit into
mainfrom
chore/bump-sdk-0.3.4

Conversation

@mabry1985
Copy link
Copy Markdown
Contributor

@mabry1985 mabry1985 commented May 26, 2026

Pulls in @protolabsai/sdk 0.3.4, which fixes the agentic-loop early-termination bug (protoCLI#307, closed as completed) — the agent emitted intent after the planning turn then stopped without executing tools, surfacing in protoMaker as empty feature executions.

Verification

New isolated smoke test (scripts/smoke/proto-sdk-smoke.mjs) mirrors ProtoProvider.executeQuery's query() invocation against the live gateway: it runs a 2-step task that requires tool use after planning (write result.txt, read it back) and asserts the file actually landed.

Proto SDK smoke | sdk=0.3.4 | model=protolabs/smart | iterations=1
[1/1] PASS — turns=8 toolUses=2 [write_file, read_file] result=success file=true content="PROTO_OK"

4/4 PASS on protolabs/smart (the bug was intermittent on 0.3.1). tsc --noEmit clean — 0.3.4 is API-compatible with our ProtoProvider/ClaudeProvider usage (no source changes needed).

Changes

  • apps/server/package.json: ^0.3.1^0.3.4 (+ package-lock.json)
  • scripts/smoke/proto-sdk-smoke.mjs: durable one-command smoke test — auto-loads repo-root .env, resolves the installed SDK, takes model + iterations args, exit-coded for CI.
  • docs/internal/server/proto-sdk-smoke-test.md: when/how to run + FAIL triage table + how it maps to ProtoProvider.

Follow-up

Unblocks crew dispatch (protoMaker#81), which was gated on this SDK fix. Recommend a full end-to-end validation (restart the prod instance on this build, dispatch one real feature) before re-enabling auto-mode at scale.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Dependencies

    • Updated @protolabsai/sdk to v0.3.4
  • Documentation

    • Added Proto SDK smoke test documentation with execution guide
  • Tests

    • Added smoke test script for validating SDK functionality against live gateway

Review Change Stack

…e test

0.3.4 fixes the agentic-loop early-termination bug (protoCLI#307) where the
agent emitted intent after planning then stopped without executing tools —
surfacing in protoMaker as empty feature executions.

Verified with a new isolated smoke test that mirrors ProtoProvider.executeQuery
against the live gateway (write a file, read it back, assert it landed):
4/4 PASS on protolabs/smart (turns=7-8, toolUses=2 [write_file, read_file],
result=success). Was intermittently failing on 0.3.1.

- apps/server/package.json: ^0.3.1 -> ^0.3.4 (+ lockfile)
- scripts/smoke/proto-sdk-smoke.mjs: durable, one-command smoke test
  (auto-loads repo-root .env, resolves the installed SDK, model + iteration
  args, exit-coded for CI)
- docs/internal/server/proto-sdk-smoke-test.md: how/when to run + FAIL triage

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@protoquinn
Copy link
Copy Markdown

protoquinn Bot commented May 26, 2026

👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow.

@mabry1985 mabry1985 enabled auto-merge (squash) May 26, 2026 20:13
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b5051293-294c-4f6c-a15b-8ce27176db13

📥 Commits

Reviewing files that changed from the base of the PR and between de5124b and 325da64.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • apps/server/package.json
  • docs/internal/index.md
  • docs/internal/server/proto-sdk-smoke-test.md
  • scripts/smoke/proto-sdk-smoke.mjs

📝 Walkthrough

Walkthrough

This PR introduces a Node-based smoke test (scripts/smoke/proto-sdk-smoke.mjs) that validates the @protolabsai/sdk agentic execution against the live Proto gateway, updates the server dependency to ^0.3.4, and provides internal documentation on running and interpreting the test.

Changes

Proto SDK Smoke Test

Layer / File(s) Summary
Smoke Test Documentation and Navigation
docs/internal/server/proto-sdk-smoke-test.md, docs/internal/index.md
Added internal guide documenting when to run the smoke test (after SDK bumps or to verify gateway connectivity), how to invoke it with model/iteration arguments, required credential env vars (GATEWAY_API_KEY, GATEWAY_BASE_URL), what is validated (file write/read for PROTO_OK, at least one tool call), and failure interpretation. Also added navigation link in docs index.
Smoke Test Script Implementation
scripts/smoke/proto-sdk-smoke.mjs
Created a comprehensive smoke test that auto-loads repo-root .env (filling only missing vars), resolves and dynamically imports @protolabsai/sdk's query() function using server-style module resolution, parses CLI args for model tier and iteration count, executes iterative test cycles with timed query() calls in temp working directories, counts assistant tool-use events in the stream, verifies result.txt exists and contains PROTO_OK, logs per-iteration outcomes, and exits with code 0 (all pass), 1 (any fail), or 2 (config/SDK error).
SDK Dependency Update
apps/server/package.json
Bumped @protolabsai/sdk from ^0.3.1 to ^0.3.4.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

  • protoLabsAI/protoCLI#256: This PR's smoke test directly exercises the @protolabsai/sdk query/ProtoProvider execution path and SDK bump, overlapping with the retrieved issue's scope on anthropic-compat types and HookCallback runtime signature used during query.

Possibly related PRs

  • protoLabsAI/protoMaker#3626: The added smoke test validates the same live gateway ↔ ProtoProvider execution path that this PR targets for model dispatch/routing.
  • protoLabsAI/protoMaker#3625: This PR bumps the @protolabsai/sdk dependency (introduced by that PR's new ProtoProvider) and adds a smoke test for the same SDK ↔ ProtoProvider integration against the live gateway.

Suggested reviewers

  • protoquinn

Poem

🐇 A test hops along the gateway path,
Counting tools with agentic math,
PROTO_OK in files we write,
The smoke clears—SDK works right! ✨

✨ 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/bump-sdk-0.3.4

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

Copy link
Copy Markdown

@protoquinn protoquinn Bot left a comment

Choose a reason for hiding this comment

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

QA Audit — PR #3870 | chore(sdk): bump @protolabsai/sdk 0.3.1 → 0.3.4 (fixes protoCLI#307) + smoke test

VERDICT: WARN (CI in progress — not blocking)


CI Status (head 325da64)

  • test: in_progress
  • build: in_progress
  • deploy: in_progress
  • checks: in_progress

Diff Review
Clean, narrow change: SDK pin bump (^0.3.1^0.3.4) + lockfile update in apps/server/. No source changes to ProtoProvider — the PR correctly relies on SDK API compatibility. Added alongside:

  • scripts/smoke/proto-sdk-smoke.mjs — durable smoke test (ESM, .env auto-load, exit-coded for CI)
  • docs/internal/server/proto-sdk-smoke-test.md — run guide + FAIL triage table
  • Nav entry in docs/internal/index.md

Observations

  • [LOW]: Smoke test script not yet tracked in CI pipeline — it's exit-coded and ready to drop into a test:smoke step, but no GitHub Actions job references it. Recommend adding a test:smoke job (or at minimum a pre-merge note in the PR body) so the test actually gates future SDK bumps.
  • [LOW]: The scripts/smoke/proto-sdk-smoke.mjs diff was truncated in the diff output — could not review lines 50–152. Based on the file header and the documented behavior, the implementation looks sound (wraps query() with ProtoProvider-matching options, writes to temp dir, asserts result.txt existence and content). Recommend confirming full content in the Files tab.
  • [INFO]: node_modules/@protolabsai/sdk moved from root-level to apps/server/node_modules/@protolabsai/sdk in the lockfile — expected pnpm-monorepo behavior, not a functional concern.

CLAWPATCH: Skipped — since ref "main" invalid for this repo.

Preliminary PASS — the code is safe to merge and does exactly what it claims. Approval will be posted once CI clears green. The smoke test docs and script are high-value additions. Flag the test:smoke CI gap for follow-up.

— Quinn, QA Engineer

@protoquinn
Copy link
Copy Markdown

protoquinn Bot commented May 26, 2026

Submitted a preliminary COMMENT review on protoLabsAI/protoMaker#3870. CI is still in progress — the review flags a LOW observation about the smoke test not yet being wired into the CI pipeline (the script is ready to drop in but no GitHub Actions job references it yet). Once CI clears green I'll upgrade to APPROVE.

@github-actions
Copy link
Copy Markdown
Contributor

@mabry1985 mabry1985 merged commit 58c9f2c into main May 26, 2026
6 of 7 checks passed
@mabry1985 mabry1985 deleted the chore/bump-sdk-0.3.4 branch May 26, 2026 20:14
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.

1 participant