03 Custom Resource v5 Upgrades - #3
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Bump harper ^5.0.11 -> ^5.0.28 and @harperfast/integration-testing ^0.3.1 -> ^0.4.0 - Add the harperBinPath escape hatch in integrationTests/dog.test.ts so the harness resolves the CLI past harper's restricted exports map (ERR_PACKAGE_PATH_NOT_EXPORTED) - Use the standard test:integration script and add the pinned-hash Integration Tests CI workflow (Node 22/24/26) - Add typescript devDependency for editor/tsconfig support - Branding: package.json author "HarperDB Inc." -> "Harper Inc." Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The previous lockfile omitted ws's optional native deps (bufferutil, utf-8-validate, node-gyp-build), causing `npm ci` to fail with EUSAGE on Node 24/26 in CI (Node 22 happened to resolve). Regenerated from a clean install so all optional dependencies are recorded and the lockfile is in sync across Node versions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move github.event.inputs.node-version into an env var (NODE_VER) so the shell comparisons operate on a safe variable rather than a raw expression interpolated directly into the run script. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
BboyAkers
commented
Jun 11, 2026
BboyAkers
commented
Jun 11, 2026
BboyAkers
commented
Jun 11, 2026
BboyAkers
commented
Jun 11, 2026
BboyAkers
commented
Jun 11, 2026
BboyAkers
commented
Jun 11, 2026
- Add 03-custom-resource to push branches filter so CI fires after merge - Assert setup PUT succeeds in DELETE test to prevent false positives - Add strictEqual(getRes.status, 200) in update test before reading body - Add round-trip GET after PUT in creates test to verify persistence Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Member
Author
|
Review follow-up (autonomous agent): Fixed all 4 blocking findings: added |
Bump the harper dependency to ^5.2.1 and regenerate the lockfile. Regenerated in full so the optional native deps (bufferutil, utf-8-validate, segfault-handler) stay in the tree for Linux CI. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The previous lockfile was generated with npm 11, which does not auto-install the peer dependencies of an optional dependency. harper 5.2.1 pulls alasql, which optionally depends on react-native-fs, whose peers (react-native, react) npm 12 installs and npm 11 does not. CI runs npm 12 on Node 24/26, so npm ci failed there with those packages "missing from lock file" while Node 22 (npm 11) passed. Regenerated with npm 12 so the lockfile carries the full tree. lockfileVersion stays 3; npm ci verified under both npm 11 and npm 12. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Four of the six threads on #3 were already fixed on-branch in ef1d84b (push-trigger branch filter, DELETE setup status check, create-test round-trip, status check before the post-update JSON parse). The two cleanups were still open; both are done here. Hoisted the per-test boilerplate: httpURL and auth are resolved once in before() and closed over, instead of being re-derived in all seven tests. Table-driven the three DogWithHumanAge tests. They were copy-paste with different values; adding a mapping is now one row. Generated test names match the previous ones exactly, so CI output is unchanged. Also extended the silent-setup-failure fix beyond the DELETE test. The review flagged it there, but the same unchecked seed PUT appeared in five other tests. All seeding now goes through one putDog() helper that asserts the write succeeded, so a failed seed reports "setup PUT failed" instead of surfacing as a confusing downstream assertion. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dawsontoth
approved these changes
Aug 21, 2026
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
Completes the Harper v4 -> v5 upgrade for the
03-custom-resourcetutorial step of the "Create Your First Application" Learn guide.This guide repo has one progressive app captured across step branches (
01-create-table->02-rest-api->03-custom-resource->04-logger). This PR upgrades the03-custom-resourcestep (base branch:03-custom-resource). The sibling PR #2 upgrades the next step (04-logger); see "Two-PR structure" below.Changes
harper^5.0.11->^5.0.28;@harperfast/integration-testing^0.3.1->^0.4.0.resources.jsimports{ tables }fromharperand drops the v4-onlystatic loadAsInstance = false. (Applied in the original commit; confirmed correct.)integrationTests/dog.test.tscovers Dog REST CRUD (PUT/GET/PUT-update/DELETE/404) and theDogWithHumanAgecustom resource (humanAge for ages 1/2/3). Added the mandatoryharperBinPathescape hatch so the harness resolves the CLI past harper's restrictedexportsmap.test:integration(harper-integration-test-run "integrationTests/**/*.test.ts"), matching the CI workflow..github/workflows/integration-tests.yml(Node 22/24/26; actions pinned to commit hashes).typescriptdevDependency fortsconfig.json/ editor support.package.jsonauthor"HarperDB Inc."->"Harper Inc.". Livedocs.harperdb.ioURLs left intact.Migration items N/A
This is a minimal tutorial app (a single custom resource that reads via
super.get(target)and returns a fresh spread object). The following v5 changes do not apply: Table.get() return shape (#2), frozen/immutable records (#3 — already returns a new object), implicit transaction context (#4), child-process spawn allowlist (#5), blob storage (#6), install scripts (#7), VM module loader config (#8).Tests
EADDRNOTAVAILon 127.0.0.2+) — environmental, not a code issue. TheharperBinPathfix is confirmed working: the run progresses past CLI resolution to the loopback-pool stage before failing.ubuntu-latest, which supports the full 127.0.0.0/8 range and needs no loopback aliasing. This is the authoritative test gate for this PR.Known issue (upstream, flagged)
The
harperpackage'sexportsmap only exposes".", so the harness's defaultrequire.resolve('harper/dist/bin/harper.js')throwsERR_PACKAGE_PATH_NOT_EXPORTED(harper 5.0.11–5.0.28, integration-testing 0.3.1–0.4.0). Worked around via the documentedharperBinPathoption. Upstream fix: harper should export its bin path, or the harness should resolve via the package root.Two-PR structure
03-custom-resource: fully completed (deps, migration, tests, CI, branding).04-logger: upgrades the next tutorial step (addslogger+console.log). It applies the same import/rename migration but has no integration tests, no tsconfig, no CI, and still pinsharper@^5.0.11. Recommend mirroring this PR onto 04 Logger v5 Upgrades #2 (bump versions, add a test asserting the logger path still returns correct data, add the same CI workflow, harperBinPath fix). Not changed here to avoid clobbering that PR.Manual follow-up
🤖 Generated with Claude Code