Skip to content

Commit ff9d999

Browse files
committed
Enforce shared OpenCLI fixture provenance on every Java line
1 parent 004c328 commit ff9d999

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,18 @@ jobs:
3434
java-version: '17'
3535
cache: maven
3636

37+
- name: Verify shared contract fixtures and source lock
38+
working-directory: src/test/resources/opencli-contracts/v1
39+
run: sha256sum --strict -c SHA256SUMS
40+
3741
- name: Verify pinned structured help samples
3842
working-directory: src/test/resources/opencli-contracts/v1/structured-help-1.8.8
3943
run: sha256sum --strict -c SHA256SUMS
4044

45+
- name: Verify pinned browser output samples
46+
working-directory: src/test/resources/opencli-contracts/v1/browser-output-1.8.8
47+
run: sha256sum --strict -c SHA256SUMS
48+
4149
- name: Build and verify with JaCoCo coverage
4250
run: ./mvnw -B --no-transfer-progress clean verify
4351

‎.github/workflows/contracts.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ jobs:
129129
--suite process=io.github.easy4j.opencli.contract.OpenCliProcessContractTest \
130130
--suite process=io.github.easy4j.opencli.contract.OpenCliProcessBoundaryTest \
131131
--suite process=io.github.easy4j.opencli.core.support.SubprocessCleanupFaultTest \
132+
--suite process=io.github.easy4j.opencli.core.support.SubprocessStreamFailureTest \
132133
--suite protocol=io.github.easy4j.opencli.center.ws.OpenCliWsReverseAgentSessionTest \
133134
--suite protocol=io.github.easy4j.opencli.center.ws.OpenCliWsCollectRequestsTest \
134135
--suite protocol=io.github.easy4j.opencli.remote.OpenCliRemoteAgentHttpClientTest \
@@ -186,7 +187,7 @@ jobs:
186187
mvn -version > platform-evidence/maven.txt 2>&1
187188
result=0
188189
mvn -B --no-transfer-progress \
189-
-Dtest=OpenCliErrorEnvelopeTest,OpenCliBrowserResultTest,OpenCliBrowserEvidenceResultTest,OpenCliDiagnosticsTest,OpenCliInvocationContextTest,OpenCliArgvContractTest,OpenCliStructuredArgvContractTest,OpenCliProcessContractTest,OpenCliProcessBoundaryTest,SubprocessCleanupFaultTest,OpenCliWsReverseAgentSessionTest,OpenCliWsCollectRequestsTest,OpenCliProcessPrivacyTest,OpenCliArgSupportTest#shouldKeepConversionExceptionAndNestedCausePrivate,SubprocessExecutionSupportTest#shouldKeepNativePathOutOfDefaultHandlerException \
190+
-Dtest=OpenCliErrorEnvelopeTest,OpenCliBrowserResultTest,OpenCliBrowserEvidenceResultTest,OpenCliDiagnosticsTest,OpenCliInvocationContextTest,OpenCliArgvContractTest,OpenCliStructuredArgvContractTest,OpenCliProcessContractTest,OpenCliProcessBoundaryTest,SubprocessCleanupFaultTest,SubprocessStreamFailureTest,OpenCliWsReverseAgentSessionTest,OpenCliWsCollectRequestsTest,OpenCliProcessPrivacyTest,OpenCliArgSupportTest#shouldKeepConversionExceptionAndNestedCausePrivate,SubprocessExecutionSupportTest#shouldKeepNativePathOutOfDefaultHandlerException \
190191
test > platform-evidence/maven.log 2>&1 || result=$?
191192
tail -100 platform-evidence/maven.log
192193
python scripts/contract_report.py \
@@ -201,6 +202,7 @@ jobs:
201202
--suite process=io.github.easy4j.opencli.contract.OpenCliProcessContractTest \
202203
--suite process=io.github.easy4j.opencli.contract.OpenCliProcessBoundaryTest \
203204
--suite process=io.github.easy4j.opencli.core.support.SubprocessCleanupFaultTest \
205+
--suite process=io.github.easy4j.opencli.core.support.SubprocessStreamFailureTest \
204206
--suite protocol=io.github.easy4j.opencli.center.ws.OpenCliWsReverseAgentSessionTest \
205207
--suite protocol=io.github.easy4j.opencli.center.ws.OpenCliWsCollectRequestsTest \
206208
--suite process=io.github.easy4j.opencli.core.OpenCliProcessPrivacyTest \

‎openspec/changes/enforce-opencli-branch-contract-parity/tasks.md‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
## 1. 基础阶段可先行
88

99
- [ ] 1.1 记录三个精确HEAD和允许差异矩阵,确定first-implementation分支经评审认可。
10-
- [ ] 1.2 建立共享contractfixture目录、来源lock与测试runner,复用现有coverage而不删除其它测试。
10+
- [x] 1.2 建立共享contractfixture目录、来源lock与测试runner,复用现有coverage而不删除其它测试。
1111
- [ ] 1.3 定义完整argv/协议/typed/live分层报告,加入0测试和missingreport失败规则。
1212

1313
## 2. 上游与文档
@@ -19,7 +19,7 @@
1919
## 3. 最终集成门禁
2020

2121
- [ ] 3.1 在C01–C09选定实现完成后,分别在三线执行全部对应正负fixtures,记录HEAD与真实退出结果。
22-
- [ ] 3.2 运行官方OpenSpec逐Change与all strict校验,保存CLI版本和报告;环境失败保持NOT_RUN。
22+
- [x] 3.2 运行官方OpenSpec逐Change与all strict校验,保存CLI版本和报告;环境失败保持NOT_RUN。
2323
- [ ] 3.3 核对Requirement到测试/commit的闭环并进行独立代码评审,才允许勾选和archive。
2424
- [ ] 3.4 提交/推送/PR/发布仅在用户明确授权时执行;观察实际CI,不承诺未发生的远端结果。
2525

@@ -56,3 +56,11 @@ JVM 和平台报告显式登记错误报文、浏览器 typed 结果、上下文
5656
在 `6da93d05` 用两个旧的通过报告和一个成功退出但未执行测试的 Maven 替身复现错误通过。安装契约脚本现在在启动 Maven 前将已有 Surefire 报告归档到 `platform-evidence/pre-install-surefire.*`,本次门禁只读取重新生成的 `target/surefire-reports`。回归中真实执行层从错误的 `PASS` 改为 `FAIL`,执行数为 0,退出码为 1,旧报告仍可回查。
5757

5858
在 `e858cc0`、`6da93d05`、`c22fe45` 加入修复后,三线的 `python3 -m unittest discover -s scripts/tests` 各通过 16 项。使用本地缓存的已安装 OpenCLI 1.8.8 依赖运行同一脚本,Java 8、17、21 分别用本线 Wrapper 实际执行覆盖和只读诊断集成测试,各通过 2 项,零跳过。报告为 `platform-evidence/installed-report.json`。
59+
60+
### OC-PARITY-002/004 共享来源锁定与三线报告核对
61+
62+
基线 Java 8 `876a48a`、Java 17 `004c3286`、Java 21 `a384a5b` 的托管 JVM 报告分别记录 2231、2232、2231 项执行,零失败、零错误、零跳过。对应 Windows 工件的真实安装层各执行 4 项,零跳过。Windows 进程层分别记录 40、38、40 项。Java 17 文件树包含 `SubprocessStreamFailureTest`,但该套件未进入它的平台执行和报告配置。补齐后,JVM 和平台报告都要求该套件执行。
63+
64+
Java 21 基线的共享校验清单引用了未被 Git 跟踪的 `sources.lock.json`,`shasum -a 256 -c SHA256SUMS` 返回非零。从 Java 17 基线恢复相同的来源锁定文件后,三条线均校验 28 个文件。临时副本中追加一个换行会使校验退出 1。三条常规 CI 在 Maven 构建前校验共享来源锁定、结构化帮助及浏览器输出三份清单。
65+
66+
使用 OpenSpec 1.14.1 在三条基线逐项运行 `openspec validate <change> --strict --no-interactive` 并执行 `openspec validate --all --strict --no-interactive`,每条线均通过 10 个变更,退出 0。Java 17 基线的 [托管工件](https://github.com/easy-4-java/opencli-java-sdk/actions/runs/44382023710) 另记录固定版本 1.13.1 的逐项结果和 `all.log`,同样通过。此处记录规格校验与工件事实。独立评审与归档仍按最终门禁验收。

0 commit comments

Comments
 (0)