Ship generic futures routes and permit-to-production flow - #65
Conversation
|
Warning Review limit reached
Next review available in: 37 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe release workflow now verifies and publishes immutable artifacts through dependent jobs. The release adds permit-to-production documentation, typed permit envelope handling, canonical futures slugs with legacy aliases, and version 1.2.2 metadata. ChangesRelease pipeline
Permit-to-production API
Canonical futures slugs
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant verify
participant ArtifactStore
participant publish
participant npmRegistry
participant release_assets
participant GitHubRelease
verify->>ArtifactStore: upload signed package artifact and checksums
publish->>ArtifactStore: download artifact
publish->>publish: verify artifact checksum
publish->>npmRegistry: publish exact npm tarball
npmRegistry-->>publish: return package integrity and latest tag
release_assets->>ArtifactStore: download artifact
release_assets->>release_assets: verify artifact checksum
release_assets->>GitHubRelease: upload snippet manifest
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
tests/resources/ei.test.ts (1)
252-267: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd coverage for all supported response shapes.
This test covers only the
{ well_permits: ... }envelope. Add cases for a rawLatestWellPermit[]response and a{ data: LatestWellPermit[] }response to protect the other branches inEIWellPermitsResource.search.Also applies to: 280-280
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/resources/ei.test.ts` around lines 252 - 267, Extend the well-permits search tests around the existing spy and client.ei.wellPermits.search call to cover both remaining response shapes: a raw LatestWellPermit[] payload and a { data: LatestWellPermit[] } envelope. Assert each shape produces the expected search results, while preserving the existing { well_permits: ... } coverage.tests/resources/futures-family.test.ts (1)
147-162: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd regression cases for the remaining legacy aliases.
The implementation retains
ice-brent,ice-wti,ice-gasoil, andeua-carbon. These tests cover only the first two aliases across the file. Add parameterized cases forice-gasoilandeua-carbon, including uppercase inputs, to protect legacy compatibility.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/resources/futures-family.test.ts` around lines 147 - 162, Extend the futures family resolution tests around resolveFuturesFamilySlug with parameterized regression cases for ice-gasoil and eua-carbon, asserting their expected slugs and including uppercase input variants to verify case-insensitive legacy alias support.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/resources/ei/well-permits.ts`:
- Line 328: Revert the search method’s return type and behavior to preserve the
existing WellPermitRecord[] API in async search(query: WellPermitSearchQuery).
Defer LatestWellPermit[] to a major release or expose it through a separate
method without changing search compatibility.
---
Nitpick comments:
In `@tests/resources/ei.test.ts`:
- Around line 252-267: Extend the well-permits search tests around the existing
spy and client.ei.wellPermits.search call to cover both remaining response
shapes: a raw LatestWellPermit[] payload and a { data: LatestWellPermit[] }
envelope. Assert each shape produces the expected search results, while
preserving the existing { well_permits: ... } coverage.
In `@tests/resources/futures-family.test.ts`:
- Around line 147-162: Extend the futures family resolution tests around
resolveFuturesFamilySlug with parameterized regression cases for ice-gasoil and
eua-carbon, asserting their expected slugs and including uppercase input
variants to verify case-insensitive legacy alias support.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 0df57c0f-4b7f-486e-b709-bafbd7bff42d
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (11)
.github/workflows/publish.ymlCHANGELOG.mdREADME.mdpackage.jsonsrc/resources/ei/well-permits.tssrc/resources/futures.tssrc/version.tstests/release-readiness.test.tstests/resources/ei.test.tstests/resources/futures-family.test.tstests/resources/futures.test.ts
Summary
Red-green proof
{ well_permits, meta }search regression was added before the unwrapping fixVerification
npm audit --audit-level=low: 0 vulnerabilitiesnpm run lint: green, zero warningsnpm run storefront:check: 36 public surfacesnpm run check:secrets: greennpm run build: ESM and CJS greennpm run snippets:check: 6/6 fixtures plus manifest testsnpm run smoke:package: exact packed ESM/CJS keyless production smoke greengit diff --check: greenCloses the Node portions of OilpriceAPI/oilpriceapi-api#4175 and OilpriceAPI/oilpriceapi-api#3941.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation