惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
A
About on SuperTechFans
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
博客园 - Franky
D
Docker
Martin Fowler
Martin Fowler
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
人人都是产品经理
人人都是产品经理
Last Week in AI
Last Week in AI
U
Unit 42
F
Fortinet All Blogs
H
Help Net Security
Blog — PlanetScale
Blog — PlanetScale
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
P
Proofpoint News Feed
月光博客
月光博客
G
Google Developers Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
refactor(tasks): share audit JSON payload formatting · op...
vincentkoc · 2026-06-22 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -103,3 +103,40 @@ export function buildTaskSystemAuditFindings(params: {

103103

},

104104

};

105105

}

106+
107+

type TaskSystemAuditResult = ReturnType<typeof buildTaskSystemAuditFindings>;

108+
109+

export function buildTaskSystemAuditJsonPayload(

110+

result: TaskSystemAuditResult,

111+

params: {

112+

severityFilter?: TaskSystemAuditSeverity;

113+

codeFilter?: TaskSystemAuditCode;

114+

limit?: number;

115+

},

116+

) {

117+

const { allFindings, filteredFindings, taskFindings, summary } = result;

118+

const limit = typeof params.limit === "number" && params.limit > 0 ? params.limit : undefined;

119+

const displayed = limit ? filteredFindings.slice(0, limit) : filteredFindings;

120+

// Preserve the legacy task-only summary while adding combined task-flow counts.

121+

const legacySummary = summarizeTaskAuditFindings(taskFindings);

122+

return {

123+

count: allFindings.length,

124+

filteredCount: filteredFindings.length,

125+

displayed: displayed.length,

126+

filters: {

127+

severity: params.severityFilter ?? null,

128+

code: params.codeFilter ?? null,

129+

limit: limit ?? null,

130+

},

131+

summary: {

132+

...legacySummary,

133+

taskFlows: summary.taskFlows,

134+

combined: {

135+

total: summary.total,

136+

errors: summary.errors,

137+

warnings: summary.warnings,

138+

},

139+

},

140+

findings: displayed,

141+

};

142+

}

Original file line numberDiff line numberDiff line change

@@ -6,9 +6,10 @@ import { writeRuntimeJson } from "../runtime.js";

66

import { listTaskRecords } from "../tasks/runtime-internal.js";

77

import { listTaskFlowAuditFindings } from "../tasks/task-flow-registry.audit.js";

88

import { listTaskFlowRecords } from "../tasks/task-flow-runtime-internal.js";

9-

import { listTaskAuditFindings, summarizeTaskAuditFindings } from "../tasks/task-registry.audit.js";

9+

import { listTaskAuditFindings } from "../tasks/task-registry.audit.js";

1010

import type { TaskRecord } from "../tasks/task-registry.types.js";

1111

import {

12+

buildTaskSystemAuditJsonPayload,

1213

buildTaskSystemAuditFindings,

1314

type TaskSystemAuditCode,

1415

type TaskSystemAuditSeverity,

@@ -73,34 +74,15 @@ function buildTasksListJsonPayload(opts: TasksListJsonArgs) {

7374

function buildTasksAuditJsonPayload(opts: TasksAuditJsonArgs) {

7475

const severityFilter = opts.severity?.trim() as TaskSystemAuditSeverity | undefined;

7576

const codeFilter = opts.code?.trim() as TaskSystemAuditCode | undefined;

76-

const { allFindings, filteredFindings, taskFindings, summary } = toSystemAuditFindings({

77+

const result = toSystemAuditFindings({

7778

severityFilter,

7879

codeFilter,

7980

});

80-

const limit = typeof opts.limit === "number" && opts.limit > 0 ? opts.limit : undefined;

81-

const displayed = limit ? filteredFindings.slice(0, limit) : filteredFindings;

82-

// Preserve the legacy task-only summary while adding combined task-flow counts.

83-

const legacySummary = summarizeTaskAuditFindings(taskFindings);

84-

return {

85-

count: allFindings.length,

86-

filteredCount: filteredFindings.length,

87-

displayed: displayed.length,

88-

filters: {

89-

severity: severityFilter ?? null,

90-

code: codeFilter ?? null,

91-

limit: limit ?? null,

92-

},

93-

summary: {

94-

...legacySummary,

95-

taskFlows: summary.taskFlows,

96-

combined: {

97-

total: summary.total,

98-

errors: summary.errors,

99-

warnings: summary.warnings,

100-

},

101-

},

102-

findings: displayed,

103-

};

81+

return buildTaskSystemAuditJsonPayload(result, {

82+

severityFilter,

83+

codeFilter,

84+

limit: opts.limit,

85+

});

10486

}

10587
10688

/** Writes task list JSON without triggering task maintenance. */

Original file line numberDiff line numberDiff line change

@@ -24,7 +24,6 @@ import {

2424

import {

2525

listTaskAuditFindings,

2626

summarizeRetainedLostTaskAuditFindings,

27-

summarizeTaskAuditFindings,

2827

} from "../tasks/task-registry.audit.js";

2928

import {

3029

getInspectableTaskAuditSummary,

@@ -41,6 +40,7 @@ import {

4140

import { summarizeTaskRecords } from "../tasks/task-registry.summary.js";

4241

import type { TaskNotifyPolicy, TaskRecord } from "../tasks/task-registry.types.js";

4342

import {

43+

buildTaskSystemAuditJsonPayload,

4444

buildTaskSystemAuditFindings,

4545

type TaskSystemAuditCode,

4646

type TaskSystemAuditFinding,

@@ -499,37 +499,22 @@ export async function tasksAuditCommand(

499499

configureTaskMaintenanceFromConfig();

500500

const severityFilter = opts.severity?.trim() as TaskSystemAuditSeverity | undefined;

501501

const codeFilter = opts.code?.trim() as TaskSystemAuditCode | undefined;

502-

const { allFindings, filteredFindings, taskFindings, summary } = toSystemAuditFindings({

502+

const auditResult = toSystemAuditFindings({

503503

severityFilter,

504504

codeFilter,

505505

});

506+

const { filteredFindings, summary } = auditResult;

506507

const limit = typeof opts.limit === "number" && opts.limit > 0 ? opts.limit : undefined;

507508

const displayed = limit ? filteredFindings.slice(0, limit) : filteredFindings;

508509
509510

if (opts.json) {

510-

const legacySummary = summarizeTaskAuditFindings(taskFindings);

511511

runtime.log(

512512

JSON.stringify(

513-

{

514-

count: allFindings.length,

515-

filteredCount: filteredFindings.length,

516-

displayed: displayed.length,

517-

filters: {

518-

severity: severityFilter ?? null,

519-

code: codeFilter ?? null,

520-

limit: limit ?? null,

521-

},

522-

summary: {

523-

...legacySummary,

524-

taskFlows: summary.taskFlows,

525-

combined: {

526-

total: summary.total,

527-

errors: summary.errors,

528-

warnings: summary.warnings,

529-

},

530-

},

531-

findings: displayed,

532-

},

513+

buildTaskSystemAuditJsonPayload(auditResult, {

514+

severityFilter,

515+

codeFilter,

516+

limit: opts.limit,

517+

}),

533518

null,

534519

2,

535520

),