Skip to content

ci: compare fixtures with Ruby main - #71

Merged
cardmagic merged 3 commits into
mainfrom
polecat/furiosa/sj-a94+mv1o22nl
Oct 10, 2026
Merged

cardmagic merged 3 commits into
mainfrom
polecat/furiosa/sj-a94+mv1o22nl

Conversation

@cardmagic

@cardmagic cardmagic commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Why

  1. docs/parity.md cited Ruby solid_objects 0.17.2. RubyGems has 0.17.3.
  2. The four compatibility/*.json fixtures are committed to this repository and to solid-objects-ruby. Each suite reads its own copy. No job compared the two copies, so one side could change a wire format and both suites would stay green.

What changed

  • docs/parity.md now cites Ruby solid_objects 0.17.3. The ledger has no new row. Ruby 0.17.3 adds four problem guides, their tests, and activejob in the development bundle. The GitHub compare of v0.17.2 and v0.17.3 changes only docs/, test/, examples/, ci.yml, CHANGELOG.md, Gemfile, Gemfile.lock, README.md, and lib/solid_objects/version.rb. The release has no runtime change.
  • scripts/check-compatibility-fixtures.mjs takes two directories. It compares each *.json file by name and by bytes. It prints one line for each file that is missing on one side or different, and it exits with status 1. It also fails when an argument is absent or is not a directory. It ignores a file that is not JSON.
  • test/check-compatibility-fixtures.test.ts covers equal sets, a changed byte, a file present on one side only, a missing directory, a file that is not JSON, and an absent argument.
  • .github/workflows/compatibility-fixtures.yml runs on a push to main, one time each day (07:23 UTC), and on workflow_dispatch. It does a shallow sparse checkout of compatibility/ from cardmagic/solid-objects-ruby at main and runs the script. It does not run on a pull request, because the other repository holds the old fixture until the two pull requests of a paired change merge. The actions use the same commit SHAs as ci.yml.
  • docs/parity.md describes the workflow and the local command.
  • CHANGELOG.md has a new Unreleased section with two entries. The version did not change.

Limits

  • The workflow runs in this repository only. A fixture change that merges in solid-objects-ruby first fails here on the next daily run, not on the Ruby push.
  • The workflow cannot run before it is on main. I ran the same comparison locally on a sparse clone of solid-objects-ruby at main. The script exited with status 0. The four fixtures have the same git blob hashes in the two repositories.

Failing test first

Before the script existed, pnpm exec vitest run test/check-compatibility-fixtures.test.ts gave:

FAIL  test/check-compatibility-fixtures.test.ts > compatibility fixture check > fails when a directory is not given
AssertionError: expected 'node:internal/modules/cjs/loader:1520…' to contain 'usage:'
+ Error: Cannot find module '<repository>/scripts/check-compatibility-fixtures.mjs'
+   code: 'MODULE_NOT_FOUND',

 Test Files  1 failed (1)
      Tests  6 failed (6)

After the script: Test Files 1 passed (1), Tests 6 passed (6).

Validation

  • pnpm run build: passed.
  • pnpm run check: passed.
  • pnpm run format:check: passed on a clean git archive export of commit ae2ff29.
  • pnpm test: 70 files, 623 passed, 32 skipped in 3 runs. In other runs, 1 to 3 tests in test/lifecycle.test.ts and test/sqlite.test.ts failed. The machine load average was above 60. The same tests failed in 5 of 6 runs with the new test file excluded, so this change is not the cause. The new test file passed in each run. A follow-up task records these timing tests.
  • pnpm run test:browser: not run. This change does not touch browser code.
  • node scripts/check-compatibility-fixtures.mjs compatibility <sparse clone>/compatibility: exit status 0.

Sibling runtime

Ruby has no equivalent job. This workflow compares the two repositories, so one job covers both.

The ledger cited Ruby solid_objects 0.17.2, and RubyGems has 0.17.3.

Ruby 0.17.3 adds four problem guides, their tests, and activejob in the
development bundle. Between the tags v0.17.2 and v0.17.3, the only file
in lib/ that changed is version.rb. The release has no runtime change,
so the ledger needs no new row.
The four compatibility/*.json fixtures are committed to this repository
and to solid-objects-ruby. Each suite reads its own copy, and no job
compared the two copies, so one side could change a wire format and
both suites would stay green.

The new script compares the *.json files in two directories by name and
by bytes. The new workflow runs it on this repository and on a sparse
checkout of solid-objects-ruby at main.

The workflow does not run on a pull request. During a paired change,
the other repository holds the old fixture until the two pull requests
merge.
@context7

context7 Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Docs7 for cardmagic/solid-objects-js

Result Status Action
Deployment ➖ Not used —
Content review ➖ Did not run. This site has no agent runs available this month. Wait for the monthly reset or check your Docs7 plan. —

Commit 29202ce

@greptile-apps

greptile-apps Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous finding is fixed.

Summary

The PR adds a daily check that compares JavaScript fixtures with Ruby main.

  • The workflow checks that JavaScript and Ruby fixtures match.
  • The parity guide now tracks Ruby solid_objects 0.17.3.

Reviews (2) · Last reviewed commit: "refactor: inline jsonFileNames helper (s..." · Reviewed by Greptile

Comment thread scripts/check-compatibility-fixtures.mjs Outdated
Greptile found that jsonFileNames had one caller and held one short
expression. The reader had to go to the function to read the filter.

Put the expression at the call site. The behavior does not change.
@cardmagic

Copy link
Copy Markdown
Owner Author

@greptileai Please review the latest commit, 29202ce ("refactor: inline jsonFileNames helper"). It fixes the finding "Single-use helper adds a jump" in scripts/check-compatibility-fixtures.mjs.

@cardmagic
cardmagic merged commit 84cebd6 into main Oct 10, 2026
37 of 38 checks passed
@cardmagic
cardmagic deleted the polecat/furiosa/sj-a94+mv1o22nl branch October 10, 2026 02:14
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