Skip to content

Apply wicked core changes and backend on upstream v1.31.1 - #17

Merged
Stumble merged 2 commits into
integration/upstream-v1.31.1from
refactor/wicked-on-upstream
Sep 9, 2026
Merged

Apply wicked core changes and backend on upstream v1.31.1#17
Stumble merged 2 commits into
integration/upstream-v1.31.1from
refactor/wicked-on-upstream

Conversation

@Stumble

@Stumble Stumble commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

Apply the wicked fork directly on upstream sqlc v1.31.1 in exactly two
linear commits
, with no merge commit or imported upstream history in the PR range.

This supersedes the merge-based review in #16. It reorganizes the verified
implementation, not the product behavior.

Base and the two commits

Base integration/upstream-v1.31.1 is initialized to the exact upstream commit
a95e91d70ad9e1181253c333a1cfdd75ae4b95a5 (v1.31.1).

  1. 4739a8ac5 — core changes
    • Parameter-context inference and repeated-relation ambiguity fixes.
    • Scoped wicked schema/model conventions and configuration checks.
    • Minimal protobuf facts and request mapping for the backend.
    • Shared version/build plumbing, security updates, and core tests/test tooling.
    • Builds independently without importing the wicked generator.
  2. 41bb4c158 — wicked backend
    • internal/codegen/wicked: Go types, templates, comment options, cache keys,
      timeout, invalidation, transaction and replica behavior.
    • CLI registration, generation/consumer/JSON contract tests, sample CI and docs.
    • Registration is here so the first commit does not depend on a nonexistent backend.

The old refactor/upstream-sync branch is retained. No force-push or change to
main is involved, and this PR is in Stumble/sqlc, not sqlc-dev/sqlc.
Merging it updates the integration branch; promoting/replacing the legacy main
branch remains a separate decision.

Verification

  • Reconstructed tree before the documentation update exactly equals the verified
    aa0ff2cdb tree: 1c3c895c10634e2292636bbe68b17370f673bd61.
  • Final differences from that version are limited to README/GUIDE/history notes
    and historical Markdown trailing whitespace. Product source, dependencies,
    protocol, templates, generated files and CI configuration are byte-identical.
  • Core commit: independent CLI build and compiler/config/cmd checks pass.
  • Full tree: CLI build; compiler/config/cmd/wicked/release tests; generated
    consumer/JSON fixture tests; bookstore sqlc diff pass.
  • Prior verified-tree evidence remains applicable: full upstream examples/tests,
    CGO/non-CGO builds, bookstore runtime/race, and zero reachable vulnerabilities.
  • Eight consumer repositories / 226 query sets / 689 regenerated Go files match
    same-input wicked v2.3.4 output except version comments.
  • Seven consumer repositories compiled fully. Trex generated packages compile,
    its regenerated source differs from its checked-in source only by comments,
    and that source commit has passing CI. Trex local full compilation remains
    unverified
    due to CCXT exceeding the environment memory soft limit.
  • Current-head CI and review status are visible on this PR; no auto-merge.

Compatibility and remaining work

Existing wpgx entrypoints and validated generated contracts are retained.
The fork's internal plugin protocol changes; old custom plugin binaries are not
a compatibility target. Qualified built-in type recognition and the documented
compiler fixes remain intentional improvements.

The top-level SELECT classification is not a full read-only proof. Ordinary-view
primary models, wicked batch/last-ID and database-only analysis remain unsupported;
copyfrom retains its existing cache/invalidate limitation.

No production migrations or downstream runtime dependency upgrades. Generic
patches remain in this fork; an actual upstream contribution is a separate task.

Related PR

Runtime example and regression suite: Stumble/bookstore#2.
The full design/history and verification record is in
docs/changelogs/2026-09-08-sync-upstream-and-separate-wicked-codegen.md.

Add primary-schema facts and scoped schema conventions, retain parameter context inference and fix repeated-relation ambiguity, and expose the minimal backend protocol. Include core tests, release version plumbing, secure toolchain/dependencies, and core CI/test tooling. No wicked generation implementation or dispatch is included in this commit.
Add the standalone wicked generator, legacy Go mappings and runtime templates, CLI dispatch, generation/consumer regression fixtures, bookstore CI, and usage documentation. Preserve the previously verified product tree while presenting the fork as exactly two linear commits on upstream v1.31.1.
@Stumble
Stumble merged commit e40892b into integration/upstream-v1.31.1 Sep 9, 2026
13 checks passed
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