Setup adaptera produkcji
Konsola integracji
Jedna powierzchnia settings steruje lokalnymi kontraktami DB/auth-ready, trybami providerow i checklista przejscia na produkcje.
Kontrakt scenariusza
ScenarioStore.v1
Ksztalt API jest stabilny dla przyszlego DB adaptera.
Aktorzy rol
5
Uzytkownicy demo mapuja sie na przyszle RBAC claims.
Tryby providerow
6
Mock/lokalne providery pokazuja cele produkcyjne.
Preflight
1/5
Gotowosc migracji snapshotu przed realnym DB/auth cutover.
Kroki przejscia
0/6
Gotowe gates kontra zadania infrastruktury.
Connection
0/4
Redacted endpoint readiness dla wybranego adaptera.
Integration Readiness Copilot
2/9 integration gates are ready for db-auth-session-adapter.
Recommended integration action
Record adapter connection evidence
Connection checks show 0/4; record the redacted endpoint packet before dry-run.
Provider contracts
6 local-to-production provider contracts are visible.
Session adapter
ScenarioStore.v1 runs with mock-auth-header for the local demo contract.
Migration preflight
Preflight is 1/5 with snapshot checksum bfg-eba94650.
Migration runbook
Runbook is 1/6 with decision BLOCKED_PENDING_PREFLIGHT.
Release handoff
Release is 3/5 with decision BLOCKED_PENDING_DRY_RUN.
Rollback drill
Rollback is 0/4 with decision BLOCKED_PENDING_DRY_RUN.
Integration blocker checklist
Production readiness decision
Infrastructure decision prompt
db-auth-session-adapter is selected for rehearsal, but BLOCKED_PENDING_DRY_RUN keeps real DB/auth cutover blocked until infrastructure owners choose the live provider.
Decision needed
Choose the real DB/auth provider before wiring production
Release gates show 3/5; data cutover remains 0/5. Keep demo evidence open, but do not claim production readiness.
Selected adapter target
db-auth-session-adapter
The target is ready for local replay, not live production traffic.
Auth/RBAC owner
OIDC/RBAC
OIDC, roles and secret handling need owner confirmation before code wiring.
Go/no-go decision
BLOCKED_PENDING_DRY_RUN
Local demo can proceed while production remains blocked.
Provider selection acceptance
Provider selection acceptance stub
Anna Kowalska musi zaakceptowac db-auth-session-adapter przed live DB/auth wiring; BLOCKED_PENDING_DRY_RUN pozostaje jedyna dozwolona decyzja produkcyjna.
Live DB/auth provider
db-auth-session-adapter
Anna Kowalska musi wybrac realny provider contract dla db-auth-session-adapter.
Auth/RBAC owner
OIDC/RBAC
Anna Kowalska musi potwierdzic role, claims i secret handling przed live users.
Tenant i secrets boundary
single-tenant-local
db-auth-session-adapter pozostaje zablokowany do akceptacji tenant isolation i managed secrets.
Live wiring go/no-go
BLOCKED_PENDING_DRY_RUN
BLOCKED_PENDING_DRY_RUN zostaje locked do sign-off provider, auth i rollback owners.
Infrastructure selection decision
ProductionInfrastructureDecision.v1 blocker
Anna Kowalska musi wybrac hosting, region, runtime ownership oraz secrets/backup boundaries dla db-auth-session-adapter; BLOCKED_PENDING_DRY_RUN pozostaje locked do tej decyzji.
Hosting provider i account
db-auth-session-adapter
Anna Kowalska musi wybrac live hosting account/provider zanim db-auth-session-adapter dostanie production traffic.
Anna Kowalska odpowiada za te infrastructure decision przed real DB/auth wiring.
Region i data residency
EU region pending
EU region, data residency i backup locality musza byc potwierdzone przed live DB/auth wiring.
Anna Kowalska odpowiada za te infrastructure decision przed real DB/auth wiring.
Runtime operations owner
Managed runtime pending
On-call, deploy, monitoring i incident owner musza byc nazwani dla db-auth-session-adapter.
Anna Kowalska odpowiada za te infrastructure decision przed real DB/auth wiring.
Secrets i backup boundary
Secrets/backup pending
Managed secrets, backup/RPO i restore owner musza byc zaakceptowane zanim BLOCKED_PENDING_DRY_RUN moze sie zmienic.
Anna Kowalska odpowiada za te infrastructure decision przed real DB/auth wiring.
Reviewer proof path
Use these routes to show the blocker, evidence and audit trail without pretending live infrastructure exists.
Guarded DB/auth wiring
ProductionDbAuthAdapterWiring.v1 preflight
Local contract wiring dla db-auth-session-adapter moze ruszyc po infrastructure acceptance (0/4); production traffic pozostaje disabled do czasu live credentials.
Infrastructure acceptance
Wymaga zaakceptowanego hosting, EU region, runtime owner i secrets/backup ownership dla db-auth-session-adapter.
db-auth-session-adapter.infrastructureAcceptance
Endpoint contract
Uzywa redacted adapter endpoint contract bez live external connection.
db-auth-session-adapter.endpointContract
Tenant context
Mapuje organization i tenant claims przed jakimkolwiek live database write.
db-auth-session-adapter.tenantContext
OIDC/RBAC claims
Przygotowuje role claims dla MD, dispatcher, accountant, driver i client scopes.
db-auth-session-adapter.oidcRbacClaims
RLS policy draft
Potwierdza tenant-scoped RLS policy plan gotowy do migration review.
db-auth-session-adapter.rlsPolicyDraft
Secrets i backup boundary
Wiaze secrets, backup/RPO i restore ownership z zaakceptowana infrastructure decision.
db-auth-session-adapter.secretsBackupBoundary
Live credentials
Blocked do czasu dostarczenia sprawdzonych provider credentials poza local demo workspace.
db-auth-session-adapter.liveCredentials
Production traffic pozostaje disabled
Decision=BLOCKED_PENDING_INFRASTRUCTURE_OR_CREDENTIALS; traffic=production_traffic_disabled. Live credentials i secrets nie sa obecne w MVP workspace.
Preflight nieuruchomiony; infrastructure status: blocked.
Kontrakty providerow
Mock-first providery z celami produkcji
Kazda zewnetrzna zaleznosc ma lokalny tryb MVP i nazwany zamiennik produkcyjny.
Scenario store
Dzis zapisuje scenariusz demo i definiuje przyszly kontrakt sesji DB.
Aktualny tryb
file-local
Tryb docelowy
Postgres/RLS
Auth i RBAC
Naglowki rol obsluguja MVP, zachowujac granice user, tenant i permission.
Aktualny tryb
mock-auth-header
Tryb docelowy
OIDC/RBAC
Document intelligence
Lokalne wyniki OCR maja ksztalt odpowiedzi produkcyjnej ekstrakcji.
Aktualny tryb
local-ocr
Tryb docelowy
Document AI
KSeF e-faktura
Mock pakiety faktur utrzymuja finance flow gotowy na regulowane API.
Aktualny tryb
mock-ksef
Tryb docelowy
KSeF API
Mapy i ETA
Lokalna logika ETA moze byc podmieniona na live maps i traffic provider.
Aktualny tryb
local-eta
Tryb docelowy
Maps/ETA API
Driver offline sync
Service worker i trip cache definiuja granice przyszlego background sync.
Aktualny tryb
service-worker
Tryb docelowy
Background sync
Sesja live
Aktualny stan adaptera
Adapter storage
file-local
Tryb auth
mock-auth-header
Tryb tenant
single-tenant-local
Ostatni zapis
Jeszcze bez zapisu
Mapa RBAC
Aktorzy wg rol
Te same actor ids i uprawnienia ida przez naglowki Scenario API i moga pozniej stac sie auth claims.
Anna Kowalska
user_md_anna ยท BFG Control
Marek Zielinski
user_dispatcher_marek ยท Dispatch desk
Olena Shevchenko
user_accountant_olena ยท Finance
Petro Tarasenko
driver_tarasenko ยท BFG Driver
Lviv Farma Distribution
cp_client_lviv_farma ยท Client Portal
Przejscie produkcyjne
Checklista migracji DB/auth
Akceptuj rehearsal cutover prowadzony przez ownerow, aby DB/auth checklist stal sie audit evidence.
Kontrakty zamrozone
Scenario envelope, actor headers i metadata fields sa pokryte smoke testami.
Owner: Anna Kowalska ยท Dyrektor
Naglowki rol zmapowane
Managing Director, Dispatcher, Accountant, Driver i Client sa widoczni.
Owner: Marek Zielinski ยท Dyspozytor
Rehearsal Scenario Store
Potwierdz payload adaptera file-local do DB replay.
Owner: Marek Zielinski ยท Dyspozytor
Schemat DB
Zbudowac tabele tenant, user, permission i scenario-state dla adaptera produkcji.
Owner: Olena Shevchenko ยท Ksiegowosc
Sekrety i auth
Podlaczyc wybrany OIDC/RBAC provider bez wymogu platnych kluczy w MVP.
Owner: Olena Shevchenko ยท Ksiegowosc
Migracja i rollback
Przeniesc lokalny demo state do DB adaptera i zachowac rollback dla demo.
Owner: Anna Kowalska ยท Dyrektor
Tablica decyzji adaptera
Production adapter decision board
Pokazuje wybor adaptera DB/auth, gotowosc srodowiska, sekrety, schemat, migracje, rollback i akceptacje ownerow przed production cutover.
Adapter selection status
db-auth-session-adapter
Staging target is explicitly selected while the local MVP keeps the file adapter for demos.
Owner
Anna Kowalska
Dyrektor
Evidence
Target locked
Environment readiness
Staging to production
Contracts and replayable Scenario Store payload must be accepted before the DB/auth environment opens.
Owner
Marek Zielinski
Dyspozytor
Evidence
0/2 checkow accepted
Secrets and RBAC owner
OIDC/RBAC handoff
Role headers and secret handling must both be accepted before real user auth is wired.
Owner
Olena Shevchenko
Ksiegowosc
Evidence
0/2 checkow accepted
Schema and RLS
Postgres/RLS
Tenant, user, permission and scenario-state tables need owner acceptance before adapter migration.
Owner
Olena Shevchenko
Ksiegowosc
Evidence
0/1 checkow accepted
Migration dry-run
Seed backfill rehearsal
The local demo state needs a dry-run path into the DB adapter before reviewer cutover.
Owner
Anna Kowalska
Dyrektor
Evidence
0/1 checkow accepted
Rollback window
File-local fallback
Keep the file-local adapter ready until migration and replay evidence are accepted together.
Owner
Anna Kowalska
Dyrektor
Evidence
0/2 checkow accepted
Release owner approvals
6 owner checks
All owner-led cutover rehearsals must be accepted before production release sign-off.
Owner
Anna Kowalska
Dyrektor
Evidence
0/6 checkow accepted
Migration runbook
Production migration runbook
Portable SQL/RLS outline and operator checklist for replaying the current ScenarioStore snapshot into the selected DB/auth adapter without live secrets.
Freeze snapshot
0 / bfg-feb1d61b
Carry BFGScenarioSnapshot.v1 rows and checksum into the migration packet.
Schema and RLS
0/6
Tenant, user, snapshot and audit tables are mapped for the selected adapter.
Actor claims
5
Demo actors and permissions become future DB/auth claims.
Adapter replay
0/4 + 0/5
Connection and dry-run evidence prove the target can replay the payload.
Checksum verification
1/5
Preflight readiness and checksum close the migration verification loop.
Rollback seal
BLOCKED_PENDING_DRY_RUN
Release and rollback decisions remain bound to the local fallback adapter.
ProductionAdapterMigrationRunbook.v1 SQL Outline
ProductionAdapterMigrationRunbook.v1 targets db-auth-session-adapter with checksum bfg-feb1d61b; keep it as a reviewer-safe migration rehearsal outline until real infrastructure is connected.
-- ProductionAdapterMigrationRunbook.v1
-- source=BFGScenarioSnapshot.v1
-- target=db-auth-session-adapter
-- session=grant-demo-local
-- checksum=bfg-feb1d61b
-- rows=0
-- runbook_decision=BLOCKED_PENDING_PREFLIGHT
create schema if not exists bfg_flowcontrol;
create table if not exists bfg_flowcontrol.tenants (
tenant_id text primary key,
name text not null,
created_at timestamptz not null default now()
);
create table if not exists bfg_flowcontrol.users (
user_id text primary key,
tenant_id text not null references bfg_flowcontrol.tenants(tenant_id),
role_key text not null,
display_name text not null,
permissions text[] not null default '{}'
);
create table if not exists bfg_flowcontrol.scenario_snapshots (
snapshot_id text primary key,
tenant_id text not null references bfg_flowcontrol.tenants(tenant_id),
checksum text not null,
schema_version text not null,
payload jsonb not null,
created_at timestamptz not null default now()
);
create table if not exists bfg_flowcontrol.audit_events (
event_id text primary key,
tenant_id text not null references bfg_flowcontrol.tenants(tenant_id),
actor_id text not null references bfg_flowcontrol.users(user_id),
source text not null,
payload jsonb not null,
created_at timestamptz not null default now()
);
alter table bfg_flowcontrol.users enable row level security;
alter table bfg_flowcontrol.scenario_snapshots enable row level security;
alter table bfg_flowcontrol.audit_events enable row level security;
drop policy if exists bfg_tenant_users on bfg_flowcontrol.users;
drop policy if exists bfg_tenant_snapshots on bfg_flowcontrol.scenario_snapshots;
drop policy if exists bfg_tenant_audit on bfg_flowcontrol.audit_events;
create policy bfg_tenant_users on bfg_flowcontrol.users
using (tenant_id = current_setting('bfg.tenant_id', true));
create policy bfg_tenant_snapshots on bfg_flowcontrol.scenario_snapshots
using (tenant_id = current_setting('bfg.tenant_id', true));
create policy bfg_tenant_audit on bfg_flowcontrol.audit_events
using (tenant_id = current_setting('bfg.tenant_id', true));Runbook decision BLOCKED_PENDING_PREFLIGHT; 1/6 migration checks are ready.
Cutover danych
Konsola produkcyjnego cutover danych
Zamienia runbook migracji w dowody batchy tenant, operacje, finanse i audit przed podlaczeniem live DB/auth.
Seed tenant i RBAC
5 actors
Aktorzy demo i uprawnienia staja sie pierwszym seedem tenant/user.
Replay operacji
0 rows
Zlecenia, zdarzenia kierowcy, klienta i dispatch pozostaja replayowalne.
Ledger finansowy
0 rows
KSeF i platnosci sa wydzielone do migracji finance.
Audit trail
0 rows
Risk, cutover, connection, dry-run i sign-off zostaja polaczone.
Freeze snapshotu
0 rows
Wiersze i suma BFGScenarioSnapshot.v1 sa zablokowane.
Seed tenant/RLS
1/6
Tabele runbooka i RLS sa gotowe dla adaptera.
Replay batchy
0/4 + 0/5
Connection i dry-run potwierdzaja bezpieczny replay.
Parzystosc audytu
1/4
Wszystkie batche maja dane i dowod preflight.
Seal rollback
BLOCKED_PENDING_DRY_RUN
Release i rollback utrzymuja file-local fallback.
Pakiet ProductionDataCutoverPlan.v1
db-auth-session-adapter pakuje 5 wierszy batchy z suma bfg-e7a2d068; to bezpieczny plan cutover do czasu wyboru infrastruktury.
ProductionDataCutoverPlan.v1 target=db-auth-session-adapter session=grant-demo-local snapshot_schema=BFGScenarioSnapshot.v1 snapshot_checksum=bfg-e7a2d068 snapshot_rows=0 batch_rows=5 batches=1/4 steps=0/5 connection=0/4 dry_run=0/5 runbook_decision=BLOCKED_PENDING_PREFLIGHT release_decision=BLOCKED_PENDING_DRY_RUN rollback_decision=BLOCKED_PENDING_DRY_RUN cutover_decision=BLOCKED_PENDING_DATA_CUTOVER
Decyzja BLOCKED_PENDING_DATA_CUTOVER; 0/5 kontroli cutover i 1 grup batchy gotowe.
Adapter connection
Production adapter connection wizard
Zapisuje redacted endpoint, TLS/RBAC i write-probe evidence dla wybranego DB/auth adaptera bez przechowywania sekretow.
Endpoint reachability
Wybrany endpoint adaptera jest nazwany i osiagalny.
Czeka na connection check
TLS fingerprint
Fingerprint certyfikatu jest reviewer-safe.
Czeka na connection check
RBAC session
Demo actor claims mapuja sie na granice tenant/user.
Czeka na connection check
Write probe
No-secret write/read probe moze byc replayed przed cutover.
Czeka na connection check
ProductionAdapterConnection.v1 packet
Adapter target
db-auth-session-adapter
Redacted endpoint
Nie zapisano
Endpoint fingerprint
Fingerprint nie zapisany
Zapisz packet po potwierdzeniu endpoint reachability, TLS, RBAC i write probe.
Dry-run adaptera
Transcript produkcyjnego dry-run adaptera
Uruchom lokalny transcript, ktory replayuje stan scenariusza do wybranego kontraktu DB/auth adapter bez wymagania live infrastruktury.
Eksport snapshotu
Zamraza zamowienia, zdarzenia kierowcy, finanse i dowody reviewerow.
Czeka na dry-run
Walidacja mapy schematu
Mapuje pola Scenario Store do tabel tenant, user, order, document i audit.
Czeka na dry-run
Proba RBAC claims
Replayuje demo actor ids jako przyszle auth claims z uprawnieniami rol.
Czeka na dry-run
Transcript replay adaptera
Zapisuje i odczytuje payload przez wybrany kontrakt DB/auth adapter.
Czeka na dry-run
Checkpoint rollback
Utrzymuje file-local fallback i replay id do akceptacji cutover.
Czeka na dry-run
ProductionAdapterDryRun.v1 checkpoint
db-auth-session-adapter
Uruchom dry-run, aby zapisac replayowalny checkpoint adaptera dla reviewerow.
Migration preflight
Preflight migracji snapshotu
Reviewer-safe raport DB/auth rehearsal z aktualnego payloadu BFGScenarioSnapshot.v1, adapter target i rollback evidence.
Payload snapshotu
0 rekordow
BFGScenarioSnapshot.v1 jest zamrozony z liczba rekordow i checksum.
Schema map
1/7
Adapter decision i cutover evidence wskazuja tenant/user/order/document/audit tables.
RBAC claims
5 aktorow
Demo actor ids i permissions sa gotowe jako auth claims.
Adapter replay
0/5
ProductionAdapterDryRun.v1 potwierdza write/read compatibility dla wybranego adaptera.
Rollback evidence
Zablokowane
Release i rollback packets utrzymuja file-local fallback jawnie.
Raport ProductionAdapterMigrationPreflight.v1
BFGScenarioSnapshot.v1 ma 0 rekordow i checksum bfg-eba94650; uzyj raportu do DB/auth migration rehearsal przed live infrastruktura.
ProductionAdapterMigrationPreflight.v1 schema=BFGScenarioSnapshot.v1 target=db-auth-session-adapter session=grant-demo-local checksum=bfg-eba94650 rows=0 adapter_contract=ScenarioStore.v1 dry_run=0/5 connection=0/4 rollback_decision=BLOCKED_PENDING_DRY_RUN
Release handoff
Eksport env production release
Reviewer-ready env pokazuje lokalny tryb adaptera, cel, rollback owner i decyzje go/no-go.
Zmienne env
9
Dziewiec wartosci release pochodzi z metadanych sesji.
Cel adaptera
1/7
Wybrany cel DB/auth jest widoczny.
Dry-run transcript
0/5
Replay transcript potwierdza zgodnosc lokalnego payloadu.
Rollback
file-local
Fallback adapter pozostaje jawny.
Evidence ownerow
0/6
Kontrole cutover ownerow lacza sie ze Scenario Store.
Blok env release
BFG_RELEASE_ENVIRONMENT=local-demo BFG_RELEASE_TARGET=db-auth-session-adapter BFG_SCENARIO_ADAPTER=ScenarioStore.v1 BFG_STORAGE_ADAPTER=file-local BFG_AUTH_MODE=mock-auth-header BFG_TENANT_MODE=single-tenant-local BFG_ROLLBACK_OWNER=user_md_anna BFG_RELEASE_EVIDENCE=ProductionAdapterDryRun.v1 BFG_RELEASE_DECISION=BLOCKED_PENDING_DRY_RUN
Decyzja BLOCKED_PENDING_DRY_RUN; 3/5 bramek release handoff jest gotowych.
Drill rollbacku
Production rollback drill
Ops sprawdza wlasciciela fallbacku, adapter storage i pakiet audytu przed prawdziwym cutover infrastruktury.
Okno freeze
BLOCKED_PENDING_DRY_RUN
Production pozostaje zablokowane do przegladu lokalnej decyzji go/no-go.
Potwierdzenie ownera
Anna Kowalska
Managing Director posiada decyzje rollbacku i pakiet audytu.
Storage fallback
file-local
Adapter file-local pozostaje jawna sciezka rollbacku.
Pakiet audytu
ProductionRollbackDrill.v1
Dowody release i rollback sa polaczone w jednym pakiecie eksportu.
Pakiet audytu rollbacku
BFG_ROLLBACK_DECISION=BLOCKED_PENDING_DRY_RUN BFG_ROLLBACK_OWNER=user_md_anna BFG_ROLLBACK_STORAGE=file-local BFG_ROLLBACK_AUTH=mock-auth-header BFG_ROLLBACK_EVIDENCE=ProductionReleaseHandoff.v1 BFG_ROLLBACK_PACKET=ProductionRollbackDrill.v1
Decyzja BLOCKED_PENDING_DRY_RUN; 0/4 kontroli rollbacku jest gotowych dla Anna Kowalska.
Srodowiska
Plan rollout adaptera
Demo lokalne
file-local
Dziala teraz z file-local scenario state i mock kontraktami providerow.
Staging
db-auth-session-adapter
Nastepny cel dla DB persistence, auth claims i provider secrets.
Produkcja
tenant-rbac-adapter
Finalny tenant-scoped adapter z prawdziwym auth i provider audit logs.