Skip to content

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

Handover RC-1-S28-F12 Fix: ess-governance is in the RC-1 stack, and IF-ESS-012 and IF-ESS-014 have end-to-end and outage results

Card: RC-1-S28-F12. Issue: cema-care/his#218. Branch: session/RC-1-S28-F12. Owner session: RC-1-S26. Decision record: ADR-HIS-098.

Comes after RC-1-S28 and RC-1-S28-F11. The issue's first comment holds the gate's evidence: interface operations gap 2 of the interface operations sheet, "unit tests only; ess-governance is not in the RC-1 stack". No person had commented. This session also read RC-1-S05, which built the unit and asked RC-1-S26 to add it to the stack.

What was built and where

ess-governance in the RC-1 stack (e2e/scenarios/RC-1/stack.json, ADR-HIS-098): - What it calls. The unit runs with the stack's task service (his.governance.workflow-url, IF-ESS-010) and master data (master-data-url, IF-ESS-007). It calls them, and the decision service, as its own service identity. Its schema root is the checkout, and its scheduler runs every 2 seconds. - The environment it controls. It controls the stack's own environment, development (activation-environment, BR-ESS-029). - Its consumers. The stack's consumers of configuration are pointed at it, each through the setting it already had: - ess-audit (his.audit-service.clients.configuration-url, with its client credentials) registers ess.audit-forwarding-rule and reads the active rules; - ess-coordination (his.workflow.configuration-url) installs task types, queues and definitions from ConfigurationChanged; - ess-runtime-decision (his.authz.configuration-url) applies policy versions from ConfigurationChanged. - The gateway (gateway/e2e.toml) routes configuration.v1 and api-catalogue.v1 to the unit, where before it had the refusing address of a unit outside the stack. - The provisioning (provision/identities.json): - the service identity ess-governance, which may ask for decisions, create tasks and read master data; - e2e-release-pipeline, a stand-in for the Domain 2 release pipeline, which promotes configuration and publishes contracts (D10-ESS 9.2 rule 6); - ess.cfg.item-type.register for ess-audit; - two configuration administrators and change approvers (an author and a different approver), and an enterprise architect.

The scenario (e2e/scenarios/RC-1/rc-1-governance.scenario.ts, README "Cases"): - RC-1-E2E-014, IF-ESS-012: - ess-audit has registered its item type with the configuration service; - a feature flag is drafted through the gateway, validated, submitted (an approval task in the task service), approved by a different person, promoted by its content hash by the pipeline, and activated; - it resolves for the facility, and ConfigurationChanged is delivered to and acknowledged by both subscriptions; - errors are refused with nothing saved, and repeats change nothing; - a second version's scheduled activation is missed while ess-governance is down, and applied at its effective time once it is back. Meanwhile the task service and the decision service carry on; - a rollback approved by another person restores the first version; - the activation is traced in Tempo through the gateway, ess-governance, the decision service, ess-coordination and ess-audit, and the gateway counts the route. - RC-1-E2E-015, IF-ESS-014: - the pipeline publishes a contract version; an identical republish is a no-op, other content under the same version is refused (409), and an unresolvable schema is refused; - an engineer finds it through the gateway, with the compatibility policy; - a consumer is registered once and notified of the deprecation, and retirement with that consumer is refused (PR-CFG-003-2); - a decision record is drafted, and an incomplete one refused; - with ess-governance down the catalogue is unavailable through the gateway; once it is back the entry is unchanged and republishing is still a no-op; - the gateway counts the route's answers by status and refusal class. - Late decisions. On this shared host a decision slower than the 250 ms budget (CFG-ISE-031) is refused closed, which is the decision-latency shortfall the gate reports. The cases' clients ask again, up to 3 times, when an answer says a check could not be made in time. Each re-ask is attached as asked-again.json. An outage the test makes is answered otherwise and never asked again.

A defect between the units, repaired (services/ess-governance, as RC-1-S26 repaired those it found, D1 to D16 of its handover): - The defect. HttpOwners, the active-owner check, read the record's status. It serves catalogue entries (FR-ESS-CFG-003 section 7: an accountable team or person, active) and extension points, extensions and feature flags (FR-ESS-CFG-002 section 10, "Owner inactive"). master-data.v1 gives status to practitioners only (PractitionerStatus), while every entity version carries its lifecycle state (VersionedEntity). So every organization was refused, and no contract whose owner is a team could be published. The unit's tests replace the check with a fake, so they could not see it. - The repair. The check now requires state active, and for a practitioner status active too. An organization therefore owns a catalogue entry, as FR-ESS-CFG-003 allows. - What stays with people (review round 1). FR-ESS-CFG-002 section 7 gives extension points, extensions and feature flags accountable people as owners ("Account references"). So Owners.isActivePerson admits only a practitioner, and ExtensionService and the feature flag's validation hook use it. An organization as the owner or support owner of an extension point or extension is refused (400, /owner or /supportOwner). For a feature flag it is a validation finding at /owner, and the extensions report counts it as without an active support owner. Before the repair, an organization was refused there only because it was never found active. The check is in the Owners interface, so the tests' fake applies it as well. - The tests. - HttpOwnersTest serves master-data records in the contract's form. With the old check activeOrganization fails (1 of 4); with the repair all 4 pass. - ExtensionPointsTest.flagOwnerIsAPerson and extensionOwnersArePeople fail without the person-only rule (2 of 9 failed) and pass with it.

The test that fails before and passes after: e2e/harness/test/test_governance_stack.py, 7 tests. Against main's stack, gateway environment and identities all 7 fail; with the fix all 7 pass. They check that: - the stack runs the unit from its folder and wires its collaborators; - every ${unit.…} reference names a unit of the stack; - each consumer of configuration is pointed at it; - the identities hold the scopes their calls need, and the starter policy grants each of them to a service; - the rendered gateway routes promoteConfigurationVersion and publishCatalogueEntry to the unit's address; - the scenario has a case for each interface.

The other evidence is the scenario itself: RC-1-E2E-014 and 015 cannot run without the unit in the stack.

ADR-HIS-098 and its row in the decision record index (99 records after the merges with main, identical to what build_adrs.py writes, checked on a copy). It was 097 until main took ADR-HIS-096 and 097 (RC-1-S28-F3 and F13), and every reference moved with it.

Checks and their result

Check Command Result
The two new cases HIS_SESSION=RC-1-S28-F12 e2e/harness/scenario run e2e/scenarios/RC-1 --fresh --grep "RC-1-E2E-01[45]", full profile Run 20261129T161830Z-6b03. Every step of both cases passes except the audit checks, which are soft and name the gap below. RC-1-E2E-014: 11 of 12 steps pass, in 86 s; the missed activation was applied at its effective time 37 s after the outage began. RC-1-E2E-015: 6 of 7 steps pass (the seventh passes its gateway metrics and fails only its soft audit checks). Nothing was asked again in that run (asked-again.json empty); earlier runs under a load average of 44 needed it. In each of the three full runs below, both cases again failed on the soft audit checks alone. After the merge with main (RC-1-S28-F3, F7 and F13), run 20261129T173032Z-051a with --strict on commit 5ef3bda gives the same: only the soft audit checks fail. Its record is "incomplete" only because those failures have no defect reference yet
The slice scenario, every case HIS_SESSION=RC-1-S28-F12 e2e/harness/scenario run e2e/scenarios/RC-1 --fresh --strict, three runs on commit 8466b43. Other sessions' stacks shared the host, at load averages of 5 to 23 Run 20261129T164735Z-3faf: 11 of 15 pass. RC-1-E2E-014 and 015 fail only on the soft audit checks below, and RC-1-E2E-009 only on its soft check of #220, as before this fix. RC-1-E2E-006 failed once: adm-patient-administration was refused by master data, whose own decision was late (503 "D10 registry unavailable: master data answered 503"). The screen kept the draft, as it must. Run 20261129T162818Z-fa0d: 9 pass. 001 and 010 failed on decisions slower than 250 ms, refused closed (503; 405 of 010's searches). 011 timed out waiting for the audit backlog after the audit service's restart. Run 20261129T170617Z-9a39: 10 pass. 006 and 007 failed on the gateway's own late decisions (503 with no upstream status). Every other case of the slice passed in at least two of the three runs. Each failure is the decision-latency shortfall the gate reports (NFR-ESS-001, the kits' decision cache CFG-ESS-009 as its follow-up), except 011's, which passed in the other two runs. The new cases' outages restart ess-coordination and ess-governance only, and 3 minutes or more before the next case starts
ess-governance build and every test ./gradlew cleanTest build --no-build-cache --continue in services/ess-governance, light profile of this session Passes: 117 tests, 6 of them new (HttpOwnersTest and the 2 owner tests of ExtensionPointsTest, review round 1). They include the provider contract test ConfigurationContractTest, which covers all 40 operations
The repair's test before and after ./gradlew :mod-ess-012:test --tests '*HttpOwnersTest', with the old check put back for the first run Before: 4 tests, 1 failed (activeOrganization). After: 4 pass. ExtensionPointsTest without the person-only rule: 9 tests, 2 failed; with it, all pass
The stack test before and after python3 -m unittest discover -s e2e/harness/test -p test_governance_stack.py, with main's three stack files for the first run Before: 7 of 7 fail. After: 7 of 7 pass
Harness self-tests e2e/harness/scenario selftest 13 TypeScript tests pass after the type check of src, test and ../scenarios (the new scenario file included). 29 Python tests pass, 7 of them new
Pipeline scans platform/delivery-pipeline/bin/secret-scan code origin/main HEAD and docs; static-analysis on e2e/harness, e2e/scenarios/RC-1, services/ess-governance No secret; no blocking finding. No dependency was added, so the dependency and image scans have nothing new
Decision record index build_adrs.py on a copy of docs/ Identical
Documentation links python3 docs/implementation_plan/tools/check_links.py 0 broken links, 0 duplicate anchors
Documentation site .venv/bin/mkdocs build Builds; its 5 warnings are older files' links outside docs/, none from this change

What the gate line now shows

Criterion 6 (ACC-005), the interface operations sheet's five properties, in the integrated environment:

Interface Acknowledgement Error handling Replay / repeat Reconciliation Monitoring Outage
IF-ESS-012 Draft answered with version, state and hash under the caller's correlation identifier; ess-audit's item type registration reached the service 401 at the gateway; schema findings and a refused submission; author cannot approve (403); wrong hash refused; task service down: 503 with Retry-After, nothing saved Same Idempotency-Key, same version; identical promotion a no-op (same ETag); rollback to the prior version A missed scheduled activation applied at its effective time once the service is back (D10-ESS 8.6); ConfigurationChanged published to and acknowledged by ess-coordination and ess-runtime-decision, none dead-lettered Tempo trace through gateway and units; gateway per-route metrics Service down: 503 with Retry-After at the gateway; the task service and the decision service carry on with what they hold
IF-ESS-014 Entry answered under the caller's correlation identifier 409 for other content under a version; unresolvable schema refused; incomplete decision record refused; retirement with an active consumer refused; 401 at the gateway Identical republish a no-op, before and after an outage; consumer registered once Consumer notified of the deprecation with its date (recorded; sent once IF-ESS-009 exists, RC-2) Gateway per-route metrics and refusal classes Service down: 503 with Retry-After at the gateway; the entry unchanged once it is back

What it does not yet show: - Audit (both interfaces' "all lifecycle actions audited", "entry changes audited"). Every action reaches the audit service, and the audit service quarantines it. ess-governance's ess.cfg.item, ess.cfg.extension and ess.cfg.catalogue events carry neither the item's version (resourceRef.version) nor before and after values (beforeAfter), which D10-ESS 9.5 requires of administration and configuration events. The audit service's log: quarantined (schema-invalid): /resourceRef/version … /beforeAfter. It is the gap F15 to F18 found in other units' emitters, here in a unit the gate did not run. The cases hold it as soft checks, so they fail on it and on nothing else. It needs a fix issue against RC-1-S05 ("Needs a person"). - "Pending approvals and failed promotions monitored" (IF-ESS-012). The unit has no measure of either. A failed promotion shows only as a 400 on the promotion route in the gateway's and the units' HTTP metrics. The approval task cannot be listed by anyone: it has no queue, and it is assigned to the role change-approver, which is not in the role catalogue (follow-up). - "Unregistered deployed contracts reported" (IF-ESS-014). Not built in the unit (follow-up).

Requirements and test scenarios of the card

The card has no requirement of its own; it repairs the gate line above.

Requirement or interface Covered by
IF-ESS-012 RC-1-E2E-014; test_governance_stack.py
IF-ESS-014 RC-1-E2E-015; test_governance_stack.py
FR-ESS-CFG-001, WF-ESS-006, BR-ESS-028, BR-ESS-029, BR-ESS-030, TEST-ESS-030 (end to end) RC-1-E2E-014: promotion recorded with hash, actor and time; rollback restores the prior behaviour with both histories kept; facility-scoped resolution; hash mismatch refused; a different approver; scheduled activation
FR-ESS-CFG-002 RC-1-E2E-014 (the feature-flag register, a flag owned by an active practitioner); HttpOwnersTest (active owner); ExtensionPointsTest.flagOwnerIsAPerson, extensionOwnersArePeople (owners are people)
FR-ESS-CFG-003, TEST-ESS-037 (end to end) RC-1-E2E-015: search, deprecation notice, retirement with consumers refused, decision record completeness, a contract owned by an active organization; HttpOwnersTest
EVT-ESS-011, IF-ISE-002 RC-1-E2E-014: ConfigurationChanged delivered and acknowledged by both subscriptions
IF-ESS-010 RC-1-E2E-014: submission depends on the task service and is refused with nothing saved while it is down
IF-ESS-008 RC-1-E2E-014, 015: every action reaches the audit service. The gap above is a soft check
IF-ISE-001, FR-ISE-OBS-001 RC-1-E2E-014, 015: the gateway's routes, problems and metrics; the Tempo trace

Review round 1

The review asked for three changes: - Organizations own catalogue entries only. The repaired owner check had let an organization own feature flags and extension points too. FR-ESS-CFG-002 section 7 gives those accountable people as owners, and only FR-ESS-CFG-003's catalogue entry allows a team. Owners.isActivePerson now keeps them to practitioners, with two tests (above, "What stays with people"). - RC-1-E2E-014's flag is owned by a person: the seed's practitioner (FLAG_OWNER). The synthetic contract of RC-1-E2E-015 keeps the RSU-01 organization (CONTRACT_OWNER). - Citations. The active-owner check is cited as FR-ESS-CFG-002 section 10 ("Owner inactive") and FR-ESS-CFG-003 section 7, not PR-CFG-002-3, in this handover and the scenario.

Checks of this round: - ./gradlew cleanTest build in services/ess-governance: 117 tests pass; - run 20261129T180159Z-ba98 (--fresh --strict --grep "RC-1-E2E-01[45]", commit 104303f): as before, only the soft audit checks fail, and the practitioner-owned flag goes through every step; - check_links.py (0 broken), the harness self-tests and the secret scan.

Differences from the card, specification or contract

  • A unit outside the scenario folder is changed: services/ess-governance. The card's work is the stack. Running the unit beside master data found that its owner check read a field master-data.v1 gives practitioners only. The repair is the owner check, with its tests, as RC-1-S26 repaired what it found between units. It keeps FR-ESS-CFG-002's owners to people (review round 1). No other part of the unit changed, and no contract changed.
  • The audit gap is reported, not repaired. Repairing it means changing the unit's audit wire format for every configuration, extension and catalogue action. That is a fix of its own, as F15 to F18 are for other units.
  • A stand-in identity promotes. platform/delivery-pipeline does not call the configuration service yet, so e2e-release-pipeline holds the pipeline's scopes in the stack (ADR-HIS-098 point 4).
  • No specification or contract changed.

Questions for a person

None blocks this card.

Follow-ups outside the card

  • services/ess-governance (RC-1-S05), audit: give every ess.cfg.* event the item's version (resourceRef.version) and before and after values (beforeAfter), so that the audit service accepts them (D10-ESS 9.5). The next gate round's run records this failure; it needs a fix issue.
  • services/ess-governance, monitoring: measures of pending approvals and failed promotions (IF-ESS-012), and the report of unregistered deployed contracts (IF-ESS-014).
  • services/ess-governance and services/ess-coordination, the approval task: the task is assigned to the role change-approver and has no queue. No person holds that role (the catalogue has configuration-administrator-change-approver), and the owning service cannot list it without a queue. So pending approvals cannot be worked or counted. A queue for the item types' approval tasks, or approval roles from the catalogue (ADR-HIS-052 point 5), would close it.
  • services/ess-governance, settings: his.governance.registry-url takes the registry's base address and adds /apis/registry/v3, while his-env env gives HIS_SCHEMA_REGISTRY_URL with that path already. So the stack does not set it, and a catalogue entry whose schema is a registry subject cannot be checked. Taking the v3 address as his-env gives it would let a stack set it.
  • services/ess-governance, calls: HttpOwners sends no X-Correlation-Id to master data, so its call is not tied to the request in telemetry.
  • services/ess-coordination: its notification item type registration (ess.notification-type) is tried once at start. In a stack whose service identities are installed after the units start, that one try is refused, and it is not tried again. ess-audit tries again with each refresh. This matters once RC-2 wires notifications.
  • ess.authorization-policy is registered by no one (RC-1-S17's follow-up). So the decision service's policy versions cannot come through the lifecycle yet, and the stack shows the decision service as a consumer of ConfigurationChanged only by its delivery counts.
  • Design system: none.