Skip to content

revert(deps): restore pre-C4 lockfile β€” fix gRPC connection failure blocking all posts - #36

Merged
JOY (JOY) merged 1 commit into
mainfrom
dev
Sep 12, 2026
Merged

JOY (JOY) merged 1 commit into
mainfrom
dev

Conversation

@JOY

@JOY JOY (JOY) commented Sep 12, 2026

Copy link
Copy Markdown

What kind of change does this PR introduce?

Bug fix β€” scope: dependencies (package.json, pnpm-lock.yaml). Reverts the dependency changes from PR #34 that broke Temporal gRPC connectivity, blocking ALL post publishing.

Why was this change needed?

PR #34's dependency overrides broke @grpc/grpc-js gRPC connectivity in the Docker container. The Temporal client returned gRPC error 14 (UNAVAILABLE) for ALL targets (including localhost:7233), preventing ALL post publishing. The root cause: the protobufjs@7.5.5 override bumped protobufjs from 7.5.4 β†’ 7.6.6 which has a breaking change with @grpc/grpc-js@1.14.3 β€” gRPC handshake fails even though TCP connects. Combined with the happy-dom@20 override affecting gRPC's DNS resolver, the entire gRPC stack became unusable.

Technical Details & Scope

  • Restored package.json + pnpm-lock.yaml to the pre-C4 state (commit abf11fc9)
  • protobufjs back to 7.5.4 (working with grpc-js 1.14.3)
  • Removed all 10 pnpm.overrides (tar, form-data, protobufjs, shell-quote, fast-uri, hono, immutable, handlebars, happy-dom, grpc-js)
  • Restored removed dependencies (sweetalert2, @mantine/modals, @solana/*, etc.)
  • The C4 security fixes will be re-applied in a separate PR after identifying which specific override breaks gRPC

Verification & Testing

  • pnpm install β€” 38.2s, no errors
  • pnpm --filter ./apps/backend run build β€” exit 0
  • pnpm --filter ./apps/orchestrator run build β€” exit 0
  • Lockfile verified: protobufjs@7.5.4, grpc-js@1.14.3 (original versions)

QA

  1. Run pnpm install β€” expect no ERR_PNPM_JSON_PARSE
  2. Run pnpm list protobufjs @grpc/grpc-js --depth 0 β€” expect protobufjs 7.5.4, grpc-js 1.14.3
  3. Run pnpm --filter ./apps/backend run build β€” expect exit 0
  4. On the VM after deploy: post a Facebook post from the dashboard β€” expect it to publish within 5 minutes
  5. Check Temporal workflow list: docker exec temporal-admin-tools tctl --address temporal:7233 workflow list β€” expect non-empty

Checklist:

  • My code follows the project's code style and architectural conventions.
  • Local build passes (pnpm run build).
  • Branding guard validation passes (pnpm dlx tsx scripts/branding-guard.ts).
  • Tests and typecheck have been verified without errors.
  • Documentation has been updated (if applicable).
  • No secrets or sensitive credentials are included in this PR.
  • I have filled in the QA / Verification section above with real steps to verify this change.

Note

Medium Risk
Restores production-critical Temporal/gRPC behavior but re-opens transitive dependency versions that C4 had pinned; Vitest/sharp version shifts may affect CI and image processing until security overrides are re-applied safely.

Overview
Reverts the dependency lockfile changes from PR #34 that made Temporal’s gRPC client fail (UNAVAILABLE) in Docker and blocked all post publishing.

pnpm.overrides is rolled back to the smaller pre-C4 set: the ten security-related pins (protobufjs, @grpc/grpc-js, happy-dom, tar, form-data, etc.) are removed so transitive versions match the last working stack (e.g. protobufjs 7.5.4 with @grpc/grpc-js 1.14.3).

Direct dependencies are restored that had been dropped in the C4 bumpβ€”UI/wallet stack (@mantine/modals, Solana adapters, @postiz/wallets, sweetalert2 + dark theme, viem) and dev @tailwindcss/vite. sharp is downgraded from ^0.35.0 to ^0.33.4, and Vitest-related dev packages are moved back to older versions (vitest 3.1.4, @vitest/* 1.6.0 vs the newer 3.2.6 line).

C4 security overrides are intentionally deferred to a follow-up PR after isolating which pin breaks gRPC.

Reviewed by Cursor Bugbot for commit aa2e4df. Configure here.

…ction failure

PR #34 dependency changes broke @grpc/grpc-js gRPC connectivity in the Docker container. The workflow bundle compiles correctly but the Temporal client cannot connect (gRPC error 14 UNAVAILABLE, ECONNREFUSED 127.0.0.1:7233). This blocks ALL post publishing.
@cursor

cursor Bot commented Sep 12, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_cbf31353-040a-4a3a-acdf-3c24c1ec9012)

@JOY
JOY (JOY) merged commit bc46a90 into main Sep 12, 2026
9 of 15 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates package.json by adding several new dependencies (including @mantine/modals, @postiz/wallets, @solana/wallet-adapter-react, sweetalert2, and viem), downgrading sharp, and removing various overrides. It also downgrades vitest and its companion packages. The feedback points out a critical version mismatch where vitest is set to 3.1.4 while @vitest/coverage-v8 and @vitest/ui are reverted to 1.6.0. To prevent runtime errors and test failures, it is recommended to align vitest to version 1.6.0 as well.

Comment thread package.json
"vite": "^8.2.1",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "3.2.6"
"vitest": "3.1.4"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

There is a version mismatch between vitest (3.1.4) and its companion packages @vitest/coverage-v8 and @vitest/ui (both reverted to 1.6.0). Mixing major versions of Vitest packages can lead to runtime errors, API incompatibilities, or failure to run tests and generate coverage. Please align vitest to version 1.6.0 to ensure compatibility.

Suggested change
"vitest": "3.1.4"
"vitest": "1.6.0"

JOY (JOY) added a commit that referenced this pull request Sep 13, 2026
The Build workflow has been red on every push to dev and main since at least
2026-09-10 (PRs #33-#36). The failing step is "Test bootstrap / OAuth consent
(jest)": those suites guard against running on a shared database and throw
'Use isolated local test services' unless DATABASE_URL points at
127.0.0.1:15491 (or :15432) and REDIS_URL at 127.0.0.1:16391 (or :16379).
CI provided neither, so beforeAll threw, prisma stayed undefined, and afterAll
then failed with "Cannot read properties of undefined (reading
'oAuthAuthorization')" β€” surfacing as 42 failed / 11 passed of 53.

Add Postgres 17 and Redis 7.2 service containers on exactly those ports, push
the Prisma schema into the throwaway database before the run, and add
--runInBand because the suites share one database and create/delete rows by
known ids.

Verified locally against the same images, ports, env and commands:

    Test Suites: 5 passed, 5 total
    Tests:       53 passed, 53 total

Jest exits cleanly, so no --forceExit is needed.

This does not make CI a trustworthy gate on its own. The ESLint workflow is
still red (eslint 8.57 cannot consume the flat eslint.config.mjs, and fixing
that needs eslint 9 plus @typescript-eslint 8), and it is
"Build & Publish Crove Containers" β€” not this workflow β€” that produces the
deployable image. Those are separate follow-ups.
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