test(integration): OpenAPI endpoint tests (port legacy 22) - #732
Merged
Conversation
Self-contained suite that installs a minimal component (TableName table + Greeting table), then verifies GET /openapi returns the expected title, paths, schemas, and security schemes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Reviewed; no blockers found. |
Codex and Gemini review flagged that using a second @table for Greeting would not exercise the JS Resource → OpenAPI code path, allowing a regression in resource-class discovery to go undetected. Replace the Greeting @table with a minimal Resource class exported from resources.js (matching the legacy test's coverage), and enable jsResource in config.yaml. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dawsontoth
approved these changes
May 22, 2026
kriszyp
added a commit
that referenced
this pull request
Jul 28, 2026
Moves the pin from ^2.3.0 to ~2.4.1 and the lockfile from 2.3.0 to 2.4.1. 2.4.1 is the 2.4-line backport of the cross-column-family transactional read fix (rocksdb-js #717, backported in #732). TransactionHandle::get honored the caller's dbHandleOverride on its synchronous block-cache-tier attempt but dropped it in the async worker, falling back to the transaction's own column family. All tables in a Harper database share one read transaction, so every table after the first in a request was read through a foreign column family: reads that hit the block cache were correct, reads that missed it silently returned not-found. The failure was therefore intermittent and scaled with cache residency — worst right after a restart, healing as traffic warmed the cache. Where two tables share a key format a read could also hit in the foreign column family and return another table's row. Related: #1881. Tilde, not caret, is deliberate. ^2.4.1 resolves to 2.5.0 at install time, which would pull in the dedicated per-database commit thread, the fd-limit-derived max_open_files default, and the VerificationTable epoch rekey — none of which belong in a patch. ~2.4.1 holds 5.1.x on the 2.4 line. main stays on ^2.5.0 for 5.2. The lockfile moves with the pin because the lockfile is what ships: the original exposure was ^2.3.0 with a 2.3.0 lockfile, which let the 5.1.22 image build against whatever npm resolved that day (2.4.0, with the bug).
kriszyp
added a commit
that referenced
this pull request
Jul 28, 2026
Moves the pin from ^2.3.0 to ~2.4.1 and the lockfile from 2.3.0 to 2.4.1. 2.4.1 is the 2.4-line backport of the cross-column-family transactional read fix (rocksdb-js #717, backported in #732). TransactionHandle::get honored the caller's dbHandleOverride on its synchronous block-cache-tier attempt but dropped it in the async worker, falling back to the transaction's own column family. All tables in a Harper database share one read transaction, so every table after the first in a request was read through a foreign column family: reads that hit the block cache were correct, reads that missed it silently returned not-found. The failure was therefore intermittent and scaled with cache residency — worst right after a restart, healing as traffic warmed the cache. Where two tables share a key format a read could also hit in the foreign column family and return another table's row. Related: #1881. Tilde, not caret, is deliberate. ^2.4.1 resolves to 2.5.0 at install time, which would pull in the dedicated per-database commit thread, the fd-limit-derived max_open_files default, and the VerificationTable epoch rekey — none of which belong in a patch. ~2.4.1 holds 5.1.x on the 2.4 line. main stays on ^2.5.0 for 5.2. The lockfile moves with the pin because the lockfile is what ships: the original exposure was ^2.3.0 with a 2.3.0 lockfile, which let the 5.1.22 image build against whatever npm resolved that day (2.4.0, with the bug).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apiTests/tests/22_openApi.mjsto the new self-contained frameworkopenApiAppcomponent with aTableNametable and aGreetingtable viainstallAppComponent/openapireturns a valid OpenAPI 3.x document with the expected title, paths, schemas, and security schemesTest plan
restart_service http_workers)/TableName/and/TableName/{id}paths,/Greeting/path,schemas.TableName,schemas.Greeting,securitySchemes.basicAuth,securitySchemes.bearerAuth🤖 Generated with Claude Code
— Claude