Skip to content

Fix nits from the 1.4.0 release review - #76

Merged
pacmano1 merged 1 commit into
mainfrom
fix-nits-1.4.0
Dec 1, 2026
Merged

pacmano1 merged 1 commit into
mainfrom
fix-nits-1.4.0

Conversation

@pacmano1

@pacmano1 pacmano1 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

rbac PR #75 fixed what the first 1.4.0 release review found. A second review, of PR #75, found no blocker and 31 small findings. This fixes 28 of them. The other three:

  • Import refusal messages show a backslash in a role name doubled. Left as is; docs/design-notes.md says why.
  • Splitting SecureAuthorizationController (now 504 lines) joins the splits of RbacAuthorizationController, RbacRepository, RoleEditorDialog and e2e/checks.py planned for the next release.
  • Not done: an optional probe of whether the e2e suite can read Derby's schema version over REST after an uninstall.

Behavior

  • Assign Role over REST (POST /api/extensions/rbac/users/{id}/role/{roleId}) answers 404 for a user id the engine doesn't have, with the message "No engine user has the id N.", as UserRoles.assign refuses one. It used to store the assignment.
  • Three web changes match what Swing already does:
    • After a failed import apply, the web previews again only on a 400 or 409, so a 403 on apply shows its error once.
    • The Orphaned Permissions dialog can't be closed during a removal.
    • The role editor counts a field edited back to its first shown text as unedited. A text input drops line breaks, so the web also compares with the stored value without them.
  • Swing: Import Roles and the export download can't be started twice. The Orphaned Permissions dialog always clears its guards, so an exception can't leave it stuck open or the task unresponsive until the Administrator restarts.
  • The release job's check that Build passed on main refuses an answer that isn't a number, and its message says to re-run the job once Build passes. RELEASING.md says the same.

Correction to rbac PR #75

PR #75 said that saving what a text field showed renamed a role stored with a line break, in both editors. That was true of the Swing editor only. The web editor saves the value in its state, which is the stored value until the field is edited, so a line break in the middle of a value was never lost there; its browser test passed on the old code (measured). The web change kept the leading and trailing spaces and line breaks of an unedited value. The browser test now uses a description ending in a line break, which the old code dropped, and a new entry in docs/design-notes.md records the correction.

New and changed tests

  • LogNameEscapingTest matches each quoted placeholder to its argument by position. The old count let a dropped escape through when another argument had one.
  • SqlStatementIdCoverageTest reads the statement ids from the sources instead of a hand-kept list.
  • New unit tests: a failure reading the permission labels at startup, the REST 404, the import's skip of the admin role, the web's rule for previewing again, the web's edited-back field, and the Swing permission-load guard.
  • New browser tests: a 403 on apply sends no second preview, and the Orphaned Permissions dialog stays open during a removal.
  • e2e: UserRoles.assign with a user id the engine doesn't have throws IllegalArgumentException on a real engine, and the REST call answers 404 and stores nothing. A NOTE line records how many permission labels rbac read at startup. The UserRoles check stops before its channel script if another admin couldn't be moved off the admin role.

Docs and small fixes

  • README: a Java caller using reflection gets UserRoles' exceptions as the cause of an InvocationTargetException.
  • CLAUDE.md: the full condition for the "(no longer exists)" row of the import preview's channel table, the REST 404, and that a user delete doesn't take the role-change lock.
  • Comments and test names list all three admin-only tasks: Export Roles, Import Roles and Orphaned Permissions.
  • A misplaced Javadoc, the --label-as help text and a docstring in e2e/run.py, a test name that contradicted its assertion, an indent and a blank line.

Test results

  • Unit tests: shared 11, server 398, client 110, web 151.
  • Browser suite against web client 1.3.0 and 1.1.0: 92 tests pass against each.
  • e2e suite on OIE 4.7.0 with Derby, MySQL, PostgreSQL, Oracle and SQL Server (jTDS and Microsoft drivers): no failures. The new UserRoles check first failed on every database: its script looked for the exception's cause, and Rhino, the engine's script runtime, unwraps the InvocationTargetException that Method.invoke throws. With the script fixed, I ran the fresh scenario again on all six.
  • Controls: with eight fixes undone at once, only the new unit test of each fails. With three web fixes undone, the three new browser tests fail (the 403 on apply, the dialog during a removal, the line break). With the user-exists check wired to accept any id in both the REST call and UserRoles, the three new e2e checks of an unknown user fail.
  • Swing Administrator on a running OIE 4.7.0: Export Roles, Import Roles and Orphaned Permissions each open again when pressed a second time, and a removal keeps Close off until the list reloads.

Co-authored with Claude Code.

rbac PR #75 fixed what the first 1.4.0 release review found. A second
review, of PR #75, found no blocker and 31 small findings. This fixes 28
of them. The other three:

- Import refusal messages show a backslash in a role name doubled. Left
  as is; docs/design-notes.md says why.
- Splitting SecureAuthorizationController joins the splits of
  RbacAuthorizationController, RbacRepository, RoleEditorDialog and
  e2e/checks.py planned for the next release.
- Not done: an optional probe of whether the e2e suite can read Derby's
  schema version over REST after an uninstall.

Changes:

- Assign Role over REST (POST
  /api/extensions/rbac/users/{id}/role/{roleId}) answers 404, with a
  message, for a user id the engine doesn't have, as UserRoles.assign
  refuses one.
- Three web changes match what Swing already does: after a failed import
  apply, the web previews again only on a 400 or 409, so a 403 shows its
  error once; the Orphaned Permissions dialog can't be closed during a
  removal; and the role editor counts a field edited back to its first
  shown text as unedited.
- Swing: Import Roles and the export download can't be started twice.
  The Orphaned Permissions dialog always clears its guards, so an
  exception can't leave it stuck open.
- The release job's check that Build passed on main refuses an answer
  that isn't a number, and its message says to re-run the job once Build
  passes. RELEASING.md says the same.
- Tests: LogNameEscapingTest matches each quoted placeholder to its
  argument, and SqlStatementIdCoverageTest reads the statement ids from
  the sources. New tests cover a failure reading the permission labels
  at startup, the REST 404, the import's skip of the admin role, the
  web's rule for previewing again, the web's edited-back field, the
  Swing permission-load guard, a 403 on apply and the dialog during a
  removal. The browser test for an unedited description with a line
  break now fails on the old code.
- e2e: UserRoles.assign with an unknown user id, the REST 404, and a
  NOTE with the number of permission labels rbac read at startup. The
  UserRoles check stops before its channel script if another admin
  couldn't be moved off the admin role.
- Docs: the README says a Java caller using reflection gets UserRoles'
  exceptions as the cause of an InvocationTargetException. Comments and
  test names list all three admin-only tasks: Export Roles, Import Roles
  and Orphaned Permissions. CLAUDE.md gains the full condition for the
  "(no longer exists)" row of the import preview's channel table, the
  REST 404, and that a user delete doesn't take the role-change lock. A
  new entry in docs/design-notes.md corrects what the previous one said
  about the web editor and line breaks, and says what has no automated
  test.
- Small: a misplaced Javadoc, the --label-as help text and a docstring
  in e2e/run.py, a test name, an indent, a blank line.

Tested on this branch: the unit tests (shared 11, server 398, client
110, web 151), the browser suite against web client 1.3.0 and 1.1.0 (92
tests each), and the e2e suite on OIE 4.7.0 with Derby, MySQL,
PostgreSQL, Oracle and SQL Server (jTDS and Microsoft drivers), with no
failures. The new UserRoles check first failed on every database: its
script looked for the exception's cause, and Rhino unwraps the
InvocationTargetException that Method.invoke throws. With the script
fixed, I ran the fresh scenario again on all six. Controls: with eight
fixes undone at once, only the new unit test of each fails. With three
web fixes undone, the three new browser tests fail (the 403 on apply,
the dialog during a removal, the line break). With the user-exists check
wired to accept any id in both the REST call and UserRoles, the three
new e2e checks of an unknown user fail. In the Swing Administrator on
OIE 4.7.0, Export Roles, Import Roles and Orphaned Permissions each open
again when pressed a second time, and a removal keeps Close off until
the list reloads.

Co-Authored-By: Claude <noreply@anthropic.com>
@pacmano1
pacmano1 merged commit 927c3c8 into main Dec 1, 2026
20 checks passed
@pacmano1
pacmano1 deleted the fix-nits-1.4.0 branch December 1, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant