test: expand schema tests — @sealed, Brotli Blob, array @indexed, schema-less table#1205
Open
claude[bot] wants to merge 2 commits into
Open
test: expand schema tests — @sealed, Brotli Blob, array @indexed, schema-less table#1205claude[bot] wants to merge 2 commits into
claude[bot] wants to merge 2 commits into
Conversation
Add four test cases per issue #1194: - @Sealed enforcement: PUT and operations-API insert with undeclared fields are rejected with HTTP 400 and "is not allowed" error. (schema-enforcement.test.mjs) - [String] @indexed array element search: REST queries on an indexed array field return only records whose array contains the queried element. (schema-enforcement.test.mjs) - Brotli Blob Content-Encoding pass-through: a sourced resource that stores Brotli-compressed bytes and sets Content-Encoding: br in the get() response delivers that header through Harper's REST layer. (blob.test.mjs — new Brotli Blob suite) - Schema-less table for MQTT retained messages: a table created via the operations API with no declared attributes (only hash_attribute) accepts arbitrary fields; upsert correctly overwrites the record for the same id, modelling retained-message semantics. (configuration.test.mjs) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Reviewed; no blockers found. |
…mpression failure The /brotlicache/ list endpoint responds with Content-Encoding: br, causing supertest's automatic decompression to throw "Decompression failed" during the readiness poll in restartHttpWorkers — which stalls the before() for 120s and then fails. Switch to /openapi (the same probe the original blob suite uses), which is brotli-free and a reliable HTTP-worker readiness signal. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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
Adds four integration test cases requested in #1194 (Section 3 Cat 1):
@sealedenforcement (schema-enforcement.test.mjs): RESTPUTand operations-APIinsertwith undeclared fields on a@sealedtable are rejected with HTTP 400 and the"is not allowed"error message fromTable.ts.[String] @indexedelement-level search (schema-enforcement.test.mjs): A table with an indexed array field is searched via the REST query syntax (?tags=value); records are returned only when their array contains the queried element, confirming per-element index storage viagetIndexedValues.Content-Encoding: brpass-through (blob.test.mjs, new suite): A sourced blob resource that Brotli-compresses content and setsContent-Encoding: brin itsget()response headers; the test verifies Harper passes that header through without re-compressing.configuration.test.mjs): A table created with only ahash_attributeaccepts arbitrary fields on insert;upsertto the same id replaces the previous record, matching retained-message semantics.Test plan
npm run format:check— passesnpm run lint— passesnode --test integrationTests/apiTests/schema-enforcement.test.mjs— new suite passes (requires non-Windows runner)node --test integrationTests/apiTests/configuration.test.mjs— new schema-less tests passnode --test integrationTests/apiTests/blob.test.mjs— new Brotli suite passes (requires non-Windows/non-Bun runner)Closes #1194
🤖 Generated with Claude Code