GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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) #351

New issue
Copy link
New issue
Copy link
Closed
Epic
5 / 55 of 5 issues completed
Closed
[Epic] Harden consultant lifecycle & deploy safety (stop inconsistent-state bugs)#351
Epic
5 / 55 of 5 issues completed
Copy link
Assignees
Storypapst

Description

@kiodreambau
kiodreambau
opened on Jul 8, 2026
Issue body actions

Why

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

  • Consultant login broken: orphan consultant (no agency) crashes /users/data with 500 #350 — Consultant login broken: orphan consultant (no agency) crashes /users/data.

🤖 Generated with Claude Code

Sub-issues

Collapse Sub-issuesSub-issues

5 of 55 of 5 Issues completed
Loading 5 sub-issues

Activity

Next
  1. kiodreambau commented on Jul 8, 2026

    @kiodreambau
    kiodreambau
    on Jul 8, 2026
    ContributorAuthor
    More actions

    Related PRs & issues (all linked)

    Point-fixes (symptom mitigations)

    • fix(userservice): propagate agency-assignment errors instead of swallowing them #343 — propagate agency-assignment errors instead of swallowing (MERGED)
    • fix(admin): surface agency-assignment errors instead of silent success ORISO-Admin#258 — surface agency-assignment errors + client-side topic/agency validation (MERGED)
    • fix(userservice): don't fail consultant login when no agency is assigned #347 — /users/data returns empty agencies instead of 500 for agency-less consultant (OPEN, approved)
    • fix(userservice): stop logging plaintext passwords #344 — mask plaintext passwords + 2FA/TOTP secrets in logs (OPEN)

    Bug

    • Consultant login broken: orphan consultant (no agency) crashes /users/data with 500 #350 — orphan consultant (no agency) crashes login

    Maps to workstreams

    • fix(userservice): propagate agency-assignment errors instead of swallowing them #343 / unit tests: ChatService — increase coverage #258 / fix(userservice): don't fail consultant login when no agency is assigned #347 → workstream 2 (consistent error contract) — partial, read/assignment paths only.
    • root cause of Consultant login broken: orphan consultant (no agency) crashes /users/data with 500 #350 → workstream 1 (atomic creation) — not yet addressed.
    • the AGENCY_ADMIN_SERVICE_API_URL incident → workstream 3 (config drift).
    • none of the above are guarded by → workstream 4 (post-deploy E2E gate), which currently skips.
  2. Storypapst
    self-assigned this
    on Jul 9, 2026
  3. Storypapst
    added this to ORISO Roadmapon Jul 9, 2026
  4. github-project-automation
    moved this to Backlog in ORISO Roadmapon Jul 9, 2026
  5. Storypapst commented on Jul 9, 2026

    @Storypapst
    Storypapst
    on Jul 9, 2026
    Collaborator
    More actions

    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:

    • PR fix(userservice): propagate agency-assignment errors instead of swallowing them #343 — propagate agency-assignment errors instead of swallowing them; related issues: Consultant agency assignment returns 200 after validation failure #341, setConsultantAgencies swallows validator errors and always returns 200 #352.
    • PR fix(userservice): stop logging plaintext passwords #344 — stop logging plaintext passwords; related hardening work in this lifecycle/deploy-safety cluster.
    • PR fix(userservice): don't fail consultant login when no agency is assigned #347 — do not fail consultant login when no agency is assigned; related issue: Consultant login broken: orphan consultant (no agency) crashes /users/data with 500 #350.
    • Issue Cannot create a Counsellor-Admin (agencyadmin) from a Tenant account — POST /service/useradmin/agencyadmins fails #353 — agencyadmin creation still needs separate follow-up / verification.

    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.

  6. Storypapst
    moved this from Backlog to In progress in ORISO Roadmapon Jul 9, 2026
  7. BjoernLudwig
    set
    Priority
    to
    High
    on Jul 9, 2026
  8. kennstenicht
    added the
    Epic
    issue type on Jul 9, 2026
  9. kiodreambau
    added sub-issues on Jul 28, 2026
    • Consultant login broken: orphan consultant (no agency) crashes /users/data with 500 #350
    • Make scheduled group-chat deactivation cluster-safe #379
    • [DEL-GUARD] Epic: consultant deletion guard defects (403/500 instead of clean rules) #453
    • Pre-Dev schema drift: Liquibase disabled — changeset 0067 (#445) never applied, all consultant queries 500ed #458
    • Clean-slate DB boot broken: 0067_consultant_public_slug changeset never included in master changelog #488
  10. kiodreambau
    moved this from In progress to Ready in ORISO Roadmapon Jul 29, 2026
  11. Storypapst commented on Jul 29, 2026

    @Storypapst
    Storypapst
    on Jul 29, 2026
    Collaborator
    More actions

    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.

  12. 2 remaining items

  13. shazia-k
    added a commit that references this issue on Aug 6, 2026

    Merge pull request #969 from OpenResilienceInitiative/feat/consultant…

    93f09da
  14. Storypapst
    moved this from In review to In progress in ORISO Roadmapon Aug 20, 2026
  15. kiodreambau
    changed
    Platform release
    to
    v2.0.4v2.0.2
    on Aug 24, 2026
  16. Storypapst
    changed
    Platform release
    to
    v2.0.4
    on Aug 25, 2026
  17. Storypapst
    cleared
    Platform release
    on Aug 26, 2026
  18. Storypapst commented on Sep 7, 2026

    @Storypapst
    Storypapst
    on Sep 7, 2026
    Collaborator
    More actions

    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.

  19. Storypapst
    set
    Platform release
    to
    v2.0.6
    on Sep 15, 2026
  20. Storypapst
    changed
    Platform release
    to
    v2.0.7
    on Sep 16, 2026
  21. Storypapst
    cleared
    Platform release
    on Sep 16, 2026
  22. Storypapst commented on Oct 20, 2026

    @Storypapst
    Storypapst
    on Oct 20, 2026
    Collaborator
    More actions

    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:

    • ORISO-UserService#350 — Done; issue CLOSED/COMPLETED
    • ORISO-UserService#379 — Done; issue CLOSED/COMPLETED
    • ORISO-UserService#453 — Done; issue CLOSED/COMPLETED
    • ORISO-UserService#454 — Done; issue CLOSED/COMPLETED
    • ORISO-UserService#455 — Done; issue CLOSED/COMPLETED
    • ORISO-UserService#456 — Done; issue CLOSED/COMPLETED
    • ORISO-UserService#458 — Done; issue CLOSED/COMPLETED
    • ORISO-UserService#488 — Done; issue CLOSED/COMPLETED
  23. Storypapst
    moved this from In progress to QA internal in ORISO Roadmapon Oct 20, 2026
  24. Storypapst
    moved this from QA internal to QA external in ORISO Roadmapon Nov 4, 2026
  25. HelenaSKloeckner
    moved this from QA external to Done in ORISO Roadmapon Nov 18, 2026
  26. HelenaSKloeckner
    closed this as completedby moving to Done in ORISO Roadmapon Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Storypapst
    Storypapst

Labels

No labels
No labels

Type

Epic

Fields

Priority

High

Projects

  • ORISO Roadmap
    Status
    Done
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.