test: merge duplicated cases into the stronger one

Every case here restates a rule another test already pins with the same or a
wider input class:

- the activation group case is byte-identical to its neighbour, minus an extra
  assertion; the rule snapshot version guard is re-driven with a second value
  of the same schemaVersion check; the global-mode deployment-failure case is
  a mode-literal copy of the strictly stronger direct-mode one; the clear-
  failure case duplicates the deferred-retry sibling
- two RuntimeDocument projection cases only re-map locals, already asserted as
  full array equality; the IPv6-LAN endpoint case repeats the direct-mode case
  (the derivation reads only ports)
- the three HTTP export cases varied only listenerMode while the derivation
  ignores it and one name contradicted its own expectation; one loop over all
  listener modes now states the real rule
- the 0700/0600 permission baseline is one AtomicFileWriter behavior and stays
  pinned through RuntimeFileStoreTests, which also covers self-heal and atomic
  replace

The command-boundary case keeps its mixed-scenario isolation check (four
commands, four independent adapter counters) and drops only its unfalsifiable
queriedTargetIDs claim.

Co-Authored-By: DeepSeek Harness <noreply@deepseek.com>
This commit is contained in:
Qiu Yuzhou
2026-10-21 01:46:29 +08:00
co-authored by DeepSeek Harness
parent d63d04c114
commit e7116a5ebd
10 changed files with 16 additions and 152 deletions
@@ -318,7 +318,10 @@ final class ProxyControlWorkflowTests: XCTestCase {
// MARK: - 命令边界
func testCommandsTouchOnlyRuntimeAndTargetFactsAdapters() async {
/// 四个命令各自只触达自己的运行时缝:模式命令不派发 agent/系统代理命令,
/// 重同步不派发开关命令;目录激活、订阅刷新、设置保存与诊断导出不在本
/// module 的依赖面上(类型层面不存在这些入口)。
func testCommandsTouchOnlyTheirOwnRuntimeAdapter() async {
await workflow.setAgentEnabled(true)
await workflow.setSystemProxyEnabled(true)
await workflow.setProxyMode(.global)
@@ -328,8 +331,5 @@ final class ProxyControlWorkflowTests: XCTestCase {
XCTAssertEqual(runtime.systemProxyCommands, [true])
XCTAssertEqual(runtime.modeCommands, [.global])
XCTAssertEqual(runtime.resyncCount, 1)
// 目标缝只被 snapshot 组装读取;目录激活、订阅刷新、设置保存与诊断导出
// 不在本 module 的依赖面上(类型层面不存在这些入口)。
XCTAssertFalse(targetFacts.queriedTargetIDs.isEmpty, "每次观察经窄缝取目标事实")
}
}