From 72c222731c3ed0918fa80225b1d917bd97315518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Weberru=C3=9F?= Date: Fri, 20 Nov 2026 17:35:20 +0000 Subject: [PATCH 1/3] fix(configurator): share configuration chats within workspaces --- .../api/db/102_shared_configuration_chat.sql | 78 +++++++ .../assistant/knowledge-topics.generated.ts | 73 ++++--- .../app/apps/api/src/assistant/routes.ts | 52 ++++- .../app/apps/api/src/assistant/service.ts | 143 +++++++++++-- .../apps/api/src/configurations/service.ts | 2 +- .../apps/web/src/components/AssistantChat.tsx | 201 ++++++++++++++--- .../web/src/components/TemplateAdvice.tsx | 9 +- .../app/apps/web/src/locales/en.ts | 21 ++ .../app/apps/web/src/main.tsx | 2 +- .../app/e2e/configurator.spec.ts | 128 +++++++++++ .../app/integration/identity.test.ts | 202 ++++++++++++++++-- .../app/scripts/assistant-knowledge.ts | 1 + .../app/scripts/assistant-scenarios.ts | 21 ++ .../app/tests/assistant-scenarios.test.ts | 53 ++--- .../app/tests/assistant.test.ts | 1 + .../docs/assistant-knowledge/README.de.md | 8 +- .../docs/assistant-knowledge/README.md | 7 +- .../configuration-lifecycle.de.md | 7 + .../configuration-lifecycle.md | 34 ++- .../docs/assistant-knowledge/manifest.json | 8 +- .../docs/assistant-test-catalogue.json | 17 +- .../docs/user-guide.de.md | 13 +- landing-zone-configurator/docs/user-guide.md | 12 +- .../infra/ci/release-notes.mjs | 8 + .../infra/mailout/README.de.md | 3 +- .../infra/mailout/README.md | 3 +- 26 files changed, 935 insertions(+), 172 deletions(-) create mode 100644 landing-zone-configurator/app/apps/api/db/102_shared_configuration_chat.sql diff --git a/landing-zone-configurator/app/apps/api/db/102_shared_configuration_chat.sql b/landing-zone-configurator/app/apps/api/db/102_shared_configuration_chat.sql new file mode 100644 index 00000000..ee065047 --- /dev/null +++ b/landing-zone-configurator/app/apps/api/db/102_shared_configuration_chat.sql @@ -0,0 +1,78 @@ +-- Preserve previously private conversations under their original owner policies. +-- Sharing an existing transcript requires an explicit action by its author. +ALTER TABLE lzc.assistant_conversations RENAME TO assistant_personal_conversations; +ALTER TABLE lzc.assistant_personal_conversations RENAME CONSTRAINT assistant_conversations_pkey TO assistant_personal_conversations_pkey; +ALTER TABLE lzc.assistant_personal_conversations RENAME CONSTRAINT assistant_conversations_configuration_id_created_by_key TO assistant_personal_configuration_author_key; +ALTER INDEX lzc.assistant_expiration RENAME TO assistant_personal_expiration; + +CREATE TABLE lzc.assistant_conversations ( + id uuid PRIMARY KEY, + configuration_id uuid NOT NULL REFERENCES lzc.configurations(id) ON DELETE CASCADE, + tenant_id uuid NOT NULL REFERENCES lzc.tenants(id) ON DELETE CASCADE, + created_by uuid NOT NULL REFERENCES lzc_auth.users(id), + created_at timestamptz NOT NULL DEFAULT now(), + expires_at timestamptz NOT NULL DEFAULT ((now() AT TIME ZONE 'UTC' + interval '3 months') AT TIME ZONE 'UTC'), + revision integer NOT NULL DEFAULT 1 CHECK (revision>0), + base_revision integer NOT NULL, + knowledge_hash text NOT NULL, + messages jsonb NOT NULL DEFAULT '[]' CHECK (jsonb_typeof(messages)='array' AND jsonb_array_length(messages)<=40), + proposal jsonb, + proposal_baseline jsonb, + UNIQUE(configuration_id), + UNIQUE(configuration_id,created_by) +); +ALTER TABLE lzc.assistant_conversations ENABLE ROW LEVEL SECURITY; +ALTER TABLE lzc.assistant_conversations FORCE ROW LEVEL SECURITY; +CREATE POLICY assistant_read ON lzc.assistant_conversations FOR SELECT TO configurator_app + USING(tenant_id=lzc.current_tenant_id() AND lzc.application_role('platform-engineer') + AND EXISTS(SELECT 1 FROM lzc.configurations c WHERE c.id=configuration_id)); +CREATE POLICY assistant_insert ON lzc.assistant_conversations FOR INSERT TO configurator_app + WITH CHECK(tenant_id=lzc.current_tenant_id() AND created_by=lzc.current_user_id() + AND lzc.application_role('platform-engineer') AND EXISTS(SELECT 1 FROM lzc.configurations c WHERE c.id=configuration_id)); +CREATE POLICY assistant_update ON lzc.assistant_conversations FOR UPDATE TO configurator_app + USING(tenant_id=lzc.current_tenant_id() AND lzc.application_role('platform-engineer') AND EXISTS(SELECT 1 FROM lzc.configurations c WHERE c.id=configuration_id)) + WITH CHECK(tenant_id=lzc.current_tenant_id() AND lzc.application_role('platform-engineer') AND EXISTS(SELECT 1 FROM lzc.configurations c WHERE c.id=configuration_id)); +CREATE POLICY assistant_delete ON lzc.assistant_conversations FOR DELETE TO configurator_app + USING(tenant_id=lzc.current_tenant_id() AND lzc.application_role('platform-engineer') AND EXISTS(SELECT 1 FROM lzc.configurations c WHERE c.id=configuration_id)); +CREATE POLICY assistant_migration ON lzc.assistant_conversations TO configurator_migration USING(true) WITH CHECK(true); +GRANT SELECT,DELETE ON lzc.assistant_conversations TO configurator_app; +GRANT INSERT(id,configuration_id,tenant_id,created_by,base_revision,knowledge_hash) ON lzc.assistant_conversations TO configurator_app; +GRANT UPDATE(revision,base_revision,messages,proposal,proposal_baseline,knowledge_hash) ON lzc.assistant_conversations TO configurator_app; +CREATE INDEX assistant_expiration ON lzc.assistant_conversations(expires_at); + +ALTER TABLE lzc.assistant_configuration_context ADD COLUMN workspace_shared boolean NOT NULL DEFAULT false; +ALTER TABLE lzc.assistant_configuration_context ALTER COLUMN advice_id DROP NOT NULL; +ALTER TABLE lzc.assistant_configuration_context DROP CONSTRAINT assistant_configuration_context_advice_id_fkey; +ALTER TABLE lzc.assistant_configuration_context ADD CONSTRAINT assistant_context_advice_source + FOREIGN KEY(advice_id) REFERENCES lzc.assistant_template_advice(id) ON DELETE SET NULL; +DROP POLICY context_owner ON lzc.assistant_configuration_context; +CREATE POLICY context_read ON lzc.assistant_configuration_context FOR SELECT TO configurator_app + USING(tenant_id=lzc.current_tenant_id() AND (created_by=lzc.current_user_id() OR workspace_shared) + AND lzc.application_role('platform-engineer') AND EXISTS(SELECT 1 FROM lzc.configurations c WHERE c.id=configuration_id)); +CREATE POLICY context_insert ON lzc.assistant_configuration_context FOR INSERT TO configurator_app + WITH CHECK(tenant_id=lzc.current_tenant_id() AND created_by=lzc.current_user_id() + AND lzc.application_role('platform-engineer') AND EXISTS(SELECT 1 FROM lzc.configurations c WHERE c.id=configuration_id) + AND EXISTS(SELECT 1 FROM lzc.assistant_template_advice a WHERE a.id=advice_id)); +CREATE POLICY context_share ON lzc.assistant_configuration_context FOR UPDATE TO configurator_app + USING(tenant_id=lzc.current_tenant_id() AND created_by=lzc.current_user_id() AND lzc.application_role('platform-engineer') + AND EXISTS(SELECT 1 FROM lzc.configurations c WHERE c.id=configuration_id)) + WITH CHECK(tenant_id=lzc.current_tenant_id() AND created_by=lzc.current_user_id() AND lzc.application_role('platform-engineer') + AND EXISTS(SELECT 1 FROM lzc.configurations c WHERE c.id=configuration_id)); +CREATE POLICY context_delete ON lzc.assistant_configuration_context FOR DELETE TO configurator_app + USING(tenant_id=lzc.current_tenant_id() AND (created_by=lzc.current_user_id() OR workspace_shared) + AND lzc.application_role('platform-engineer') AND EXISTS(SELECT 1 FROM lzc.configurations c WHERE c.id=configuration_id)); +GRANT INSERT(workspace_shared) ON lzc.assistant_configuration_context TO configurator_app; +GRANT UPDATE(workspace_shared) ON lzc.assistant_configuration_context TO configurator_app; + +CREATE OR REPLACE FUNCTION lzc_auth.prune_assistant_conversations() RETURNS void +LANGUAGE plpgsql SECURITY DEFINER SET search_path=pg_catalog AS $$ +BEGIN + DELETE FROM lzc.assistant_conversations WHERE expires_at<=now() + OR EXISTS(SELECT 1 FROM lzc.tenants t WHERE t.id=tenant_id AND t.archived_at IS NOT NULL); + DELETE FROM lzc.assistant_personal_conversations WHERE expires_at<=now() + OR EXISTS(SELECT 1 FROM lzc.tenants t WHERE t.id=tenant_id AND t.archived_at IS NOT NULL); + DELETE FROM lzc.assistant_template_advice WHERE expires_at<=now() + OR EXISTS(SELECT 1 FROM lzc.tenants t WHERE t.id=tenant_id AND t.archived_at IS NOT NULL); + DELETE FROM lzc.assistant_configuration_context WHERE expires_at<=now() + OR EXISTS(SELECT 1 FROM lzc.tenants t WHERE t.id=tenant_id AND t.archived_at IS NOT NULL); +END $$; diff --git a/landing-zone-configurator/app/apps/api/src/assistant/knowledge-topics.generated.ts b/landing-zone-configurator/app/apps/api/src/assistant/knowledge-topics.generated.ts index 0aeb40df..07a50781 100644 --- a/landing-zone-configurator/app/apps/api/src/assistant/knowledge-topics.generated.ts +++ b/landing-zone-configurator/app/apps/api/src/assistant/knowledge-topics.generated.ts @@ -48,7 +48,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/api/src/assistant/service.ts", sha256: - "5e30c72e152a1f54b2ecae7a4e6c6eb1bdc91c912f2bc7202d1cbb7fcaf527b4", + "0ebc392adf2961343911c1289e62cdd975b9073592cddb549f29d60f6d5a9a30", }, { path: "landing-zone-configurator/app/apps/api/src/assistant/consultation.ts", @@ -158,7 +158,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [ @@ -332,7 +332,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [ @@ -524,7 +524,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -694,7 +694,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -899,7 +899,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -960,7 +960,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/api/src/assistant/service.ts", sha256: - "5e30c72e152a1f54b2ecae7a4e6c6eb1bdc91c912f2bc7202d1cbb7fcaf527b4", + "0ebc392adf2961343911c1289e62cdd975b9073592cddb549f29d60f6d5a9a30", }, { path: "landing-zone-configurator/app/apps/api/src/assistant/model-serving.ts", @@ -1075,7 +1075,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [ @@ -1279,7 +1279,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -1443,7 +1443,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -1614,7 +1614,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [ @@ -1805,7 +1805,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -2015,7 +2015,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -2297,7 +2297,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -2528,7 +2528,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -2589,22 +2589,22 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/api/src/assistant/routes.ts", sha256: - "8fa3d3277b95194b96d42cf0e2ec72fac6a478511ef3b06640b81c8545676ae0", + "75a4189a8f2af753a56b9ad7abc2e45f553b6cb8f455121b01e803135c72fd46", }, { path: "landing-zone-configurator/app/apps/api/src/assistant/service.ts", sha256: - "5e30c72e152a1f54b2ecae7a4e6c6eb1bdc91c912f2bc7202d1cbb7fcaf527b4", + "0ebc392adf2961343911c1289e62cdd975b9073592cddb549f29d60f6d5a9a30", }, { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, { path: "landing-zone-configurator/app/apps/web/src/components/TemplateAdvice.tsx", sha256: - "dba870729eded3f3eb22734743609e0ac04a371108f5929aa8cfbf9932414037", + "c811de2ce928b471debf221237da428eb102ff6153aacc0488e988fe0c323b0f", }, { path: "src/modules/landing-zone/8-git.tf", @@ -2891,7 +2891,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -3153,7 +3153,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [ @@ -3344,7 +3344,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -3507,7 +3507,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -3557,8 +3557,8 @@ export const assistantKnowledgeTopics = { { id: "configuration-lifecycle", file: "configuration-lifecycle.md", - version: 14, - checkedOn: "2026-11-09", + version: 15, + checkedOn: "2026-11-20", qualification: "local-draft-not-reviewed-release", groups: [], mandatory: true, @@ -3573,18 +3573,13 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/api/src/assistant/service.ts", sha256: - "5e30c72e152a1f54b2ecae7a4e6c6eb1bdc91c912f2bc7202d1cbb7fcaf527b4", + "0ebc392adf2961343911c1289e62cdd975b9073592cddb549f29d60f6d5a9a30", }, { path: "landing-zone-configurator/app/apps/api/src/assistant/dialogue.ts", sha256: "cd1c5d72edd2c41c25dc840e8bda22d1654f26c3a811e3e4514af06ef83ec9f2", }, - { - path: "landing-zone-configurator/app/packages/contracts/src/assistant.ts", - sha256: - "6e2eb15270f169794061e54937d89b32079a2da4c5a770785e434065e6339154", - }, { path: "landing-zone-configurator/app/apps/api/src/assistant/model-serving.ts", sha256: @@ -3625,6 +3620,11 @@ export const assistantKnowledgeTopics = { sha256: "64bc29316d0e28c021ad412ce1ef48cd771a6b9774b549482275f5a5dbdcb53b", }, + { + path: "landing-zone-configurator/app/apps/api/db/102_shared_configuration_chat.sql", + sha256: + "be39ebc8c1ee809aa092c764f04f84984d7e20c0e05a89a9f810acb09e22de9f", + }, { path: "landing-zone-configurator/app/apps/api/src/assistant/consultation.ts", sha256: @@ -3685,6 +3685,11 @@ export const assistantKnowledgeTopics = { sha256: "151ea86a683cfdc18bbb519786b292e02e31a7bbbe7c4a1e423b5b143e41d525", }, + { + path: "landing-zone-configurator/app/packages/contracts/src/assistant.ts", + sha256: + "6e2eb15270f169794061e54937d89b32079a2da4c5a770785e434065e6339154", + }, { path: "landing-zone-configurator/app/apps/api/src/assistant/editor.ts", sha256: @@ -3728,7 +3733,7 @@ export const assistantKnowledgeTopics = { { path: "landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx", sha256: - "983cc2004b0ef430fb139f2808e2bfdce690cd1f9e996fd477765b57d60a071e", + "f11a78ebc22213562dd372a4b3c95581ce2606d20b5f29c4d0e0ad106ce34181", }, ], externalSources: [], @@ -3747,9 +3752,9 @@ export const assistantKnowledgeTopics = { fieldPaths: [], source: "landing-zone-configurator/docs/assistant-knowledge/configuration-lifecycle.md", - text: '# Configuration, Conversation and Execution Lifecycle\n\n## Purpose\n\nAuth; acceptance ≠ execution.\n\n## Accelerator Contract\n\nNative tfvars; defaults/catalogues enable nothing. Patches: company\nname/code/region, existing folders, native SNA. Naming consent is NAMES ONLY;\npreserve keys/metadata, never IDs/region/access/owners/roles. Save/publish/order/Plan/Apply/Destroy/Recovery separate. Apply=foundations+enabled inputs.\nPinned IaC/lock/tools+patched Worker.\n\nOrigin=template Git; desired=Accelerator, not draft; lastApplied=successful\nApply source, NOT State/Recovery.\nSource upgrade preserves order/project/State/backend/policy; then fresh\nPlan review (changes/replacements/deletions), explicit separate Apply approval.\nFailure keeps desired but MAY CHANGE State/resources; never promise no loss,\nunchanged failed State or reorder. Recovery=interrupted snapshot/source;\nPlan=actual State, not lastApplied. Withdrawn sources/unresolved Recovery block\nupgrades. Operator: reviewed recovery package; no bypass/fake hashes/arbitrary Git.\n\nTemplate: Platform Owner publishes same-family forward path. Keep order/project/\nState/backend/answers; ask new required answers. Confirm desired snapshot; fresh\nPlan/separate Apply. Block disallowed infrastructure/service/account/credential\nremoval/replacement and unknown evidence; no checkbox override. Exact Plan may\npermit project custom-role/role-assignment removal/replacement as sensitive IAM.\nSensitive IAM/keys/network/services/availability follow PATH, not NEW-ORDER policy.\nSelf-service: Application Owner reviews fresh Plan, confirms Apply; NO extra\nPlatform Owner approval. Default separate approval binds Plan/artifact/candidate,\neven ordinary changes. Policy edit appends immutable publication; old targets/Plans\nretain policy. Reselect latest path+fresh Plan; no retroactive unlock.\nShared firewall/routes affect ALL Applications, no private old copy. Platform\nOwner decides known complete shared deletes/replacements from Plan changes,\ncounts, data-loss warning and affected Applications. Explicit impact ack\nbinds Plan/artifact/State/dependencies; separate normal/destructive Apply approval.\nBlock unknown/incomplete evidence, active execution/Recovery, changed State.\nAudit Logs→Observability: same review. Fresh Plan; never relabel old Plans.\nPublish actual successful contract path; requester adopts; same template allowed.\nOrg/placement/SNA/backend migration separate. Chat cannot Git/publish/order/upgrade/unlock/execute or expose raw State/Plan.\n\n## Dependencies\n\nReady ≠ executed.\n\n## Dialogue\n\nReuse history/requirements/follow-ups; topic switches win.\nState assumptions; later enables nothing. Split business/operator choices;\nOne missing firewall question. Options ≠ consent. multiple=true: compatible answers,\nfree text. Revalidate subsets; save only whole-proposal acceptance. New configs inherit server revision-bound context; no retrofit. Groups/parameters constrain versions.\n\n## Examples\n\n"SNA first, firewall later": SNA only; disclose inherited firewall. No selective Apply; tfvars need external credentials/backend.\n\n## Limits\n\nRecheck auth/base/candidate on acceptance/inference/reauth.\nChats expire three calendar months from\nCREATION; activity/deletion/late inference never extend expiry or restore derived\ncontext. Refresh knowledge; keep drafts on errors. 5 sessions=load target, not quota.\n\n## Credentials\n\nSession ≠ rights; no tokens/keys/raw errors/protected model data.\n\n## Sources\n\nManifest.\n', + text: '# Configuration, Conversation and Execution Lifecycle\n\n## Purpose\n\nAuth; accept≠execute.\n\n## Accelerator Contract\n\nNative tfvars; defaults/catalogues enable nothing. Patches: company\nname/code/region, existing folders, native SNA. Naming consent is NAMES ONLY;\npreserve keys/metadata, never IDs/region/access/owners/roles. Save/publish/order/Plan/Apply/Destroy/Recovery separate. Apply=foundations+enabled inputs.\nPinned IaC/lock/tools+patched Worker.\n\nOrigin=template Git; desired=Accelerator; lastApplied=successful Apply source, not State/Recovery or draft.\nSource upgrade preserves order/project/State/backend/policy; then fresh\nPlan review (changes/replacements/deletions), explicit separate Apply approval.\nFailure preserves desired, may change State/resources. Never promise lossless failure or reorder. Recovery=interrupted snapshot/source;\nPlan=actual State, not lastApplied. Withdrawn sources/unresolved Recovery block\nupgrades. Operator: reviewed recovery package; no bypass/fake hashes/arbitrary Git.\n\nTemplate: Platform Owner publishes same-family forward path. Keep order/project/\nState/backend/answers; ask new required answers. Confirm desired snapshot; fresh\nPlan/separate Apply. Block disallowed infrastructure/service/account/credential\nremoval/replacement and unknown evidence; no checkbox override. Exact Plan may\npermit project custom-role/role-assignment removal/replacement as sensitive IAM.\nIAM/keys/network/services/availability follow PATH policy, not NEW-ORDER.\nSelf-service: Application Owner reviews fresh Plan, confirms Apply; no Platform Owner approval. Separate approval always binds Plan/artifact/candidate. Policy edit appends immutable publication; old targets/Plans\nretain policy. Reselect latest path+fresh Plan; no retroactive unlock.\nShared firewall/routes affect ALL Applications; no private copy. Platform\nOwner decides known complete shared deletes/replacements from Plan changes,\ncounts, data-loss warning and affected Applications. Explicit impact ack\nbinds Plan/artifact/State/dependencies; separate normal/destructive Apply approval.\nBlock unknown/incomplete evidence, active execution/Recovery, changed State.\nAudit→Observability: same review. Fresh Plan; never relabel old Plans.\nPublish successful contract path; requester adopts; same template allowed.\nOrg/placement/SNA/backend migration separate. Chat cannot Git/publish/order/upgrade/unlock/execute or expose raw State/Plan.\n\n## Dependencies\n\nReady≠executed.\n\n## Dialogue\n\nReuse history; topic switches win.\nConfig chat shared by authorized platform members. Retain authors; author shares legacy private logs, never merge. Actor switch rebuilds brief with current identity/rights. Drafts local; chat CAS; switch abort/reset.\nState assumptions; later enables nothing. Split business/operator choices;\nOne missing firewall question. Options ≠ consent. multiple=true: compatible answers/free text. Revalidate subsets; whole-proposal acceptance only. New configs inherit revision-bound context; no retrofit. Groups/parameters constrain versions.\n\n## Examples\n\n"SNA first": SNA only; disclose inherited firewall. No selective Apply; tfvars need external credentials/backend.\n\n## Limits\n\nRecheck auth/base/candidate on acceptance/inference/reauth.\nChat expiry=3 calendar months from creation; no activity/late-inference extension or automatic context resurrection. Refresh knowledge; keep drafts on errors. 5 sessions=load target, not quota.\n\n## Credentials\n\nSession ≠ rights; no tokens/keys/raw errors/protected model data.\n\n## Sources\n\nManifest.\n', sha256: - "70a353e3705603d273d782bffd59d75bf26a78d2674aa2f9b6cafc11834a37e9", + "8c8c15401188db6596d305ed6ca2cd38a08eb28f1fa9e1878ca38b610b826241", }, ], } as const; diff --git a/landing-zone-configurator/app/apps/api/src/assistant/routes.ts b/landing-zone-configurator/app/apps/api/src/assistant/routes.ts index 9bd2f063..175105cc 100644 --- a/landing-zone-configurator/app/apps/api/src/assistant/routes.ts +++ b/landing-zone-configurator/app/apps/api/src/assistant/routes.ts @@ -125,6 +125,8 @@ export function registerAssistant( | "sendTemplateAdvice" | "removeTemplateAdvice" | "preview" + | "getPrivate" + | "sharePrivate" > >, ) { @@ -202,6 +204,18 @@ export function registerAssistant( }); } const prefix = "/api/v1/configurations/:id/assistant"; + if (assistant.sharePrivate) + routes.post(`${prefix}/share-private`, async (request) => { + const session = (await authenticatedSession(request, auth))!; + const { id } = z.strictObject({ id: z.uuid() }).parse(request.params); + return { + conversation: await assistant.sharePrivate!( + session, + id, + request.body, + ), + }; + }); for (const action of [ "get", "send", @@ -222,9 +236,29 @@ export function registerAssistant( return reply.code(401).send({ error: "authentication_required" }); const { id } = z.strictObject({ id: z.uuid() }).parse(request.params); if (action === "get") - return { conversation: await assistant.get(session, id) }; + return { + conversation: await assistant.get(session, id), + privateConversation: await assistant.getPrivate?.(session, id), + }; if (action === "remove") { - await assistant.remove(session, id); + const match = request.headers["if-match"]; + if (match !== undefined) { + const parts = z + .string() + .regex(/^"[a-f0-9-]{36}:[1-9][0-9]*"$/i) + .parse(match) + .slice(1, -1) + .split(":"); + await assistant.remove(session, id, { + id: z.uuid().parse(parts[0]), + revision: z + .number() + .int() + .positive() + .safe() + .parse(Number(parts[1])), + }); + } else await assistant.remove(session, id); return reply.code(204).send(); } if (action === "discard") @@ -232,12 +266,22 @@ export function registerAssistant( conversation: await assistant.discard(session, id, request.body), }; if (action === "send") { - const { revision, message, draft, language } = z + const { revision, message, draft, language, conversation } = z .strictObject({ revision: z.number().int().positive(), message: chatMessageSchema, language: assistantLanguageSchema.optional(), draft: z.unknown().optional(), + conversation: z + .strictObject({ + id: z.uuid().nullable(), + revision: z.number().int().positive().nullable(), + }) + .refine( + (value) => + (value.id === null) === (value.revision === null), + ) + .optional(), }) .parse(request.body); if (request.headers.accept === "application/x-ndjson") @@ -250,6 +294,7 @@ export function registerAssistant( stream, draft, language, + conversation, ), })); return { @@ -261,6 +306,7 @@ export function registerAssistant( undefined, draft, language, + conversation, ), }; } diff --git a/landing-zone-configurator/app/apps/api/src/assistant/service.ts b/landing-zone-configurator/app/apps/api/src/assistant/service.ts index 3eab4a5c..ce6c2dce 100644 --- a/landing-zone-configurator/app/apps/api/src/assistant/service.ts +++ b/landing-zone-configurator/app/apps/api/src/assistant/service.ts @@ -82,6 +82,8 @@ type Message = { role: "user" | "assistant"; content: string; proposalDiscarded?: boolean; + authorId?: string; + authorName?: string; consultationState?: ConsultationState; recommendations?: AssistantRecommendation[]; }; @@ -674,12 +676,96 @@ export class AssistantConversations { }); } - remove(session: Session, id: string) { - return this.work(session, id, async (client) => { + getPrivate(session: Session, id: string) { + return this.work(session, id, async (client, configuration) => { + const row = ( + await client.query( + "SELECT * FROM lzc.assistant_personal_conversations WHERE configuration_id=$1 AND created_by=$2 AND expires_at>now()", + [id, session.userId], + ) + ).rows[0]; + return row ? response(row, configuration) : null; + }); + } + sharePrivate(session: Session, id: string, raw: unknown) { + const input = z + .strictObject({ + conversationId: z.uuid(), + revision: z.number().int().positive(), + }) + .parse(raw); + return this.work(session, id, async (client, configuration) => { + const row = ( + await client.query( + "SELECT * FROM lzc.assistant_personal_conversations WHERE configuration_id=$1 AND id=$2 AND revision=$3 AND created_by=$4 AND expires_at>now() FOR UPDATE", + [id, input.conversationId, input.revision, session.userId], + ) + ).rows[0]; + if (!row) + throw new AssistantError( + 404, + "assistant_private_conversation_unavailable", + ); + const created = ( + await client.query<{ id: string }>( + "INSERT INTO lzc.assistant_conversations(id,configuration_id,tenant_id,created_by,base_revision,knowledge_hash) VALUES($1,$2,$3,$4,$5,$6) ON CONFLICT(configuration_id) DO NOTHING RETURNING id", + [ + randomUUID(), + id, + session.tenantId, + session.userId, + row.base_revision, + row.knowledge_hash, + ], + ) + ).rows[0]; + if (!created) + throw new AssistantError(409, "assistant_shared_conversation_exists"); + const messages = row.messages.map((entry) => ({ + ...entry, + authorId: session.userId, + ...(entry.role === "user" ? { authorName: session.login } : {}), + })); + const shared = ( + await client.query( + "UPDATE lzc.assistant_conversations SET messages=$2,proposal=$3,proposal_baseline=$4,revision=$5 WHERE id=$1 RETURNING *", + [ + created.id, + JSON.stringify(messages), + row.proposal ? JSON.stringify(row.proposal) : null, + row.proposal_baseline + ? JSON.stringify(row.proposal_baseline) + : null, + row.revision, + ], + ) + ).rows[0]!; await client.query( - "DELETE FROM lzc.assistant_conversations WHERE configuration_id=$1", - [id], + "UPDATE lzc.assistant_configuration_context SET workspace_shared=true WHERE configuration_id=$1 AND created_by=$2", + [id, session.userId], ); + return response(shared, configuration); + }); + } + + remove( + session: Session, + id: string, + expected?: { id: string; revision: number }, + ) { + return this.work(session, id, async (client) => { + if (expected) { + const removed = await client.query( + "DELETE FROM lzc.assistant_conversations WHERE configuration_id=$1 AND id=$2 AND revision=$3", + [id, expected.id, expected.revision], + ); + if (!removed.rowCount) + throw new AssistantError(409, "assistant_conversation_changed"); + } else + await client.query( + "DELETE FROM lzc.assistant_conversations WHERE configuration_id=$1", + [id], + ); }); } @@ -726,6 +812,7 @@ export class AssistantConversations { stream?: AssistantStream, localDraft?: unknown, language?: AssistantLanguage, + expectedConversation?: { id: string | null; revision: number | null }, ) { const message = chatMessageSchema.parse(text); if (this.active >= 5) throw new AssistantError(429, "assistant_busy"); @@ -750,8 +837,21 @@ export class AssistantConversations { if (document.id !== saved.id) throw new AssistantError(400, "assistant_invalid_request"); const values = assistantPublicValues(document); + if (expectedConversation) { + const existing = ( + await client.query( + "SELECT * FROM lzc.assistant_conversations WHERE configuration_id=$1", + [id], + ) + ).rows[0]; + if ( + (existing?.id ?? null) !== expectedConversation.id || + (existing?.revision ?? null) !== expectedConversation.revision + ) + throw new AssistantError(409, "assistant_conversation_changed"); + } await client.query( - "INSERT INTO lzc.assistant_conversations(id,configuration_id,tenant_id,created_by,base_revision,knowledge_hash) VALUES($1,$2,$3,$4,$5,$6) ON CONFLICT(configuration_id,created_by) DO NOTHING", + "INSERT INTO lzc.assistant_conversations(id,configuration_id,tenant_id,created_by,base_revision,knowledge_hash) VALUES($1,$2,$3,$4,$5,$6) ON CONFLICT(configuration_id) DO NOTHING", [ randomUUID(), id, @@ -773,7 +873,7 @@ export class AssistantConversations { throw new AssistantError(409, "assistant_conversation_full"); const context = ( await client.query<{ messages: Message[]; expires_at: Date }>( - "SELECT messages,expires_at FROM lzc.assistant_configuration_context WHERE configuration_id=$1 AND expires_at>now()", + "SELECT messages,expires_at FROM lzc.assistant_configuration_context WHERE configuration_id=$1 AND workspace_shared AND expires_at>now()", [id], ) ).rows[0]; @@ -858,13 +958,17 @@ export class AssistantConversations { base.row.messages.map((entry) => ({ role: entry.role, content: - entry.role === "assistant" && entry.proposalDiscarded === true - ? "The user explicitly discarded the preceding proposal. This turn is closed: no proposal, selection question or setup request remains pending. Do not resume or reissue that proposal without a new explicit user request." - : entry.content + - (entry.recommendations?.length - ? "\nReviewed recommendations: " + - JSON.stringify(entry.recommendations) - : ""), + entry.role === "user" && + entry.authorId && + entry.authorId !== session.userId + ? `Earlier requirement from another authorized workspace participant (${entry.authorName ?? "team member"}):\n${entry.content}` + : entry.role === "assistant" && entry.proposalDiscarded === true + ? "The user explicitly discarded the preceding proposal. This turn is closed: no proposal, selection question or setup request remains pending. Do not resume or reissue that proposal without a new explicit user request." + : entry.content + + (entry.recommendations?.length + ? "\nReviewed recommendations: " + + JSON.stringify(entry.recommendations) + : ""), })), message, catalogues, @@ -874,7 +978,9 @@ export class AssistantConversations { pendingProposal, state: latestAssistant?.proposalDiscarded ? undefined - : latestAssistant?.consultationState, + : latestAssistant?.authorId === session.userId + ? latestAssistant.consultationState + : undefined, onState: (state) => { consultationState = state; }, @@ -943,10 +1049,17 @@ export class AssistantConversations { throw new AssistantError(409, "configuration_changed"); const messages = [ ...base.row.messages, - { id: randomUUID(), role: "user", content: message }, + { + id: randomUUID(), + role: "user", + content: message, + authorId: session.userId, + authorName: session.login, + }, { id: randomUUID(), role: "assistant", + authorId: session.userId, ...(consultationState ? { consultationState } : {}), ...(proposal.recommendations?.length ? { recommendations: proposal.recommendations } diff --git a/landing-zone-configurator/app/apps/api/src/configurations/service.ts b/landing-zone-configurator/app/apps/api/src/configurations/service.ts index 85db7e2f..14068f98 100644 --- a/landing-zone-configurator/app/apps/api/src/configurations/service.ts +++ b/landing-zone-configurator/app/apps/api/src/configurations/service.ts @@ -100,7 +100,7 @@ export class Configurations { if (!row) throw new ConfigurationError(503, "configuration_save_failed"); if (templateAdvice) { const context = await client.query( - "INSERT INTO lzc.assistant_configuration_context(configuration_id,advice_id,tenant_id,created_by,advice_revision,expires_at,messages) SELECT $1,id,tenant_id,created_by,revision,expires_at,messages FROM lzc.assistant_template_advice WHERE id=$2 AND revision=$3 AND created_by=$4 AND expires_at>now() AND recommendation->>'knowledgeSha256'=$5 RETURNING configuration_id", + "INSERT INTO lzc.assistant_configuration_context(configuration_id,advice_id,tenant_id,created_by,advice_revision,expires_at,messages,workspace_shared) SELECT $1,id,tenant_id,created_by,revision,expires_at,messages,true FROM lzc.assistant_template_advice WHERE id=$2 AND revision=$3 AND created_by=$4 AND expires_at>now() AND recommendation->>'knowledgeSha256'=$5 RETURNING configuration_id", [ row.id, z.uuid().parse(templateAdvice.id), diff --git a/landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx b/landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx index bbf78e48..6d4d3b89 100644 --- a/landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx +++ b/landing-zone-configurator/app/apps/web/src/components/AssistantChat.tsx @@ -42,6 +42,8 @@ type Conversation = { role: "user" | "assistant"; content: string; proposalDiscarded?: boolean; + authorId?: string; + authorName?: string; recommendations?: AssistantRecommendation[]; }[]; proposal: { @@ -77,6 +79,12 @@ class MergeConfirmation extends Error { } const errors: Record = { + assistant_private_conversation_unavailable: + "Der private Verlauf ist nicht mehr verfügbar. Bitte neu laden.", + assistant_shared_conversation_exists: + "Für diese Konfiguration gibt es bereits einen gemeinsamen Verlauf. Lade ihn, um daran weiterzuarbeiten.", + stale_tenant_context: + "Der Arbeitsbereich wurde geändert. Lade die Seite neu.", assistant_inference_failed: "Die Modellantwort konnte nicht sicher verarbeitet werden. Bitte erneut versuchen; deine Anfrage bleibt erhalten und es wurde nichts geändert.", assistant_observability_plan_incompatible: @@ -128,7 +136,14 @@ async function checked(response: Response) { return response; } -export function AssistantChat({ +export function AssistantChat( + props: Parameters[0], +) { + const scope = `${props.session.tenant?.id ?? ""}:${props.session.user.id ?? ""}:${props.binding?.id ?? (isCommonDraft(props.draft) ? props.draft.id : "unsaved-legacy")}`; + return ; +} + +function ScopedAssistantChat({ session, binding, dirty, @@ -149,6 +164,8 @@ export function AssistantChat({ }) { const [open, setOpen] = useState(true); const [conversation, setConversation] = useState(null); + const [privateConversation, setPrivateConversation] = + useState(null); const [message, setMessage] = useState(""); const [busy, setBusy] = useState(false); const [error, setError] = useState(""); @@ -173,27 +190,69 @@ export function AssistantChat({ ? `/api/v1/configurations/${binding.id}/assistant` : null; + const refreshGeneration = useRef(0); + const latestConversation = useRef(conversation); + latestConversation.current = conversation; useEffect(() => { const controller = new AbortController(); lifetime.current = controller; - if (endpoint && binding?.revision) - void fetch(endpoint, { signal: controller.signal }) - .then(checked) - .then((response) => response.json()) - .then((body) => { - if (!controller.signal.aborted) { - setConversation(body.conversation); - setSelectedPaths(null); - } - }) - .catch((reason) => { - if (!controller.signal.aborted) - setError( - reason instanceof AssistantFailureError ? reason : reason.message, + async function refresh() { + if (!endpoint || !binding?.revision || active.current) return; + const generation = ++refreshGeneration.current; + try { + const response = await checked( + await fetch(endpoint, { + signal: controller.signal, + cache: "no-store", + headers: { "x-lzc-tenant": session.tenant?.id ?? "" }, + }), + ); + const body = await response.json(); + if ( + controller.signal.aborted || + active.current || + generation !== refreshGeneration.current + ) + return; + const current = latestConversation.current; + const next: Conversation | null = body.conversation ?? null; + if ( + current?.id !== next?.id || + current?.revision !== next?.revision || + current?.stale !== next?.stale + ) { + setConversation(next); + setSelectedPaths(null); + setConfirmation(null); + if (current) + setNotice( + "Der gemeinsame Chat wurde aktualisiert. Deine Nachricht bleibt erhalten.", ); - }); - return () => controller.abort(); - }, [endpoint, binding?.revision]); + } + setPrivateConversation(body.privateConversation ?? null); + } catch (reason) { + if ( + !controller.signal.aborted && + generation === refreshGeneration.current + ) + setError( + reason instanceof AssistantFailureError + ? reason + : reason instanceof Error + ? reason.message + : "Anfrage fehlgeschlagen.", + ); + } + } + void refresh(); + const timer = window.setInterval(() => { + if (!document.hidden) void refresh(); + }, 4000); + return () => { + controller.abort(); + window.clearInterval(timer); + }; + }, [endpoint, binding?.revision, session.tenant?.id]); useEffect(() => { if (open && (conversation || previewText !== null) && messages.current) @@ -250,7 +309,7 @@ export function AssistantChat({ ); async function act( - action: "send" | "accept" | "discard" | "remove", + action: "send" | "accept" | "discard" | "remove" | "share", approved?: NonNullable, outgoingMessage = message, ) { @@ -269,10 +328,15 @@ export function AssistantChat({ if (action === "discard" && !conversation?.proposal) return; if ( action === "remove" && - !window.confirm(t("Gespräch und Vorschlag endgültig löschen?")) + !window.confirm( + t( + "Gemeinsames Gespräch und Vorschlag für diese Konfiguration endgültig löschen?", + ), + ) ) return; active.current = true; + refreshGeneration.current++; setBusy(true); setError(""); setNotice(""); @@ -300,8 +364,8 @@ export function AssistantChat({ throw new Error(errors.assistant_editor_changed); const response = await checked( await fetch( - action === "accept" || action === "discard" - ? `${endpoint}/${action}` + action === "accept" || action === "discard" || action === "share" + ? `${endpoint}/${action === "share" ? "share-private" : action}` : endpoint, { method: action === "remove" ? "DELETE" : "POST", @@ -311,7 +375,13 @@ export function AssistantChat({ ? { "Content-Type": "application/json" } : {}), ...(action === "send" ? { Accept: "application/x-ndjson" } : {}), + ...(action === "remove" && conversation + ? { + "If-Match": `"${conversation.id}:${conversation.revision}"`, + } + : {}), "x-lzc-csrf": session.csrfToken, + "x-lzc-tenant": session.tenant?.id ?? "", }, ...(action === "send" ? { @@ -319,28 +389,39 @@ export function AssistantChat({ revision: binding.revision, message: outgoingMessage, language: currentLanguage(), + conversation: conversation + ? { id: conversation.id, revision: conversation.revision } + : { id: null, revision: null }, draft, }), } - : action === "discard" + : action === "share" ? { body: JSON.stringify({ - conversationId: conversation?.id, - revision: conversation?.revision, + conversationId: privateConversation?.id, + revision: privateConversation?.revision, }), } - : action === "accept" + : action === "discard" ? { body: JSON.stringify({ - ...acceptance, - ...(approved - ? { - confirmedRevision: approved.configurationRevision, - } - : {}), + conversationId: conversation?.id, + revision: conversation?.revision, }), } - : {}), + : action === "accept" + ? { + body: JSON.stringify({ + ...acceptance, + ...(approved + ? { + confirmedRevision: + approved.configurationRevision, + } + : {}), + }), + } + : {}), }, ), ); @@ -349,6 +430,16 @@ export function AssistantChat({ setConversation(null); return; } + if (action === "share") { + const body = await response.json(); + if (signal?.aborted) return; + setConversation(body.conversation); + setSelectedPaths(null); + setNotice( + "Dein Verlauf ist jetzt für berechtigte Mitglieder dieses Arbeitsbereichs sichtbar.", + ); + return; + } if (action === "discard") { const body = await response.json(); if (signal?.aborted) return; @@ -450,6 +541,42 @@ export function AssistantChat({ {open && (
+

+ {t( + "Berechtigte Teammitglieder können den Chat dieser Konfiguration lesen und fortsetzen.", + )} +

+ {privateConversation && ( +
+ {t("Bisheriger privater Verlauf")} +

+ {t( + "Dieser ältere Verlauf ist nur für dich sichtbar. Du kannst ihn für diese Konfiguration teilen, solange noch kein gemeinsamer Verlauf besteht.", + )} +

+ {privateConversation.messages.map((entry) => ( +
+ + {t(entry.role === "user" ? "Du" : "Assistent")} + +

{entry.content}

+
+ ))} + {!conversation && ( + + )} +
+ )} {conversation && (

{t("Gespräch gültig bis")}{" "} @@ -467,7 +594,13 @@ export function AssistantChat({ > {conversation?.messages.map((entry) => (

- {t(entry.role === "user" ? "Du" : "Assistent")} + + {entry.role === "user" + ? entry.authorId && entry.authorId !== session.user.id + ? (entry.authorName ?? t("Teammitglied")) + : t("Du") + : t("Assistent")} +

{entry.content}

{entry.role === "assistant" && entry.recommendations && ( diff --git a/landing-zone-configurator/app/apps/web/src/components/TemplateAdvice.tsx b/landing-zone-configurator/app/apps/web/src/components/TemplateAdvice.tsx index af953d70..cd1e71ed 100644 --- a/landing-zone-configurator/app/apps/web/src/components/TemplateAdvice.tsx +++ b/landing-zone-configurator/app/apps/web/src/components/TemplateAdvice.tsx @@ -74,7 +74,11 @@ export function TemplateAdvice({ useEffect(() => { const controller = new AbortController(); lifetime.current = controller; - void fetch(endpoint, { signal: controller.signal }) + void fetch(endpoint, { + signal: controller.signal, + cache: "no-store", + headers: { "x-lzc-tenant": session.tenant?.id ?? "" }, + }) .then(checked) .then((response) => response.json()) .then((body) => { @@ -87,7 +91,7 @@ export function TemplateAdvice({ ); }); return () => controller.abort(); - }, []); + }, [session.tenant?.id]); useEffect(() => { if ((advice || previewText !== null) && messages.current) messages.current.scrollTop = messages.current.scrollHeight; @@ -115,6 +119,7 @@ export function TemplateAdvice({ signal: controller.signal, headers: { "x-lzc-csrf": session.csrfToken, + "x-lzc-tenant": session.tenant?.id ?? "", ...(!remove ? { "Content-Type": "application/json" } : {}), ...(!remove ? { Accept: "application/x-ndjson" } : {}), }, diff --git a/landing-zone-configurator/app/apps/web/src/locales/en.ts b/landing-zone-configurator/app/apps/web/src/locales/en.ts index 35613c09..2d78e9ba 100644 --- a/landing-zone-configurator/app/apps/web/src/locales/en.ts +++ b/landing-zone-configurator/app/apps/web/src/locales/en.ts @@ -1,4 +1,25 @@ export const englishMessages: Record = { + "Der Arbeitsbereich wurde geändert. Lade die Seite neu.": + "The workspace has changed. Reload the page.", + "Der private Verlauf ist nicht mehr verfügbar. Bitte neu laden.": + "The private history is no longer available. Please reload.", + "Für diese Konfiguration gibt es bereits einen gemeinsamen Verlauf. Lade ihn, um daran weiterzuarbeiten.": + "This configuration already has a shared conversation. Load it to continue working together.", + "Der gemeinsame Chat wurde aktualisiert. Deine Nachricht bleibt erhalten.": + "The shared chat was updated. Your message has been kept.", + "Gemeinsames Gespräch und Vorschlag für diese Konfiguration endgültig löschen?": + "Permanently delete the shared conversation and proposal for this configuration?", + "Dein Verlauf ist jetzt für berechtigte Mitglieder dieses Arbeitsbereichs sichtbar.": + "Your history is now visible to authorized members of this workspace.", + "Berechtigte Teammitglieder können den Chat dieser Konfiguration lesen und fortsetzen.": + "Authorized team members can read and continue this configuration's chat.", + "Bisheriger privater Verlauf": "Previous private history", + "Dieser ältere Verlauf ist nur für dich sichtbar. Du kannst ihn für diese Konfiguration teilen, solange noch kein gemeinsamer Verlauf besteht.": + "This earlier history is visible only to you. You can share it for this configuration if no shared conversation exists yet.", + "Privaten Verlauf für diese Konfiguration teilen": + "Share private history for this configuration", + Teammitglied: "Team member", + "Vorgeschlagene Standardwerte": "Proposed defaults", "Prüfe diese Standardwerte, bevor du den Vorschlag übernimmst.": "Review these defaults before accepting the proposal.", diff --git a/landing-zone-configurator/app/apps/web/src/main.tsx b/landing-zone-configurator/app/apps/web/src/main.tsx index 36e1f249..545a4f66 100644 --- a/landing-zone-configurator/app/apps/web/src/main.tsx +++ b/landing-zone-configurator/app/apps/web/src/main.tsx @@ -600,7 +600,7 @@ function App() { const assistantPanel = platformAccess && draft && session ? ( { + const ids = [ + "11111111-2222-4333-8444-000000000011", + "11111111-2222-4333-8444-000000000012", + ]; + const configurations = ids.map((id, index) => { + const draft = createEditorConfiguration("standalone", id); + draft.name = `Team config ${index + 1}`; + return { + id, + name: draft.name, + revision: 1, + updatedAt: new Date().toISOString(), + draft, + }; + }); + await page.route("**/api/v1/session", (route) => + route.fulfill({ + json: { + user: { id: "alice-id", login: "alice" }, + csrfToken: "csrf-test", + tenant: { + id: "team-workspace", + kind: "workspace", + roles: ["platform-engineer"], + }, + expiresAt: new Date(Date.now() + 3600000).toISOString(), + }, + }), + ); + await page.route("**/auth/status", (route) => + route.fulfill({ + json: { github: false, stackit: true, primary: "stackit" }, + }), + ); + await page.route("**/api/v1/configurations", (route) => + route.fulfill({ json: { configurations } }), + ); + let peerUpdated = false; + for (const [index, configuration] of configurations.entries()) { + await page.route(`**/api/v1/configurations/${configuration.id}`, (route) => + route.fulfill({ json: { configuration } }), + ); + await page.route( + `**/api/v1/configurations/${configuration.id}/assistant`, + (route) => { + expect(route.request().headers()["x-lzc-tenant"]).toBe( + "team-workspace", + ); + expect(route.request().method()).toBe("GET"); + return route.fulfill({ + json: { + conversation: { + id: configuration.id, + revision: peerUpdated && index === 0 ? 2 : 1, + baseRevision: 1, + stale: false, + expiresAt: "2027-01-10T09:00:00Z", + proposal: null, + messages: [ + { + id: "peer-message", + role: "user", + authorId: "bob-id", + authorName: "Bob", + content: `Configuration ${index + 1} requirements`, + }, + ...(peerUpdated && index === 0 + ? [ + { + id: "peer-update", + role: "assistant", + content: "Teammate continuation", + }, + ] + : []), + ], + }, + }, + }); + }, + ); + } + await page.goto("/repositories"); + await page + .getByRole("button", { + name: "Konfiguration öffnen: Team config 1", + exact: true, + }) + .click(); + const chat = page.getByRole("region", { name: "Konfigurations-Chat" }); + await expect( + chat.getByText("Configuration 1 requirements", { exact: true }), + ).toBeVisible(); + await expect(chat.getByText("Bob", { exact: true })).toBeVisible(); + await chat + .getByRole("textbox", { name: "Deine Nachricht" }) + .fill("My unsent requirements"); + peerUpdated = true; + await expect( + chat.getByText("Teammate continuation", { exact: true }), + ).toBeVisible({ timeout: 10000 }); + await expect( + chat.getByRole("textbox", { name: "Deine Nachricht" }), + ).toHaveValue("My unsent requirements"); + await openConfigurationStorage(page); + await page + .getByRole("button", { + name: "Konfiguration öffnen: Team config 2", + exact: true, + }) + .click(); + await expect( + chat.getByText("Configuration 2 requirements", { exact: true }), + ).toBeVisible(); + await expect( + chat.getByText("Configuration 1 requirements", { exact: true }), + ).toHaveCount(0); + await expect( + chat.getByText("Teammate continuation", { exact: true }), + ).toHaveCount(0); + await expect( + chat.getByRole("textbox", { name: "Deine Nachricht" }), + ).toHaveValue(""); +}); + test("configuration chat sends answers directly and requires explicit proposal acceptance", async ({ page, }, testInfo) => { diff --git a/landing-zone-configurator/app/integration/identity.test.ts b/landing-zone-configurator/app/integration/identity.test.ts index 3600f3ea..160252cf 100644 --- a/landing-zone-configurator/app/integration/identity.test.ts +++ b/landing-zone-configurator/app/integration/identity.test.ts @@ -862,9 +862,9 @@ describe("real PostgreSQL session and tenant boundaries", () => { ) ).rowCount, ), - ).toBe(0); + ).toBe(1); await assistant.send(alice, stored.id, 1, "Neue Rueckfrage"); - expect(model.converse.mock.calls[1]?.[5]).toEqual([]); + expect(model.converse.mock.calls[1]?.[5]).toEqual(advice.messages); await configurations.remove(alice, stored.id, 1); }); @@ -2711,11 +2711,9 @@ describe("real PostgreSQL session and tenant boundaries", () => { expect(discarded.revision).toBe(proposal.revision + 1); expect(discarded.messages).toHaveLength(proposal.messages.length); expect( - discarded.messages.map(({ id, role, content }) => ({ - id, - role, - content, - })), + discarded.messages.map( + ({ proposalDiscarded: _discarded, ...message }) => message, + ), ).toEqual(proposal.messages); expect(discarded.messages.at(-1)?.proposalDiscarded).toBe(true); expect(model.converse).toHaveBeenCalledTimes(2); @@ -10976,7 +10974,169 @@ describe("organisation draft workspaces", () => { bob = (await create(902)).session; }); const organisations = new PostgresOrganisations(pool); - it("shares saved configurations across platform members with revision conflicts and private assistant history", async () => { + it("shares configuration chat across collaborators while preserving private legacy histories and actor identity", async () => { + const tenantId = await organisations.create( + alice, + "Shared team chat", + randomUUID(), + ); + await organisations.switch(alice, tenantId); + const owner = { ...alice, tenantId }; + await inviteMember(owner, bob, ["platform-engineer"], false); + await organisations.switch(bob, tenantId); + const collaborator = { ...bob, tenantId }; + const configurations = new Configurations(pool); + const model = { + converse: vi.fn(async () => ({ + explanation: "Gemeinsamer Konfigurationskontext", + questions: [], + changes: [], + references: ["configuration-contract"], + })), + }; + const assistant = new AssistantConversations(pool, model); + try { + const stored = await configurations.create( + owner, + createEditorConfiguration("standalone", randomUUID()), + ); + const other = await configurations.create( + collaborator, + createEditorConfiguration("standalone", randomUUID()), + ); + const privateId = randomUUID(); + await withTenant(pool, owner, async (client) => { + await client.query( + "INSERT INTO lzc.assistant_personal_conversations(id,configuration_id,tenant_id,created_by,base_revision,knowledge_hash) VALUES($1,$2,$3,$4,1,$5)", + [ + privateId, + stored.id, + tenantId, + owner.userId, + buildAssistantKnowledge().sha256, + ], + ); + await client.query( + "UPDATE lzc.assistant_personal_conversations SET messages=$2 WHERE id=$1", + [ + privateId, + JSON.stringify([ + { + id: randomUUID(), + role: "user", + content: "Anforderungen von Alice", + }, + { + id: randomUUID(), + role: "assistant", + content: "Bisheriger privater Kontext", + consultationState: { privateIdentity: "owner-only" }, + }, + ]), + ], + ); + }); + expect(await assistant.get(owner, stored.id)).toBeNull(); + expect((await assistant.getPrivate(owner, stored.id))?.id).toBe( + privateId, + ); + expect(await assistant.getPrivate(collaborator, stored.id)).toBeNull(); + await expect( + assistant.sharePrivate(collaborator, stored.id, { + conversationId: privateId, + revision: 1, + }), + ).rejects.toMatchObject({ status: 404 }); + const shared = await assistant.sharePrivate(owner, stored.id, { + conversationId: privateId, + revision: 1, + }); + expect((await assistant.get(collaborator, stored.id))?.id).toBe( + shared.id, + ); + expect(await assistant.get(collaborator, other.id)).toBeNull(); + expect( + JSON.stringify(await assistant.get(collaborator, stored.id)), + ).not.toContain("owner-only"); + await expect( + assistant.sharePrivate(owner, stored.id, { + conversationId: privateId, + revision: 1, + }), + ).rejects.toMatchObject({ status: 409 }); + const reply = await assistant.send( + collaborator, + stored.id, + 1, + "Welche Grundlagen fehlen noch?", + undefined, + undefined, + "de", + { id: shared.id, revision: shared.revision }, + ); + expect(reply.messages).toHaveLength(4); + expect(reply.messages.at(-2)?.authorId).toBe(collaborator.userId); + expect(model.converse.mock.calls[0]?.[2][0]?.content).toContain( + "another authorized workspace participant", + ); + expect(model.converse.mock.calls[0]?.[7]?.state).toBeUndefined(); + await expect( + assistant.send( + owner, + stored.id, + 1, + "Veraltete Antwort", + undefined, + undefined, + "de", + { id: shared.id, revision: shared.revision }, + ), + ).rejects.toMatchObject({ code: "assistant_conversation_changed" }); + expect(model.converse).toHaveBeenCalledTimes(1); + await expect( + assistant.remove(owner, stored.id, { + id: shared.id, + revision: shared.revision, + }), + ).rejects.toMatchObject({ code: "assistant_conversation_changed" }); + expect((await assistant.get(owner, stored.id))?.revision).toBe( + reply.revision, + ); + expect((await configurations.get(owner, stored.id)).revision).toBe(1); + await organisations.editMember( + owner, + collaborator.userId, + ["application-owner"], + false, + ); + await expect( + assistant.get(collaborator, stored.id), + ).rejects.toBeDefined(); + await configurations.remove(owner, stored.id, 1); + expect( + ( + await admin.query( + "SELECT id FROM lzc.assistant_personal_conversations WHERE configuration_id=$1", + [stored.id], + ) + ).rows, + ).toEqual([]); + expect( + ( + await admin.query( + "SELECT id FROM lzc.assistant_conversations WHERE configuration_id=$1", + [stored.id], + ) + ).rows, + ).toEqual([]); + await configurations.remove(owner, other.id, 1); + } finally { + await organisations.switch(alice, alice.tenantId); + await organisations.switch(bob, bob.tenantId); + } + }); + + it("shares saved configurations and their single conversation across authorized platform members with revision conflicts", async () => { const tenantId = await organisations.create( alice, "Shared configurations", @@ -11042,19 +11202,21 @@ describe("organisation draft workspaces", () => { ), ) ).rows, - ).toEqual([]); - await withTenant(pool, collaborator, (client) => - client.query( - "INSERT INTO lzc.assistant_conversations(id,configuration_id,tenant_id,created_by,base_revision,knowledge_hash) VALUES($1,$2,$3,$4,3,$5)", - [ - randomUUID(), - stored.id, - tenantId, - collaborator.userId, - buildAssistantKnowledge().sha256, - ], + ).toEqual([{ id: conversationId }]); + await expect( + withTenant(pool, collaborator, (client) => + client.query( + "INSERT INTO lzc.assistant_conversations(id,configuration_id,tenant_id,created_by,base_revision,knowledge_hash) VALUES($1,$2,$3,$4,3,$5)", + [ + randomUUID(), + stored.id, + tenantId, + collaborator.userId, + buildAssistantKnowledge().sha256, + ], + ), ), - ); + ).rejects.toMatchObject({ code: "23505" }); expect( ( await withTenant(pool, owner, (client) => diff --git a/landing-zone-configurator/app/scripts/assistant-knowledge.ts b/landing-zone-configurator/app/scripts/assistant-knowledge.ts index a584bedd..ce92f0b2 100644 --- a/landing-zone-configurator/app/scripts/assistant-knowledge.ts +++ b/landing-zone-configurator/app/scripts/assistant-knowledge.ts @@ -185,6 +185,7 @@ export function buildAssistantKnowledgeTopics() { "landing-zone-configurator/app/packages/contracts/src/application-upgrades.ts", "landing-zone-configurator/app/apps/api/db/093_platform_destructive_impact_review.sql", "landing-zone-configurator/app/apps/api/db/098_managed_state_serialization.sql", + "landing-zone-configurator/app/apps/api/db/102_shared_configuration_chat.sql", "docs/state-locking.md", ].includes(path)) ) diff --git a/landing-zone-configurator/app/scripts/assistant-scenarios.ts b/landing-zone-configurator/app/scripts/assistant-scenarios.ts index 342d74c4..62755d61 100644 --- a/landing-zone-configurator/app/scripts/assistant-scenarios.ts +++ b/landing-zone-configurator/app/scripts/assistant-scenarios.ts @@ -1428,6 +1428,13 @@ export const assistantScenarios: readonly AssistantScenario[] = [ message: "Nutze die Email meines aktuell verifiziert angemeldeten STACKIT-Benutzers als Organisations-Owner.", }, + { + id: "configuration-shared-chat-advice", + topic: "configuration-lifecycle", + fixture: "baseline", + message: + "Wie arbeiten zwei berechtigte Platform Engineers im selben Arbeitsbereich am Assistant-Chat einer gespeicherten Konfiguration zusammen? Was passiert beim Wechsel der Konfiguration, mit bisher privaten Verläufen und mit meiner Identität beim Fortsetzen? Erkläre auch, ob ein Chat automatisch speichert oder deployt. Nur beraten, keine Änderungen.", + }, { id: "application-template-upgrade-advice", topic: "configuration-lifecycle", @@ -2270,6 +2277,20 @@ export function validateAssistantScenario( assistantTemplateQuestionPaths(fixture.values), ); const failures: string[] = []; + if (scenario.id === "configuration-shared-chat-advice") { + const text = dialogue.explanation; + if (!/gemeinsam|geteilt|shared/i.test(text)) + failures.push("shared_configuration_chat_missing"); + if ( + !/privat|private/i.test(text) || + !/Autor|author|ausdrücklich|explicit/i.test(text) + ) + failures.push("legacy_private_history_consent_missing"); + if (!/Identität|identity|Berechtigung|permission/i.test(text)) + failures.push("current_actor_context_missing"); + if (dialogue.changes.length || dialogue.questions.length) + failures.push("shared_chat_unrequested_changes_or_questions"); + } if (scenario.id === "firewall-access-bootstrap-advice") { failures.push(...assistantFirewallBootstrapFailures(dialogue.explanation)); if (dialogue.changes.length || dialogue.questions.length) diff --git a/landing-zone-configurator/app/tests/assistant-scenarios.test.ts b/landing-zone-configurator/app/tests/assistant-scenarios.test.ts index 84758320..8d6e915d 100644 --- a/landing-zone-configurator/app/tests/assistant-scenarios.test.ts +++ b/landing-zone-configurator/app/tests/assistant-scenarios.test.ts @@ -416,31 +416,34 @@ it.each(assistantScenarios)( } else if (scenario.fixture === "baseline") { expect( validateAssistantScenario(scenario, { - explanation: scenario.sourceGuidance - ? sourceGuidanceExamples[scenario.sourceGuidance] - : scenario.platformImpactReview - ? "Der Platform Owner entscheidet über Löschungen und Ersetzungen nach Prüfung möglicher Datenverluste und betroffener Applications. Bestätigung bindet Artefakt-Hash, State und Abhängigkeiten. Neuer Plan, Apply separat; Observability bleibt Ziel." - : scenario.id === "application-upgrade-self-service-advice" - ? "Der Platform Owner veröffentlicht einen Upgrade-Pfad. Antworten und State bleiben erhalten. Ein neuer Plan und separate Apply-Freigabe sind erforderlich. Löschungen und Ersetzungen bestehender Infrastruktur werden blockiert. Bei eigenständiger Durchführung ist keine zusätzliche Platform-Owner-Freigabe erforderlich." - : scenario.applicationUpgrade === "template" - ? "Der Platform Owner veröffentlicht einen Upgrade-Pfad. Antworten und State bleiben erhalten. Ein neuer Plan und separate Apply-Freigabe sind erforderlich. Löschungen und Ersetzungen werden blockiert." - : scenario.applicationUpgrade === "platform" - ? "Gemeinsame Änderungen betreffen alle abhängigen Applications. Abhängigkeitsprüfung und Plan-Freigabe stehen vor Apply. Danach den tatsächlich entstandenen Plattformvertrag und den Pfad veröffentlichen. Die Vertragsbindung wechselt nicht automatisch. Der Application Owner übernimmt ihn ausdrücklich. Keine private alte Firewall." - : scenario.executionLifecycle - ? "Ursprüngliche Template-Revision bleibt erhalten. Die gewünschte Quelle bleibt gebunden; zuletzt angewendet ändert sich erst nach erfolgreichem Apply. Bestehende Bestellung und State bleiben erhalten. Ein neuer Plan und die normale Apply-Freigabe sind erforderlich. Zurückgezogene Quellen brauchen einen geprüften Ersatz, keine Neubestellung; der Chat führt kein Upgrade aus." - : scenario.applicationAccess === "advice" - ? "Granulare VM-Rechte empfohlen. IDP bestätigt Identität; Projekt-IAM ist separat. Zentraler initialer Owner und Workload-Automation sind getrennt. Voller Owner bleibt Kundenwahl; geerbte Rechte sind additiv. Der Besteller erhält 191 Rechte mit projektweiter Schlüsselverwaltung; Automation erhält 184 Workload-Rechte." - : scenario.corporateIpv4 === "advice" - ? "Automatisch übernimmt das Standardpräfix /28 der SNA. Der Provider benötigt bei gesetztem DNS ein explizites Präfix; das native Modul liest es im Plan aus der SNA und übergibt es explizit. DNS bleibt erhalten. Freie Kapazität ist nicht garantiert." - : [ - "vpn", - "platform-kubernetes", - "firewall-access-bootstrap", - ].includes(scenario.topic) - ? buildAssistantKnowledge().topics.find( - (topic) => topic.id === scenario.topic, - )?.fieldOverview - : `Nur Beratung, keine Speicherung oder Ausfuehrung. ${scenario.requiredOverviewFields?.join(", ") ?? ""}. Namen 1-40 Zeichen; Beschreibungen nicht unterstützt und abgelehnt. pass, block, reject; explizite Synchronisierung. ${scenario.dnsRole ? dnsRoleExplanation : ""} git_flavor=null erstellt keine Git-Instanz; git-10 ist kein automatisch aktivierter Standard.`, + explanation: + scenario.id === "configuration-shared-chat-advice" + ? "Berechtigte Mitglieder nutzen den gemeinsamen Konfigurations-Chat. Bisher private Verläufe teilt nur ihr Autor ausdrücklich. Beim Wechsel wird der passende Verlauf geladen und die aktuelle Identität verwendet. Keine automatische Speicherung oder Ausführung." + : scenario.sourceGuidance + ? sourceGuidanceExamples[scenario.sourceGuidance] + : scenario.platformImpactReview + ? "Der Platform Owner entscheidet über Löschungen und Ersetzungen nach Prüfung möglicher Datenverluste und betroffener Applications. Bestätigung bindet Artefakt-Hash, State und Abhängigkeiten. Neuer Plan, Apply separat; Observability bleibt Ziel." + : scenario.id === "application-upgrade-self-service-advice" + ? "Der Platform Owner veröffentlicht einen Upgrade-Pfad. Antworten und State bleiben erhalten. Ein neuer Plan und separate Apply-Freigabe sind erforderlich. Löschungen und Ersetzungen bestehender Infrastruktur werden blockiert. Bei eigenständiger Durchführung ist keine zusätzliche Platform-Owner-Freigabe erforderlich." + : scenario.applicationUpgrade === "template" + ? "Der Platform Owner veröffentlicht einen Upgrade-Pfad. Antworten und State bleiben erhalten. Ein neuer Plan und separate Apply-Freigabe sind erforderlich. Löschungen und Ersetzungen werden blockiert." + : scenario.applicationUpgrade === "platform" + ? "Gemeinsame Änderungen betreffen alle abhängigen Applications. Abhängigkeitsprüfung und Plan-Freigabe stehen vor Apply. Danach den tatsächlich entstandenen Plattformvertrag und den Pfad veröffentlichen. Die Vertragsbindung wechselt nicht automatisch. Der Application Owner übernimmt ihn ausdrücklich. Keine private alte Firewall." + : scenario.executionLifecycle + ? "Ursprüngliche Template-Revision bleibt erhalten. Die gewünschte Quelle bleibt gebunden; zuletzt angewendet ändert sich erst nach erfolgreichem Apply. Bestehende Bestellung und State bleiben erhalten. Ein neuer Plan und die normale Apply-Freigabe sind erforderlich. Zurückgezogene Quellen brauchen einen geprüften Ersatz, keine Neubestellung; der Chat führt kein Upgrade aus." + : scenario.applicationAccess === "advice" + ? "Granulare VM-Rechte empfohlen. IDP bestätigt Identität; Projekt-IAM ist separat. Zentraler initialer Owner und Workload-Automation sind getrennt. Voller Owner bleibt Kundenwahl; geerbte Rechte sind additiv. Der Besteller erhält 191 Rechte mit projektweiter Schlüsselverwaltung; Automation erhält 184 Workload-Rechte." + : scenario.corporateIpv4 === "advice" + ? "Automatisch übernimmt das Standardpräfix /28 der SNA. Der Provider benötigt bei gesetztem DNS ein explizites Präfix; das native Modul liest es im Plan aus der SNA und übergibt es explizit. DNS bleibt erhalten. Freie Kapazität ist nicht garantiert." + : [ + "vpn", + "platform-kubernetes", + "firewall-access-bootstrap", + ].includes(scenario.topic) + ? buildAssistantKnowledge().topics.find( + (topic) => topic.id === scenario.topic, + )?.fieldOverview + : `Nur Beratung, keine Speicherung oder Ausfuehrung. ${scenario.requiredOverviewFields?.join(", ") ?? ""}. Namen 1-40 Zeichen; Beschreibungen nicht unterstützt und abgelehnt. pass, block, reject; explizite Synchronisierung. ${scenario.dnsRole ? dnsRoleExplanation : ""} git_flavor=null erstellt keine Git-Instanz; git-10 ist kein automatisch aktivierter Standard.`, questions: [], changes: [], references: [scenario.topic], diff --git a/landing-zone-configurator/app/tests/assistant.test.ts b/landing-zone-configurator/app/tests/assistant.test.ts index 4e9b3452..9acb5d56 100644 --- a/landing-zone-configurator/app/tests/assistant.test.ts +++ b/landing-zone-configurator/app/tests/assistant.test.ts @@ -2314,6 +2314,7 @@ it("requires login, current origin and CSRF for chat and rejects injected tenant undefined, undefined, "en", + undefined, ); expect( ( diff --git a/landing-zone-configurator/docs/assistant-knowledge/README.de.md b/landing-zone-configurator/docs/assistant-knowledge/README.de.md index c0f5a2bf..94ce8ff4 100644 --- a/landing-zone-configurator/docs/assistant-knowledge/README.de.md +++ b/landing-zone-configurator/docs/assistant-knowledge/README.de.md @@ -320,7 +320,13 @@ Bestätigte Entscheidungen zitieren echte Benutzerbeiträge; unbelegte Angaben w verworfen. Ein neuer Wissenshash verwirft den Kontext, nicht den Verlauf. Verwerfen schließt offene Vorschlagskontexte. Neue Antworten behalten den ursprünglichen Ablaufzeitpunkt und ersetzen Vorschlag und Wissenshash atomar. Veraltete Vorschläge -werden nicht still übernommen. Eine Datenbankmigration ist nicht nötig. +werden nicht still übernommen. Migration 102 gibt gespeicherten Konfigurationen +einen gemeinsamen Verlauf mit Arbeitsbereichsrechten und Autorenangabe. Bisher +private Verläufe teilt nur ihr Autor ausdrücklich in einen noch leeren gemeinsamen +Verlauf. Bei Arbeitsbereichs- und Konfigurationswechsel lädt der Browser neu und +fragt Änderungen anderer Mitglieder regelmäßig ab. Bei einem Teilnehmerwechsel +wird der Beratungskontext aus dem gemeinsamen Verlauf mit der aktuellen Identität +neu aufgebaut; der private Kontext eines anderen Teilnehmers wird nicht übernommen. Der Bundle-Hash umfasst kuratierte Inhalte, Manifest, Engine-Revision und lokale Quellfingerabdrücke. Quelländerungen verlangen geprüfte Neugenerierung; Build und diff --git a/landing-zone-configurator/docs/assistant-knowledge/README.md b/landing-zone-configurator/docs/assistant-knowledge/README.md index 51406415..c2ac8f3b 100644 --- a/landing-zone-configurator/docs/assistant-knowledge/README.md +++ b/landing-zone-configurator/docs/assistant-knowledge/README.md @@ -288,7 +288,12 @@ conversation message. Confirmed decisions cite actual user turns; unsupported memory is discarded. Knowledge hash changes invalidate the brief, not the original history. Discarding closes pending context. New responses preserve the original expiry and atomically replace the proposal and knowledge hash. Stale proposals -cannot be silently accepted. No database migration is required. +cannot be silently accepted. Migration 102 gives saved configurations one shared +conversation with workspace authorization and attributed messages. Existing private +histories require their author’s explicit sharing into an empty shared conversation. +The browser reloads on workspace/configuration switches and polls for team updates. +A different participant rebuilds the consultation brief from shared history using +their own current identity; another participant’s private brief is not reused. The bundle hash includes curated content, manifest metadata, engine revision and local source fingerprints. Source edits make generated knowledge stale and require diff --git a/landing-zone-configurator/docs/assistant-knowledge/configuration-lifecycle.de.md b/landing-zone-configurator/docs/assistant-knowledge/configuration-lifecycle.de.md index f90819e8..d6dd0f7a 100644 --- a/landing-zone-configurator/docs/assistant-knowledge/configuration-lifecycle.de.md +++ b/landing-zone-configurator/docs/assistant-knowledge/configuration-lifecycle.de.md @@ -70,6 +70,13 @@ veröffentlichen noch Bindungen ändern, entsperren oder ausführen. Bereitschaft ist keine Ausführung und keine Autorisierung. +Der Konfigurations-Chat ist ein gemeinsamer Verlauf je Konfiguration und Arbeitsbereich +für berechtigte Plattform-Mitglieder. Autoren bleiben erkennbar. Bisherige private +Verläufe brauchen die ausdrückliche Freigabe ihres Autors und werden nicht vermischt. +Bei einem Autorenwechsel wird der interne Gesprächsbrief mit der aktuellen Identität +und deren Rechten neu aufgebaut. Nicht gespeicherte Entwürfe bleiben lokal. +Gesprächsversionen schützen parallele Antworten; Kontextwechsel brechen alte Anfragen ab. + ## Dialog Bestätigte Anforderungen, Verlauf und unbenannte Folgefragen verwenden; diff --git a/landing-zone-configurator/docs/assistant-knowledge/configuration-lifecycle.md b/landing-zone-configurator/docs/assistant-knowledge/configuration-lifecycle.md index e416d08a..efb3bdd2 100644 --- a/landing-zone-configurator/docs/assistant-knowledge/configuration-lifecycle.md +++ b/landing-zone-configurator/docs/assistant-knowledge/configuration-lifecycle.md @@ -2,7 +2,7 @@ ## Purpose -Auth; acceptance ≠ execution. +Auth; accept≠execute. ## Accelerator Contract @@ -11,12 +11,10 @@ name/code/region, existing folders, native SNA. Naming consent is NAMES ONLY; preserve keys/metadata, never IDs/region/access/owners/roles. Save/publish/order/Plan/Apply/Destroy/Recovery separate. Apply=foundations+enabled inputs. Pinned IaC/lock/tools+patched Worker. -Origin=template Git; desired=Accelerator, not draft; lastApplied=successful -Apply source, NOT State/Recovery. +Origin=template Git; desired=Accelerator; lastApplied=successful Apply source, not State/Recovery or draft. Source upgrade preserves order/project/State/backend/policy; then fresh Plan review (changes/replacements/deletions), explicit separate Apply approval. -Failure keeps desired but MAY CHANGE State/resources; never promise no loss, -unchanged failed State or reorder. Recovery=interrupted snapshot/source; +Failure preserves desired, may change State/resources. Never promise lossless failure or reorder. Recovery=interrupted snapshot/source; Plan=actual State, not lastApplied. Withdrawn sources/unresolved Recovery block upgrades. Operator: reviewed recovery package; no bypass/fake hashes/arbitrary Git. @@ -25,41 +23,37 @@ State/backend/answers; ask new required answers. Confirm desired snapshot; fresh Plan/separate Apply. Block disallowed infrastructure/service/account/credential removal/replacement and unknown evidence; no checkbox override. Exact Plan may permit project custom-role/role-assignment removal/replacement as sensitive IAM. -Sensitive IAM/keys/network/services/availability follow PATH, not NEW-ORDER policy. -Self-service: Application Owner reviews fresh Plan, confirms Apply; NO extra -Platform Owner approval. Default separate approval binds Plan/artifact/candidate, -even ordinary changes. Policy edit appends immutable publication; old targets/Plans +IAM/keys/network/services/availability follow PATH policy, not NEW-ORDER. +Self-service: Application Owner reviews fresh Plan, confirms Apply; no Platform Owner approval. Separate approval always binds Plan/artifact/candidate. Policy edit appends immutable publication; old targets/Plans retain policy. Reselect latest path+fresh Plan; no retroactive unlock. -Shared firewall/routes affect ALL Applications, no private old copy. Platform +Shared firewall/routes affect ALL Applications; no private copy. Platform Owner decides known complete shared deletes/replacements from Plan changes, counts, data-loss warning and affected Applications. Explicit impact ack binds Plan/artifact/State/dependencies; separate normal/destructive Apply approval. Block unknown/incomplete evidence, active execution/Recovery, changed State. -Audit Logs→Observability: same review. Fresh Plan; never relabel old Plans. -Publish actual successful contract path; requester adopts; same template allowed. +Audit→Observability: same review. Fresh Plan; never relabel old Plans. +Publish successful contract path; requester adopts; same template allowed. Org/placement/SNA/backend migration separate. Chat cannot Git/publish/order/upgrade/unlock/execute or expose raw State/Plan. ## Dependencies -Ready ≠ executed. +Ready≠executed. ## Dialogue -Reuse history/requirements/follow-ups; topic switches win. +Reuse history; topic switches win. +Config chat shared by authorized platform members. Retain authors; author shares legacy private logs, never merge. Actor switch rebuilds brief with current identity/rights. Drafts local; chat CAS; switch abort/reset. State assumptions; later enables nothing. Split business/operator choices; -One missing firewall question. Options ≠ consent. multiple=true: compatible answers, -free text. Revalidate subsets; save only whole-proposal acceptance. New configs inherit server revision-bound context; no retrofit. Groups/parameters constrain versions. +One missing firewall question. Options ≠ consent. multiple=true: compatible answers/free text. Revalidate subsets; whole-proposal acceptance only. New configs inherit revision-bound context; no retrofit. Groups/parameters constrain versions. ## Examples -"SNA first, firewall later": SNA only; disclose inherited firewall. No selective Apply; tfvars need external credentials/backend. +"SNA first": SNA only; disclose inherited firewall. No selective Apply; tfvars need external credentials/backend. ## Limits Recheck auth/base/candidate on acceptance/inference/reauth. -Chats expire three calendar months from -CREATION; activity/deletion/late inference never extend expiry or restore derived -context. Refresh knowledge; keep drafts on errors. 5 sessions=load target, not quota. +Chat expiry=3 calendar months from creation; no activity/late-inference extension or automatic context resurrection. Refresh knowledge; keep drafts on errors. 5 sessions=load target, not quota. ## Credentials diff --git a/landing-zone-configurator/docs/assistant-knowledge/manifest.json b/landing-zone-configurator/docs/assistant-knowledge/manifest.json index 8d090b90..f0ee42ff 100644 --- a/landing-zone-configurator/docs/assistant-knowledge/manifest.json +++ b/landing-zone-configurator/docs/assistant-knowledge/manifest.json @@ -639,8 +639,8 @@ { "id": "configuration-lifecycle", "file": "configuration-lifecycle.md", - "version": 14, - "checkedOn": "2026-11-09", + "version": 15, + "checkedOn": "2026-11-20", "qualification": "local-draft-not-reviewed-release", "groups": [], "mandatory": true, @@ -652,7 +652,6 @@ "landing-zone-configurator/app/apps/api/src/assistant/knowledge.ts", "landing-zone-configurator/app/apps/api/src/assistant/service.ts", "landing-zone-configurator/app/apps/api/src/assistant/dialogue.ts", - "landing-zone-configurator/app/packages/contracts/src/assistant.ts", "landing-zone-configurator/app/apps/api/src/assistant/model-serving.ts", "landing-zone-configurator/docs/application-execution-lifecycle.md", "landing-zone-configurator/app/apps/api/src/applications/execution-lifecycle.ts", @@ -660,7 +659,8 @@ "landing-zone-configurator/app/packages/domain/src/application-upgrades.ts", "landing-zone-configurator/app/apps/api/src/applications/upgrades.ts", "landing-zone-configurator/app/packages/contracts/src/application-upgrades.ts", - "landing-zone-configurator/app/apps/api/db/093_platform_destructive_impact_review.sql" + "landing-zone-configurator/app/apps/api/db/093_platform_destructive_impact_review.sql", + "landing-zone-configurator/app/apps/api/db/102_shared_configuration_chat.sql" ], "externalSources": [], "scenarios": [ diff --git a/landing-zone-configurator/docs/assistant-test-catalogue.json b/landing-zone-configurator/docs/assistant-test-catalogue.json index 032c1c19..ef291262 100644 --- a/landing-zone-configurator/docs/assistant-test-catalogue.json +++ b/landing-zone-configurator/docs/assistant-test-catalogue.json @@ -2,13 +2,13 @@ "schemaVersion": 1, "status": "field-inventory-and-smoke-corpus-not-ai-qualification", "engineRevision": "a256f6896d11134fdc351786f1be5eba4e56b2e2", - "knowledgeSha256": "ac8ef349e8a260e10a3fa63b2d5d29eb5840692ef33e2033ceab0f67403210fb", + "knowledgeSha256": "51ce3f79e3eae451212e22a23702a40c579ff53ba9b497f5b83fd3bb774a3592", "sourceDigests": { - "scripts/assistant-scenarios.ts": "e8a36a6b4201040ad97952aa4da661a5d275dd6b3ca3388efdd02fe2c1623f09", + "scripts/assistant-scenarios.ts": "340b60fe7a464d67b04509adde98af5055e7d30b3c225cd116d567b4028b9863", "scripts/assistant-tests.ts": "e479f24ab2a517f0b4c5e63ab7791ad8562960f4363283be8a9c5b31628542c2", "scripts/assistant-test-model.ts": "ba6ced19b4974fb8144d39506b8601b428a02cada2dcf7b300e4e9113bb33209" }, - "suiteSha256": "daad945181ed1c7def28bbb158e9ec68e7c4af5536aae66fa6bde2cf74856b18", + "suiteSha256": "2951928e744a0daab0b779013e4002e7fdcd5b94df2bfb3ccbad41d446a7f075", "topics": [ { "id": "credential-foundations", @@ -7785,6 +7785,17 @@ "id": "configuration-lifecycle", "fields": [], "cases": [ + { + "id": "configuration-shared-chat-advice", + "topic": "configuration-lifecycle", + "fixture": "baseline", + "message": "Wie arbeiten zwei berechtigte Platform Engineers im selben Arbeitsbereich am Assistant-Chat einer gespeicherten Konfiguration zusammen? Was passiert beim Wechsel der Konfiguration, mit bisher privaten Verläufen und mit meiner Identität beim Fortsetzen? Erkläre auch, ob ein Chat automatisch speichert oder deployt. Nur beraten, keine Änderungen.", + "assertions": [ + "valid_dialogue", + "reviewed_topic_reference", + "no_changes" + ] + }, { "id": "application-template-upgrade-advice", "topic": "configuration-lifecycle", diff --git a/landing-zone-configurator/docs/user-guide.de.md b/landing-zone-configurator/docs/user-guide.de.md index 4e647d18..28f92803 100644 --- a/landing-zone-configurator/docs/user-guide.de.md +++ b/landing-zone-configurator/docs/user-guide.de.md @@ -49,8 +49,17 @@ Platform Engineers können sie gemeinsam öffnen, bearbeiten und löschen, auch wenn ein anderes Mitglied sie gespeichert hat. Nicht gespeicherte Entwürfe bleiben im aktuellen Browser. Speichert ein anderes Mitglied zuerst, lade dessen neue Revision und prüfe deine Änderungen erneut; ein veralteter Stand kann seine Arbeit -nicht überschreiben. Assistant-Verläufe und Zugangsdatenprofile bleiben persönlich. -Das Teilen einer Konfiguration erteilt keine Rechte zur Cloud-Ausführung. +nicht überschreiben. Neue Assistant-Verläufe gehören zur gespeicherten +Konfiguration: Berechtigte Platform Engineers können denselben Verlauf lesen und +fortsetzen. Beim Arbeitsbereichs- oder Konfigurationswechsel wird der zugehörige +Verlauf geladen. Nachrichten zeigen ihren Autor; bei konkurrierenden Antworten +ist ein Aktualisieren erforderlich, statt neue Nachrichten zu überschreiben. Das +Löschen eines gemeinsamen Verlaufs betrifft das ganze Team. Bestehende private +Verläufe bleiben nur für ihren Autor sichtbar. Dieser kann einen Verlauf +ausdrücklich teilen, solange noch kein gemeinsamer Verlauf existiert. +Zugangsdatenprofile und Beratungen vor dem Anlegen einer Konfiguration bleiben +persönlich. Das Teilen einer Konfiguration erteilt keine Rechte zur Cloud-Ausführung. +Vorschläge müssen weiterhin ausdrücklich übernommen und Änderungen gespeichert werden. **Speicheroptionen öffnen →** öffnet nur die Speicherauswahl. **Konfiguration speichern** schreibt eine neue Datenbankrevision; **Speichern und zur diff --git a/landing-zone-configurator/docs/user-guide.md b/landing-zone-configurator/docs/user-guide.md index 81ee1d93..11157293 100644 --- a/landing-zone-configurator/docs/user-guide.md +++ b/landing-zone-configurator/docs/user-guide.md @@ -43,8 +43,16 @@ Saved configurations belong to the selected workspace. Its Platform Engineers can open, edit and delete them, including configurations saved by another member. Unsaved drafts stay in the current browser. If another member saves first, reload the newer revision and review your changes before saving; an outdated revision -cannot overwrite their work. Assistant conversations and credential profiles -remain personal. Sharing a configuration grants no cloud execution permissions. +cannot overwrite their work. New Assistant conversations belong to the saved +configuration: authorized Platform Engineers can read and continue the same +conversation. Switching workspace or configuration loads its own history; messages +show their author, and concurrent replies require a refresh instead of overwriting +newer messages. Deleting a shared conversation removes it for the team. Existing +private histories remain visible only to their author, who can explicitly share +one when no shared conversation exists. Credential profiles and consultations +before creating a configuration remain personal. Sharing a configuration grants +no cloud execution permissions. Proposals still require explicit acceptance and +configuration changes require saving. **Open save options →** only opens storage choices. **Save configuration** writes a new database revision; **Save and prepare deployment** performs the same save and diff --git a/landing-zone-configurator/infra/ci/release-notes.mjs b/landing-zone-configurator/infra/ci/release-notes.mjs index 63e52b94..03f21905 100644 --- a/landing-zone-configurator/infra/ci/release-notes.mjs +++ b/landing-zone-configurator/infra/ci/release-notes.mjs @@ -1,6 +1,14 @@ const tag=process.env.LZC_RELEASE_TAG; if(!/^v(?:[2-9]|[1-9][0-9]+)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/.test(tag??""))throw new Error("Expected a stable product release tag"); const notes={ + "v2.2.3": { + introduction:"Shared configuration conversations for collaborative platform work.", + changes:[ + "Let authorized Platform Engineers read and continue one Assistant conversation per saved configuration, with authors and concurrent-update protection.", + "Load the matching conversation when switching workspace or configuration, and refresh teammate replies while preserving unsent input.", + "Preserve existing private histories and offer explicit sharing by their author; proposals still require acceptance and configuration changes require saving.", + ], + }, "v2.2.2": { introduction:"Production email delivery and reliable recovery after reported S3 Apply failures.", changes:[ diff --git a/landing-zone-configurator/infra/mailout/README.de.md b/landing-zone-configurator/infra/mailout/README.de.md index 0f1423e1..e01bc628 100644 --- a/landing-zone-configurator/infra/mailout/README.de.md +++ b/landing-zone-configurator/infra/mailout/README.de.md @@ -86,8 +86,7 @@ gh secret set LZC_MAILOUT_BINDINGS --repo stackitcloud/stackit-landing-zone \ Das Prod-Deployment verlangt die SMTP-Bindung und bricht bei fehlender Bindung vor der Aktivierung ab. Production Release übergibt dieses Secret an die Runtime-Vorbereitung und prüft -die tatsächliche CF-MailOut-Bindung vor dem SMTP-Verbindungstest. Staging, Runner -und Migrations-App erhalten keine SMTP-Zugangsdaten und versenden keine Mails. +die tatsächliche CF-MailOut-Bindung vor dem SMTP-Verbindungstest. Im Staging ist der Versand deaktiviert. Runner und Migrations-App erhalten keine SMTP-Zugangsdaten und versenden keine Mails. Vorlagen im STACKIT-Erscheinungsbild, Sprache und persönliche Themenpräferenzen entsprechen Dev; den Einladungsversand wählt der Einladende. diff --git a/landing-zone-configurator/infra/mailout/README.md b/landing-zone-configurator/infra/mailout/README.md index 6ece1b0b..20364ef6 100644 --- a/landing-zone-configurator/infra/mailout/README.md +++ b/landing-zone-configurator/infra/mailout/README.md @@ -81,8 +81,7 @@ gh secret set LZC_MAILOUT_BINDINGS --repo stackitcloud/stackit-landing-zone \ Production deployment requires the SMTP binding and fails before activation if it is missing. The Production Release workflow passes this secret to runtime preparation and -verifies the actual CF MailOut binding before SMTP connection checks. Staging, -Runner and migration applications never receive SMTP credentials or send mail. +verifies the actual CF MailOut binding before SMTP connection checks. Staging email is disabled. Runner and migration applications never receive SMTP credentials or send mail. Production sending uses the same branded templates, language and per-user topic preferences as Dev; invitation delivery is selected by the inviter. From 97209a4b9c77c03f0ec2ea4fec000ca32d7d73a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Weberru=C3=9F?= Date: Fri, 20 Nov 2026 17:51:14 +0000 Subject: [PATCH 2/3] test(configurator): assert shared conversation revisions in browser flows --- landing-zone-configurator/app/e2e/assistant-discard.spec.ts | 1 + landing-zone-configurator/app/e2e/configurator.spec.ts | 1 + landing-zone-configurator/app/e2e/platform-owner-flow.spec.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/landing-zone-configurator/app/e2e/assistant-discard.spec.ts b/landing-zone-configurator/app/e2e/assistant-discard.spec.ts index c1ec81f1..e02588bf 100644 --- a/landing-zone-configurator/app/e2e/assistant-discard.spec.ts +++ b/landing-zone-configurator/app/e2e/assistant-discard.spec.ts @@ -129,6 +129,7 @@ for (const context of ["configuration", "templates"] as const) { revision: 1, message: "Bitte jetzt nur die Grundlagen erklären.", language: "de", + conversation: { id: conversationId, revision: 3 }, draft: { ...original, name: "Unsaved preserved discard draft" }, }); sent++; diff --git a/landing-zone-configurator/app/e2e/configurator.spec.ts b/landing-zone-configurator/app/e2e/configurator.spec.ts index 904f2d13..119a0dc0 100644 --- a/landing-zone-configurator/app/e2e/configurator.spec.ts +++ b/landing-zone-configurator/app/e2e/configurator.spec.ts @@ -1644,6 +1644,7 @@ test("firewall HA merges local edits, reviews conflicts and saves separately", a revision: 2, message: "Bitte HA erneut vorschlagen.", language: "de", + conversation: { id, revision: conversationRevision }, draft: localDraft, }); proposalBaseRevision = revision; diff --git a/landing-zone-configurator/app/e2e/platform-owner-flow.spec.ts b/landing-zone-configurator/app/e2e/platform-owner-flow.spec.ts index 05cdadf8..de4befc0 100644 --- a/landing-zone-configurator/app/e2e/platform-owner-flow.spec.ts +++ b/landing-zone-configurator/app/e2e/platform-owner-flow.spec.ts @@ -529,6 +529,7 @@ test("template-draft Assistant uses the saved configuration and accepts locally revision: 1, message: "Bitte den Namen dieses Templates verbessern.", language: "de", + conversation: { id: null, revision: null }, draft: original, }); sent++; From fcfef28c42bf74b811c6480f927605667d33853d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Weberru=C3=9F?= Date: Fri, 20 Nov 2026 17:51:48 +0000 Subject: [PATCH 3/3] docs(release): include validated recovery and mail fixes in combined promotion --- landing-zone-configurator/infra/ci/release-notes.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/landing-zone-configurator/infra/ci/release-notes.mjs b/landing-zone-configurator/infra/ci/release-notes.mjs index 03f21905..e69f2f06 100644 --- a/landing-zone-configurator/infra/ci/release-notes.mjs +++ b/landing-zone-configurator/infra/ci/release-notes.mjs @@ -2,11 +2,12 @@ const tag=process.env.LZC_RELEASE_TAG; if(!/^v(?:[2-9]|[1-9][0-9]+)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/.test(tag??""))throw new Error("Expected a stable product release tag"); const notes={ "v2.2.3": { - introduction:"Shared configuration conversations for collaborative platform work.", + introduction:"Collaborative configuration conversations, production email and S3 Apply recovery.", changes:[ "Let authorized Platform Engineers read and continue one Assistant conversation per saved configuration, with authors and concurrent-update protection.", "Load the matching conversation when switching workspace or configuration, and refresh teammate replies while preserving unsent input.", "Preserve existing private histories and offer explicit sharing by their author; proposals still require acceptance and configuration changes require saving.", + "Include dedicated production MailOut provisioning and verified backend SMTP binding, plus source-verified runner retirement after reported S3 Apply failures while retaining State and recovery holds.", ], }, "v2.2.2": {