fix(mocks): read the rejection reason from MPE_REVIEW, as the estate does #534

Merged
allan merged 1 commits from fix/gethistory-review-reason into release/7.23 2026-11-08 17:09:00 +00:00
Collaborator

The rejection-reason finding from review 933 on #481.

gethistory.sas takes review_reason_txt from a left join on &mpelib..mpe_review (gethistory.sas:128, :130), and MPE_SUBMIT carries no such variable - the rejection path writes the reason to MPE_REVIEW only (approvers/rejection.js:81). The mock read it off the submission, which is why your reproduction showed REVIEW_REASON_TXT: " " where the product shows the reason.

The reason now comes from the latest review for the table, which is the join's own rule, with the submission's column kept as the fallback for a row the join misses.

Coverage: three cases in sas/mocks/test/approvers-gethistory.test.js - the reason is shown, the latest review wins, and the submission's column still answers when no review row exists. Seeded directly rather than through the edit cycle, because no corpus case rejects and the subject is the read, not the rejection. Two of the three fail with the service file reverted and all three pass with it; the wider mock suite is 167 + 3.

That leaves the site-mode libref (#531) and the release body as the only findings open on 481.

The rejection-reason finding from review 933 on #481. `gethistory.sas` takes `review_reason_txt` from a left join on `&mpelib..mpe_review` (`gethistory.sas:128`, `:130`), and `MPE_SUBMIT` carries no such variable - the rejection path writes the reason to `MPE_REVIEW` only (`approvers/rejection.js:81`). The mock read it off the submission, which is why your reproduction showed `REVIEW_REASON_TXT: " "` where the product shows the reason. The reason now comes from the latest review for the table, which is the join's own rule, with the submission's column kept as the fallback for a row the join misses. Coverage: three cases in `sas/mocks/test/approvers-gethistory.test.js` - the reason is shown, the latest review wins, and the submission's column still answers when no review row exists. Seeded directly rather than through the edit cycle, because no corpus case rejects and the subject is the read, not the rejection. Two of the three fail with the service file reverted and all three pass with it; the wider mock suite is 167 + 3. That leaves the site-mode libref (#531) and the release body as the only findings open on 481.
hermes added 1 commit 2026-11-08 17:07:51 +00:00
fix(mocks): read the rejection reason from MPE_REVIEW, as the estate does
Build / Build-and-ng-test (pull_request) Successful in 3m6s
Build / Build-and-test-development (pull_request) Failing after 22m53s
Build / lighthouse (pull_request) Successful in 6m45s
4deda2b4a6
gethistory.sas takes review_reason_txt from a left join on &mpelib..mpe_review
(gethistory.sas:128, :130) and MPE_SUBMIT carries no such variable. The mock read
the submission, so a rejection's reason came back blank exactly where the product
shows it: the rejection path writes the reason to MPE_REVIEW only
(approvers/rejection.js:81).

The reason now comes from the latest review for the table - the join's own rule -
with the submission's column as the fallback for a row the join misses.

Seeded directly in the test rather than through the edit cycle: no corpus case
rejects, and the subject here is the read. Three cases: the reason is shown, the
latest review wins, and the submission's column still answers when no review row
exists. Without the fix two of the three fail; with it, three pass.
allan merged commit e92575ef43 into release/7.23 2026-11-08 17:09:00 +00:00
allan deleted branch fix/gethistory-review-reason 2026-11-08 17:09:00 +00:00

Lighthouse

Route Performance Accessibility Best practices SEO
#/home/tables 0.87 0.93 1.00 1.00
#/editor/DC996664.MPE_X_TEST 0.30 0.96 1.00 1.00
#/view/data 0.71 0.92 1.00 1.00
#/view/data/DC996664 0.75 0.92 1.00 1.00
#/view/data/DC996664.MPE_X_TEST 0.54 0.92 1.00 1.00
#/view/usernav/groups 0.73 0.92 1.00 1.00
#/view/usernav/groups/1 0.71 0.92 1.00 1.00
#/view/usernav/users/1 0.73 0.92 1.00 1.00
#/home/excel-maps 0.81 0.92 1.00 1.00
#/home/excel-maps/BASEL-CR2 0.68 0.87 1.00 1.00
#/home/multi-load 0.81 0.90 1.00 1.00
#/review/submitted 0.85 0.91 1.00 1.00
#/review/approve 0.86 0.91 1.00 1.00
#/review/history 0.87 0.91 1.00 1.00
#/stage/DC20221006T142649516_059582_7169 0.87 0.96 1.00 0.92
#/review/submitted/DC20221006T142649516_059582_7169 0.83 0.91 1.00 1.00
#/system 0.89 0.93 1.00 1.00

Lowest accessibility score: 0.87 (the gate is a median of 0.85 while issue 497 is open).

Run: https://git.datacontroller.io/dc/dc/actions/runs/3553

<!-- lighthouse-report --> ### Lighthouse | Route | Performance | Accessibility | Best practices | SEO | |---|---|---|---|---| | `#/home/tables` | 0.87 | 0.93 | 1.00 | 1.00 | | `#/editor/DC996664.MPE_X_TEST` | 0.30 | 0.96 | 1.00 | 1.00 | | `#/view/data` | 0.71 | 0.92 | 1.00 | 1.00 | | `#/view/data/DC996664` | 0.75 | 0.92 | 1.00 | 1.00 | | `#/view/data/DC996664.MPE_X_TEST` | 0.54 | 0.92 | 1.00 | 1.00 | | `#/view/usernav/groups` | 0.73 | 0.92 | 1.00 | 1.00 | | `#/view/usernav/groups/1` | 0.71 | 0.92 | 1.00 | 1.00 | | `#/view/usernav/users/1` | 0.73 | 0.92 | 1.00 | 1.00 | | `#/home/excel-maps` | 0.81 | 0.92 | 1.00 | 1.00 | | `#/home/excel-maps/BASEL-CR2` | 0.68 | 0.87 | 1.00 | 1.00 | | `#/home/multi-load` | 0.81 | 0.90 | 1.00 | 1.00 | | `#/review/submitted` | 0.85 | 0.91 | 1.00 | 1.00 | | `#/review/approve` | 0.86 | 0.91 | 1.00 | 1.00 | | `#/review/history` | 0.87 | 0.91 | 1.00 | 1.00 | | `#/stage/DC20221006T142649516_059582_7169` | 0.87 | 0.96 | 1.00 | 0.92 | | `#/review/submitted/DC20221006T142649516_059582_7169` | 0.83 | 0.91 | 1.00 | 1.00 | | `#/system` | 0.89 | 0.93 | 1.00 | 1.00 | Lowest accessibility score: **0.87** (the gate is a median of 0.85 while issue 497 is open). Run: https://git.datacontroller.io/dc/dc/actions/runs/3553
Sign in to join this conversation.