fix: resolve build and test errors#1394
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Three stale tests/tooling didn't match intentional source behavior, breaking
`pnpm build` / `pnpm test`. No shipped runtime behavior is changed.
1. MDX docs build (packages/spec/scripts/build-docs.ts) — @objectstack/docs#build
escapeMdxDescription used two separate regex passes for `{...}` and `<...>`.
On nested tokens like `{<id>}` it double-wrapped into `` `{`<id>`}` ``, whose
inner backticks closed the inline-code span early and leaked `<id>` as raw
JSX ("Expected a closing tag for `<id>`"). Replaced with a single
backtick-aware pass that skips fragments already inside code spans, and
regenerated the affected .mdx.
2. objectql registry test (packages/objectql/src/protocol-meta.test.ts)
"loads from a complete artifact" asserted strict toEqual against objDef, but
object schemas pass through registerObject -> applyProtection which stamps
internal envelope markers (ADR-0010 §3.7). Switched to toMatchObject to
assert the author-supplied shape is preserved rather than demanding equality
against intentional system fields.
3. CLI serve-defaults test (packages/cli/test/serve-defaults.test.ts)
The test pinned ALWAYS_ON_CAPABILITIES to exactly six items, but the shipped
fail-closed allowlist now also includes `sharing`. The six foundational
capabilities are still required to lead the slate in order, so the test now
pins that prefix (slice(0,6)) plus a no-duplicates invariant, letting the
list grow without churning the assertion.
Build: 63/63 tasks pass. Test: 123/123 tasks pass.
e33003a to
0f320f8
Compare
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.
What
Fixes three stale tests/tooling that didn't match intentional source behavior, so
pnpm build/pnpm testare green again. No shipped runtime behavior changes — only tests and the docs generator.@objectstack/docs#build(gen:docs)escapeMdxDescription(packages/spec/scripts/build-docs.ts) used two separate regex passes for{...}and<...>. On nested tokens like{<id>}it double-wrapped into`{`<id>`}`— the inner backticks closed the inline-code span early and leaked<id>as raw JSX (Expected a closing tag for <id>). Replaced with a single backtick-aware pass that skips fragments already inside code spans; regenerated the affected.mdx.@objectstack/objectql#testloads from a complete artifactasserted stricttoEqualagainstobjDef, but object schemas pass throughregisterObject -> applyProtection, which stamps internal envelope markers (ADR-0010 §3.7). Switched totoMatchObjectso it asserts the author-supplied shape is preserved rather than equality against intentional system fields.@objectstack/cli#testserve-defaultspinnedALWAYS_ON_CAPABILITIESto exactly six items, but the shipped fail-closed allowlist now also includessharing. The six foundational capabilities must still lead the slate in order, so the test pins that prefix (slice(0, 6)) plus a no-duplicates invariant — letting the list grow without churning the assertion.Verification
pnpm build→ 63/63 tasks passpnpm test→ 123/123 tasks passReviewer notes
content/docs/**.mdxfiles are the legitimate output of the fixedgen:docs(which had been crashing). Regenerating against this branch produces no further diff.sharing.