GeezerVison is showing github.com — [Epic] Harden consultant lifecycle & deploy safety (stop inconsistent-state bugs) · Issue #351 · OpenResilienceInitiative/ORISO-UserService
[Epic] Harden consultant lifecycle & deploy safety (stop inconsistent-state bugs) #351Closed 5 / 55 of 5 issues completedClosed Epic 5 / 55 of 5 issues completed DescriptionWhy
Multiple production-blocking bugs on 2026-07-08 (incl. a Caritas demo) share one root pattern:
Multi-step operations leave the system in an inconsistent state, and that inconsistency is handled by either silently swallowing the error (fake 200) or hard-crashing (500) — never surfaced as an actionable error at the right layer.
Point-fixes (below) are necessary but not sufficient; they patch symptoms. This epic tracks the structural work so the platform is hardened, not whack-a-moled.
Evidence (all today)
| Symptom |
System's reaction |
Point-fix |
| Consultant→agency assignment fails validation |
swallowed → fake 200, nothing persisted |
#343 (merged) |
| Consultant without agency loads profile |
hard 500 on /users/data (+ 400 on sessions/chat) |
#347 (open) |
AGENCY_ADMIN_SERVICE_API_URL missing on cluster |
self-call → 500 |
manual ConfigMap patch |
| Passwords/2FA secrets in request bodies |
logged in clear text at DEBUG |
#344 (open) |
Independent confirmation: Sentry's bot flagged #343 as "setConsultantAgencies is not transactional → data inconsistency (HIGH)" — the exact pattern.
Root cause (concrete)
A consultant is created in two independent, non-atomic HTTP calls from the Admin — POST /useradmin/consultants then a separate PUT /useradmin/consultants/{id}/agencies (ORISO-Admin/src/api/counselor/addCounselorData.ts). CreateConsultantSaga does not touch agencies. If the second call fails, the consultant already exists in Keycloak (can authenticate) but has no agency → app crash. No rollback.
Workstreams
- 1. Make consultant creation atomic (biggest lever). Assign the agency inside
CreateConsultantSaga with rollback, OR have the Admin roll back (delete) the just-created consultant when agency assignment fails. Consider requiring >=1 agency at creation. → prevents orphans.
- 2. Consistent error-handling contract. Validation failures →
4xx with message; never swallow to 200; never 500 on an expected empty state. Codify in the exception handler + a review checklist.
- 3. Eliminate config drift. Deploy only from the Helm chart (no manual
kubectl ConfigMap patches); add a CI/CD check that required env vars are present in the live cluster. (The AGENCY_ADMIN_SERVICE_API_URL incident was pure drift — present in the chart, missing in the cluster.)
- 4. Post-deploy smoke gate. Wire real PreDev credentials into the ORISO-E2E money-path spec (it currently
test.skips without creds, so it provides zero coverage) and run it as a post-deploy gate. It literally logs in a consultant, opens a session, sends a message — exactly the invariant that keeps breaking.
Workstreams 1 + 4 together would have prevented the whole demo incident: (1) stops the orphan, (4) catches it if one slips through.
Related bug
🤖 Generated with Claude Code Sub-issuesCollapse Sub-issuesSub-issues5 of 55 of 5 Issues completedLoading 5 sub-issues Activitykiodreambau commented on Jul 8, 2026 ContributorAuthor More actions Related PRs & issues (all linked)
Point-fixes (symptom mitigations)
Bug
Maps to workstreams
Storypapst commented on Jul 9, 2026 PR / issue reconciliation snapshot (2026-07-09)
This epic is the umbrella for the consultant-lifecycle fixes that were created during the recent E2E and deploy-safety work.
Linked PRs / issues:
Current board intent: keep this epic and its active follow-ups visible on ORISO Roadmap; PRs stay linked here rather than added as duplicate project cards. Storypapst commented on Jul 29, 2026 Ready-column audit (2026-07-29): Partially done, not closing. The point-fixes this epic cites (#343, #347, #344) are merged — atomic consultant creation landed 2026-07-20 (commit eecd4a8a) — but the epic's other workstreams are unchecked and its status hasn't been updated to reflect what's actually done vs. still open.
Automated finding from a code-verification pass over all "Ready"-labeled issues on the ORISO Roadmap board — grepped against the current state of the relevant repo(s) and cross-checked with git history. Reopen/re-flag if this is wrong. Storypapst commented on Sep 7, 2026 My coding agent checked the current issue/PR record. Technical follow-up: @shazia-k. Reconcile the remaining lifecycle workstreams against merged #969/#970; startup validation alone does not establish the entire epic complete.
Storypapst commented on Oct 20, 2026 Moved to QA internal at Frank's request because all active sub-issues are at QA internal or later. This reflects board aggregation, not new functional QA or production acceptance.
For developers — current board aggregation evidence:
Epic: https://github.com/OpenResilienceInitiative/ORISO-UserService/issues/351
Non-cancelled descendants: 8/8 at QA internal or later (Done: 8).
Cancelled descendants excluded: 0.
Direct sub-issues: 5; nested descendants included in total: 3.
Child issues and current board statuses:
MetadataMetadataStatusShow more project fields
DevelopmentNo branches or pull requestsIssue actions
|