Skip to content

Implementation plan / Session plan / Handover RC-1-S28-F32

Handover RC-1-S28-F32 Fix: ess-audit quarantines refusals in Administration and configuration, because it does not waive before and after values (and the item when no record exists) as the #277 ruling requires

Card: RC-1-S28-F32. Issue: cema-care/his#314. Branch: session/RC-1-S28-F32. Slice: RC-1. This is a round 2 fix of the gate session RC-1-S28-G2. The unit belongs to RC-1-S04. It comes after RC-1-S28-F31. Decision record: ADR-HIS-121 (amends points 6 and 7 of ADR-HIS-101).

The failure

The gate run 20261201T000308Z-fa9c (commit 1586d431) quarantined refusals of configuration actions. Once RC-1-S28-F25, F26 and F28 moved them from the unregistered access-check-unavailable to the refused action's own type, outcome denied, they were still quarantined, now as schema-invalid: - at /beforeAfter for every refusal in Administration and configuration; - also at /resourceRef or /recordNotCreated when the refusal concerned no existing item.

SubmissionValidator required "item reference and version; before and after values" (D10-ESS 9.5) on every outcome, and accepted recordNotCreated only on a refused creation in Record change (ADR-HIS-101 point 7).

The ruling on #277 (option A, Security and Privacy Office with the Domain 10 owner) says that, for a refusal in this category, the intake waives: - the before and after values; - the item reference and version when the refusal concerns no existing item, extending recordNotCreated to this category.

A refusal of an existing item still names it with its version.

What was changed and where

Everything is in services/ess-audit/:

  • mod-ess-006/.../SubmissionValidator.java, for category administration-and-configuration:
  • Outcome denied no longer needs before and after values. Every other outcome still does.
  • recordNotCreated is now valid on a refusal in this category, whatever the action. It waives the item reference and version, and nothing else. An identifier sent with it (the one the caller asked for) is stored as sent.
  • Without the marker, a refusal still needs the item with its version.
  • The patient reference is not waived, and recordNotCreated in any other category is still an error.
  • mod-ess-006/.../AuditIntakeTest.java: new test refusalInAdministrationAndConfiguration.
  • README.md: the validation row and the history line.

The integration environment his-rc-1-s28-f32 was reset at the end. No contract, migration, dependency, lockfile or setting changed. ADR-HIS-121 records why the marker is not limited to a list of actions: the category's actions are each domain's policy codes, and only the emitter knows whether the item exists.

Checks and their result

I ran these in services/ess-audit on the light profile, as HIS_SESSION=RC-1-S28-F32.

Check Command Result
The new test before the repair ./gradlew :mod-ess-006:test --tests '*AuditIntakeTest.refusalInAdministrationAndConfiguration' with SubmissionValidator as on main Fails: ess.cfg.item refusal answered 400, /beforeAfter "the before and after values are required for administration and configuration (D10-ESS 9.5)", the gate's pointer
Build and every test of the unit (the owning session's tests) ./gradlew build Passed: 96 tests, 0 failures, 1 skipped (service-kit 28 with 1 skipped, mod-ess-006 65 with 1 new, app 3). AuditContractTest (IF-ESS-008) and ConsumerContractTest pass
Secret scan platform/delivery-pipeline/bin/secret-scan code origin/main HEAD No secret found, in the files or the commits
Documentation python3 docs/implementation_plan/tools/check_links.py; .venv/bin/mkdocs build 0 broken links, 0 duplicate anchors; the site builds (its one warning is a link in RC-4-S02's handover, already on main)
Slice scenario HIS_SESSION=RC-1-S28-F32 e2e/harness/scenario run e2e/scenarios/RC-1 --fresh (run 20261202T034431Z-a916, host load about 2) Stopped before its first case, as on main: "the gateway's model does not check for this run: api ise.contract-catalogue: unit gateways has no address in environment e2e". That is the same stop RC-1-S28-F31 recorded, from RC-3-S13's API in platform/gateways/model/apis.toml, outside this card. Every unit had started from this branch and provisioning had run, so the audit store could be read (next row)
Audit quarantine after the run psql on ess_audit: mod_ess_006.quarantine_entry and audit_event 411 stored, 5 quarantined. All 5 are ess-governance ess.cfg.item refusals (ess.cfg.item-type.register, ess.cfg.version.read), outcome denied, at /resourceRef alone: they send no item and no recordNotCreated (first follow-up). None is quarantined at /beforeAfter. Stored refusals: adm.person.view 112, ess.auz.decision 109, ess.iam.service-identity-misuse 2. The run had no refusal of an existing configuration item, so that case is shown by the unit test alone

What the gate line now shows

The line is criterion 6 (ACC-005: IF-ESS-008 audit intake) and criterion 4 (FR-ESS-AUD-001: every action audited, nothing quarantined) of slice gate RC-1. The intake now stores the configuration refusals that the emitters send under the ruling: - a refusal of an existing item, with its version and no before and after values (ess-reference's 380 ess.trm.content outage refusals in the gate run, and ess-governance's changes of an existing item); - a refused list read or creation with recordNotCreated (ess-reference and ess-runtime-decision, ess.iam.* and ess.auz.policy).

One group stays quarantined, for a reason on the emitter's side, not this unit's. The scenario run above shows it: these are the only 5 events quarantined. ess-governance sends a refused list read or creation without an item and without recordNotCreated (its handover, RC-1-S28-F25: "never with recordNotCreated"). Under the ruling, a missing item is waived only when the event says that no item exists, so these events are still caught at /resourceRef. See the first follow-up.

Requirements and test scenarios of the card

Requirement Test What it shows
FR-ESS-AUD-001 AC-06 with D10-ESS 9.5 and the ruling on #277; TEST-ESS-022; DEC-ESS-018 AuditIntakeTest.refusalInAdministrationAndConfiguration (new, tagged FR-ESS-AUD-001, TEST-ESS-022, DEC-ESS-018) For ess.cfg.item, ess.cfg.extension, ess.trm.content, ess.iam.account and ess.auz.policy:
- a refused change of an existing item is stored with its version and no before and after values, with or without decisionUnavailable;
- a refused read or creation with recordNotCreated is stored with no item;
- the same without the marker is quarantined at /resourceRef.
Also:
- an asked-for identifier with the marker is stored as sent;
- an existing item without its version is caught;
- on success or failure, the values are still required and the marker is an error
FR-ESS-AUD-001 (rulings on #220, #224) AuditIntakeTest.refusalWithoutDecision, refusedCreationWithoutRecord, categoryFieldsRequired (unchanged) Still pass: the other categories' waivers and errors are as before
FR-ESS-AUD-001 to 003, IF-ESS-008 AuditContractTest (unchanged) Still passes

Differences from the specification or contract

  • The description of recordNotCreated in audit.v1 1.2 (contracts/ess) still names Record change only. The intake now accepts the marker in Administration and configuration, as the ruling says. The schema is const: true and unchanged, so no event's validity against it changes. Bringing the description in line is card RC-1-S28-F33 (#315), owned by RC-1-S01, not this card.

Questions and follow-ups

  • ADR-HIS-121 awaits approval by the Enterprise Architecture Board.
  • For the person who plans the fix round: the gate line "nothing quarantined" passes on this unit's side. It passes fully only once ess-governance sends recordNotCreated (first follow-up). No card carries that before RC-1-S28-G3, so G3 would find those refusals quarantined at /resourceRef. A fix card on services/ess-governance (owner of RC-1-S28-F25's work) is needed.
  • Follow-ups outside the card:
  • ess-governance (services/ess-governance, RC-1-S28-F25's unit): send recordNotCreated on a refused list read or creation. That is what ess-reference and ess-runtime-decision do. Until then those refusals stay quarantined at /resourceRef. Its test fixture AuditCategoryRules.administrationRefusalMissingAsRuled, and the knownGap entries in GovernanceTest, should follow ADR-HIS-121.
  • ess-runtime-decision (RC-1-S28-F28): its test copy of today's intake, intakeRefusalMissing, no longer matches the intake and can be removed. refusalMissing already matches the ruling.
  • The service template (services/_template): its kit's refusal audit should follow the same rule, adding to the template follow-ups of RC-1-S28-G2 and F25.