fix: expose code agent runner provenance
This commit is contained in:
@@ -314,8 +314,13 @@ const requiredCodeAgentEvidenceTerms = Object.freeze([
|
||||
"message",
|
||||
"providerTrace",
|
||||
"codex-stdio",
|
||||
"codex-mcp-stdio-long-lived",
|
||||
"repo-owned-codex-mcp-stdio-session",
|
||||
"codex-app-server-stdio-runner",
|
||||
"codex-app-server-stdio-long-lived",
|
||||
"repo-owned-codex-app-server-stdio-session",
|
||||
"codex-app-server-jsonrpc-stdio",
|
||||
"providerTrace.command",
|
||||
"providerTrace.terminalStatus",
|
||||
"message-runtime-path",
|
||||
"not-codex-stdio",
|
||||
"not-write-capable",
|
||||
"process-local-session-registry",
|
||||
@@ -2554,6 +2559,10 @@ function hasCodeAgentCompletedEvidenceVisibility({ app, codeAgentM3Evidence }) {
|
||||
requiredCodeAgentEvidenceTerms.every((term) => codeAgentEvidenceSource.includes(term)) &&
|
||||
/conversationId:\s*result\.conversationId \|\| result\.sessionId \|\| state\.conversationId/u.test(app) &&
|
||||
/providerTrace:\s*result\.providerTrace/u.test(app) &&
|
||||
/codeAgentRuntimePathFromMessage/u.test(app) &&
|
||||
/function\s+messageRuntimePathPanel\s*\(/u.test(app) &&
|
||||
/providerTrace\.command/u.test(app) &&
|
||||
/providerTrace\.terminalStatus/u.test(app) &&
|
||||
/function\s+messageTracePanel\s*\(/u.test(app) &&
|
||||
/function\s+subscribeRunnerTrace\s*\(/u.test(app) &&
|
||||
/new EventSource\(`\/v1\/agent\/chat\/trace\/\$\{encodeURIComponent\(traceId\)\}\/stream`\)/u.test(app) &&
|
||||
@@ -2582,8 +2591,10 @@ function hasCodeAgentCompletedEvidenceVisibility({ app, codeAgentM3Evidence }) {
|
||||
/isTrustedCodeAgentProvider\(value\?\.provider\)/u.test(realEvidenceBody) &&
|
||||
/isCodexRunnerCapableEvidence\(value\)/u.test(realEvidenceBody) &&
|
||||
/CODEX_RUNNER_CAPABLE_PROVIDERS/u.test(app) &&
|
||||
/codex-mcp-stdio-long-lived/u.test(runnerEvidenceBody) &&
|
||||
/repo-owned-codex-mcp-stdio-session/u.test(runnerEvidenceBody) &&
|
||||
/CODEX_APP_SERVER_RUNNER_KIND/u.test(runnerEvidenceBody) &&
|
||||
/CODEX_APP_SERVER_SESSION_MODE/u.test(runnerEvidenceBody) &&
|
||||
/CODEX_APP_SERVER_IMPLEMENTATION_TYPE/u.test(runnerEvidenceBody) &&
|
||||
/CODEX_APP_SERVER_PROTOCOL/u.test(runnerEvidenceBody) &&
|
||||
/long-lived-codex-stdio-session/u.test(runnerEvidenceBody) &&
|
||||
/isTextFallbackChatResult/u.test(app) &&
|
||||
/value\?\.session\?\.status === "idle"/u.test(runnerEvidenceBody) &&
|
||||
@@ -2655,6 +2666,9 @@ function hasCodeAgentStatusSummaryContract({ html, app, styles, codeAgentStatus
|
||||
/classifyCodeAgentStatusSummary/u.test(app) &&
|
||||
/currentCodeAgentStatusSummary/u.test(app) &&
|
||||
/codeAgent\.status/u.test(app) &&
|
||||
/providerTrace\.command/u.test(app) &&
|
||||
/providerTrace\.terminalStatus/u.test(app) &&
|
||||
/运行路径语义/u.test(app) &&
|
||||
/当前部署 revision/u.test(app) &&
|
||||
/fallback-text-chat-only/u.test(codeAgentStatus) &&
|
||||
/stateless-one-shot/u.test(codeAgentStatus) &&
|
||||
@@ -4288,6 +4302,9 @@ async function inspectJourneyUi(page) {
|
||||
const failedText = [...document.querySelectorAll(".message-card.status-failed")]
|
||||
.map((element) => element.textContent ?? "")
|
||||
.join("\n");
|
||||
const runtimePathText = [...document.querySelectorAll(".message-card.message-agent .message-runtime-path")]
|
||||
.map((element) => element.textContent ?? "")
|
||||
.join("\n");
|
||||
const pendingText = [...document.querySelectorAll(".message-card.status-running")]
|
||||
.map((element) => element.textContent ?? "")
|
||||
.join("\n");
|
||||
@@ -4390,6 +4407,11 @@ async function inspectJourneyUi(page) {
|
||||
tracePreviewTailCapped: tracePanelMetrics
|
||||
.filter((metric) => metric.tailPreviewVisible)
|
||||
.every((metric) => metric.cappedTailCount && metric.traceMode === "tail"),
|
||||
runtimePathVisible: Boolean(document.querySelector(".message-card.message-agent .message-runtime-path")),
|
||||
runtimePathShowsProviderFields: /provider|runnerKind|protocol|implementationType|providerTrace\.command|providerTrace\.terminalStatus/u.test(runtimePathText),
|
||||
runtimePathFallbackNotFull: !/(OpenAI text fallback|source-fixture|SOURCE)[\s\S]{0,120}(真实 runner|repo-owned Codex app-server stdio)/u.test(runtimePathText),
|
||||
runtimePathMcpNotFull: !/(MCP|codex-mcp-stdio-runner|mcp-jsonrpc-stdio)/u.test(runtimePathText) ||
|
||||
(/DEGRADED:MCP|MCP\/其他 runner/u.test(runtimePathText) && !/使用 Responses wire API|wire_api=responses|真实 runner:Codex app-server stdio/u.test(runtimePathText)),
|
||||
noMainAttributionNoise: document.querySelectorAll(".message-card.message-agent .message-attribution, .message-card.message-agent .message-evidence, .message-card.message-agent .code-agent-facts").length === 0,
|
||||
attributionFallbackNotRunnerControl: !/openai-responses-fallback[\s\S]{0,80}(真实 runner|Codex stdio 长会话|workspace-write)/u.test(
|
||||
tracePanels
|
||||
@@ -4855,6 +4877,9 @@ async function runLocalAgentFixtureSmoke({
|
||||
ui.failedRetryActionVisible &&
|
||||
ui.failedTraceActionVisible &&
|
||||
ui.failedActionPanelContained &&
|
||||
ui.runtimePathVisible &&
|
||||
ui.runtimePathShowsProviderFields &&
|
||||
ui.runtimePathMcpNotFull &&
|
||||
!ui.completedMessageVisible
|
||||
)
|
||||
: (
|
||||
@@ -4888,6 +4913,9 @@ async function runLocalAgentFixtureSmoke({
|
||||
ui.traceFullViewEntryVisible &&
|
||||
ui.traceCopyJsonVisible &&
|
||||
ui.traceDownloadVisible &&
|
||||
ui.runtimePathVisible &&
|
||||
ui.runtimePathShowsProviderFields &&
|
||||
ui.runtimePathFallbackNotFull &&
|
||||
ui.noMainAttributionNoise &&
|
||||
ui.attributionFallbackNotRunnerControl &&
|
||||
ui.conversationFactsVisible &&
|
||||
|
||||
Reference in New Issue
Block a user