Skip to content

Keep 0.2–0.3.x extensions working; safer deploy and release workflows - #4

Merged
hugbubby merged 1 commit into
stagingfrom
legacy-extension-adapter
Oct 3, 2026
Merged

hugbubby merged 1 commit into
stagingfrom
legacy-extension-adapter

Conversation

@hugbubby

@hugbubby hugbubby commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Keeps manually installed 0.2–0.3.x extensions working when the PR #3 API reaches production, and makes the deploy and release workflows safe for the rollout.

Changes

  • Legacy extension adapter (api/src/lib/trpc/legacy-extension-v0/). A time-boxed tRPC middleware for extension versions ≥ 0.2.0 and < 0.4.0. It parses the old (9ee2cae) wire format, runs the current procedures unchanged, and converts each response back, checking it against copied legacy schemas. Mappings:
    • observedImageUrls is dropped; the server now derives it from the image occurrences.
    • investigationId is stripped from old clients' responses.
    • INVESTIGATING and FAILED are reported to old clients as NOT_INVESTIGATED, which is what they always received. FAILED is the one lossy case.
    • MINIMUM_SUPPORTED_EXTENSION_VERSION goes back to 0.2.0.
  • Retirement. Remove the adapter on 2026-12-01, or once 14 consecutive days pass with no 0.3.x traffic, whichever is later. The steps are in the module header.
  • Version counts. Migration 0026 adds ExtensionVersionDailyCount: page views per extension version per UTC day, with no viewer data. The README runbook has the SQL; PRIVACY.md and SPEC.md mention it.
  • Deploy. pulumi stack select no longer uses --create. A token for the wrong Pulumi org now fails with a clear error instead of starting a fresh stack that would try to rebuild live resources.
  • Release. Chrome Web Store publishing is opt-in (PUBLISH_TO_CHROME_WEB_STORE), like Firefox AMO, so tagging ext-v0.4.0 publishes a clean GitHub release while the store upload stays manual.

Verification

  • Old extension, end to end, headless. The real 0.3.3 extension, built from 9ee2cae, ran against the new API on a local database. It registered a post, got its status, and highlighted a seeded correction, with no UPGRADE_REQUIRED.
  • New extension. 0.4.0 behaves the same.
  • Negative control. With the adapter removed, 0.3.3 fails with BAD_REQUEST.
  • Integration tests. 12 new tests send old-style requests with a 0.3.3 header and check the responses against the legacy schemas. The full suite is 111/111.
  • Other checks. Typecheck, lint, all unit tests, migration drift, build, extension e2e 21/21, and test:ci:quality (coverage) on Node 22 all pass.

🤖 Generated with Claude Code

- legacy-extension-v0: time-boxed tRPC adapter for extension versions
  >= 0.2.0 and < 0.4.0, converting the 9ee2cae wire protocol to and from the
  current procedures (vendored legacy schemas; lossy mappings documented).
  MINIMUM_SUPPORTED_EXTENSION_VERSION back to 0.2.0. Retire on 2026-12-01 or
  after 14 days with no 0.3.x traffic, whichever is later.
- ExtensionVersionDailyCount (migration 0026): page views per extension
  version per UTC day, no viewer data; runbook SQL in README.
- deploy.yml: `pulumi stack select` no longer creates missing stacks.
- release-extension.yml: Chrome Web Store publishing is opt-in
  (PUBLISH_TO_CHROME_WEB_STORE), like Firefox AMO.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hugbubby
hugbubby merged commit f84696b into staging Oct 3, 2026
10 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