fix(ui/astryx-reference): remove internal stage vocabulary from reference pages
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
3 files changed
+3
-303
No files matched your search
@@ -1,4 +1,3 @@
|
||||
import { Badge } from "@astryxdesign/core/Badge";
|
||||
import { Button } from "@astryxdesign/core/Button";
|
||||
import { Heading } from "@astryxdesign/core/Heading";
|
||||
import { Layout, LayoutContent, LayoutHeader } from "@astryxdesign/core/Layout";
|
||||
@@ -20,7 +19,6 @@ const copy = {
|
||||
eyebrow: "Monitoring · 09:38 UTC",
|
||||
body: "Checkout timeouts rose after the latest release. Archie authenticated the event, bound it to the production checkout target, and started an investigation run.",
|
||||
action: "Open investigation",
|
||||
seam: "Hears → Understands → Decides",
|
||||
},
|
||||
Governance: {
|
||||
heading: "Governance",
|
||||
@@ -29,7 +27,6 @@ const copy = {
|
||||
eyebrow: "Production · Checkout · Rollback",
|
||||
body: "The current autonomy level permits read-only investigation. The rollback is reversible, but it changes production. Hard rules and the Timing guard therefore require an operator decision.",
|
||||
action: "Review decision",
|
||||
seam: "Governs · Assesses · Manages risk · Invokes policy",
|
||||
},
|
||||
Reports: {
|
||||
heading: "What Archie delivered",
|
||||
@@ -38,7 +35,6 @@ const copy = {
|
||||
eyebrow: "Operations · Waiting on approval",
|
||||
body: "The investigation and evidence are in Operations. No production change has been made. The underlying release defect remains to be confirmed.",
|
||||
action: "Open decision trail",
|
||||
seam: "Does → Delivers",
|
||||
},
|
||||
} as const;
|
||||
|
||||
@@ -63,7 +59,6 @@ export function AreaPage({ area, onOpenRun }: AreaPageProps) {
|
||||
<Section>
|
||||
<VStack gap={3}>
|
||||
<HStack gap={1} wrap="wrap" vAlign="center">
|
||||
<Badge variant="info" label={content.seam} />
|
||||
<Text size="sm" color="secondary">
|
||||
{content.eyebrow}
|
||||
</Text>
|
||||
|
||||
@@ -30,7 +30,6 @@ import {MetadataList, MetadataListItem} from '@astryxdesign/core/MetadataList';
|
||||
import {useMediaQuery} from '@astryxdesign/core/hooks';
|
||||
import {ResizeHandle, useResizable} from '@astryxdesign/core/Resizable';
|
||||
import {Section} from '@astryxdesign/core/Section';
|
||||
import {Step, Stepper} from '@astryxdesign/core/Stepper';
|
||||
import {Heading, Text} from '@astryxdesign/core/Text';
|
||||
import {Toolbar} from '@astryxdesign/core/Toolbar';
|
||||
import {
|
||||
@@ -41,34 +40,6 @@ import {
|
||||
import mark from '../../../assets/brand/archie-mark.svg?url';
|
||||
|
||||
const ARTIFACT_TITLE = 'Checkout rollback review';
|
||||
const EVIDENCE_TRAIL = [
|
||||
{
|
||||
label: 'Hears',
|
||||
description: 'The checkout alert fired after timeouts exceeded 5%.',
|
||||
},
|
||||
{
|
||||
label: 'Understands',
|
||||
description: 'The 09:34 release is the leading timing suspect.',
|
||||
},
|
||||
{
|
||||
label: 'Decides',
|
||||
description: 'A bounded rollback is proposed; policy requires approval.',
|
||||
},
|
||||
{
|
||||
label: 'Defines',
|
||||
description:
|
||||
'The existing checkout rollback workflow supplies the exact bounded operation.',
|
||||
},
|
||||
{
|
||||
label: 'Does',
|
||||
description: 'No production change has been made.',
|
||||
},
|
||||
{
|
||||
label: 'Delivers',
|
||||
description: 'The outcome follows the operator decision in Runs.',
|
||||
},
|
||||
] as const;
|
||||
|
||||
export type ConversationMessage = {
|
||||
id: string;
|
||||
sender: 'user' | 'assistant';
|
||||
@@ -104,32 +75,6 @@ function RollbackArtifactBody({
|
||||
: decision === 'approved'
|
||||
? 'success'
|
||||
: 'neutral';
|
||||
const evidenceTrail = EVIDENCE_TRAIL.map((stage) => {
|
||||
if (stage.label === 'Does') {
|
||||
return {
|
||||
...stage,
|
||||
description:
|
||||
decision === 'approved'
|
||||
? 'The exact approved rollback ran in production.'
|
||||
: decision === 'declined'
|
||||
? 'The operator declined the rollback; no production change was made.'
|
||||
: stage.description,
|
||||
};
|
||||
}
|
||||
if (stage.label === 'Delivers') {
|
||||
return {
|
||||
...stage,
|
||||
description:
|
||||
decision === 'approved'
|
||||
? 'Operations received the restored timeout rate and verification.'
|
||||
: decision === 'declined'
|
||||
? 'Operations received the decision; the incident remains unresolved.'
|
||||
: stage.description,
|
||||
};
|
||||
}
|
||||
return stage;
|
||||
});
|
||||
|
||||
return (
|
||||
<Section variant="transparent" padding={4}>
|
||||
<VStack gap={2}>
|
||||
@@ -150,28 +95,6 @@ function RollbackArtifactBody({
|
||||
</Text>
|
||||
</VStack>
|
||||
|
||||
<VStack gap={2}>
|
||||
<Heading level={2}>Evidence trail</Heading>
|
||||
<Stepper
|
||||
activeStep={decision === 'pending' ? 4 : 5}
|
||||
density="compact"
|
||||
indicatorPosition="on-track"
|
||||
label="Checkout run evidence trail"
|
||||
orientation="vertical">
|
||||
{evidenceTrail.map((stage, index) => (
|
||||
<Step
|
||||
key={stage.label}
|
||||
step={index}
|
||||
label={stage.label}
|
||||
description={stage.description}
|
||||
status={
|
||||
decision === 'pending' && index === 4 ? 'warning' : undefined
|
||||
}
|
||||
/>
|
||||
))}
|
||||
</Stepper>
|
||||
</VStack>
|
||||
|
||||
<MetadataList
|
||||
columns="single"
|
||||
label={{position: 'top'}}
|
||||
|
||||
@@ -45,21 +45,6 @@ import {BellAlertIcon} from '@heroicons/react/24/outline';
|
||||
export type RunDecision = 'pending' | 'approved' | 'declined';
|
||||
|
||||
type RunStatus = 'approval' | 'completed' | 'failed' | 'declined';
|
||||
type StageName =
|
||||
| 'Hears'
|
||||
| 'Understands'
|
||||
| 'Decides'
|
||||
| 'Defines'
|
||||
| 'Does'
|
||||
| 'Delivers';
|
||||
type StageState = 'complete' | 'waiting' | 'blocked';
|
||||
|
||||
interface RunStage {
|
||||
name: StageName;
|
||||
detail: string;
|
||||
state: StageState;
|
||||
}
|
||||
|
||||
interface Run extends Record<string, unknown> {
|
||||
id: string;
|
||||
title: string;
|
||||
@@ -74,20 +59,10 @@ interface Run extends Record<string, unknown> {
|
||||
proposedAction: string;
|
||||
reversibility: string;
|
||||
policy: string;
|
||||
stages: RunStage[];
|
||||
}
|
||||
|
||||
const PRIMARY_RUN_ID = 'RUN-2041';
|
||||
|
||||
const STAGE_ORDER: StageName[] = [
|
||||
'Hears',
|
||||
'Understands',
|
||||
'Decides',
|
||||
'Defines',
|
||||
'Does',
|
||||
'Delivers',
|
||||
];
|
||||
|
||||
const STATUS_ORDER: RunStatus[] = [
|
||||
'approval',
|
||||
'completed',
|
||||
@@ -122,98 +97,6 @@ const STATUS_DOT_VARIANT: Record<
|
||||
declined: 'neutral',
|
||||
};
|
||||
|
||||
const STAGE_STATE_LABEL: Record<StageState, string> = {
|
||||
complete: 'Complete',
|
||||
waiting: 'Waiting',
|
||||
blocked: 'Blocked',
|
||||
};
|
||||
|
||||
const STAGE_STATE_TOKEN_COLOR: Record<
|
||||
StageState,
|
||||
'green' | 'yellow' | 'gray'
|
||||
> = {
|
||||
complete: 'green',
|
||||
waiting: 'yellow',
|
||||
blocked: 'gray',
|
||||
};
|
||||
|
||||
const STAGE_STATE_DOT_VARIANT: Record<
|
||||
StageState,
|
||||
'success' | 'warning' | 'neutral'
|
||||
> = {
|
||||
complete: 'success',
|
||||
waiting: 'warning',
|
||||
blocked: 'neutral',
|
||||
};
|
||||
|
||||
function checkoutStages(decision: RunDecision): RunStage[] {
|
||||
const decisionState: StageState =
|
||||
decision === 'declined' ? 'blocked' : decision === 'approved' ? 'complete' : 'waiting';
|
||||
|
||||
return [
|
||||
{
|
||||
name: 'Hears',
|
||||
detail:
|
||||
'Checkout monitoring reports a timeout-rate alert after the 09:34 release.',
|
||||
state: 'complete',
|
||||
},
|
||||
{
|
||||
name: 'Understands',
|
||||
detail:
|
||||
'Archie links the 8.1% timeout rise to the release; no other service shows a comparable rise.',
|
||||
state: 'complete',
|
||||
},
|
||||
{
|
||||
name: 'Decides',
|
||||
detail:
|
||||
'Archie recommends a checkout-only rollback to the last healthy release.',
|
||||
state: 'complete',
|
||||
},
|
||||
{
|
||||
name: 'Defines',
|
||||
detail:
|
||||
'The existing checkout rollback workflow defines the exact bounded operation: verify 4.9.0, roll back to 4.8.2, then verify recovery.',
|
||||
state: 'complete',
|
||||
},
|
||||
{
|
||||
name: 'Does',
|
||||
detail:
|
||||
decision === 'approved'
|
||||
? 'The approved rollback reached production and the checkout version changed to 4.8.2.'
|
||||
: decision === 'declined'
|
||||
? 'The operator declined the rollback. Archie made no production change.'
|
||||
: 'Archie waits for the exact operator decision. No production change has been made.',
|
||||
state: decisionState,
|
||||
},
|
||||
{
|
||||
name: 'Delivers',
|
||||
detail:
|
||||
decision === 'approved'
|
||||
? 'Operations received the result: timeout rate returned to 0.4% by 09:46 UTC.'
|
||||
: decision === 'declined'
|
||||
? 'Operations received the decision record; the incident remains unresolved.'
|
||||
: 'Delivery waits until the approval decision and any permitted action are resolved.',
|
||||
state: decision === 'pending' ? 'waiting' : 'complete',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
function resolvedStages(...details: string[]): RunStage[] {
|
||||
return STAGE_ORDER.map((name, index) => ({
|
||||
name,
|
||||
detail: details[index],
|
||||
state: 'complete',
|
||||
}));
|
||||
}
|
||||
|
||||
function failedStages(...details: string[]): RunStage[] {
|
||||
return STAGE_ORDER.map((name, index) => ({
|
||||
name,
|
||||
detail: details[index],
|
||||
state: index === 4 ? 'blocked' : 'complete',
|
||||
}));
|
||||
}
|
||||
|
||||
const BASE_RUNS: Run[] = [
|
||||
{
|
||||
id: PRIMARY_RUN_ID,
|
||||
@@ -233,7 +116,6 @@ const BASE_RUNS: Run[] = [
|
||||
'Moderate risk: checkout may briefly lose capacity during rollout. Release 4.9.0 can be reapplied. The database is unchanged.',
|
||||
policy:
|
||||
'Read-only investigation is allowed. A production rollback needs operator approval. Database changes are blocked.',
|
||||
stages: checkoutStages('pending'),
|
||||
},
|
||||
{
|
||||
id: 'RUN-2040',
|
||||
@@ -253,14 +135,6 @@ const BASE_RUNS: Run[] = [
|
||||
'Low risk. The prior read projection remained available until the replacement passed validation.',
|
||||
policy:
|
||||
'Rebuilding a derived projection is permitted. Changing source payment records requires separate approval.',
|
||||
stages: resolvedStages(
|
||||
'The projection lag alert reported 18,420 stale payment documents.',
|
||||
'Archie verified source-event continuity and isolated the stale read model.',
|
||||
'Archie selected a full projection rebuild with no source-record mutation.',
|
||||
'The operation paused the reader, rebuilt it, and checked the newest document offset.',
|
||||
'The replacement projection rebuilt successfully without changing payment records.',
|
||||
'Payments received a freshness report with 0 documents outside the lag budget.',
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'RUN-2039',
|
||||
@@ -280,14 +154,6 @@ const BASE_RUNS: Run[] = [
|
||||
'No delivery replay occurred. The retained queue can be reviewed without duplicating external side effects.',
|
||||
policy:
|
||||
'External delivery is limited to approved destinations. The policy match must pass before replay starts.',
|
||||
stages: failedStages(
|
||||
'The webhook queue alert reported 2,104 failed deliveries.',
|
||||
'Archie compared each destination with the active recovery allowlist.',
|
||||
'Archie separated approved destinations from two destinations needing review.',
|
||||
'The replay operation was constrained to the approved subset.',
|
||||
'Policy blocked the mixed-destination replay before any message left the queue.',
|
||||
'Operations received the failed-policy decision and the retained queue count.',
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'RUN-2038',
|
||||
@@ -307,14 +173,6 @@ const BASE_RUNS: Run[] = [
|
||||
'Generation 40 remains retained and can be promoted again if parity checks regress.',
|
||||
policy:
|
||||
'Staging cache promotion is permitted because it does not modify source data.',
|
||||
stages: resolvedStages(
|
||||
'The freshness report identified warehouse cache generation 40 as stale.',
|
||||
'Archie compared source and cache generation metadata and found generation 41 intact.',
|
||||
'Archie chose a staged promotion with before-and-after parity checks.',
|
||||
'The operation promoted generation 41 and retained generation 40 as fallback.',
|
||||
'Staging switched to generation 41 and sample queries passed.',
|
||||
'Data Operations received the parity report and active generation.',
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'RUN-2037',
|
||||
@@ -334,14 +192,6 @@ const BASE_RUNS: Run[] = [
|
||||
'The replacement remained behind the healthy pool until lease uniqueness passed; the old worker could be returned if needed.',
|
||||
policy:
|
||||
'Worker replacement is permitted. Sending an ad hoc notification requires a separate workflow and grant.',
|
||||
stages: resolvedStages(
|
||||
'The scheduler reported three missed heartbeats from notifications-7.',
|
||||
'Archie confirmed one retained lease and no customer-visible delay.',
|
||||
'Archie selected a worker rotation without changing notification content.',
|
||||
'The operation drained leases, started a replacement, and checked duplicate claims.',
|
||||
'The replacement joined the pool and every scheduled task had one active lease.',
|
||||
'Notifications Operations received the worker replacement and lease audit.',
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'RUN-2036',
|
||||
@@ -361,14 +211,6 @@ const BASE_RUNS: Run[] = [
|
||||
'No membership update was applied. A renewed credential and a new run can reproduce the proposed difference set.',
|
||||
policy:
|
||||
'Protected groups cannot be reconciled by this workflow. Credential renewal does not authorize protected membership changes.',
|
||||
stages: failedStages(
|
||||
'The scheduled identity sync reported an expired service credential.',
|
||||
'Archie loaded the difference set and found four protected groups among 61 entries.',
|
||||
'Archie separated ordinary group changes from the protected group set.',
|
||||
'The operation required a renewed credential and an allowed destination scope.',
|
||||
'Policy stopped execution before the first membership write.',
|
||||
'Identity Operations received the scope and credential failure report.',
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
@@ -435,7 +277,6 @@ function getRuns(decision: RunDecision): Run[] {
|
||||
: decision === 'approved'
|
||||
? 'Rollback completed; checkout timeouts returned to 0.4%'
|
||||
: 'Operator declined the rollback; no production change was made',
|
||||
stages: checkoutStages(decision),
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -519,28 +360,6 @@ function RunRows({
|
||||
);
|
||||
}
|
||||
|
||||
function StageDetail({stage}: {stage: RunStage}) {
|
||||
return (
|
||||
<ListItem
|
||||
label={stage.name}
|
||||
description={stage.detail}
|
||||
startContent={
|
||||
<StatusDot
|
||||
variant={STAGE_STATE_DOT_VARIANT[stage.state]}
|
||||
label={`${stage.name}: ${STAGE_STATE_LABEL[stage.state]}`}
|
||||
/>
|
||||
}
|
||||
endContent={
|
||||
<Token
|
||||
size="sm"
|
||||
color={STAGE_STATE_TOKEN_COLOR[stage.state]}
|
||||
label={STAGE_STATE_LABEL[stage.state]}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function RunInspector({
|
||||
run,
|
||||
decision,
|
||||
@@ -627,43 +446,6 @@ function RunInspector({
|
||||
|
||||
<Divider />
|
||||
|
||||
<VStack gap={2}>
|
||||
<Heading level={3}>Run path</Heading>
|
||||
<HStack gap={1} vAlign="center" wrap="wrap">
|
||||
{run.stages.map((stage, index) => (
|
||||
<Fragment key={stage.name}>
|
||||
<Token
|
||||
size="sm"
|
||||
color={
|
||||
stage.state === 'complete'
|
||||
? 'green'
|
||||
: stage.state === 'waiting'
|
||||
? 'yellow'
|
||||
: 'gray'
|
||||
}
|
||||
label={stage.name}
|
||||
/>
|
||||
{index < run.stages.length - 1 && (
|
||||
<Icon icon="chevronRight" size="xsm" color="secondary" />
|
||||
)}
|
||||
</Fragment>
|
||||
))}
|
||||
</HStack>
|
||||
<HStack gap={1} wrap="wrap">
|
||||
<Token size="sm" color="purple" label="Governs" />
|
||||
<Token size="sm" color="cyan" label="Assesses" />
|
||||
<Token size="sm" color="orange" label="Manages risk" />
|
||||
<Token size="sm" color="yellow" label="Invokes policy" />
|
||||
</HStack>
|
||||
<List density="compact">
|
||||
{run.stages.map(stage => (
|
||||
<StageDetail key={stage.name} stage={stage} />
|
||||
))}
|
||||
</List>
|
||||
</VStack>
|
||||
|
||||
<Divider />
|
||||
|
||||
<VStack gap={2}>
|
||||
<Heading level={3}>Decision record</Heading>
|
||||
<MetadataList columns="single" label={{position: 'top'}}>
|
||||
@@ -825,7 +607,7 @@ export default function RunsPage({
|
||||
) : (
|
||||
<EmptyState
|
||||
title="No run selected"
|
||||
description="Select a run to see its stages and decision record."
|
||||
description="Select a run to see its decision record."
|
||||
icon={<Icon icon={BellAlertIcon} size="lg" />}
|
||||
isCompact
|
||||
/>
|
||||
@@ -838,7 +620,7 @@ export default function RunsPage({
|
||||
</LayoutContent>
|
||||
}
|
||||
footer={
|
||||
<LayoutFooter hasDivider padding={0} label="Composer">
|
||||
<LayoutFooter padding={0} label="Composer">
|
||||
{composer}
|
||||
</LayoutFooter>
|
||||
}
|
||||
@@ -861,7 +643,7 @@ export default function RunsPage({
|
||||
) : (
|
||||
<EmptyState
|
||||
title="No run selected"
|
||||
description="Select a run to see its stages and decision record."
|
||||
description="Select a run to see its decision record."
|
||||
icon={<Icon icon={BellAlertIcon} size="lg" />}
|
||||
isCompact
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user