Repository navigation
Allow multiple signoff changes in the same second - #61
Merged
Merged
Conversation
Replace the group signoff history timestamp uniqueness constraint with a nonunique index over the same columns. The sequence-generated history ID already identifies each event, so rapid changes can retain every history row without rolling back on Oracle DATE's whole-second precision. Remove the masking request test's delay and add an integration regression for rapid mask/unmask changes and their separate, ordered history rows. The pull request includes upgrade SQL for existing databases. Fixes #50 Assisted-by: Codex:GPT-6
slominskir
approved these changes
Oct 29, 2026
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.
A second signoff change for the same group and component within one second currently violates
GROUP_SIGNOFF_HISTORY_AK1and rolls back. Allow each event to be recorded using its existing sequence-generated history ID, and preserve the old lookup columns with a nonunique index.Remove the one-second workaround from
MaskingRequestITand add a regression that rapidly masks, unmasks, and masks a new component, then checks that all three events appear separately and in order in the signoff activity report.Fixes #50
Upgrade existing databases
Fresh databases get the updated schema from
container/oracle/initdb.d/02_ddl.sql. Existing databases need the following SQL in the application PDB before using the fix:The primary key on
GROUP_SIGNOFF_HISTORY_IDremains in place. The upgrade was exercised against a disposable database initialized from the original schema.Validation
./gradlew buildpassed (compilation, formatting checks, and 90 unit tests).ConstraintViolationException; the app log recordsORA-00001onGROUP_SIGNOFF_HISTORY_AK1. The same test passed after applying the upgrade SQL../gradlew integrationTestsuite successfully (60 tests, no skips). The mask acceptance test passes without its former delay.The VM's default ports were occupied. With user approval, checks used Compose project
srm-issue50, a temporary port override,SRM_URL=https://localhost:28443/srm,KEYCLOAK_URL=http://localhost:28081/auth, andMAILHOG_URL=http://localhost:28025. Docker dependency downloads required a host-network build (docker buildx build --network host --allow network.host --load -t srm-issue50-srm .), followed by Compose startup from that image. The local logbook endpoint was disabled.Decisions
Use the existing history ID as the event identity and replace timestamp uniqueness with a nonunique index. Increasing timestamp precision would still make event identity depend on clock resolution and would require changing both date columns and their producers. The user approved isolated services on unused ports; existing services were left running.
Prepared-by: OpenAI Codex:GPT-6