Repository navigation
test: port the dms-api inventory journeys off dms-control - #152
Merged
Merged
Conversation
… as integration tests
Upd4ting
marked this pull request as ready for review
November 19, 2026 09:00
…ses the guardrails
…end layer on dms-frontend 0.11.8
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.
Wdf26acfc-84
Why
dms-controland the DMS verify harness go away once nothing runs through them. This pull request moves every line of thedms-apisection of dmse2e/INVENTORY.mdthat was not yet at its destination, so dms-api's CI runs all of them with nodms-controlcall: the HTTP and command-line journeys as ordinary Vitest integration tests, the browser journeys in the Playwright suite through the@antelopejs/dms/e2ekit that dms#1162 freed fromdms-control.Summary
tests/<feature>.journeys.test.tsundervitest.journeys.config.ts(pnpm test:journeys). Each test gets a backend of the verification playground (ajs project dev) on a fresh database of one shared in-memory MongoDB, with its administrator onboarded (tests/helpers/dms.ts,backend.ts,seed.ts). A test restarts its backend under other module options or environment, which the kit'sstartRuncannot do. The unit config excludes them.packagejourneys ran the same checks astests/package.test.ts; they are deleted.e2e/journeys/package.mjs,capture.mjsandautomation.mjsstay as empty modules becausedms-control map, whichtests/package.test.tsruns, wants one per feature file.overviewverdict lines were listed as HTTP but read the verdict in the Overview's hero, in a tab. They stay in Playwright, which already runs them.pnpm e2e:buildruns the five prepare commands of the verify skill. Thee2ejob runs it and setsDMS_E2E_PREBUILT=1, so the kit's global setup only starts the run. The newjourneysjob runspnpm e2e:buildthenpnpm test:journeys, and theubuntugate requires it.@antelopejs/dmsis pinned to0.21.4-next.939.g641c7fa(dms#1162), and@antelopejs/coreto~1.24.5, its peer range.every-console-route-needs-a-session-and-the-block-it-servesanda-request-is-captured-with-its-factsleft the Playwright suite.a-member-without-the-modules-permissions-is-sent-to-their-settingsanda-request-opens-in-a-drawer-that-steps-through-the-listtake their places: 7@smokejourneys before and after.recordRaw,sendAndRead,seedStatisticsanddayStartofe2e/had only ported callers left.flowchart LR subgraph before P1[pnpm e2e] --> K1[kit global setup: dms-control up --prepare] K1 --> J1[85 journeys, browser, HTTP and command line] end subgraph after B[pnpm e2e:build] --> P2[pnpm e2e, DMS_E2E_PREBUILT=1] P2 --> K2[kit global setup: startRun] --> J2[51 browser journeys] B --> V[pnpm test:journeys] --> M[(one mongod)] V --> D[a playground backend per test] --> M endInventory lines
Counts of the 76 lines of the
dms-apisection:every-console-route-needs-a-session-and-the-block-it-servestests/access.journeys.test.tsthe-console-is-the-owners-and-a-role-holding-a-block-is-refusedtests/access.journeys.test.tswithout-the-automation-module-the-registration-is-a-silent-no-optests/automation.journeys.test.tsthe-module-registers-its-three-nodes-with-their-documented-inputstests/automation.journeys.test.tsget-api-health-restricts-its-breakdown-to-the-last-daystests/automation.journeys.test.tsquery-request-logs-pages-caps-and-filterstests/automation.journeys.test.tsroute-unhealthy-fires-on-the-flags-it-watches-and-never-faster-than-ten-secondstests/automation.journeys.test.tsquery-request-logs-next-cursor-reads-the-next-pagetests/automation.journeys.test.tstest.fails: the action takes no cursor input)a-request-is-captured-with-its-factstests/capture.journeys.test.tsa-thrown-error-keeps-its-message-and-its-stacktests/capture.journeys.test.tsthe-consoles-own-and-the-dms-traffic-is-never-capturedtests/capture.journeys.test.tsonly-the-listed-headers-are-stored-and-secret-ones-nevertests/capture-redaction.journeys.test.tsvalues-under-secret-looking-keys-are-redacted-before-storagetests/capture-redaction.journeys.test.tsbodies-above-the-cap-are-stored-truncated-and-flaggedtests/capture-redaction.journeys.test.tsa-key-is-secret-by-the-words-it-is-made-oftests/capture-redaction.journeys.test.tssecrets-and-card-numbers-are-redacted-wherever-they-sittests/capture-redaction.journeys.test.tsthe-tabs-the-filters-and-the-search-narrow-the-listthe-list-is-newest-first-sorts-and-pagestests/logs.journeys.test.tspause-holds-the-table-and-counts-what-was-missedthe-histogram-bars-follow-the-perioda-request-opens-in-a-drawer-that-steps-through-the-lista-link-names-a-range-with-since-and-untilthe-histogram-counts-past-days-by-classtests/logs.journeys.test.tsa-past-range-draws-at-most-120-barstests/logs.journeys.test.tsfilters-combine-with-the-status-tabtests/logs.journeys.test.tsthe-list-sorts-by-duration-both-waysthe-slow-labels-follow-the-threshold-in-seconds-or-millisecondscounts-are-grouped-and-all-time-compares-nothingwith-no-traffic-the-verdict-is-idlenineteen-failing-calls-are-too-few-to-judgeone-failing-call-in-a-hundred-is-degradedone-failing-call-in-a-hundred-and-one-is-operationala-fifth-of-the-calls-failing-is-downnineteen-percent-failing-is-degraded-not-downthe-blocks-rank-the-routes-by-what-is-wrong-with-themthe-period-and-the-comparison-are-kept-in-the-url-and-shared-by-the-pagesdown-reads-the-last-five-minutes-and-not-the-last-fifteentests/overview.journeys.test.tserrors-older-than-five-minutes-do-not-make-the-api-downtests/overview.journeys.test.tsthe-module-path-redirects-to-the-overviewa-route-is-flagged-at-the-documented-edges-whatever-the-perioda-comparison-beyond-the-kept-statistics-compares-with-nothingthe-hero-says-how-long-the-verdict-has-held-and-when-it-was-checkeda-comparison-the-page-does-not-know-compares-with-nothingtests/overview.journeys.test.tsevery-figure-compared-with-the-period-before-says-its-change-and-its-valuethe-slowest-routes-are-ranked-by-average-latency-not-by-their-slowest-callthe-tarball-holds-what-the-manifest-namestests/package.test.ts› the packed tarballthe-ranges-and-the-skill-match-what-the-docs-nametests/package.test.ts› the ranges the docs name, the skillthe-docs-links-and-the-two-locales-are-completetests/package.test.ts› the docs and the localeslowering-a-retention-tells-what-the-next-prune-deletestests/retention.journeys.test.tsthe-hourly-prune-deletes-what-the-retention-passedtests/retention.journeys.test.tslowering-a-retention-asks-before-it-deletesthe-tree-groups-routes-by-folder-and-the-filters-narrow-ita-route-opens-with-its-header-and-the-url-names-itthe-statistics-tab-adds-up-the-periodthe-documentation-tab-is-inferred-from-the-code-and-the-trafficauthentication-is-read-from-the-guards-before-the-handlerthe-contract-reads-seven-days-of-real-calls-and-never-the-testerstests/routes.journeys.test.tsa-route-from-an-installed-module-names-its-modulethe-route-statistics-compare-in-points-with-the-period-beforethe-documentation-writes-its-snippets-against-the-public-api-origin-and-hides-what-was-never-calledthe-form-shows-the-documented-defaultsevery-bound-of-the-form-is-enforced-on-its-edgetests/settings.journeys.test.tsuse-default-returns-a-field-to-the-module-optiontests/settings.journeys.test.tsthe-module-refuses-to-start-with-a-value-the-form-would-refusetests/settings.journeys.test.tsthe-scope-decides-which-routes-and-requests-every-page-watchesa-log-retention-of-no-day-is-refused-at-starttests/settings.journeys.test.tsretention-fields-have-no-use-default-but-the-others-dotraffic-shows-in-the-overview-and-the-request-logsa-tester-call-is-logged-and-marked-but-never-counteda-secret-keeps-the-testers-token-valid-across-restartstests/tester.journeys.test.tsthe-tester-sends-the-form-and-keeps-twenty-five-callsa-history-entry-restores-its-call-and-a-typed-authorization-beats-the-sessionheaders-for-all-routes-are-kept-in-the-browser-but-credentials-are-nota-replayed-call-needs-its-credentials-and-redacted-values-by-handformal-route-statisticsformal-route-statisticsprepareofverify-dms-api(5 commands)pnpm e2e:buildin thee2eandjourneysjobs,DMS_E2E_PREBUILT=1for the kitProof
Journey integration tests, locally, 4 workers: 10 files, 31 tests passed in 63 s (
pnpm test:journeys --maxWorkers=4). The Playwright list goes from 85 journeys onmainto 51 (pnpm exec playwright test -c e2e --list).Each file fails on a wrong implementation. One line of
src/broken,pnpm build, the test run, then reverted:requestId: undefinedincapture.tsthe stored request: expected { …(33) } to match object…+ "requestId": null✓ 1 passedpinmatched anywhere inredaction.tsspin keeps its value,pinned keeps its valuefailGET /logsguarded byLogsPage.liveGET /logs refuses with its own block's permissionfailssigningKey()ignorestesterSourceSecretunder the same secret the call is the Tester's: expected null to be 'tester'CONTRACT_WINDOW_DAYS7 → 9legacyfield,[[201,3]]TARGET_MAX_BARS120 → 2403 to 2 days ago: 50 to 120 bars (145)downWindowMinutes5 → 15the verdict: expected 'degraded' to be 'down'logRetentionDaysmax 366 → 400requestLogRetentionDays = 367: expected 200 to be 400REQUEST_LOG_MAX_LIMIT200 → 300expected [ 250, true ] to deeply equal [ 200, true ]pruneRequestLogsdroppedexpected [ Array(10) ] to deeply equal [ +0, 10, 10, 10, 10 ]Known failure
automation › query-request-logs-next-cursor-reads-the-next-pageistest.fails. Run as a plain test it fails onapi.query-request-logs returns a nextCursor but takes no cursor input, so a second call returns the first page again: expected false to be true.Follow-ups
api.query-request-logsreturns anextCursorbut takes no cursor input, done means a call with it returns the next page and thetest.failsofquery-request-logs-next-cursor-reads-the-next-pagebecomes atest..agents/skills/verify-dms-api/playground, andtests/package.test.tsrunsdms-control map, done means both work once the verify skill folder anddms-controlare deleted.startRunof@antelopejs/dms/e2e/runcannot restart a backend with other environment, so HTTP journeys that restart need a harness of their own, done means it exposes a restart with extra environment.[ERROR] [dms-api] route statistics write failed: MongoClientClosedError: Operation interrupted because client was closed(seen in CI run 44492434790, jobjourneys), done means the module flushes its statistics before the database client closes and a stop logs no error.