Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

## Unreleased

- **cap2UI5 host on `@cap2ui5/cds-plugin` 0.7.0** (0.6.0 before), the
release with `t.ref( )` - a field `TYPE REF TO data` in a JavaScript
app. The twin of `Z2UI5_CL_CONF_REF` starts now and passes
`model.reference-delta` and `window.delta-positions-reference`, answering
both as the ABAP app: the two pins for `cap2ui5` in
`test/lib/expected.mjs` and both entries of `BACKEND_TRAFFIC_APART` are
gone, `test/traffic.test.mjs` expects both checks to pass on both
backends and compares their traffic. cap2UI5 passes 92 of 93 (one SHOULD
warning, `error.details`), node-runtime 93 of 93. Traffic recorded again
from both hosts; `conformance/RESULTS.md` updated (*Tables behind a data
reference*).

- **Open question 14 resolved (b): the backend side of a table behind a
data reference gets its checks.** A backend MUST read the entry of such
a table at its model node `/<attr>/*` - a `__delta` there changes
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ source file and method it was derived from ([spec/README.md](spec/README.md#sour
([spec/open-questions.md](spec/open-questions.md)).
- **Backend suite: 93 checks** (75 MUST, 18 SHOULD; 86 core, 7 UI5 profile).
`node-runtime` (`@abap2ui5/node-runtime` 1.149.0) passes 93/93;
`cap2ui5` (`@cap2ui5/cds-plugin` 0.6.0, on the same runtime) 90/93 with
one SHOULD warning and two pinned failures - the two checks of a table
behind a data reference, which need the plugin's `t.ref( )` after 0.6.0
`cap2ui5` (`@cap2ui5/cds-plugin` 0.7.0, on the same runtime) 92/93 with
one SHOULD warning and no failure - the two checks of a table behind a
data reference pass with the plugin's `t.ref( )`, new in 0.7.0
([conformance/RESULTS.md](conformance/RESULTS.md)).
- **Schemas** validate all 482 recorded requests, 466 responses and 26 agent
- **Schemas** validate all 490 recorded requests, 474 responses and 26 agent
snapshots, checked by the shipped validator and by ajv.
- **Portable profile v1** filled from a census of 247 core apps (73.7 % by
controls, 64.8 % run unchanged).
Expand Down
71 changes: 36 additions & 35 deletions conformance/RESULTS.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# Results

Backend suite, profile `ui5` (93 checks: 86 core, 7 UI5-profile; 75 MUST,
18 SHOULD), run 2026-11-19 with `npm run conformance:<backend>`. The traffic
18 SHOULD), run 2026-11-20 with `npm run conformance:<backend>`. The traffic
of these runs is recorded in [`../traffic/`](../traffic/). Revision 0.5
moved the node-runtime host to abap2UI5 1.149.0 and added the thirteen
checks of the windowed tables (`window.*`) and
`model.unconvertible-scalar-skipped` (SHOULD), and moved the cap2UI5 host
to `@cap2ui5/cds-plugin` 0.6.0, which hosts the same runtime. Open question
14 added the conformance app REF and two checks of a table behind a data
reference (`model.reference-delta`, `window.delta-positions-reference`):
node-runtime passes every MUST; cap2UI5 0.6.0 fails those two - its
JavaScript apps cannot declare a field `TYPE REF TO data`
([below](#tables-behind-a-data-reference)) - and they are its only pinned
failures ([`../test/lib/expected.mjs`](../test/lib/expected.mjs); the one
pinned warning is `error.details`).
reference (`model.reference-delta`, `window.delta-positions-reference`);
cap2UI5 0.6.0 failed those two - its JavaScript apps could not declare a
field `TYPE REF TO data` - and the cap2UI5 host moved to
`@cap2ui5/cds-plugin` 0.7.0, whose `t.ref( )` declares one
([below](#tables-behind-a-data-reference)). Both backends pass every MUST
now; the one pinned result is cap2UI5's SHOULD warning `error.details`
([`../test/lib/expected.mjs`](../test/lib/expected.mjs)).

| Backend | Version | Apps | Pass | Fail | Warn | Skip | Verdict |
|---|---|---|---:|---:|---:|---:|---|
| `node-runtime` | `@abap2ui5/node-runtime` 1.149.0 (abap2UI5 1.149.0, transpiled) | the ABAP apps, transpiled together with the framework by the package's `abap2ui5-transpile` (`@abaplint/transpiler-cli` 2.14.33) | 93 | 0 | 0 | 0 | conformant (ui5) |
| `cap2ui5` | `@cap2ui5/cds-plugin` 0.6.0 on `@abap2ui5/node-runtime` 1.149.0 (the version the plugin pins), `@sap/cds` 10 | the JavaScript apps | 90 | 2 | 1 | 0 | not conformant (ui5): `model.reference-delta` and `window.delta-positions-reference` fail, pinned ([below](#tables-behind-a-data-reference)); one SHOULD warning: `error.details` (below) |
| `cap2ui5` | `@cap2ui5/cds-plugin` 0.7.0 on `@abap2ui5/node-runtime` 1.149.0 (the version the plugin pins), `@sap/cds` 10 | the JavaScript apps | 92 | 0 | 1 | 0 | conformant (ui5); one SHOULD warning: `error.details` (below) |

Per area (both backends identical except `error` and the two checks of
the app REF):
Per area (both backends identical except `error`):

| Area | Checks | node-runtime | cap2ui5 |
|---|---:|---|---|
| transport | 8 | 8 pass | 8 pass |
| response | 8 | 8 pass | 8 pass |
| event | 5 | 5 pass | 5 pass |
| model | 12 | 12 pass | 11 pass, 1 fail (`model.reference-delta`) |
| window | 14 | 14 pass | 13 pass, 1 fail (`window.delta-positions-reference`) |
| model | 12 | 12 pass | 12 pass |
| window | 14 | 14 pass | 14 pass |
| message | 4 | 4 pass | 4 pass |
| slots | 7 | 7 pass | 7 pass |
| action | 3 | 3 pass | 3 pass |
Expand All @@ -42,11 +42,12 @@ The ABAP system itself (abap2UI5 on NetWeaver / ABAP Cloud) has not been run
yet - it needs a system with the apps pulled in by abapGit; the transpiled
runtime is the same framework source.

Both hosts run the same framework release now: cap2UI5 0.6.0 pins
`@abap2ui5/node-runtime` 1.149.0, the version the node-runtime host runs
(with 0.5.0 the cap2UI5 host was on 1.147.0). The recorded traffic of the
two is identical for every check the cap2UI5 host can run, the windowed
tables included ([below](#differences-between-the-two-backends)).
Both hosts run the same framework release now: cap2UI5 0.7.0 (like 0.6.0)
pins `@abap2ui5/node-runtime` 1.149.0, the version the node-runtime host
runs (with 0.5.0 the cap2UI5 host was on 1.147.0). The recorded traffic of
the two is identical for every check but `error.details`, the windowed
tables and the app REF included
([below](#differences-between-the-two-backends)).

## The move from 1.148.0 to 1.149.0

Expand Down Expand Up @@ -171,13 +172,13 @@ and `MR_WIN` with `window_bind_tab( )` in its own order (`QTY`
descending); the two checks send `{ "MR_TAB": { "*": { "__delta": { "1":
{ "TEXT": "zwei", "DONE": true } } } } }` and `{ "MR_WIN": { "*": {
"__delta": { "0": { "DONE": true }, "2": { "DONE": true } } } } }` with
`CHECK`. Measured 2026-11-19:
`CHECK`. Measured 2026-11-19 and 2026-11-20:

| Backend | `model.reference-delta` | `window.delta-positions-reference` |
|---|---|---|
| `node-runtime` 1.149.0 | pass - exactly row 2 changed, `SUMMARY` `1:one:,2:zwei:X,3:three:;` | pass - positions 0 and 2 land in the rows with `ID` 4 and 5, `SUMMARY` `...;4,5` |
| `cap2ui5` 0.6.0 | **fail, pinned** - the start answers `500` | **fail, pinned** - the same |
| `cap2ui5` with `t.ref( )` (cap2UI5/cap2UI5 `5085ddc`, branch `claude/great-mendel-aiaiwu`, not released) | pass | pass |
| `cap2ui5` 0.6.0 (until 2026-11-20) | fail, was pinned - the start answers `500` | fail, was pinned - the same |
| `cap2ui5` 0.7.0 (`t.ref( )`) | pass - as node-runtime | pass - as node-runtime |

*node-runtime.* The spec recorded as an implementation note that the
1.149.0 backend applies the `*`/`__delta`, and that only the 1.149.0
Expand All @@ -195,17 +196,17 @@ dereferenced nor survive the draft. The twin
[`apps/cap2ui5/ref.js`](apps/cap2ui5/ref.js) therefore needs `t.ref( )`:
on a plugin without it the app is registered as one whose `main( )` throws
(a declaration with `t.ref( )` would throw while the module loads and take
every app of the host with it), so the start of `Z2UI5_CL_CONF_REF` is
answered `500` and both checks end on that first request. *Filed for
cap2UI5:* `t.ref( )` - a field `TYPE REF TO data`, read and written as the
data it points to, bound as `"mr_tab->*"` with `_bind( )` and
`window_bind_tab( )`, kept in the draft by the framework's own S-RTTI -
on cap2UI5/cap2UI5 branch `claude/great-mendel-aiaiwu` (`5085ddc`). With that plugin
in the host (its `lib/define-app.js` over the installed 0.6.0, measured,
not recorded) the twin passes both checks and answers them byte for byte
as the ABAP app; the suite ends 92 pass, 1 warn (`error.details`). Once a
release carries it, the host moves to it, the two pins and
`BACKEND_TRAFFIC_APART` go, and the traffic is recorded again.
every app of the host with it), so on 0.6.0 the start of
`Z2UI5_CL_CONF_REF` was answered `500`, both checks ended on that first
request and were pinned, and `BACKEND_TRAFFIC_APART` kept them out of the
comparison. Filed for cap2UI5 and released in `@cap2ui5/cds-plugin` 0.7.0:
`t.ref( )` - a field `TYPE REF TO data`, read and written as the data it
points to, bound as `"mr_tab->*"` with `_bind( )` and
`window_bind_tab( )`, kept in the draft by the framework's own S-RTTI. The
host runs 0.7.0 since 2026-11-20: the twin passes both checks and answers
them as the ABAP app (compared in the recorded traffic); the suite ends
92 pass, 1 warn (`error.details`). The two pins and
`BACKEND_TRAFFIC_APART` are gone.

## The move from 1.146.0 to 1.148.0

Expand Down Expand Up @@ -292,10 +293,10 @@ both).
`test/traffic.test.mjs` compares the two recordings check by check - status,
media type and JSON body, draft ids normalized - and finds them
**identical** apart from the following - the thirteen checks of the
[windowed tables](#windowed-tables) included. The two checks of the app
REF are left out of the comparison (`BACKEND_TRAFFIC_APART` in
`test/lib/expected.mjs`): the cap2UI5 host does not get past its start
([below](#tables-behind-a-data-reference)). Both are the same framework
[windowed tables](#windowed-tables) and the two checks of the app REF
([above](#tables-behind-a-data-reference)) included; nothing is left out
of the comparison (`BACKEND_TRAFFIC_APART` in `test/lib/expected.mjs` is
empty). Both are the same framework
(cap2UI5 hosts `@abap2ui5/node-runtime` rather than porting it), so this
was the expected outcome; what differs is what the host adds around it.

Expand Down
2 changes: 1 addition & 1 deletion conformance/apps/cap2ui5/ref.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// conformance/apps/abap/z2ui5_cl_conf_ref.clas.abap.
// Behaviour: conformance/apps/README.md, section REF.
// t.ref( ) - a field TYPE REF TO data, bound dereferenced as "mr_tab->*" -
// comes after @cap2ui5/cds-plugin 0.6.0. On a plugin without it the app is
// came with @cap2ui5/cds-plugin 0.7.0. On a plugin without it the app is
// registered all the same and its start fails, naming why - a declaration
// with t.ref( ) would throw while the module loads, and take every other
// app of the host with it.
Expand Down
8 changes: 4 additions & 4 deletions conformance/hosts/cap2ui5/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion conformance/hosts/cap2ui5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "A minimal CAP project serving the cap2UI5 conformance apps (conformance/apps/cap2ui5) for the backend conformance suite. Nothing in here is cap2UI5-specific except the plugin and the app directory.",
"dependencies": {
"@cap-js/sqlite": "^3",
"@cap2ui5/cds-plugin": "0.6.0",
"@cap2ui5/cds-plugin": "0.7.0",
"@sap/cds": "^10"
},
"cds": {
Expand Down
10 changes: 5 additions & 5 deletions spec/open-questions.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,11 @@ nothing in the backend suite would have noticed.
*Status.* `@abap2ui5/node-runtime` 1.149.0 passes both checks: its
backend has read the `*` node all along ([MOD] `main_json_to_attri`) -
up to 1.149.0 only its frontend sent such an edit wrong, fixed in
abap2UI5 2cc0344 (#3026). `@cap2ui5/cds-plugin` 0.6.0 cannot declare a
field `TYPE REF TO data` in a JavaScript app, so the twin's start fails
there and both checks are pinned for it in `test/lib/expected.mjs`; the
plugin's `t.ref( )` (cap2UI5/cap2UI5, after 0.6.0) is the fix, and with
it the twin answers byte for byte as the ABAP app
abap2UI5 2cc0344 (#3026). `@cap2ui5/cds-plugin` 0.6.0 could not declare
a field `TYPE REF TO data` in a JavaScript app, so the twin's start
failed there and both checks were pinned for it; 0.7.0 brings the
plugin's `t.ref( )`, the host runs it, and the twin passes both checks
and answers them as the ABAP app
([../conformance/RESULTS.md](../conformance/RESULTS.md#tables-behind-a-data-reference)).

**Alternatives considered.**
Expand Down
27 changes: 11 additions & 16 deletions test/lib/expected.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,15 @@
* and @cap2ui5/cds-plugin 0.5.0. cap2ui5: none either - the thirteen checks
* of the windowed tables (spec/windowed-tables.md) were pinned for it while
* its host ran @cap2ui5/cds-plugin 0.5.0, whose runtime (1.147.0) has no
* window_bind_tab( ); the host runs 0.6.0 on the runtime 1.149.0 now and
* passes them. Pinned for cap2ui5 today: the two checks of a table behind a
* data reference (spec/request.md, open question 14) - a JavaScript app of
* @cap2ui5/cds-plugin 0.6.0 cannot declare a field TYPE REF TO data, so the
* twin of Z2UI5_CL_CONF_REF fails its start; the plugin's t.ref( ) after
* 0.6.0 (cap2UI5/cap2UI5) is the fix.
* window_bind_tab( ); 0.6.0 on the runtime 1.149.0 passes them. The two
* checks of a table behind a data reference (spec/request.md, open question
* 14) were pinned for it while its host ran @cap2ui5/cds-plugin 0.6.0, which
* cannot declare a field TYPE REF TO data, so the twin of Z2UI5_CL_CONF_REF
* failed its start; 0.7.0 brings t.ref( ) and passes them.
*/
const NO_REF = "@cap2ui5/cds-plugin 0.6.0 has no t.ref( ) - the twin of Z2UI5_CL_CONF_REF fails its start; fixed by t.ref( ) in cap2UI5/cap2UI5 after 0.6.0";
export const BACKEND_EXPECTED_FAILURES = Object.freeze({
"node-runtime": Object.freeze({}),
cap2ui5: Object.freeze({
"model.reference-delta": NO_REF,
"window.delta-positions-reference": NO_REF,
}),
cap2ui5: Object.freeze({}),
});

/**
Expand All @@ -52,9 +47,9 @@ export const expectedWarningIds = (backend) => ids(BACKEND_EXPECTED_WARNINGS, ba

/**
* The checks whose recorded traffic cannot be compared between the two
* backends because one of them never gets past the app's start: the two of
* the app REF, which cap2UI5 0.6.0 cannot start (above). Every other check
* is answered identically by both (test/traffic.test.mjs); a pin that keeps
* a host out of an app goes here.
* backends because one of them never gets past the app's start - none
* today (the two of the app REF were, while cap2UI5 0.6.0 could not start
* it). Every other check is answered identically by both
* (test/traffic.test.mjs); a pin that keeps a host out of an app goes here.
*/
export const BACKEND_TRAFFIC_APART = Object.freeze(["model.reference-delta", "window.delta-positions-reference"]);
export const BACKEND_TRAFFIC_APART = Object.freeze([]);
18 changes: 9 additions & 9 deletions test/traffic.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ test("both backends answer every check identically (status, media type, JSON bod
}
});

test("the windowed tables: both backends pass every check of them but the one behind a data reference, and nothing else keeps their traffic out of the comparison above", () => {
const windowed = node.checks.filter((c) => c.id.startsWith("window.") && c.id !== "window.delta-positions-reference");
assert.equal(windowed.length, 13);
assert.deepEqual([...pinnedApart], ["model.reference-delta", "window.delta-positions-reference"]);
test("the windowed tables: both backends pass every check of them, the one behind a data reference included, and nothing keeps their traffic out of the comparison above", () => {
const windowed = node.checks.filter((c) => c.id.startsWith("window."));
assert.equal(windowed.length, 14);
assert.deepEqual([...pinnedApart], []);
for (const c of windowed) {
const o = cap.checks.find((x) => x.id === c.id);
assert.equal(c.status, "pass", `node-runtime ${c.id}`);
Expand All @@ -65,13 +65,13 @@ test("the one recorded difference: cap2UI5 hides a JavaScript app's exception te
assert.match(body(cap), /^roundtrip failed \(/);
});

test("tables behind a data reference (open question 14): node-runtime passes both checks, the twin of cap2UI5 0.6.0 fails its start (pinned in test/lib/expected.mjs)", () => {
for (const id of pinnedApart) {
test("tables behind a data reference (open question 14): both backends pass both checks - cap2UI5 since @cap2ui5/cds-plugin 0.7.0 and its t.ref( ) - and answer them identically (compared above)", () => {
for (const id of ["model.reference-delta", "window.delta-positions-reference"]) {
const n = node.checks.find((c) => c.id === id);
const o = cap.checks.find((c) => c.id === id);
assert.equal(n.status, "pass", `node-runtime ${id}`);
assert.equal(o.status, "fail", `cap2ui5 ${id}`);
assert.equal(o.exchanges.length, 1, `cap2ui5 ${id}: the start, and nothing after it`);
assert.equal(o.exchanges[0].response.status, 500, `cap2ui5 ${id}: the start fails`);
assert.equal(o.status, "pass", `cap2ui5 ${id}`);
assert.ok(!pinnedApart.has(id), `${id} is compared between the backends`);
assert.equal(o.exchanges.length, n.exchanges.length, id);
}
});
Loading