style(copy): punctuation rules and site-wide fix with a CI check (QA U11)

- glossary: 10 punctuation rules (full-width in Chinese, CJK/Latin spacing,
  full-width parens around Chinese, single ellipsis, 「」 quotes, period rules)
- scripts/check-copy-punctuation.mjs: checks string literals, templates and JSX
  text (not comments, types, keys, match/compare strings); --fix, --strict,
  --by-file; wired into deno task ci as check:copy in warn mode
- --fix applied to web, server and contracts; files other lanes were editing
  (subscriptions, sites, browser, agent, auth/account, inventory) left for them
- tests updated for the changed messages

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-28 20:09:29 +08:00
1 parent 9b017906cf
commit 52402864d6
143 files changed
+985 -606

No files matched your search

@@ -113,7 +113,7 @@ export class Scheduler {
});
} catch (err) {
this.leader = false;
this.log.warn({ err: { message: errText(err) } }, "调度器循环出错,稍后重试");
this.log.warn({ err: { message: errText(err) } }, "调度器循环出错,稍后重试");
if (!this.stopped) await this.sleep(retry);
}
}
@@ -121,7 +121,7 @@ export class Scheduler {
/** 上一个执行者中断时留下的 running 状态:标为失败 */
private async recoverInterrupted(): Promise<void> {
const msg = "调度器重启,上次运行中断";
const msg = "调度器重启,上次运行中断";
await this.db
.updateTable("scheduled_job_run")
.set({ status: "failed", error: msg, finished_at: this.now() })
@@ -296,7 +296,7 @@ export class Scheduler {
where r.agent_status is null and a.status = any(${TERMINAL_AGENT})
limit 50`.execute(this.db);
for (const r of rows.rows) {
const summary = (r.summary ?? "").trim() || `Agent 运行结束:${r.status}`;
const summary = (r.summary ?? "").trim() || `Agent 运行结束:${r.status}`;
await this.db
.updateTable("scheduled_job_run")
.set({ agent_status: r.status, summary: summary.slice(0, 4000) })
@@ -305,7 +305,7 @@ export class Scheduler {
if (r.config?.reportAsDecision === true && r.status === "succeeded") {
const ins = await sql<{ id: string }>`
insert into decision (kind, severity, title, summary, subject_type, subject_id, dedupe_key, evidence, agent_run_id)
values ('other', 'info', ${`巡检报告:${r.job_name}`}, ${summary.slice(0, 4000)}, 'agent_run', ${r.agent_run_id},
values ('other', 'info', ${`巡检报告:${r.job_name}`}, ${summary.slice(0, 4000)}, 'agent_run', ${r.agent_run_id},
${`schedule-report:${r.id}`}, ${JSON.stringify({ scheduledJobId: r.job_id, scheduledRunId: r.id })}::jsonb,
${r.agent_run_id})
on conflict do nothing
@@ -315,7 +315,7 @@ export class Scheduler {
await this.ctx.outbox.emit(
this.db,
"decision.created",
{ decisionId: d.id, kind: "other", severity: "info", title: `巡检报告:${r.job_name}` },
{ decisionId: d.id, kind: "other", severity: "info", title: `巡检报告:${r.job_name}` },
{ idempotencyKey: `decision.created:${d.id}` },
);
}