Skip to content

Add climate to SKIPPABLE_ERROR_MESSAGES#380

Closed
mattmueller-stripe wants to merge 13 commits into
mainfrom
liouh-climate
Closed

Add climate to SKIPPABLE_ERROR_MESSAGES#380
mattmueller-stripe wants to merge 13 commits into
mainfrom
liouh-climate

Conversation

@mattmueller-stripe
Copy link
Copy Markdown

Summary

  • Fixes: Account not eligible for Climate Orders

How to test (optional)

Related

  • Closes #

Thanks for contributing ❤️

tonyxiao and others added 13 commits April 30, 2026 10:53
Add two new connector packages:

- **source-metronome**: Reads from the Metronome billing API (customers,
  contracts, products, rate cards, credit grants, invoices, entitlements).
  Supports cursor-based pagination, per-customer/per-contract fan-out,
  and webhook-driven live updates for credit balance and entitlement
  changes.

- **destination-redis**: Writes synced data to Redis as individual SET
  keys (`{prefix}{stream}:{pk}`). Pipelined batch writes, per-stream
  failure tracking, SCAN-based teardown.

Also:
- Register both connectors in the engine (default-connectors.ts)
- Add Redis service to compose.yml (port 56379)
- Regenerate OpenAPI specs with new connector config schemas
- Add e2e test script (scripts/e2e-metronome-redis.sh)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
PixelDraw demo app: each pixel drawn sends a usage event to Metronome,
credit balance is gated via Metronome-synced data in Redis (no local
state). The sync pipeline keeps Redis up to date via webhooks.

- Express server with /api/draw (hot path) and /api/credits
- Canvas UI with color picker and live credit balance display
- Usage events sent to Metronome ingest API per pixel
- Balance checked from Metronome-synced credit_grants in Redis only

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
Zero-dependency SQLite destination connector that uses Node.js 24's built-in
node:sqlite module (DatabaseSync). Supports upsert with newer-than deduplication,
hard deletes, and auto-creates tables on first write.

Registered in both the engine default connectors and the service CLI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
* Fix reverse ETL connector progress and schemas

Committed-By-Agent: cursor

* Fix reverse ETL regression with source schema and status handling

Fix source-postgres connector specification so conformance sees a valid JSON Schema shape for `config`, prevent destination-stripe from forwarding non-error stream status once a stream has failed, and make the reverse ETL custom-object double-run test state progression deterministic.

Committed-By-Agent: cursor
* docs: update architecture docs to match current codebase

- packages.md: add missing packages (logger, openapi, hono-zod-openapi,
  test-utils, dashboard, visualizer), fix stale dependency claims
  (yesql removed, stripe SDK → undici, protocol deps updated)
- service/ARCHITECTURE.md: rewrite for Temporal-based architecture
- engine/ARCHITECTURE.md: fix stale export names (forward→pipe, etc.)
- principles.md: add logger+openapi to approved shared utilities
- AGENTS.md: update package table and isolation rule
- Remove deprecated docs (impl-status.md, overview.md)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude

* got the outline going

* More outline update

* docs(slides): add knowledge-transfer deck and bump node to 24

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude

* Align KT slides with the current sync protocol and runtime surfaces

The knowledge-transfer deck had drifted away from the current engine, webhook, and connector behavior. This updates the slides to match the actual code paths, adds concrete protocol examples, and marks deprecated protocol message wrappers so the presentation teaches the current direction instead of legacy shapes.

Constraint: Slides needed to stay faithful to current code paths while remaining presentation-readable
Rejected: Keep generic interface aliases and legacy protocol examples | too ambiguous for a codebase handoff
Rejected: Present webhook flow through Temporal/liveLoop | newer /pipeline_handle_events direction is the simpler story to teach
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep slides aligned with the actual protocol and API surfaces; if the message union or webhook entrypoints change again, update the deck at the same time
Tested: Built Slidev deck in Docker; verified preview served over HTTP on localhost:3030
Not-tested: Runtime behavior of the deprecated protocol annotations beyond type/docs usage
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* Keep generated OpenAPI specs aligned with protocol deprecation docs

The protocol annotation updates changed generated schema descriptions for deprecated eof payloads. The pre-push hook rejects drift, so this records the regenerated engine and service OpenAPI artifacts alongside the slide/protocol update already on the branch.

Constraint: Repo pre-push hook requires generated OpenAPI files to match current source annotations
Rejected: Push docs/protocol changes without regenerating specs | hook blocks on generated drift
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Any protocol description or schema metadata change that feeds OpenAPI should be followed immediately by ./scripts/generate-openapi.sh
Tested: Ran ./scripts/generate-openapi.sh and inspected generated engine/service OpenAPI diffs
Not-tested: Full downstream client compatibility beyond generated type refresh
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

* docs(slides): refine knowledge-transfer deck and add styles

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude

* update slides

* fix(demo): align write-to-postgres with protocol message format

Records must be nested as `{"type":"record","record":{...}}` per the
RecordMessage schema, and the catalog needs `newer_than_field` with a
matching timestamp in record data for destination-postgres upserts.

Also adds dummy-source demo scripts and reorders KT slides.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude

* Polish the KT deck so the presentation reads cleanly live

This pass simplifies the opening slide, tightens the webhook and subdivision explanations, and adjusts layout choices so the deck behaves better in Slidev during an actual presentation rather than just reading well in source form.

Constraint: Slides need to fit the live Slidev rendering model, not just look correct in markdown
Rejected: Leave the slide structure as-is and rely on browser refreshes | rendering/layout issues were slide-source problems, not just stale client state
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep presentation changes grouped and verify them in the running Slidev preview before committing
Tested: Rebuilt Slidev deck in Docker repeatedly and verified preview responses on localhost:3030
Not-tested: Remote browser rendering differences beyond the local preview
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: codex <noreply@openai.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
Committed-By-Agent: claude

# Conflicts:
#	apps/engine/package.json
#	apps/engine/src/__generated__/openapi.d.ts
#	apps/engine/src/__generated__/openapi.json
#	apps/engine/src/lib/default-connectors.ts
#	apps/service/src/__generated__/openapi.d.ts
#	apps/service/src/__generated__/openapi.json
#	pnpm-lock.yaml
#	scripts/generate-openapi-specs.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Committed-By-Agent: claude
Committed-By-Agent: claude

# Conflicts:
#	apps/service/package.json
#	apps/service/src/cli.ts
#	pnpm-lock.yaml
Copilot AI review requested due to automatic review settings May 21, 2026 21:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Stripe source’s list API error-skipping logic to treat the “Account not eligible for Climate Orders” response as a permanent, skippable error so affected climate streams can be marked as skipped instead of erroring.

Changes:

  • Add a new SKIPPABLE_ERROR_MESSAGES entry for Stripe Climate Orders/Products eligibility errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/source-stripe/src/src-list-api.ts
Comment on lines +161 to +164
// climate_order, climate_product
// This account is not eligible for Climate Orders. [GET /v1/climate/orders (400)]
// This account is not eligible for Climate Orders. [GET /v1/climate/products (400)]
'This account is not eligible for Climate Orders',
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.

5 participants