Skip to content

adds integration test check - #430

Merged
jtzero merged 1 commit into
mainfrom
manual-fixtures-test
Aug 8, 2026
Merged

adds integration test check#430
jtzero merged 1 commit into
mainfrom
manual-fixtures-test

Conversation

@jtzero

@jtzero jtzero commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added stronger validation for manually managed fixture data, including match-count consistency and duplicate-match detection.
    • Added checks that referenced fixture images are reachable.
  • Bug Fixes

    • Improved detection of invalid or inconsistent fixture content before release.
  • Tests

    • Expanded coverage for fixture parsing, naming, schema validation, match counts, and image URLs.
    • Separated unit, integration, and full test commands, with integration checks running automatically in CI.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jtzero, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8c95f381-28a0-405c-98f3-81aad213cd2e

📥 Commits

Reviewing files that changed from the base of the PR and between b05bbc2 and e9d04d0.

📒 Files selected for processing (1)
  • src/content/manual-fixtures.integration.test.ts
📝 Walkthrough

Walkthrough

The PR extracts manual fixture validation into a shared schema, adds integration checks for fixture files and image URLs, separates test commands, runs integration tests in GitHub Actions, and updates JSON file writing to use asynchronous filesystem APIs.

Changes

Manual fixture validation

Layer / File(s) Summary
Shared manual fixture schema
src/content.types.ts, src/content.config.ts
The shared schema validates fixture data, rejects duplicate match IDs, exports ManualFixturesType, and replaces the inline collection schema.
Fixture integration checks
src/content/manual-fixtures.integration.test.ts
Integration tests validate fixture JSON, date-based filenames, schema data, match counts, and referenced image URL reachability.
Dedicated integration test execution
package.json, .github/workflows/test.yml
Test scripts separate unit, integration, and all-test execution. GitHub Actions runs integration tests with Node.js 20 and npm caching.

JSON file output

Layer / File(s) Summary
Asynchronous JSON writing
src/lib/dataPipeline/json.ts
stringifyToFile accepts unknown data, creates parent directories recursively, and writes formatted JSON with promise-based filesystem APIs.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions as GitHub Actions
  participant Npm as npm scripts
  participant Vitest as Vitest integration suite
  participant Fixtures as Manual fixture files
  participant Schema as manualFixturesSchema
  participant Images as Referenced image URLs
  GitHubActions->>Npm: Run test:integration
  Npm->>Vitest: Start integration tests
  Vitest->>Fixtures: Load and validate fixture files
  Vitest->>Schema: Validate fixture data
  Schema-->>Vitest: Return validation results
  Vitest->>Images: Check referenced URLs with timeouts
  Images-->>Vitest: Return reachability results
  Vitest-->>Npm: Return test status
  Npm-->>GitHubActions: Return job status
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the added integration test workflow and related test configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch manual-fixtures-test

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/test.yml (1)

30-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use npm ci when running install in CI.

package-lock.json is tracked, so npm install can let CI resolve dependency ranges without reusing it. Replace the install step with npm ci to use the committed lockfile consistently.

Proposed fix
       - name: Install dependencies
-        run: npm install
+        run: npm ci
🤖 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 @.github/workflows/test.yml around lines 30 - 31, Update the “Install
dependencies” workflow step to run npm ci instead of npm install, ensuring CI
uses the tracked package-lock.json consistently.
🤖 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/content/manual-fixtures.integration.test.ts`:
- Around line 14-19: Update fixtureFileNames to recursively discover all JSON
files beneath fixturesDir, matching the **/*.json behavior in
src/content.config.ts; preserve the existing sorted filename output so nested
fixtures are included in all validation checks.

---

Nitpick comments:
In @.github/workflows/test.yml:
- Around line 30-31: Update the “Install dependencies” workflow step to run npm
ci instead of npm install, ensuring CI uses the tracked package-lock.json
consistently.
🪄 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: 79c8ae32-7272-41f1-aa2a-75ce76e8fbd0

📥 Commits

Reviewing files that changed from the base of the PR and between 91c90bf and 08866c4.

📒 Files selected for processing (5)
  • .github/workflows/test.yml
  • package.json
  • src/content.config.ts
  • src/content.types.ts
  • src/content/manual-fixtures.integration.test.ts

Comment thread src/content/manual-fixtures.integration.test.ts
@jtzero
jtzero force-pushed the manual-fixtures-test branch from 08866c4 to b05bbc2 Compare August 8, 2026 19:53

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 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/lib/dataPipeline/json.ts`:
- Around line 6-11: Update the JSON serialization flow around JSON.stringify so
values that produce undefined are rejected with a clear error before mkdir or
writeFile runs. Preserve normal serialization for JSON-compatible data and
ensure writeFile only receives a JSON string.
🪄 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: d708e9bb-bbf8-4a9c-9cd9-2ed1a075198a

📥 Commits

Reviewing files that changed from the base of the PR and between 08866c4 and b05bbc2.

📒 Files selected for processing (1)
  • src/lib/dataPipeline/json.ts

Comment thread src/lib/dataPipeline/json.ts
@jtzero
jtzero force-pushed the manual-fixtures-test branch from b05bbc2 to e9d04d0 Compare August 8, 2026 20:16
@jtzero
jtzero merged commit e082f33 into main Aug 8, 2026
6 checks passed
@jtzero
jtzero deleted the manual-fixtures-test branch August 8, 2026 20:25
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