Skip to content

Implementation plan / Session plan / Handover RC-1-S02

Handover RC-1-S02 Contract: Contracts and stubs: D2 ISE

Card: RC-1-S02. Issue: cema-care/his#16. Branch: session/RC-1-S02.

What was built and where

Everything is in contracts/ise/, except the section 7.3 additions. Its README.md lists:

  • what the domain offers, with the requirements each part traces to;
  • the conventions this contract follows;
  • the contract points each build and screen session of the slice must meet.

Scope as read. D2 is the integration fabric, so much of what it offers the other domains already exists in contracts/common (FN-S04): the gateway conventions of IF-ISE-001 and the event envelope of IF-ISE-002. This session contracted the rest:

  • the parts of the platform operations API IF-ISE-007 that the slice's ISE requirements name in their section 15;
  • what the two ISE screens of the slice (RC-1-S22: UI-ISE-007, UI-ISE-008) need from it;
  • the eight platform events of section 8.5 that those requirements name.

What was built:

  • Four APIs, OpenAPI 3.1, 36 operations:
  • service-catalogue (FR-ISE-PLT-001, FR-ISE-PLT-002, FR-ISE-OBS-001): the catalogue, admission, the dependency graph, availability, the service state board every domain polls as the fallback of ServiceStateChanged, and the environment inventory and drift report;
  • event-operations (FR-ISE-EVT-001, FR-ISE-EVT-002, with the replay controls of FR-ISE-INT-005): topics, dead letters per subscription, controlled replay with second authorization and owning-domain confirmation, and reconciliation counts;
  • releases (FR-ISE-REL-002, and what UI-ISE-007 uses of FR-ISE-REL-003 and FR-ISE-SUP-002): releases with manifest, signatures, evidence, gate and promotion history; promotion decisions; security sign-off; recovery authorization; change records;
  • secrets (FR-ISE-KEY-001): the metadata inventory, rotation in two steps, revocation, history and the rotation report. No value or private key crosses the API.
  • Eight events, version 1.0, all enterprise-scoped:
  • EnvironmentDriftDetected (EVT-ISE-012);
  • ServiceStateChanged (EVT-ISE-008);
  • InterfaceMessageDeadLettered (EVT-ISE-002);
  • EventReplayExecuted (EVT-ISE-018);
  • ReleaseDeployed (EVT-ISE-007);
  • CertificateExpiring (EVT-ISE-005);
  • CredentialRotatedOrRevoked (EVT-ISE-006);
  • SecurityAlertRaised (EVT-ISE-013).

They use seven topics his.ise.<aggregate>.v1. The two certificate events share his.ise.cryptographicitem.v1. - Stubs in contracts/ise/stubs/, generated by his-contract stub. - Section 7.3 additions in D02-ISE 7.3, each attribute with its trace and data classification: - new tables: DE-ISE-002 Environment, DE-ISE-010 Delivery Exception, DE-ISE-014 Change Record and DE-ISE-022 Telemetry Record and Alert; - new rows in DE-ISE-001 (dependency attributes, alert rules, tier approval, times), DE-ISE-012 (name, validity, rotation mode, next due, overlap, certificate status) and DE-ISE-013 (components, manifest, environment, evidence, security sign-off, reproducibility, gate); - the 7.2 rows of the four new entities now link to their tables. No existing attribute was changed. - Check contracts/ise/scripts/ends-when.sh: the "Ends when" check of this card, repeatable by any later session. It needs only Docker on the host. - Manifest contracts/ise/package.json and its lockfile, as the contracts/common README gives it. The lockfile holds only link:../common. No dependency was added.

Checks and their result

Node.js is not installed on this server. The checks ran in the node:22-bookworm container (Node.js 22.23.5, pnpm 10.34.9), as FN-S04's did. The integration environment ran as HIS_SESSION=RC-1-S02 (his-rc-1-s02) and was reset afterwards: nothing of the session is left.

Check Command Result
Lint (conventions, event catalogue, examples) pnpm build in contracts/ise Passed
Check against origin/main (compatibility, stubs up to date) pnpm test Passed (contract new)
Provider contract test against the stub his-contract serve . and his-contract verify . 86 of 86 cases passed; no violation recorded
Sample events against envelope and contract his-contract validate-event . stubs/events/*.json 8 of 8 passed
Ends when HIS_SESSION=RC-1-S02 contracts/ise/scripts/ends-when.sh Passed. (1) Check passed. (2) On the full profile: 8 schemas registered in Apicurio, unchanged on the second run; 7 topics created; 8 sample events published, read back from Kafka and validated. (3) The stub on the session network passed all 86 provider cases with a client-credentials token of the environment's Keycloak, with no violation
Dependency scan platform/delivery-pipeline/bin/dependency-scan contracts/ise 0 components, 0 blocking
Static analysis platform/delivery-pipeline/bin/static-analysis contracts/ise No blocking finding
Secret scan of the change platform/delivery-pipeline/bin/secret-scan code origin/main HEAD and secret-scan docs origin/main HEAD No finding
Links under docs/ python3 docs/implementation_plan/tools/check_links.py 0 broken, 0 duplicate anchors
Documentation site mkdocs build Builds. The only warning is FN-S05's existing link to platform/

Requirements and test scenarios

The card lists no test scenario of its own. The slice's ISE test scenarios belong to the build sessions. Each contract part traces as follows:

Card item Where it is met
Contracts pass the compatibility check pnpm test; step 1 of ends-when.sh
Every contract field traces to a requirement, a business rule or a section 7.3 attribute Each schema's description names its source: the 7.3 attribute (as written, in camelCase), or the requirement, business rule or section 8.5 event. The missing 7.3 attributes were written into the specification (above). Fields with no 7.3 entity trace to their requirement: the replay record (FR-ISE-INT-005 outputs), the service state (EVT-ISE-008 payload list), the subscription counts (FR-ISE-EVT-002 behaviour 8), and the availability and rotation reports (FR-ISE-PLT-002 behaviour 6, FR-ISE-KEY-001 outputs)
Stubs run in the integration environment Steps 2 and 3 of ends-when.sh
The scenario test runs and fails only because the behaviour is not built Not done here, see "Differences" below
A list of the contract points each build session must meet contracts/ise/README.md, "Contract points for the build and screen sessions": RC-1-S10 to S14, S18 to S20 and S22

Differences from the card or specification

  • No scenario test here. The card's "Leaves behind" and "Ends when" name the failing scenario test. Its scope says "the last contract session of the slice joins the domains and writes the scenario test", and that session is RC-1-S03. A scenario in e2e/scenarios/RC-1/ written here, beside RC-1-S01 working in parallel, would also be the file both sessions change. For RC-1-S03, the parts of the scenario that D2 carries are these:
  • step 5 is the envelope and topic of the encounter event, which RC-1-S03 defines on the backbone of this contract;
  • step 7's telemetry follows the template's correlation fields (README, RC-1-S10 row).

RC-1-S03 lists contracts/ise under "stubs" in stack.json if its scenario calls the ISE stub, for example the service state board. - Refusals answer 400 validation-failed. IF-ISE-007 says a refused operation states its unmet precondition, and the shared ProblemCode has no code for it. So a refused command lists each unmet precondition in errors. A segregation-of-duties denial is 403. See the follow-up below. - The screen brief of UI-ISE-007 differs from the specification on rejection. The brief assumes a rejected promotion leaves the release in its state ("gives the release no rejected state"). PR-REL-002-4 and section 4.3 make it Rejected, and the contract follows the specification. The README tells RC-1-S22. - Trust anchors (FR-ISE-KEY-003) appear on UI-ISE-008 but belong to a requirement outside this slice. They are not in this version, and adding them later is compatible. - The tier query parameter of listServices is written out (type: integer) instead of referring to the Tier schema. The stub coerces a query value only when the parameter's own schema states its type (follow-up below). - No decision record. The choices of this contract are in contracts/ise/README.md ("How the contract is built"). They bind only this domain's contract, which the domain leads approve: - enterprise scope of platform data: this contract's reading of architecture 7.5, which does not list platform operational data among facility-owned data; - naming of subscriptions and services; - status and state, as section 7.3 writes them; - refusals as above.

A cross-domain code for refused preconditions would be a decision for contracts/common.

Review round 1

  • Replay requested by the owning domain (FR-ISE-INT-005 behaviour 7). The request now says who asks, with requestedAs:
  • owning-domain is a replay requested from the owning domain's own queue. The request counts as the owning domain's confirmation and is recorded in decisions as its approve, so only a second Integration Operations Analyst then authorizes in place (CUX-64). The policy decision point must permit the caller for that domain;
  • integration-operations (the default) is a replay started on the console. It still needs both decisions through authorizeReplay.

The RC-1-S13 contract point in the README says the same. - Facility wording. The README, contract.yaml and the API headers now present enterprise scope as this contract's reading of architecture 7.5, which does not list platform operational data.

Questions for a person

None that stop the work. Under "Needs a person" for the pull request:

  • The leads of the domains in the slice approve the contract and the section 7.3 additions before the slice's build sessions start (architecture 6.6 point 5; session plan section 4, "End of each contract session"): D1 ADM, D2 ISE and D10 ESS.

Follow-ups outside the card

  • contracts/common (a foundation or contract-tooling card):
  • a distinct ProblemCode for a refused precondition, for example precondition-unmet with 409 or 422, added compatibly (extensible enum). The ISE refusals would then move to it in a minor version;
  • the stub server's coerce should resolve a parameter schema given by $ref. Today a query integer given by reference is refused as "must be integer";
  • FN-S05's open finding still stands: the Vitest/tinypool CVE in contracts/common. It did not stop this change, because the dependency scan of contracts/ise sees only the link.
  • RC-1-S03: the ADM topics used in this contract's examples (his.adm.encounter.v1, his.adm.EncounterOpened) are illustrations; ADM's contract fixes them. If it names them differently, only the examples here change.
  • MOD-ISE-003 slice (integration engine): the integration engine's side of InterfaceMessageDeadLettered (interfaceId, transactionId) and the quarantine kind of DE-ISE-010. The kind enum is marked extensible for this.
  • FR-ISE-KEY-003 slice: trust anchors and node-certificate binding on the secrets API.