Qiu Yuzhou
b7a2a6a524
test: 为 Agent 系统代理测试复用小规则夹具
2026-10-04 00:30:43 +08:00
Qiu Yuzhou
7fb736f53e
test: 为代理控制集成测试注入小规则夹具
2026-10-04 00:22:45 +08:00
Qiu Yuzhou
0235e64ad1
test: 拆分运行时测试类并缩短健康等待窗口
2026-10-04 00:06:47 +08:00
Qiu Yuzhou
210c677c1b
docs(ng2): 测试框架政策入 AGENTS.md,新测试默认 Swift Testing
2026-10-03 23:26:09 +08:00
Qiu Yuzhou
45b20d329b
test: 单测开启多 runner 并行执行
2026-10-03 23:26:08 +08:00
Qiu Yuzhou
56ad46bec0
refactor(ui): 分区自挂页级动作与编辑/导出流程,壳收成薄转发
2026-10-03 23:03:30 +08:00
Qiu Yuzhou
9322184310
refactor(ui): 状态卡呈现政策收进 StatusCardModel,壳只挂薄视图
2026-10-03 22:57:04 +08:00
Qiu Yuzhou
a504171c18
refactor(ui): 激活反馈收成共享状态模块,三入口单飞
2026-10-03 22:39:41 +08:00
Qiu Yuzhou
868cfe66ad
refactor(catalog): 激活拒绝结果自含 typed 原因
2026-10-03 22:08:37 +08:00
Qiu Yuzhou
b48e4158b6
refactor(sysproxy): 健康观察任务柄归属观察机,循环体经闭包注入
2026-10-03 20:35:36 +08:00
Qiu Yuzhou
31e9f6e95f
refactor(sysproxy): 观察机写面收成意图命令,字段退回实现
2026-10-03 20:29:15 +08:00
Qiu Yuzhou
f39e32ecd7
refactor(ui): 系统代理失败文案映射三份收成一份
2026-10-03 19:53:22 +08:00
Qiu Yuzhou
94a2873c1c
refactor(ui): 首页包装壳收进 MainWindowView,删 WorkspaceDestinations
2026-10-03 19:53:10 +08:00
Qiu Yuzhou
5c24b65227
refactor(rules): 删 RuleSet 死类型与 updateCustomRules 前文档时代缝
2026-10-03 19:11:30 +08:00
Qiu Yuzhou
edb2c08933
refactor(rules): outcome→文案映射移出视图文件,落回 outcome 类型旁
2026-10-03 19:04:40 +08:00
Qiu Yuzhou
16a2384498
fix(runtime): 收敛票据恒查全部失效事实,agent 关闭不再被旧收敛复活
...
mode/catalog 路径的票据子集缺 .flow/.agentEnabled:agent 关闭落在
mode 切换健康门 await 窗口内会被误分类为失败并触发 restore,把用户
显式的 off 意图静默撤销。删除逐 call site 挑子集的 Checks 政策,
convergenceIsCurrent 恒查 flow/mode/preparation/agentEnabled 四事实;
deployPrepared 的手工 preparation 守卫随之删除。
restore 门禁先行:agent 意图与票据时效先于回滚载荷持久化——竞态下
不再把旧 mode 写回持久层(内存/持久层分叉、用户切换被无声撤销)。
轮询写入守卫对齐同一票据词汇:防火墙轮询 await 恢复后补查代际
(cancel 后不得把 .firewallBlocked 盖回 .off);系统代理健康 Task
post-await 守卫补 agentEnabled。
新增 5 个交错/门禁测试(BlockingProbe/BlockingFirewallChecker 暂停
缝;修复前实测全红:agent 重注册、running 复活、.direct 意图被改回
.global、载荷写回、.failed 误分类);CONTEXT.md 增补 Convergence
ticket 词条。全量 792 测试通过。
2026-10-03 18:44:58 +08:00
Qiu Yuzhou
2f670a4c6b
refactor(rules): decouple saved intent from runtime application
2026-10-03 17:40:05 +08:00
Qiu Yuzhou
57ce356573
refactor(catalog): 目录树投影收进 CatalogTreeSnapshot
...
visibleRows(collapsed:)、serverLeafCount 与共享行类型 CatalogTreeRow
移入树快照,服务器管理侧栏、首页目标树与工作区角标三处各自重走的
遍历归一;HomeServerListState.visibleRows 保留为委托门面,视图与
测试零改动。嵌套菜单构造(TargetCascade)与政策查询
(moveDestinations)非投影重复,有意不动。
2026-10-03 14:29:12 +08:00
Qiu Yuzhou
cde430c5fc
refactor(ui): 服务器表单草稿收成共享 ServerFormFields module
...
新建/编辑两个表单面此前各持 8 个 @State 字段、逐字复制的密码 reveal、
column helper 与字段 ↔ ServerEditDraft 映射;收进 App/ServerFormFields.swift
(草稿 ObservableObject + 表单栅格视图),caller 只剩 load(from:)/draft。
订阅只读禁用、集外加密追加与插件区 facts 参数化;methodChoices 统一后
新建面行为等价(初值恒在集内)。CONTEXT.md 补 Server form draft 术语。
2026-10-03 13:52:33 +08:00
Qiu Yuzhou
aaabb4f7ea
refactor(ui): 订阅与诊断分区自持错误弹窗,塌缩两个 destination 包装壳
...
SubscriptionsView/DiagnosticsView 改为自持 ErrorAlertPresenter 并经
presentingErrors 挂载(与 ServersView 同法),只为转发 presenter 而存在的
WorkspaceSubscriptionsView/WorkspaceDiagnosticsView 整体删除,窗口壳
destinationView 直挂分区视图;WorkspaceHomeView 因承载旧版导入主动弹窗
保留。穿透链 13 个类型减至 11 个,presenter owner 减至 3 个。
2026-10-03 13:29:15 +08:00
Qiu Yuzhou
64ff12dc4c
refactor(ui): 错误弹窗挂载收成 presentingErrors modifier
...
五处逐字复制的 10 行 .alert 样板(窗口壳、三个 destination 包装、服务器
分区)各变一行;ErrorAlertPresenter 的挂载边缘收进 UIErrorAlert.swift,
照 WindowActivationPolicy 的 ViewModifier 先例。AppPresentation 文案
映射边缘不动,presenter 所有权与穿透面不变,零行为变化。
2026-10-03 13:25:19 +08:00
Qiu Yuzhou
b24029acab
refactor(sysproxy): 操作互斥改等待队列,cleanup 静默窗可注入
...
waitForSystemProxyOperation 的 10ms 忙轮询换成 continuation 等待队列:操作
收尾时唤醒全部等待者,等待者再经既有二次门禁竞争下一轮,取消者照旧得到
false 中止——语义与轮询版一致,去掉固定 10ms 延迟与空转。cleanup 每轮
扫描后的 SystemConfiguration 排空静默窗提为注入参数(默认仍 100ms)。
观察机现在可从自身 interface 驱动(策略机抽取的直接收益),新增两个不经
控制器夹具的用例:cleanup-until-quiet 重扫循环(清理期内网络变化触发整轮
重扫,安静后收敛)与并发收敛互斥(进行中操作等收尾而非被跳过)。快车道
779 全绿。
2026-10-03 12:52:04 +08:00
Qiu Yuzhou
eac30c4abd
refactor(sysproxy): 系统代理策略机抽为 SystemProxyObserver 模块
...
ADR-0022 的观察/修复/挂起策略此前溶解在控制器 15 个可变字段里、由
Gate/Inspection/Commands/Health/Mode 五个文件交叉读写。现在策略机独立为
SystemProxyObserver:意图开关、出口可用性、期望配置与健康循环调度以
@MainActor 闭包注入,模块不反向依赖控制器;底层继续只依赖
SystemProxyControlling / helper 注册缝 / 网络变化监视三条既有缝。
- 3 个 @Published 呈现事实随迁,控制器留同名只读门面(测试与诊断面零改动);
adapter 再发布链 merge 观察机 objectWillChange,主队列 hop 语义不变
- 健康循环留在控制器(循环体含运行时健康呈现),任务柄归观察机;
cleanup-until-quiet、网络变化 inspection 调度与操作互斥全部内聚
- 方法体逐字搬运(settings.systemProxyEnabled→isIntentEnabled() 等机械替换),
语义零改动;既有 777 测试全绿
2026-10-03 12:44:20 +08:00
Qiu Yuzhou
21259dde2a
refactor(ui): 主窗口壳停止观察 ProxyRuntimeController,守卫固化
...
服务器分区活动目标标记改从 control.snapshot.activeTarget 取值(out-of-tree
目标仍带 id,值恒等;与首页/状态菜单同一 snapshot 口径)。MainWindowView/
MainApp 删除对 controller 的直接传递,视图层 controller 依赖清零;MainApp
的 @StateObject 保留为组合根寿命锚点。
顺带把「新 UI 禁依赖 controller」固化为 SkeletonTests 禁令 token
(控制器家族按前缀豁免,ProxyRuntimeFacts 为适配器侧 facts 映射豁免);
删除 ErrorPresentation 的 AgentRunState 呈现 overload(生产零调用),
四处测试断言迁到 RuntimeFailureFacts 路径。
2026-10-03 12:00:04 +08:00
Qiu Yuzhou
dbb14dcb88
refactor(ui): 服务器分区活动目标标记收为平值入参
...
ServersView 不再观察 ProxyRuntimeController,与 SidebarRow/
ServerDetailView 的传参先例同法收 activeTargetID: NodeID?;外壳暂仍从
controller 取值,事实源切换随后一提交完成。
2026-10-03 11:44:28 +08:00
Qiu Yuzhou
14fdd493a3
fix(rules-smoke): adapt smoke fixtures to sourceless ProxyRule
...
fcd5645「slim built-in snapshots」移除了 ProxyRule 的 source 字段后 Smoke
target 未同步,构造器多传 source: 导致冒烟编译失败(先于收敛脊柱重构就
存在的破损)。移除冒烟夹具中的 source 实参与不再使用的 RuleSourceIdentity
局部值;来源身份属于浏览集合层,运行时文档与 ACL 只消费 action+match,
夹具语义不变。
2026-10-03 11:21:37 +08:00
Qiu Yuzhou
63845e487b
style: swift-format leftover in convergence spine
2026-10-03 11:14:32 +08:00
Qiu Yuzhou
cb39a13b76
docs: define Runtime convergence in the domain vocabulary
...
「运行时收敛」此前只以不变量描述(有效值未变的提交不做收敛工作)散见于
各条目,现在作为独立词条定义:GUI 侧把派生运行时定义落到部署的操作——
持久化 intent、重展开已提交目录、派生运行时文档、计划执行部署动作、验证
启动健康、失败整体回滚;派生字节未变且运行态健康时不做任何收敛工作。
顺带收录 pre-commit swift-format 对收敛脊柱文件的一处花括号重排。
2026-10-03 11:14:22 +08:00
Qiu Yuzhou
1fed58c903
refactor(rules): drop the dead rule-mode validation seam
...
ruleModeCandidateRules / ruleModeValidation 零生产调用者——生产校验经由
RulesWorkflow 预检与 RuleRuntimeCompiler.compile;控制器内这份薄复制删除。
相关测试断言改为直接调用领域层 RuleRuntimeCompiler.validation(与被删缝
同参同义),遮蔽关系与重排不变性断言原样保留。
2026-10-03 11:13:10 +08:00
Qiu Yuzhou
d7169d9f01
refactor(runtime): route catalog sync through the convergence spine
...
- catalogDidCommit 的 deployed 分支体(派生 + 幂等跳过 + deployPrepared)
与 deploy() 逐语义等价,改走 deploy();runtimeAlreadyConverged 独立机制
删除,plan 空判定由 apply 层的 convergencePlanIsEmpty 统一承担。
- deploy/deployPrepared 返回 ConvergenceResult:被取代的派生按 .superseded
呈现为 .revalidated,其余路径仍由状态面映射。
- reexpand 三-case 开关收敛为 convergeToReexpanded:convergeAgent /
updateSettings / resyncOnLaunch 各变一行;catalogDidCommit 保留按 case
的结构化 outcome 映射。
- 统一设置持久化 epilogue 为 persistSettings:setAgentEnabled /
setSystemProxyEnabled / transitionMode 三处相同 save-fail 语义折叠
(updateSettings 的 throw 变体与级联关闭的 return-nil 变体语义不同,
保持原样)。
- SkeletonTests 运行时适配器豁免名单登记 +Convergence.swift。
2026-10-03 11:08:24 +08:00
Qiu Yuzhou
8587b2e80c
refactor(runtime): unify apply/restore into the convergence spine
...
三份「执行 → 健康门 → 失败回滚」编排骨架(mode 切换 / rules 提交 /
deployPrepared)统一为收敛脊柱的 apply 层:
- apply:幂等跳过(派生契约与运行中运行时逐字节相同 → .unchanged,
不闪 starting、不重走健康门)→ 计划执行 → 健康门(requiresReceipt /
convergeProxyOnSuccess / preserveProxyOnFailure 逐路径参数照旧)→
成功后按 proxyTail 收敛系统代理。
- restore:单一回滚例程 + RollbackPlan 两种载荷 policy(mode 的
settings/mode 回退 + 意图变化强制重收敛;rules 的规则文档恢复)。
restoreRuntimeDocument/relaunchPreviousInstance 删除——计划层对
写契约/信号/注销重注的裁决与旧例程逐场景等价。
- 票据 inout 传参:execute 后的 flow 推进对调用方可见,rules 提交在
apply 之后的时效检查使用推进过的票据。
- ModeTransitionSnapshotForRules 删除,rules 回滚计划在部署入口构建。
行为保持:.run 计划动作全部同步执行,starting 前置不可观测;mode/rules
路径到 apply 时计划必非空,幂等跳过只对 deploy 路径生效(与「有效值未
变的提交不做运行时收敛」不变量一致)。
2026-10-03 10:56:23 +08:00
Qiu Yuzhou
dc35e70798
refactor(runtime): capture convergence tickets instead of hand-checked generations
...
execute 现在返回 RuntimeExecutionOutcome(成功与否 + 本次占用的并发流
代际),mode 与 rules 路径的 24 处手写代际 guard 收拢为 ConvergenceTicket
的 convergenceIsCurrent 检查;两处 flowGeneration + 1 手算随之消失。
行为逐字节保持:mode 路径的 mode 代际仍在派生前捕获、preparation 分量
在派生后推进;rules 路径四个代际事实全查不变。
2026-10-03 10:30:47 +08:00
Qiu Yuzhou
3aae39799a
fix(rules): convert root URL paths to exact domains
2026-10-03 09:56:00 +08:00
Qiu Yuzhou
6e69d92449
feat(rules): convert pathless URL prefixes to exact domains
2026-10-03 09:52:42 +08:00
Qiu Yuzhou
44c56fe7f8
chore(workflow): replace deprecated String(cString:) with UTF-8 decoding
...
inet_ntop 写入 null 结尾缓冲区;按弃用提示先在终止符处截断,再经
String(bytes:encoding:) 解码,行为不变。
2026-10-03 03:40:31 +08:00
Qiu Yuzhou
619121a36c
fix(route): decouple sidebar selection write-back from route publish
...
The same-value guard only stopped same-value selection re-syncs.
After an external navigation (add menu, rule editor dismissal,
manage-servers/show-runtime actions) the sidebar List still held
its stale cached selection and wrote it back into the custom
selection binding during a view update; the resulting publish
warned and would bounce the navigation back. Route the sidebar
selection through a SwiftUI-managed @State with onChange hops in
both directions (selection -> navigate, route -> backfill), anchor
the seed on WorkspaceRoute.initialDestination, and pin the
alignment with a regression test.
2026-10-03 03:38:07 +08:00
Qiu Yuzhou
9530af2a19
fix(helper): box XPC reply closure to cross @Sendable boundary
...
@objc 协议 SystemProxyHelperControlling 里 reply 参数无法标注 @Sendable,
直接被 queue.async 的 @Sendable 闭包捕获即产生并发警告。装箱为
@unchecked Sendable 后跨过边界:XPC 运行时生成的应答块线程安全且恰好
调用一次,引擎在串行工作队列上调用它本就是既有设计,行为不变。
2026-10-03 03:36:39 +08:00
Qiu Yuzhou
1ce96da710
ui: 状态栏图标改用系统 SF Symbol paperplane.fill
...
静态图标不随代理状态切换;StatusMenuLabel 不再观察
ProxyControlWorkflow(control 仅承载启动 resync),并删除
失去唯一引用的 MenuBarIcon.imageset。
2026-10-03 03:11:36 +08:00
Qiu Yuzhou
a5d96dc990
refactor(rules): keep one conversion path
2026-10-03 02:55:48 +08:00
Qiu Yuzhou
842265a8e5
ui: enhance Custom Rule Editor layout with segmented pickers
2026-10-03 02:44:25 +08:00
Qiu Yuzhou
fcd5645b68
refactor(rules): slim built-in snapshots
2026-10-03 02:34:04 +08:00
Qiu Yuzhou
5b7a522b7a
fix(route): make same-destination navigation a no-op
...
The sidebar List selection binding can be written back during view
updates (macOS List/NavigationSplitView selection re-sync on row
content changes); publishing from the setter then triggered the
"Publishing changes from within view updates" runtime warning. Guard
navigate(to:) against same-value writes and pin the no-publish
invariant with a regression test.
2026-10-03 01:17:16 +08:00
Qiu Yuzhou
60cdfc0198
ui: app名称标题使用纸飞机图标
2026-10-03 01:13:53 +08:00
Qiu Yuzhou
589345f484
feat(rules): add batch custom rule deletion ( #80 )
2026-10-03 01:06:02 +08:00
Qiu Yuzhou
17672ff655
feat(rules): add custom rule editor ( #79 )
...
Add versioned sheet-local drafts, normalized previews, custom identity validation,
and explicit saves through the existing rule-document transaction. Preserve UUIDs,
builtin memberships, disabled identities, and deployment recovery outcomes.
Include approved Chinese and English editor copy. Verify public Workflow commands,
the production Controller adapter with hostless tests, and compiled bilingual
resources. Visual acceptance remains manual.
2026-10-03 00:47:06 +08:00
Qiu Yuzhou
e345d772eb
fix(runtime): make ACL deployment transactional
2026-10-03 00:09:42 +08:00
Qiu Yuzhou
e5de11a5fe
perf(rules): share snapshots and reuse commit results
2026-10-02 23:50:59 +08:00
Qiu Yuzhou
73f8358aa2
perf(rules): precompute collection sort keys
2026-10-02 23:04:04 +08:00
Qiu Yuzhou
59ba9dfeff
feat(rules): enhance rule identity documentation and introduce offline testing explanation
2026-10-02 22:38:11 +08:00
Qiu Yuzhou
63cb42da2a
fix(rules): keep enablement feedback stable and accurate ( #78 )
...
Reserve one toolbar status area through saving, deployment, and collection
refresh. Show counted transient success and persistent actionable failures,
with distinct applied, unchanged-runtime, and deferred-save results.
Keep cached rows when collection reload fails. Require explicit refresh
and fresh selection after a version conflict.
Validation: 774 hostless tests passed with local ad-hoc signing. Format,
lint, two-axis review, and isolated Chinese/English view rendering checked.
2026-10-02 22:37:02 +08:00