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
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@

## Unreleased

- **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
exactly the named cells, on a windowed table it names positions.
- `spec/request.md`: the implementation note became that rule (*Checked
by:* `model.reference-delta`, `window.delta-positions-reference`); a
whole value at `/<attr>/*` stays an implementation note.
`spec/windowed-tables.md` *Edits*: the positions rule names the `*`
node. `spec/open-questions.md`: question 14 resolved.
- New conformance app REF (`Z2UI5_CL_CONF_REF`, ABAP and cap2UI5 twin,
`conformance/apps/README.md`): `MR_TAB` and `MR_WIN`, both
`TYPE REF TO data`, bound dereferenced - one with `_bind( )`, one with
`window_bind_tab( )` in the order `QTY` descending.
- Two backend checks (MUST, core) - 93 checks (75 MUST, 18 SHOULD; 86
core). node-runtime (`@abap2ui5/node-runtime` 1.149.0) passes both:
its backend reads the `*` node, only its frontend sent the edit wrong.
cap2UI5 0.6.0 cannot declare such a field in a JavaScript app; the
twin's start fails there, and both checks are pinned for `cap2ui5` in
`test/lib/expected.mjs` (and kept out of the traffic comparison,
`BACKEND_TRAFFIC_APART`) until a plugin with `t.ref( )`
(cap2UI5/cap2UI5 `5085ddc`, not released) is in the host - with it the
twin passes both and answers as the ABAP app
(`conformance/RESULTS.md`, *Tables behind a data reference*).
- Suite traffic recorded again from both hosts (`traffic/*/suite.json`):
it carries `{ "*": { "__delta" } }` requests now.

- **The row delta of a table behind a data reference** (abap2UI5 #3026,
`2cc0344`). An attribute `TYPE REF TO data` bound dereferenced is the
model node `/<attr>/*`; its cell travels as `{ "MR_TAB": { "*": {
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ source file and method it was derived from ([spec/README.md](spec/README.md#sour
- **Protocol 2**, specification revision 0.5, derived from abap2UI5 1.149.0
(its release commit `6f55b04`) - the release that brought windowed
tables ([spec/windowed-tables.md](spec/windowed-tables.md)); the
maintainer decided ten open questions in revision 0.3, three are open
maintainer decided ten open questions in revision 0.3, question 14 is
resolved, three are open
([spec/open-questions.md](spec/open-questions.md)).
- **Backend suite: 91 checks** (73 MUST, 18 SHOULD; 84 core, 7 UI5 profile).
Both reference backends pass every MUST - `node-runtime`
(`@abap2ui5/node-runtime` 1.149.0) 91/91, `cap2ui5`
(`@cap2ui5/cds-plugin` 0.6.0, on the same runtime) 90/91 with one SHOULD
warning ([conformance/RESULTS.md](conformance/RESULTS.md)). No failure
is pinned.
- **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
([conformance/RESULTS.md](conformance/RESULTS.md)).
- **Schemas** validate all 482 recorded requests, 466 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
Expand Down
2 changes: 1 addition & 1 deletion conformance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ swapped independently:

| Suite | Plays | Tests | Status |
|---|---|---|---|
| [backend/](backend/README.md) | the frontend | a backend, over HTTP, against the conformance apps | implemented - 91 checks, `abap2ui5-conformance backend` |
| [backend/](backend/README.md) | the frontend | a backend, over HTTP, against the conformance apps | implemented - 93 checks, `abap2ui5-conformance backend` |
| [frontend/](frontend/README.md) | the backend | a frontend, by scripted responses (recorded traffic + synthetic edge cases), through an adapter per frontend | implemented - 85 checks, `abap2ui5-conformance frontend --adapter ui5\|agent\|webcomponent\|adaptive-cards` |

The **conformance apps** ([apps/](apps/README.md)) are what a backend serves
Expand Down
83 changes: 69 additions & 14 deletions conformance/RESULTS.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
# Results

Backend suite, profile `ui5` (91 checks: 84 core, 7 UI5-profile; 73 MUST,
18 SHOULD), run 2026-11-16 with `npm run conformance:<backend>`. The traffic
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
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: both
reference backends pass every MUST, and no failure is pinned
([`../test/lib/expected.mjs`](../test/lib/expected.mjs); the one pinned
warning is `error.details`).
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`).

| 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) | 91 | 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 | 0 | 1 | 0 | conformant (ui5), one SHOULD warning: `error.details` (below) |
| `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) |

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

| Area | Checks | node-runtime | cap2ui5 |
|---|---:|---|---|
| transport | 8 | 8 pass | 8 pass |
| response | 8 | 8 pass | 8 pass |
| event | 5 | 5 pass | 5 pass |
| model | 11 | 11 pass | 11 pass |
| window | 13 | 13 pass | 13 pass |
| model | 12 | 12 pass | 11 pass, 1 fail (`model.reference-delta`) |
| window | 14 | 14 pass | 13 pass, 1 fail (`window.delta-positions-reference`) |
| message | 4 | 4 pass | 4 pass |
| slots | 7 | 7 pass | 7 pass |
| action | 3 | 3 pass | 3 pass |
Expand All @@ -40,8 +45,8 @@ 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 windowed tables included
([below](#differences-between-the-two-backends)).
two is identical for every check the cap2UI5 host can run, the windowed
tables included ([below](#differences-between-the-two-backends)).

## The move from 1.148.0 to 1.149.0

Expand Down Expand Up @@ -155,6 +160,53 @@ drive the window requests through the adapter interface, which has no
agent client; `semantic.recorded-snapshots` replays the start and the
`@BINDING_CALL` against the recording.

## Tables behind a data reference

[Open question 14](../spec/open-questions.md#14-tables-behind-a-data-reference-in-the-backend-suite),
resolved (b): a table bound through a data reference is the model node
`/<attr>/*`, and a backend MUST read its `__delta` there
([../spec/request.md](../spec/request.md#the-model-delta)). The
conformance app REF (`Z2UI5_CL_CONF_REF`) binds `MR_TAB` with `_bind( )`
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:

| 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 |

*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
frontend sent it wrong (the whole attribute, [Frontend suite](#frontend-suite), finding 3
of the UI5 SPA; fixed in abap2UI5 2cc0344, #3026). Verified against the
runtime the suite uses, `@abap2ui5/node-runtime` 1.149.0: [MOD]
`main_json_to_attri` reads every entry at the attribute's client name,
`/MR_TAB/*`, applies a `__delta` there by row and maps a windowed one
through its order (`delta_apply_to_table` with the window). No pin.

*cap2UI5.* A JavaScript app of `@cap2ui5/cds-plugin` 0.6.0 declares its
fields as strings, numbers, booleans, structures and tables - there is no
field `TYPE REF TO data`, and a box the app made itself would neither bind
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.

## The move from 1.146.0 to 1.148.0

Until 2026-11-15 both hosts ran abap2UI5 1.146.0 (`@abap2ui5/node-runtime`
Expand Down Expand Up @@ -240,7 +292,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. Both are the same framework
[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
(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
14 changes: 14 additions & 0 deletions conformance/apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,17 @@ shows that they do not reach the app.
| `FILTER` | the app's filter: `NAME` `Contains` argument 1; no argument clears it. As `SORT` (wired: `FILTER` with `'1'`) |
| `RERENDER` | displays MAIN again, the sort and the filter passed unchanged |
| Buttons `Sort list`, `Filter list` | wired frontend actions, no roundtrip of their own: `BINDING_CALL` `rows` `items` `sort` `QTY` `X`, and `rows` `items` `filter` `NAME` `Contains` `1` - the list binding of the UI5 frontend turns each into a window request |

## Z2UI5_CL_CONF_REF

Tables behind a data reference ([../../spec/request.md](../../spec/request.md#the-model-delta)).
Two attributes `TYPE REF TO data`, bound dereferenced - in ABAP
`_bind( <tab> )` of the data `mr_tab->*` points to, in cap2UI5
`t.ref( )` fields bound as `"mr_tab->*"` - so each table is the model node
`/<attr>/*`.

| | |
|---|---|
| Model (initial) | `MR_TAB` { `*`: [{ `ID` 1, `TEXT` "one", `DONE` false }, { 2, "two", false }, { 3, "three", false }] } (bound with `_bind( )`); `MR_WIN` { `*`: six rows `{ ID, QTY, DONE }` } bound with `window_bind_tab( )`, a window of 4 and the app's sort `QTY` descending: `ID` 1 to 6, `QTY` = `ID` * 5 mod 7 (5 3 1 6 4 2), `DONE` false - so the model carries the rows with the `ID` 4 1 5 2 and `__WINDOW` = { `MR_WIN`: { `*`: { `TOTAL` 6, `COUNT` 4, `SIZE` 4 } } }; `SUMMARY` "" |
| View | Text `{/SUMMARY}`, a button `CHECK`; a Table over `{/MR_TAB/*}` with `{ID}`, an Input `{TEXT}` and a CheckBox `{DONE}` per row; a growing Table `rows` (`growingThreshold` 4) over `{/MR_WIN/*}` with `{ID}`, `{QTY}` and a CheckBox `{DONE}` |
| `CHECK` | `SUMMARY` = the rows of `MR_TAB` as `ID:TEXT:DONE` (`DONE` as `X` or empty) joined with `,`, then `;`, then the `ID` of the rows of `MR_WIN` that are `DONE`, in the order of the table, joined with `,` - initially `1:one:,2:two:,3:three:;` |
179 changes: 179 additions & 0 deletions conformance/apps/abap/z2ui5_cl_conf_ref.clas.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
" Conformance app REF - tables behind a data reference: two attributes
" TYPE REF TO data, bound dereferenced, so the model nodes are /MR_TAB/*
" and /MR_WIN/*. MR_TAB is bound with _bind( ), MR_WIN with
" window_bind_tab( ) in a fixed order (QTY descending). CHECK writes what
" the backend holds into SUMMARY, so a client can see which edits arrived.
" Behaviour: conformance/apps/README.md, section REF.
CLASS z2ui5_cl_conf_ref DEFINITION PUBLIC FINAL CREATE PUBLIC.

PUBLIC SECTION.
INTERFACES z2ui5_if_app.

TYPES:
BEGIN OF ty_s_item,
id TYPE i,
text TYPE string,
done TYPE abap_bool,
END OF ty_s_item.
TYPES ty_t_item TYPE STANDARD TABLE OF ty_s_item WITH EMPTY KEY.
TYPES:
BEGIN OF ty_s_row,
id TYPE i,
qty TYPE i,
done TYPE abap_bool,
END OF ty_s_row.
TYPES ty_t_row TYPE STANDARD TABLE OF ty_s_row WITH EMPTY KEY.

DATA mr_tab TYPE REF TO data.
DATA mr_win TYPE REF TO data.
DATA summary TYPE string.

PROTECTED SECTION.
DATA client TYPE REF TO z2ui5_if_client.

METHODS view_display.
METHODS summary_build.
METHODS model_init.

PRIVATE SECTION.
ENDCLASS.


CLASS z2ui5_cl_conf_ref IMPLEMENTATION.

METHOD z2ui5_if_app~main.

me->client = client.
IF client->check_on_init( ).
model_init( ).
view_display( ).
ELSEIF client->check_on_navigated( ).
view_display( ).
ELSEIF client->check_on_event( ) AND client->get_event( ) = `CHECK`.
summary_build( ).
ENDIF.

ENDMETHOD.

METHOD view_display.

FIELD-SYMBOLS <tab> TYPE ty_t_item.
FIELD-SYMBOLS <win> TYPE ty_t_row.

ASSIGN mr_tab->* TO <tab>.
ASSIGN mr_win->* TO <win>.

DATA(view) = z2ui5_cl_ui5_view_builder=>factory(
)->ele( n = `View` ns = `mvc`
)->a( n = `xmlns` v = `sap.m`
)->a( n = `xmlns:mvc` v = `sap.ui.core.mvc` ).

DATA(page) = view->ele( `Page`
)->a( n = `title` v = `conformance - ref` ).

page->tag( `Text`
)->a( n = `id` v = `summary`
)->a( n = `text` v = client->_bind( summary )
)->tag( `Button`
)->a( n = `text` v = `Check`
)->a( n = `press` v = client->_event( `CHECK` ) ).

page->ele( `Table`
)->a( n = `id` v = `items`
)->a( n = `items` v = client->_bind( <tab> )

)->ele( `columns`

)->tag( `Column`
)->tag( `Column`
)->tag( `Column`

)->end(
)->ele( `items`
)->ele( `ColumnListItem`
)->ele( `cells`

)->tag( `Text`
)->a( n = `text` v = `{ID}`
)->tag( `Input`
)->a( n = `value` v = `{TEXT}`
)->tag( `CheckBox`
)->a( n = `selected` v = `{DONE}` ).

page->ele( `Table`
)->a( n = `id` v = `rows`
)->a( n = `growing` v = `true`
)->a( n = `growingThreshold` v = `4`
)->a( n = `items` v = client->window_bind_tab(
val = <win>
window = 4
t_sort = VALUE #( ( path = `QTY` descending = abap_true ) ) )

)->ele( `columns`

)->tag( `Column`
)->tag( `Column`
)->tag( `Column`

)->end(
)->ele( `items`
)->ele( `ColumnListItem`
)->ele( `cells`

)->tag( `Text`
)->a( n = `text` v = `{ID}`
)->tag( `Text`
)->a( n = `text` v = `{QTY}`
)->tag( `CheckBox`
)->a( n = `selected` v = `{DONE}` ).

client->view_display( view->stringify( ) ).

ENDMETHOD.

METHOD summary_build.

FIELD-SYMBOLS <tab> TYPE ty_t_item.
FIELD-SYMBOLS <win> TYPE ty_t_row.
DATA lt_rows TYPE string_table.
DATA lt_done TYPE string_table.

ASSIGN mr_tab->* TO <tab>.
ASSIGN mr_win->* TO <win>.

LOOP AT <tab> INTO DATA(ls_item).
INSERT |{ ls_item-id }:{ ls_item-text }:{ ls_item-done }| INTO TABLE lt_rows.
ENDLOOP.
LOOP AT <win> INTO DATA(ls_row) WHERE done = abap_true.
INSERT |{ ls_row-id }| INTO TABLE lt_done.
ENDLOOP.

summary = concat_lines_of( table = lt_rows
sep = `,` ) && `;` &&
concat_lines_of( table = lt_done
sep = `,` ).

ENDMETHOD.

METHOD model_init.

FIELD-SYMBOLS <tab> TYPE ty_t_item.
FIELD-SYMBOLS <win> TYPE ty_t_row.

CREATE DATA mr_tab TYPE ty_t_item.
ASSIGN mr_tab->* TO <tab>.
<tab> = VALUE #( ( id = 1 text = `one` )
( id = 2 text = `two` )
( id = 3 text = `three` ) ).

" QTY runs in another order than ID: 5 3 1 6 4 2
CREATE DATA mr_win TYPE ty_t_row.
ASSIGN mr_win->* TO <win>.
DO 6 TIMES.
INSERT VALUE #( id = sy-index
qty = ( sy-index * 5 ) MOD 7 ) INTO TABLE <win>.
ENDDO.

ENDMETHOD.

ENDCLASS.
Loading