From 0b6aa0f2e38cbd4fed8f1512971d46b3414aad35 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Fri, 5 Jun 2026 14:14:15 +0900 Subject: [PATCH 1/2] feat: align AI Hub UX and Strix GitHub Models --- .github/workflows/strix.yml | 37 ++-- AGENTS.md | 15 +- backend/tests/test_ai_hub_api.py | 4 +- backend/tests/test_release_governance.py | 6 +- .../2026-05-27-strix-openai-direct-only.md | 17 +- ...05-29-strix-full-scan-operational-model.md | 5 +- ...05-29-strix-vertex-model-warning-filter.md | 7 +- frontend/src/app/ai-hub/page.test.tsx | 9 +- frontend/src/components/AIHubLayout.tsx | 198 +++++++++++++++++- .../tests/e2e/ai-hub-source-surface.spec.ts | 17 +- frontend/tests/e2e/dashboard-branding.spec.ts | 8 +- frontend/tests/e2e/helpers.ts | 2 +- scripts/ci/strix_quick_gate.sh | 14 +- scripts/ci/test_strix_quick_gate.sh | 44 ++-- 14 files changed, 306 insertions(+), 77 deletions(-) diff --git a/.github/workflows/strix.yml b/.github/workflows/strix.yml index 6ecb6cccb..8031de077 100644 --- a/.github/workflows/strix.yml +++ b/.github/workflows/strix.yml @@ -24,7 +24,7 @@ on: strix_llm: description: Optional Strix model override for manual evidence runs required: false - default: openai/openai/gpt-4.1 + default: openai/gpt-5 type: string concurrency: @@ -115,25 +115,27 @@ jobs: - name: Gate Strix secrets id: gate env: - STRIX_MODEL: ${{ github.event.inputs.strix_llm || 'openai/openai/gpt-4.1' }} + STRIX_MODEL: ${{ github.event.inputs.strix_llm || 'openai/gpt-5' }} STRIX_OPENAI_API_KEY: ${{ secrets.STRIX_OPENAI_API_KEY }} STRIX_VERTEX_CREDENTIALS: ${{ secrets.GCP_SA_KEY }} - GITHUB_MODELS_TOKEN: ${{ github.token }} + STRIX_GITHUB_MODELS_TOKEN: ${{ secrets.STRIX_GITHUB_MODELS_TOKEN }} run: | strix_model="$(printf '%s' "$STRIX_MODEL" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" case "$strix_model" in - openai/openai/*) + openai/gpt-5* | openai/gpt-[6-9]* | openai/gpt-[1-9][0-9]* | \ + openai/openai/gpt-5* | openai/openai/gpt-[6-9]* | openai/openai/gpt-[1-9][0-9]* | \ + github_models/*) echo 'enabled=true' >> "$GITHUB_OUTPUT" echo 'provider_mode=github_models' >> "$GITHUB_OUTPUT" - sanitized_github_models_token="$(printf '%s' "$GITHUB_MODELS_TOKEN" | tr -d '\r\n')" + sanitized_github_models_token="$(printf '%s' "$STRIX_GITHUB_MODELS_TOKEN" | tr -d '\r\n')" trimmed_github_models_token="$(printf '%s' "$sanitized_github_models_token" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" if [ -z "$trimmed_github_models_token" ]; then - echo '::error::github.token is required for GitHub Models Strix scans.' + echo '::error::STRIX_GITHUB_MODELS_TOKEN is required for GitHub Models Strix scans.' exit 1 fi ;; gpt-5.[4-9]* | gpt-5.[1-9][0-9]* | gpt-[6-9]* | gpt-[1-9][0-9]* | \ - openai/gpt-5.[4-9]* | openai/gpt-5.[1-9][0-9]* | openai/gpt-[6-9]* | openai/gpt-[1-9][0-9]*) + openai-direct/gpt-5.[4-9]* | openai-direct/gpt-5.[1-9][0-9]* | openai-direct/gpt-[6-9]* | openai-direct/gpt-[1-9][0-9]*) echo 'enabled=true' >> "$GITHUB_OUTPUT" echo 'provider_mode=openai_direct' >> "$GITHUB_OUTPUT" sanitized_openai_key="$(printf '%s' "$STRIX_OPENAI_API_KEY" | tr -d '\r\n')" @@ -154,7 +156,7 @@ jobs: fi ;; *) - echo '::error::STRIX_LLM must select GitHub Models openai/openai/*, direct OpenAI GPT-5.4 or newer, or an approved organization Vertex AI model.' + echo '::error::STRIX_LLM must select GitHub Models openai/gpt-5 or newer, direct OpenAI GPT-5.4 or newer, or an approved organization Vertex AI model.' exit 1 ;; esac @@ -169,7 +171,7 @@ jobs: - name: Mask LLM API key if: steps.gate.outputs.enabled == 'true' env: - LLM_API_KEY: ${{ steps.gate.outputs.provider_mode == 'github_models' && github.token || steps.gate.outputs.provider_mode == 'openai_direct' && secrets.STRIX_OPENAI_API_KEY || '' }} + LLM_API_KEY: ${{ steps.gate.outputs.provider_mode == 'github_models' && secrets.STRIX_GITHUB_MODELS_TOKEN || steps.gate.outputs.provider_mode == 'openai_direct' && secrets.STRIX_OPENAI_API_KEY || '' }} run: | # Sanitize CR/LF before masking to prevent broken ::add-mask:: # commands and potential workflow command injection. @@ -185,13 +187,13 @@ jobs: - name: Prepare LLM API key input file if: steps.gate.outputs.enabled == 'true' env: - LLM_API_KEY_SECRET: ${{ steps.gate.outputs.provider_mode == 'github_models' && github.token || steps.gate.outputs.provider_mode == 'openai_direct' && secrets.STRIX_OPENAI_API_KEY || '' }} + LLM_API_KEY_SECRET: ${{ steps.gate.outputs.provider_mode == 'github_models' && secrets.STRIX_GITHUB_MODELS_TOKEN || steps.gate.outputs.provider_mode == 'openai_direct' && secrets.STRIX_OPENAI_API_KEY || '' }} PROVIDER_MODE: ${{ steps.gate.outputs.provider_mode }} run: | sanitized="$(printf '%s' "$LLM_API_KEY_SECRET" | tr -d '\r\n')" trimmed="$(printf '%s' "$sanitized" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" if [ -z "$trimmed" ] && [ "$PROVIDER_MODE" = "github_models" ]; then - echo '::error::github.token is required for GitHub Models Strix scans.' + echo '::error::STRIX_GITHUB_MODELS_TOKEN is required for GitHub Models Strix scans.' exit 1 fi if [ -z "$trimmed" ] && [ "$PROVIDER_MODE" = "openai_direct" ]; then @@ -242,17 +244,19 @@ jobs: - name: Prepare Strix model input file if: steps.gate.outputs.enabled == 'true' env: - STRIX_MODEL: ${{ github.event.inputs.strix_llm || 'openai/openai/gpt-4.1' }} + STRIX_MODEL: ${{ github.event.inputs.strix_llm || 'openai/gpt-5' }} run: | umask 077 strix_llm_file="$RUNNER_TEMP/strix_llm.txt" strix_model="$(printf '%s' "$STRIX_MODEL" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" case "$strix_model" in - openai/openai/*) + openai/gpt-5* | openai/gpt-[6-9]* | openai/gpt-[1-9][0-9]* | \ + openai/openai/gpt-5* | openai/openai/gpt-[6-9]* | openai/openai/gpt-[1-9][0-9]* | \ + github_models/*) printf '%s' "$strix_model" > "$strix_llm_file" ;; - openai/*) - printf '%s' "$strix_model" > "$strix_llm_file" + openai-direct/gpt-*) + printf 'openai/%s' "${strix_model#openai-direct/}" > "$strix_llm_file" ;; gpt-*) printf 'openai/%s' "$strix_model" > "$strix_llm_file" @@ -261,7 +265,7 @@ jobs: printf '%s' "$strix_model" > "$strix_llm_file" ;; *) - echo '::error::STRIX_LLM must select GitHub Models openai/openai/*, direct OpenAI GPT-5.4 or newer, or an approved organization Vertex AI model.' + echo '::error::STRIX_LLM must select GitHub Models openai/gpt-5 or newer, direct OpenAI GPT-5.4 or newer, or an approved organization Vertex AI model.' exit 1 ;; esac @@ -296,6 +300,7 @@ jobs: STRIX_LLM_MAX_RETRIES: 1 STRIX_TRANSIENT_RETRY_PER_MODEL: 2 STRIX_TRANSIENT_RETRY_BACKOFF_SECONDS: 3 + STRIX_FALLBACK_MODELS: ${{ steps.gate.outputs.provider_mode == 'github_models' && 'openai/gpt-5-mini openai/gpt-5-nano' || '' }} STRIX_FAIL_ON_PROVIDER_SIGNAL: "1" STRIX_VERTEX_FALLBACK_MODELS: "" NPM_CONFIG_IGNORE_SCRIPTS: "true" diff --git a/AGENTS.md b/AGENTS.md index cca3142e8..42062d037 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -13,14 +13,15 @@ single files if that makes real repo modules look missing. - Prefer upgrading or removing vulnerable dependencies over downgrading patched packages unless compatibility evidence is recorded in the PR. -- Strix Security Scan uses GitHub Models by default through `github.token`, - `models: read`, `STRIX_LLM=openai/openai/gpt-4.1`, and +- Strix Security Scan uses GitHub Models by default through + `STRIX_GITHUB_MODELS_TOKEN`, `STRIX_LLM=openai/gpt-5`, and `LLM_API_BASE_FILE` pointing at a trusted file containing - `https://models.github.ai/inference`. Keep the GitHub Models endpoint in a - trusted input file and pass the token only through the - provider-scoped Strix child-process key path. Legacy `STRIX_LLM` secrets must - not override PR, push, or scheduled Strix defaults. Vertex remains available - only for manual `workflow_dispatch` evidence when the `strix_llm` input + `https://models.github.ai/inference`; GitHub Models fallbacks use + `openai/gpt-5-mini` and `openai/gpt-5-nano`. Keep the GitHub Models endpoint + in a trusted input file and pass the token only through the provider-scoped + Strix child-process key path. Legacy `STRIX_LLM` secrets must not override PR, + push, or scheduled Strix defaults. Vertex remains available only for manual + `workflow_dispatch` evidence when the `strix_llm` input explicitly selects `vertex_ai/gemini-3.1-pro-preview-customtools` or `vertex_ai/gemini-2.5-flash` with `GCP_SA_KEY`; expose Google/Vertex credentials only for Vertex provider mode. Direct OpenAI GPT-5.4-or-newer diff --git a/backend/tests/test_ai_hub_api.py b/backend/tests/test_ai_hub_api.py index 8f9f0aaba..15639c12a 100644 --- a/backend/tests/test_ai_hub_api.py +++ b/backend/tests/test_ai_hub_api.py @@ -204,7 +204,7 @@ async def scoped_db(): def test_ai_hub_surface_uses_signed_source_evidence(): session = MockSession() session.prompts = [ - _prompt(1, "의사결정 로그 요약"), + _prompt(1, "의사결정 로그 맥락 종합"), _prompt(2, "공유 프롬프트", owner_id="other-user"), ] session.prompts[1].is_shared = True @@ -216,7 +216,7 @@ def test_ai_hub_surface_uses_signed_source_evidence(): assert response.status_code == 200 data = response.json() assert data["summary_cards"][0]["value_text"] == "1" - assert data["prompt_cards"][0]["prompt_title"] == "의사결정 로그 요약" + assert data["prompt_cards"][0]["prompt_title"] == "의사결정 로그 맥락 종합" assert all(card["owner_label"] == "alice" for card in data["prompt_cards"]) assert data["prompt_cards"][0]["prompt_key"].startswith("prompt_") assert "id" not in data["prompt_cards"][0] diff --git a/backend/tests/test_release_governance.py b/backend/tests/test_release_governance.py index bfef15915..46c4860dc 100644 --- a/backend/tests/test_release_governance.py +++ b/backend/tests/test_release_governance.py @@ -198,11 +198,13 @@ def test_strix_workflow_uses_github_models_default_and_narrow_warning_filter() - assert "models: read" in workflow assert "provider_mode=github_models" in workflow assert "strix_llm:" in workflow - assert "github.event.inputs.strix_llm || 'openai/openai/gpt-4.1'" in workflow + assert "github.event.inputs.strix_llm || 'openai/gpt-5'" in workflow assert "secrets.STRIX_LLM ||" not in workflow assert "https://models.github.ai/inference" in workflow assert "LLM_API_BASE_FILE" in workflow - assert "github.token is required for GitHub Models Strix scans" in workflow + assert "STRIX_GITHUB_MODELS_TOKEN is required for GitHub Models Strix scans" in workflow + assert "secrets.STRIX_GITHUB_MODELS_TOKEN" in workflow + assert "openai/gpt-5-mini openai/gpt-5-nano" in workflow assert "vertex_ai/gemini-3.1-pro-preview-customtools" in workflow assert ( "secrets.STRIX_LLM == 'vertex_ai/gemini-3.1-pro-preview-customtools' " diff --git a/docs/plans/2026-05-27-strix-openai-direct-only.md b/docs/plans/2026-05-27-strix-openai-direct-only.md index d58874aca..100de5792 100644 --- a/docs/plans/2026-05-27-strix-openai-direct-only.md +++ b/docs/plans/2026-05-27-strix-openai-direct-only.md @@ -6,13 +6,14 @@ Keep the required Strix security gate on, but make the provider contract unambiguous. The active default route is GitHub Models selected through -`STRIX_LLM=openai/openai/gpt-4.1`, `models: read`, `github.token`, and +`STRIX_LLM=openai/gpt-5`, `STRIX_GITHUB_MODELS_TOKEN`, and `LLM_API_BASE_FILE` pointing at a trusted file containing -`https://models.github.ai/inference`. Legacy `STRIX_LLM` secrets must not -override PR, push, or scheduled Strix defaults. Vertex AI remains available only -for manual `workflow_dispatch` evidence when `strix_llm` -explicitly selects an approved Vertex model with `GCP_SA_KEY`, and direct OpenAI -GPT-5.4-or-newer remains allowed only for manual `strix_llm` selections with +`https://models.github.ai/inference`; GitHub Models fallbacks use +`openai/gpt-5-mini` and `openai/gpt-5-nano`. Legacy `STRIX_LLM` secrets must +not override PR, push, or scheduled Strix defaults. Vertex AI remains available +only for manual `workflow_dispatch` evidence when `strix_llm` explicitly selects +an approved Vertex model with `GCP_SA_KEY`, and direct OpenAI GPT-5.4-or-newer +remains allowed only for manual `strix_llm` selections with `STRIX_OPENAI_API_KEY`. Strix must not route through a generic `LLM_API_KEY` or silently fall back across providers. @@ -30,8 +31,8 @@ silently fall back across providers. ## Implementation - Keep GitHub Models credential handling inside `provider_mode=github_models` - with `github.token` passed through the trusted child-process key file and - `LLM_API_BASE_FILE` pointing at a trusted temp file. + with `STRIX_GITHUB_MODELS_TOKEN` passed through the trusted child-process key + file and `LLM_API_BASE_FILE` pointing at a trusted temp file. - Keep GCP credential gating, Google Cloud authentication, and credential export only inside manual `provider_mode=vertex_ai`, and only for approved Vertex model names. diff --git a/docs/plans/2026-05-29-strix-full-scan-operational-model.md b/docs/plans/2026-05-29-strix-full-scan-operational-model.md index e47b2eb71..652e1163b 100644 --- a/docs/plans/2026-05-29-strix-full-scan-operational-model.md +++ b/docs/plans/2026-05-29-strix-full-scan-operational-model.md @@ -36,9 +36,10 @@ ## Plan 1. Keep the GitHub Models default route with - `STRIX_LLM=openai/openai/gpt-4.1`, `models: read`, `github.token`, and + `STRIX_LLM=openai/gpt-5`, `STRIX_GITHUB_MODELS_TOKEN`, and `LLM_API_BASE_FILE` pointing at a trusted file containing - `https://models.github.ai/inference`. + `https://models.github.ai/inference`, with GitHub Models fallbacks + `openai/gpt-5-mini` and `openai/gpt-5-nano`. 2. Keep legacy `STRIX_LLM` secrets from overriding PR, push, or scheduled defaults. Keep Vertex routes explicit through manual `workflow_dispatch` `strix_llm` selections plus `GCP_SA_KEY`, and keep direct OpenAI explicit diff --git a/docs/plans/2026-05-29-strix-vertex-model-warning-filter.md b/docs/plans/2026-05-29-strix-vertex-model-warning-filter.md index a5bb3e6fb..3ad620773 100644 --- a/docs/plans/2026-05-29-strix-vertex-model-warning-filter.md +++ b/docs/plans/2026-05-29-strix-vertex-model-warning-filter.md @@ -8,10 +8,11 @@ - Project policy treats `Timeout`, `Fatal`, `Warn`, and `Denied` output as failure evidence even when the GitHub job conclusion is success. - The active default route is GitHub Models via - `STRIX_LLM=openai/openai/gpt-4.1`, `models: read`, `github.token`, and + `STRIX_LLM=openai/gpt-5`, `STRIX_GITHUB_MODELS_TOKEN`, and `LLM_API_BASE_FILE` pointing at a trusted file containing - `https://models.github.ai/inference`. Explicit Vertex routes still require - organization `GCP_SA_KEY` credentials. + `https://models.github.ai/inference`; GitHub Models fallbacks use + `openai/gpt-5-mini` and `openai/gpt-5-nano`. Explicit Vertex routes still + require organization `GCP_SA_KEY` credentials. ## Plan diff --git a/frontend/src/app/ai-hub/page.test.tsx b/frontend/src/app/ai-hub/page.test.tsx index 9b03a3676..30525f599 100644 --- a/frontend/src/app/ai-hub/page.test.tsx +++ b/frontend/src/app/ai-hub/page.test.tsx @@ -165,6 +165,11 @@ describe('AIHubPage', () => { } expect(container.textContent).toContain('AI 허브'); expect(container.textContent).toContain('의사결정 로그 맥락 종합'); + expect(container.querySelector('nav[aria-label="AI hub execution checkpoints"]')?.textContent).toContain('맥락 종합'); + expect(container.querySelector('section[aria-labelledby="context-title"]')?.textContent).toContain('맥락 종합'); + expect(container.querySelector('section[aria-labelledby="decisions-title"]')?.textContent).toContain('판단 포인트'); + expect(container.querySelector('section[aria-labelledby="actions-title"]')?.textContent).toContain('실행 항목'); + expect(container.textContent).not.toContain('설명 없음'); clickButton(container, '워크플로우'); expect(container.textContent).toContain('의사결정 로그 맥락 종합 실행 흐름'); @@ -199,7 +204,7 @@ describe('AIHubPage', () => { root?.render(); }); - expect(container.textContent).toContain('AI Hub source evidence를 불러오는 중입니다.'); + expect(container.textContent).toContain('AI 허브 source evidence를 불러오는 중입니다.'); await act(async () => { resolveFetch(jsonResponse(aiHubSurface)); @@ -220,7 +225,7 @@ describe('AIHubPage', () => { await flushAsyncWork(); expect(container.querySelector('[role="alert"]')?.textContent).toContain( - 'AI Hub source evidence를 불러오지 못했습니다.', + 'AI 허브 source evidence를 불러오지 못했습니다.', ); expect(container.textContent).toContain('다시 시도'); expect(consoleError).toHaveBeenCalled(); diff --git a/frontend/src/components/AIHubLayout.tsx b/frontend/src/components/AIHubLayout.tsx index 4f0e1ad25..a1b1c2fa8 100644 --- a/frontend/src/components/AIHubLayout.tsx +++ b/frontend/src/components/AIHubLayout.tsx @@ -1,6 +1,6 @@ "use client"; -import { useEffect, useMemo, useState } from 'react'; +import { useEffect, useMemo, useState, type ReactNode } from 'react'; import { Activity, Bot, @@ -143,7 +143,7 @@ function EmptyState({ title, detail }: { title: string; detail: string }) { function SummaryGrid({ cards }: { cards: SummaryCard[] }) { return ( -
+
{cards.map((card) => (
@@ -169,7 +169,7 @@ function PromptPanel({ prompts }: { prompts: PromptCard[] }) {

{prompt.prompt_title}

-

{prompt.description_text ?? '설명 없음'}

+

{prompt.description_text ?? '프롬프트 설명이 등록되지 않았습니다.'}

@@ -287,6 +287,170 @@ function RunHistoryPanel({ events }: { events: RunEvent[] }) { ); } +function ExecutionCheckpointNav() { + return ( + + ); +} + +function CheckpointSection({ + id, + title, + detail, + children, +}: { + id: string; + title: string; + detail: string; + children: ReactNode; +}) { + const titleId = `${id}-title`; + return ( +
+
+
+

연결 근거

+

+ {title} +

+
+

{detail}

+
+
{children}
+
+ ); +} + +function ContextCheckpoint({ prompts }: { prompts: PromptCard[] }) { + if (prompts.length === 0) { + return ; + } + return ( +
+ {prompts.slice(0, 4).map((prompt) => ( +
+
+
+

{prompt.prompt_title}

+

{prompt.description_text ?? '프롬프트 설명이 등록되지 않았습니다.'}

+
+ +
+
+
+
소유자
+
{prompt.owner_label}
+
+
+
업데이트
+
{formatDateTime(prompt.updated_at)}
+
+
+
+ ))} +
+ ); +} + +function DecisionCheckpoint({ metrics, agents }: { metrics: EvaluationMetric[]; agents: AgentCard[] }) { + const visibleMetrics = metrics.slice(0, 4); + if (visibleMetrics.length === 0 && agents.length === 0) { + return ; + } + return ( +
+
+ {visibleMetrics.map((metric) => ( +
+
+

{metric.metric_label}

+ {metric.score_value} +
+
+
+
+

{metric.trend_text}

+
+ ))} +
+ +
+ ); +} + +function ActionsCheckpoint({ workflows, events }: { workflows: WorkflowCard[]; events: RunEvent[] }) { + if (workflows.length === 0) { + return ; + } + return ( +
+
+ {workflows.slice(0, 4).map((workflow) => ( +
+
+

{workflow.workflow_title}

+ +
+

{workflow.trigger_source}

+

{workflow.evidence_text}

+
+ ))} +
+ +
+ ); +} + export function AIHubLayout() { const [activeTab, setActiveTab] = useState('prompts'); const [surfaceStatus, setSurfaceStatus] = useState('loading'); @@ -313,7 +477,7 @@ export function AIHubLayout() { if (cancelled) return; console.error('AI Hub surface fetch error', getSafeErrorSummary(error)); setSurface(null); - setErrorText('AI Hub source evidence를 불러오지 못했습니다.'); + setErrorText('AI 허브 source evidence를 불러오지 못했습니다.'); setSurfaceStatus('error'); }); return () => { @@ -365,8 +529,8 @@ export function AIHubLayout() {
{surfaceStatus === 'loading' && ( -
- AI Hub source evidence를 불러오는 중입니다. +
+ AI 허브 source evidence를 불러오는 중입니다.
)} @@ -386,6 +550,28 @@ export function AIHubLayout() { {surfaceStatus === 'ready' && surface && ( <> + + + + + + + + + +
{activeTab === 'prompts' && } {activeTab === 'workflows' && } diff --git a/frontend/tests/e2e/ai-hub-source-surface.spec.ts b/frontend/tests/e2e/ai-hub-source-surface.spec.ts index b3095e841..68bf088ba 100644 --- a/frontend/tests/e2e/ai-hub-source-surface.spec.ts +++ b/frontend/tests/e2e/ai-hub-source-surface.spec.ts @@ -39,15 +39,22 @@ for (const viewport of viewports) { } await expect(page.getByRole('heading', { name: 'AI 허브' })).toBeVisible(); - await expect(page.getByText('의사결정 로그 요약')).toBeVisible(); + await expect(page.getByRole('region', { name: '맥락 종합' })).toBeVisible(); + await expect(page.getByRole('region', { name: '판단 포인트' })).toBeVisible(); + await expect(page.getByRole('region', { name: '실행 항목' })).toBeVisible(); + await expect( + page.getByRole('region', { name: '맥락 종합' }).getByRole('heading', { name: '의사결정 로그 맥락 종합' }), + ).toBeVisible(); await page.getByRole('button', { name: /워크플로우/ }).click(); - await expect(page.getByText('의사결정 로그 요약 실행 흐름')).toBeVisible(); + await expect( + page.getByRole('region', { name: '워크플로우' }).getByRole('heading', { name: '의사결정 로그 맥락 종합 실행 흐름' }), + ).toBeVisible(); await page.getByRole('button', { name: /AI 에이전트/ }).click(); - await expect(page.getByText('Primary OpenAI')).toBeVisible(); + await expect(page.getByRole('region', { name: 'AI 에이전트' }).getByRole('heading', { name: 'Primary OpenAI' })).toBeVisible(); await page.getByRole('button', { name: /평가/ }).click(); - await expect(page.getByText('Provider 준비도')).toBeVisible(); + await expect(page.getByRole('region', { name: '평가' }).getByRole('heading', { name: 'Provider 준비도' })).toBeVisible(); await page.getByRole('button', { name: /실행 이력/ }).click(); - await expect(page.getByText('api.llm_providers')).toBeVisible(); + await expect(page.getByRole('region', { name: '실행 이력' }).getByText('api.llm_providers')).toBeVisible(); const horizontalOverflow = await page.evaluate( () => document.documentElement.scrollWidth - document.documentElement.clientWidth, diff --git a/frontend/tests/e2e/dashboard-branding.spec.ts b/frontend/tests/e2e/dashboard-branding.spec.ts index 70ae45b61..4f64f5679 100644 --- a/frontend/tests/e2e/dashboard-branding.spec.ts +++ b/frontend/tests/e2e/dashboard-branding.spec.ts @@ -456,7 +456,9 @@ test('renders Security governance access audit sharing and policy with signed AP await page.screenshot({ path: testInfo.outputPath('security-governance-mobile-scroll.png'), fullPage: false }); await page.goto('/'); - await page.getByRole('button', { name: '워크스페이스 메뉴 열기' }).click(); + const mobileMenuButton = page.getByRole('button', { name: '워크스페이스 메뉴 열기' }).first(); + await expect(mobileMenuButton).toBeVisible(); + await mobileMenuButton.click(); const menu = page.locator('#mobile-workspace-menu'); await expect(menu.getByRole('link', { name: '보안', exact: true })).toHaveAttribute('href', '/security'); await menu.evaluate((element) => { @@ -944,7 +946,7 @@ test('renders source-backed mail account settings across desktop tablet and mobi await expect(page.getByText('OAuth 로그인')).toBeVisible(); await expect(page.getByText('Source readiness')).toBeVisible(); await expect(page.getByText('caldav-primary', { exact: true })).toBeVisible(); - await expect(page.getByText('webdav_src_primary')).toBeVisible(); + await expect(page.getByLabel('Provider source readiness').getByText('webdav_src_primary', { exact: true })).toBeVisible(); await expect(page.getByText('저장된 secret 유지').first()).toBeVisible(); if (viewport.name === 'desktop') { @@ -1219,7 +1221,7 @@ test('renders unique email canonical thread intent with signed API headers', asy } expect(desktopRequest.postDataJSON().candidates).toHaveLength(2); await expect(page.getByText('email.unique_thread_intent.created')).toBeVisible(); - await expect(page.getByText('provider_write_executed=false')).toBeVisible(); + await expect(page.getByLabel('unique email canonical thread').getByText('provider_write_executed=false')).toBeVisible(); await expect(page.getByText(/fingerprint.*thread-q2-root/)).toBeVisible(); const desktopOverflow = await page.evaluate(() => document.documentElement.scrollWidth - document.documentElement.clientWidth); expect(desktopOverflow).toBeLessThanOrEqual(1); diff --git a/frontend/tests/e2e/helpers.ts b/frontend/tests/e2e/helpers.ts index eb6524747..b0549d837 100644 --- a/frontend/tests/e2e/helpers.ts +++ b/frontend/tests/e2e/helpers.ts @@ -132,7 +132,7 @@ const calendarCandidate = { }; const aiHubPrompts = [ - { id: 101, title: '의사결정 로그 요약', description: '출시 일정과 파트너 리스크를 함께 검토합니다.' }, + { id: 101, title: '의사결정 로그 맥락 종합', description: '출시 일정과 파트너 리스크를 함께 검토합니다.' }, { id: 102, title: '계약 리스크 점검', description: '계약서, 첨부, 메일 스레드를 판단 포인트로 정리합니다.' }, { id: 103, title: '후속 실행 항목', description: '답장, 일정, 할 일을 담당자별 실행 흐름으로 나눕니다.' }, ]; diff --git a/scripts/ci/strix_quick_gate.sh b/scripts/ci/strix_quick_gate.sh index 183d8a9a2..1e636643e 100644 --- a/scripts/ci/strix_quick_gate.sh +++ b/scripts/ci/strix_quick_gate.sh @@ -528,6 +528,18 @@ is_github_models_model() { esac } +is_github_models_api_compatible_model() { + case "$1" in + openai/openai/* | github_models/* | \ + openai/gpt-5* | openai/gpt-[6-9]* | openai/gpt-[1-9][0-9]*) + return 0 + ;; + *) + return 1 + ;; + esac +} + is_github_models_api_base() { local api_base="$1" case "$api_base" in @@ -1899,7 +1911,7 @@ resolved_llm_api_base_for_model() { echo "ERROR: LLM_API_BASE must be an https URL when configured." >&2 return 2 fi - if is_github_models_api_base "$llm_api_base_value" && ! is_github_models_model "$model"; then + if is_github_models_api_base "$llm_api_base_value" && ! is_github_models_api_compatible_model "$model"; then echo "ERROR: LLM_API_BASE may route through GitHub Models only when STRIX_LLM uses a GitHub Models model prefix." >&2 return 2 fi diff --git a/scripts/ci/test_strix_quick_gate.sh b/scripts/ci/test_strix_quick_gate.sh index b59896b51..1a0eafbad 100644 --- a/scripts/ci/test_strix_quick_gate.sh +++ b/scripts/ci/test_strix_quick_gate.sh @@ -119,9 +119,9 @@ assert_strix_workflow_pr_trigger_hardened() { assert_file_not_contains "$workflow_file" "STRIX_TOTAL_TIMEOUT_SECONDS:" "strix workflow must not expose total timeout env names in GitHub logs" assert_file_not_contains "$workflow_file" "STRIX_PR_SCOPE_MAX_FILES_PER_BATCH" "strix workflow must not split Strix PR evidence into separate scanner runs" assert_file_not_contains "$workflow_file" "secrets.STRIX_LLM == 'vertex_ai/gemini-3.1-pro-preview-customtools' && 'vertex_ai/gemini-2.5-flash'" "strix workflow must not quarantine the approved Vertex preview model after organization secret visibility is fixed" - assert_file_contains "$workflow_file" "github.event.inputs.strix_llm || 'openai/openai/gpt-4.1'" "strix workflow defaults PR Strix scans to GitHub Models" + assert_file_contains "$workflow_file" "github.event.inputs.strix_llm || 'openai/gpt-5'" "strix workflow defaults PR Strix scans to GitHub Models GPT-5" assert_file_not_contains "$workflow_file" "secrets.STRIX_LLM ||" "strix workflow must not let the legacy STRIX_LLM secret override PR defaults" - assert_file_contains "$workflow_file" "STRIX_LLM must select GitHub Models openai/openai/*, direct OpenAI GPT-5.4 or newer, or an approved organization Vertex AI model" "strix workflow rejects unsupported model inputs" + assert_file_contains "$workflow_file" "STRIX_LLM must select GitHub Models openai/gpt-5 or newer, direct OpenAI GPT-5.4 or newer, or an approved organization Vertex AI model" "strix workflow rejects unsupported model inputs" assert_file_contains "$workflow_file" "vertex_ai/gemini-3.1-pro-preview-customtools | vertex_ai/gemini-2.5-flash)" "strix workflow accepts only exact approved organization Vertex AI models" assert_file_contains "$workflow_file" 'STRIX_VERTEX_FALLBACK_MODELS: ""' "strix workflow disables silent Vertex fallbacks so timeout-class failures fail closed" assert_file_contains "$workflow_file" 'STRIX_FAIL_ON_PROVIDER_SIGNAL: "1"' "strix workflow fails closed on timeout, fatal, warning, denied, or provider failure signals" @@ -139,10 +139,11 @@ assert_strix_workflow_pr_trigger_hardened() { assert_file_not_contains "$workflow_file" "vertex_ai/* | vertex_ai_beta/*" "strix workflow must not accept arbitrary Vertex models" assert_file_contains "$workflow_file" "provider_mode=openai_direct" "strix workflow requires direct OpenAI GPT-5 credentials" assert_file_contains "$workflow_file" "provider_mode=github_models" "strix workflow supports GitHub Models provider mode" - assert_file_contains "$workflow_file" 'LLM_API_KEY_SECRET: ${{ steps.gate.outputs.provider_mode == '"'"'github_models'"'"' && github.token || steps.gate.outputs.provider_mode == '"'"'openai_direct'"'"' && secrets.STRIX_OPENAI_API_KEY || '"'"''"'"' }}' "strix workflow uses provider-scoped LLM key material" - assert_file_contains "$workflow_file" 'LLM_API_KEY: ${{ steps.gate.outputs.provider_mode == '"'"'github_models'"'"' && github.token || steps.gate.outputs.provider_mode == '"'"'openai_direct'"'"' && secrets.STRIX_OPENAI_API_KEY || '"'"''"'"' }}' "strix workflow masks provider-scoped LLM key material" + assert_file_contains "$workflow_file" 'STRIX_GITHUB_MODELS_TOKEN: ${{ secrets.STRIX_GITHUB_MODELS_TOKEN }}' "strix workflow uses the organization GitHub Models token secret" + assert_file_contains "$workflow_file" 'LLM_API_KEY_SECRET: ${{ steps.gate.outputs.provider_mode == '"'"'github_models'"'"' && secrets.STRIX_GITHUB_MODELS_TOKEN || steps.gate.outputs.provider_mode == '"'"'openai_direct'"'"' && secrets.STRIX_OPENAI_API_KEY || '"'"''"'"' }}' "strix workflow uses provider-scoped LLM key material" + assert_file_contains "$workflow_file" 'LLM_API_KEY: ${{ steps.gate.outputs.provider_mode == '"'"'github_models'"'"' && secrets.STRIX_GITHUB_MODELS_TOKEN || steps.gate.outputs.provider_mode == '"'"'openai_direct'"'"' && secrets.STRIX_OPENAI_API_KEY || '"'"''"'"' }}' "strix workflow masks provider-scoped LLM key material" assert_file_not_contains "$workflow_file" "secrets.LLM_API_KEY" "strix workflow must not expose generic LLM_API_KEY for Vertex scans" - assert_file_contains "$workflow_file" "github.token is required for GitHub Models Strix scans" "strix workflow fails closed when GitHub Models credentials are absent" + assert_file_contains "$workflow_file" "STRIX_GITHUB_MODELS_TOKEN is required for GitHub Models Strix scans" "strix workflow fails closed when GitHub Models credentials are absent" assert_file_contains "$workflow_file" "STRIX_OPENAI_API_KEY is required for Strix OpenAI Platform scans" "strix workflow fails closed when direct credentials are absent" assert_file_contains "$workflow_file" 'PROVIDER_MODE: ${{ steps.gate.outputs.provider_mode }}' "strix workflow passes provider mode through env" assert_file_not_contains "$workflow_file" '[ "${{ steps.gate.outputs.provider_mode }}" = "openai_direct" ]' "strix workflow does not interpolate provider mode inside shell condition" @@ -153,9 +154,9 @@ assert_strix_workflow_pr_trigger_hardened() { assert_file_contains "$workflow_file" "https://models.github.ai/inference" "strix workflow routes GitHub Models scans to the inference endpoint" assert_file_contains "$workflow_file" "LLM_API_BASE_FILE" "strix workflow passes the GitHub Models API base through a trusted input file" assert_file_not_contains "$workflow_file" '${{ secrets.STRIX_OPENAI_API_KEY || github.token }}' "strix workflow must not use fallback-secret syntax for LLM API keys" - assert_file_not_contains "$workflow_file" "openai/gpt-5 |" "strix workflow must not accept plain GPT-5 when GPT-5.4 is required" + assert_file_contains "$workflow_file" "openai/gpt-5-mini openai/gpt-5-nano" "strix workflow configures GitHub Models fallback models" assert_file_not_contains "$workflow_file" "openai/gpt-5-*" "strix workflow must not accept older GPT-5 variants when GPT-5.4 is required" - assert_file_contains "$workflow_file" "openai/openai/*" "strix workflow accepts GitHub Models OpenAI model prefixes" + assert_file_contains "$workflow_file" "openai/gpt-5*" "strix workflow accepts GitHub Models OpenAI GPT-5 model prefixes" assert_file_not_contains "$workflow_file" "github/gpt-4o" "strix workflow must not default to an unsupported GitHub Models alias" assert_file_not_contains "$workflow_file" "gemini/gemini-pro-3.1-preview" "strix workflow must not default to Gemini API when GitHub Models is required" assert_file_not_contains "$workflow_file" "if-no-files-found: warn" "strix workflow must not downgrade missing security artifacts to warnings" @@ -168,9 +169,11 @@ assert_strix_workflow_pr_trigger_hardened() { assert_strix_gpt54_model_guard_semantics() { local model="$1" case "$model" in - openai/openai/* | \ + openai/gpt-5* | openai/gpt-[6-9]* | openai/gpt-[1-9][0-9]* | \ + openai/openai/gpt-5* | openai/openai/gpt-[6-9]* | openai/openai/gpt-[1-9][0-9]* | \ + github_models/* | \ gpt-5.[4-9]* | gpt-5.[1-9][0-9]* | gpt-[6-9]* | gpt-[1-9][0-9]* | \ - openai/gpt-5.[4-9]* | openai/gpt-5.[1-9][0-9]* | openai/gpt-[6-9]* | openai/gpt-[1-9][0-9]* | \ + openai-direct/gpt-5.[4-9]* | openai-direct/gpt-5.[1-9][0-9]* | openai-direct/gpt-[6-9]* | openai-direct/gpt-[1-9][0-9]* | \ vertex_ai/gemini-3.1-pro-preview-customtools | vertex_ai/gemini-2.5-flash) return 0 ;; @@ -181,8 +184,8 @@ assert_strix_gpt54_model_guard_semantics() { } assert_strix_gpt54_model_guard_cases() { - if assert_strix_gpt54_model_guard_semantics "openai/gpt-5"; then - record_failure "strix GPT-5.4 guard must reject plain openai/gpt-5" + if ! assert_strix_gpt54_model_guard_semantics "openai/gpt-5"; then + record_failure "strix guard must accept GitHub Models openai/gpt-5" fi if assert_strix_gpt54_model_guard_semantics "gpt-5"; then record_failure "strix GPT-5.4 guard must reject plain gpt-5" @@ -190,8 +193,11 @@ assert_strix_gpt54_model_guard_cases() { if ! assert_strix_gpt54_model_guard_semantics "gpt-5.4"; then record_failure "strix GPT-5.4 guard must accept direct OpenAI gpt-5.4" fi + if ! assert_strix_gpt54_model_guard_semantics "openai-direct/gpt-5.4"; then + record_failure "strix GPT-5.4 guard must accept direct OpenAI openai-direct/gpt-5.4" + fi if ! assert_strix_gpt54_model_guard_semantics "openai/gpt-5.4"; then - record_failure "strix GPT-5.4 guard must accept openai/gpt-5.4" + record_failure "strix guard must accept GitHub Models openai/gpt-5.4" fi if ! assert_strix_gpt54_model_guard_semantics "openai/openai/gpt-5"; then record_failure "strix guard must accept GitHub Models openai/openai/gpt-5" @@ -406,7 +412,7 @@ case "${FAKE_STRIX_SCENARIO:?}" in echo "scan ok with fallback" exit 0 ;; - openai/openai/gpt-5.4) + openai/gpt-5|openai/gpt-5-mini|openai/openai/gpt-5.4) echo "scan ok with GitHub Models fallback" exit 0 ;; @@ -6832,7 +6838,7 @@ run_gate_case "github-models-model-prefix-requires-api-base" \ "" run_gate_case "github-models-api-base-rejected-for-direct-openai" \ - "openai/gpt-5.4" \ + "openai/o4-mini" \ "" \ "2" \ "LLM_API_BASE may route through GitHub Models only when STRIX_LLM uses a GitHub Models model prefix" \ @@ -6843,12 +6849,12 @@ run_gate_case "github-models-api-base-rejected-for-direct-openai" \ "https://models.github.ai/inference" run_gate_case "github-models-model-prefix-with-api-base-succeeds" \ - "openai/openai/gpt-5.4" \ + "openai/gpt-5" \ "" \ "0" \ "scan ok" \ "1" \ - "openai/openai/gpt-5.4" \ + "openai/gpt-5" \ "https://models.github.ai/inference" \ "openai" \ "https://models.github.ai/inference" @@ -6866,11 +6872,11 @@ run_gate_case "github-models-fallback-requires-api-base" \ run_gate_case "github-models-fallback-success" \ "vertex_ai/missing-primary" \ - "openai/openai/gpt-5.4" \ + "openai/gpt-5-mini" \ "0" \ - "REGEX:Strix quick scan succeeded with fallback model 'openai/openai/gpt-5[.]4' in [0-9]+s\\." \ + "REGEX:Strix quick scan succeeded with fallback model 'openai/gpt-5-mini' in [0-9]+s\\." \ "2" \ - "vertex_ai/missing-primary|openai/openai/gpt-5.4" \ + "vertex_ai/missing-primary|openai/gpt-5-mini" \ "|https://models.github.ai/inference" \ "vertex_ai" \ "https://models.github.ai/inference" \ From 3d08ad6778492f2b7ef020f046c8bb85d97ddf88 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Fri, 5 Jun 2026 14:44:00 +0900 Subject: [PATCH 2/2] fix: address AI Hub review follow-ups --- frontend/src/app/ai-hub/page.test.tsx | 2 +- frontend/src/components/AIHubLayout.tsx | 29 +++++++++-------- frontend/tests/e2e/dashboard-branding.spec.ts | 2 +- scripts/ci/test_strix_quick_gate.sh | 32 ++++++++++++++++++- 4 files changed, 48 insertions(+), 17 deletions(-) diff --git a/frontend/src/app/ai-hub/page.test.tsx b/frontend/src/app/ai-hub/page.test.tsx index 30525f599..7887d9479 100644 --- a/frontend/src/app/ai-hub/page.test.tsx +++ b/frontend/src/app/ai-hub/page.test.tsx @@ -165,7 +165,7 @@ describe('AIHubPage', () => { } expect(container.textContent).toContain('AI 허브'); expect(container.textContent).toContain('의사결정 로그 맥락 종합'); - expect(container.querySelector('nav[aria-label="AI hub execution checkpoints"]')?.textContent).toContain('맥락 종합'); + expect(container.querySelector('nav[aria-label="AI 허브 실행 체크포인트"]')?.textContent).toContain('맥락 종합'); expect(container.querySelector('section[aria-labelledby="context-title"]')?.textContent).toContain('맥락 종합'); expect(container.querySelector('section[aria-labelledby="decisions-title"]')?.textContent).toContain('판단 포인트'); expect(container.querySelector('section[aria-labelledby="actions-title"]')?.textContent).toContain('실행 항목'); diff --git a/frontend/src/components/AIHubLayout.tsx b/frontend/src/components/AIHubLayout.tsx index a1b1c2fa8..7c3f2d18b 100644 --- a/frontend/src/components/AIHubLayout.tsx +++ b/frontend/src/components/AIHubLayout.tsx @@ -289,7 +289,7 @@ function RunHistoryPanel({ events }: { events: RunEvent[] }) { function ExecutionCheckpointNav() { return ( -