Skip to content

Integrate OpenCLI C01/C02 contracts on current 2.0 feature branch - #5

Merged
loong10k merged 151 commits into
feature/2.0.xfrom
feature/REQ-20261118-wandl-opencli-contracts-20
Nov 19, 2026
Merged

loong10k merged 151 commits into
feature/2.0.xfrom
feature/REQ-20261118-wandl-opencli-contracts-20

Conversation

@loong10k

@loong10k loong10k commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

Carries former C10/C01/C02 draft #1 onto the current feature/2.0.x base on the required feature/REQ-* branch. All commits from #1 are ancestors. This is an implementation increment for the existing OpenSpec changes, not their completion.

C01 rejects an object whose toString() returns null before it reaches argv or options. C02 enforces bounded stdout/stderr capture, reports OUTPUT_LIMIT with partial evidence, and handles post-spawn watchdog, stream setup, and cleanup failures with structured results. Fault-injection and interruption tests verify owned-child cleanup, interrupt restoration, permit reuse, and uncertain-cleanup quarantine.

C09's HTTP increment removes response-body previews, URL values, remote free-text errors, and parser snippets from SDK-owned logs and public exception messages. A test-only SLF4J Simple binding captures the 503 diagnostic and checks body/URL canaries. Its parser increment removes Jackson snippets from DEBUG logs. Its WebSocket increment excludes configured URLs, raw exception messages and untrusted request IDs from default logs, and uses a fixed error category for unknown execution exceptions returned to the center. The local executor also omits native I/O causes from public exceptions to keep executable paths out of stack traces, while retaining the structured termination reason and partial result. Authorized raw stdout and business error content remain available to the caller; raw HTTP capture stays opt-in.

Current-head verification

At prior head 345306c3164e816dfbe48258d6784cc75ea8e1ad, local JDK 17 JVM suite passed 2074 tests with zero failures/errors/skips. WebSocket URL and session-log canary tests failed before the fix and passed afterward. Exact-head JDK 17 CI and Contracts CI both passed. Prior-head JaCoCo XML reports 2627/3016 covered lines (87.10%), below the unchanged 90% advisory target.

At 6e23120b7ba021a49caa95e4ab56c0b84a380789, local JDK 17 mvn verify passed all 2075 tests. The local spawn failure regression first detected the path canary in the public stack trace, then passed after the fix. JDK 17 CI and Contracts CI passed. Local coverage remains below the 90% advisory target.

Open gates

C02 remaining race/cleanup variants and descendant certainty; C09 remaining local/WS/export privacy matrix; C03–C08 implementation; 1.x/3.x parity; Windows/macOS and live OpenCLI verification; independent review; and the 90% coverage target. Keep this PR draft.

C09 HTTP diagnostics at 1485788e3674d6e7eb72fbd02b2aed82ef49e3d1 now share an SDK-generated correlation ID between the warning and public exception. The loopback 503 regression checks both outputs for the same ID and excludes body and URL canaries. Local Java 17 verify passed 2075 tests. JDK 17 CI and Contracts CI passed.

C09 diagnostic follow-up

611441d32b0b211aa4e9a247ec54186089cd50d9 removes caller-owned browser session names, URLs, and collect routing values from DEBUG diagnostics while retaining the original execution arguments and request values. Both canary cases failed before the change and passed afterward.

129075895167419bb163c4ca95940e1cb84fcd52 maps a JSON null HTTP response to a correlated envelope error and omits invalid argv option names from public exceptions. Regression checks reproduced the uncorrelated null response and option-name leak. A malformed credential-bearing HTTP endpoint also exercises the existing safe transport exception path.

JDK 17 Maven verify passed 2,079 tests with zero failures, errors, or skips. Exact-head CI and OpenSpec and contract CI passed. JaCoCo still reports 87% line coverage against the 90% advisory target. The full C09 matrix and bounded export remain open.

The process canary suite exercises missing executables, nonzero exit, and timeout across JDK lines. It checks SDK diagnostics and exception stacks while verifying authorized stderr remains available after failure. On the new test commit 0e1557f518c4adf43a4e723bcef24f9f4c11be26, JDK 17 Maven verify passed 2,082 tests with zero failures, errors, or skips. OpenSpec strict validation for C09 passed.

The 1.0.x and 3.0.x backports cover SDK process, browser, HTTP, WebSocket, and parser diagnostic projections. Tests reproduced 2 DEBUG leaks, 7 transport/parser failures, and 3 process failures on each line. The final local builds each passed 2,011 tests with zero failures, errors, or skips.

  • 1.0.x feature branch at b7e2f0af7a3ff0e9d7c9f93f92fab4f62acff88a, verified with JDK 8 and installed Maven because the branch wrapper lacked its runtime.
  • 3.0.x feature branch at 03c3bc24e11dd408ac0001a383efafac49258536, verified with JDK 21 and the Maven Wrapper invoked with Bash.

Backport branch CI and promotion are pending. These results cover the SDK-owned logs and exception text tested here. Applications that explicitly log raw results control those logs. The full specification stays open, including bounded diagnostic export and the remaining platform and fault cases.

Explicit bounded export

All three version lines now provide OpenCliDiagnosticExport.export(result, maxBytes). It returns an allowlisted UTF-8 metadata projection with a truncation marker and complete fields only. The SDK keeps no exported copy and performs no I/O. Existing result values and the opt-in HTTP capture are preserved. Five shared tests cover the export contract, including exact-fit and one-byte-short limits. OpenSpec tasks 2.3 and 3.2 are checked with local evidence. C09 remains open for the complete diagnostic and platform matrix.

Version Latest feature head Local tests Remote CI
1.0.x 295f1d32d2b00f7f3d1ae74eb4f95d792b309d9c 2016 JDK 8 passed
2.0.x 97a142dc62a0f04d1cd398c868223a6c600fd06c 2087 JDK 17 passed, OpenSpec and contract checks passed
3.0.x 6fa874a3c811733126350ca75beb750f78ba8956 2016 JDK 21 passed

Maintenance-line promotion and the other PR gates remain pending.

C01/C02 execution parity

The JDK 17 execution fix at 5e6a36c68d2bfa34fc322190ca398bda717c78f5 creates the active watchdog only after spawn. Before the fix, a cancelled submission could call the watchdog factory and an initial factory failure could bypass structured handling. Both red regressions pass, including confirmed owned-child cleanup and permit reuse after post-spawn factory failure.

The JDK 8 and 21 branches now use the same bounded process runtime and argv contracts. Eight legacy lifecycle failures were reproduced on each line. The backports also copy capture limits into reverse-worker settings and restore JaCoCo instrumentation. Empty and whitespace argv values are preserved, nulls are rejected and capture overflow returns OUTPUT_LIMIT with partial evidence.

JDK Exact code commit Local full suite Exact code CI
8 3e1bfb3 2,087 passed Pass
17 5e6a36c 2,088 passed JDK and contracts passed
21 a9d6906 2,087 passed Pass

The lifecycle change records tasks 2.1, 2.2 and 3.3 as verified. JaCoCo line coverage remains below the 90% advisory target. Descendant ownership and cleanup, the remaining supported-OS matrix and continuous-output policy still require acceptance. This PR remains draft.

Cleanup state and Windows argv evidence

A deterministic stream-reader regression failed on all three lines before the fix. When the owned root process has exited and a stream reader is still active at the cleanup deadline, the SDK now retains the observed exit code, preserves the primary cancellation, reports UNCONFIRMED, and quarantines the runtime. Descendant exit still requires separate evidence.

Line Verified feature head Linux full CI Windows macOS
1.0.x ca34757b111dd38676a8cf4484c7ca514512380c Passed 60 passed 60 passed
2.0.x a05e3c01256994db4229bc76b92accb27cccb03d Passed 58 subprocess + 2 installed-launcher tests passed Runner queued at evidence capture
3.0.x 2553de6c68742aff97ebe60f6928b89454a92543 Passed 60 passed Runner queued at evidence capture

The listed platform suites had zero failures, errors, or skips. The JDK 8 native Windows regression preserves spaces, literal quotes, and trailing backslashes in the same argument. The 1.0.x and 3.0.x local full builds each passed 2,089 tests. C02 stays open for descendant ownership, continuous-output acceptance, and completion of the platform matrix.

Bounded network follow contract

Six offline subtests invoke typed browser network --follow against a real JVM child. The fixture validates positional and flag argv, and proves success, excess output, nonzero exit, caller interruption, finite timeout, and rejection before spawn when the deadline is disabled. During the timeout, another invocation using the same executable stays alive and exits successfully after its own release. The pre-existing runtime already satisfied these assertions, so this increment adds regression evidence and documentation.

Feature line Code commit Local full verification GitHub checks
1.0.x 86564e47c30bf8ac5d873178cc501780d760dd10 JDK 8, 2,095 passed Linux CI, platform evidence
2.0.x cddc1466e66c2a32af7cd68b1c18d6233e6a6f66 JDK 17, 2,099 passed Linux CI, contract evidence
3.0.x 884953fcc8a0dff8fd80577c621e17888503f669 JDK 21, 2,095 passed Linux CI, platform evidence

All three local runs passed with zero failures, errors, or skips. For the previous 2.0.x commit a05e3c0, the once-queued macOS subprocess job has passed. A bounded sink policy, descendant ownership and live acceptance on other operating systems remain open.

Live network follow on macOS

The typed SDK entry point ran installed OpenCLI 1.8.6 against Chrome for Testing 158 with Browser Bridge 1.0.22, using a temporary browser profile and a loopback-only HTTP fixture. All three JDK lines passed both cases. The 4.5-second deadline returned EXECUTION_TIMEOUT with 33–34 complete JSONL events. The 2 KiB capture cap returned OUTPUT_LIMIT with exactly 2,048 captured bytes and 11 complete JSONL events on each line. All six outcomes reported ROOT_EXIT_CONFIRMED. The existing daemon and temporary browser remained available for subsequent tab queries.

The runtime evidence is recorded on all three feature branches. JDK 8 · JDK 17 · JDK 21

C03 error decoder design review

SnakeYAML 2.7 was evaluated as a shared Java 8, 17 and 21 dependency in an isolated probe. Each JDK passed 30 assertions with the three recorded OpenCLI 1.8.8 stderr samples and synthetic boundary cases. The default YAML 1.1 resolver changes string values such as no, off and dates. The probe preserved those strings with JSON-compatible scalar resolution and preserved decimal extension values with BigDecimal. Event guards rejected explicit tags, anchors, aliases, extra documents and excessive nesting. The byte budget and duplicate-key checks also passed.

The three feature branches now carry the same upstream fixtures and checksums. The dependency and SDK integration are pending the C03 design review. JDK 8 evidence · JDK 17 evidence · JDK 21 evidence

C02 capture buffer allocation

An 8,193-byte limit previously allowed a single 16,384-byte backing array even though the retained output was capped. The regression reproduced the allocation overrun on JDK 17. The fix caps growth of each capture array while keeping the existing partial prefix, byte counters and truncation status. JVM-wide allocation and concurrent peak usage remain separate measurements.

Local full Maven verification passed with zero failures, errors or skips on all three feature branches. Each branch also passed both real OpenCLI 1.8.6 browser follow cases on macOS. The root process exited after the deadline or the 2 KiB output limit, and the shared daemon served a subsequent tab query. JDK 8: 2,114 tests · JDK 17: 2,115 tests · JDK 21: 2,114 tests

C02 shared runtime saturation

Three clients shared two permits in the offline regression. Two real JVM children each filled stdout to 131,073 bytes and stderr to 65,539 bytes, then waited on the same release marker. Four other calls returned QUEUE_TIMEOUT without starting a child. After release, both owned roots exited and the two calls retained exactly 393,224 bytes combined without truncation. This records the peak in-flight child count and retained capture for the tested workload. JVM heap usage includes other allocations.

OpenSpec task 1.2 is checked on the three feature lines. Local full Maven verification passed with zero failures, errors or skips. JDK 8: 2,115 tests · JDK 17: 2,116 tests · JDK 21: 2,115 tests

C02 inherited process pipes

The new offline regression cancels an SDK-owned JVM after its own child inherits both process pipes. With cleanup grace set to 250 ms, the caller uses a 1,500 ms assertion window for scheduling. The SDK returns CANCELLED, leaves descendant exit unconfirmed, and reports UNCONFIRMED when readers did not drain. The untracked descendant's heartbeat continues after cancellation. The fixture releases it separately.

OpenSpec task 1.1 records the real-process and cleanup-fault regression matrix. Local full Maven verification passed without failures, errors or skips. Tracked descendant ownership and cleanup remain open. JDK 8: 2,116 tests · JDK 17: 2,117 tests · JDK 21: 2,116 tests

C02 lazy capture allocation

Queued and pre-cancelled calls previously reserved up to 16 KiB of capture array capacity per invocation even without output. Each stream now allocates capture storage on its first nonempty write, with the prior growth cap. The pre-cancelled path reports zero capacity for both capture buffers. This measurement excludes JVM object overhead and active readers' working buffers.

Two targeted assertions failed before the fix. The JDK 17 focused suite passed 33 cases afterward. Full local Maven verification across the three feature lines passed with zero failures, errors or skips. JDK 8: 2,117 tests · JDK 17: 2,118 tests · JDK 21: 2,117 tests

C02 blocking native stop

Two fault-injection cases stalled the native graceful and forced stop calls, one on explicit cancellation and one through the Commons Exec watchdog. Both callers exceeded the assertion window before the change. The SDK now submits graceful and forced stop separately, at most once each per invocation. The watchdog callback does not hold its lock across a native stop. If stop is still pending at cleanup deadline, the result keeps its original cancellation or timeout, leaves the exit code unknown when unobserved, reports UNCONFIRMED, and quarantines the runtime.

JDK 17 focused verification passed 29 tests. Full local Maven verification passed on three feature lines with zero failures, errors or skips. Platform workflows now require nonempty cleanup-fault evidence. The change covers the already owned root process. Descendant ownership stays open. JDK 8: 2,119 tests · JDK 17: 2,120 tests · JDK 21: 2,119 tests

Six live browser follow checks passed at the fixed heads on macOS with OpenCLI 1.8.6. Each line returned ROOT_EXIT_CONFIRMED after the 4.5-second deadline and 2 KiB output cap. The partial stdout retained 34 and 11 complete loopback events respectively. After both invocations, the same daemon and fixture browser served a subsequent tab query.

C01 queued argv snapshot and verification

The new process-boundary test holds a shared permit with one real JVM child, submits another call with a mutable list, and changes that list after snapshotting. After release, the receiving child reports the original full argv, including the empty value, padded Unicode value and original length. The caller's list contains only the caller's changes.

Historical JDK 17 replay produced the expected RED results. The raw-argv checkpoint cdc8b66 failed 21 of 33 tests. The ordered request checkpoint d02b16d failed 10 of 10 tests. The current focused suite passed all 45 assertions. Full local builds passed with zero failures, errors or skips. C01 now records seven verified tasks across all three feature lines. Task 3.4, the review and archive gate, remains open. JDK 8: 2,120 tests · JDK 17: 2,121 tests · JDK 21: 2,120 tests

The first Windows run of the new queued snapshot test used a Java echo child and received ??? for the three Chinese characters. Its corrected fixture uses the same native Node echo configuration as the existing Windows argv suite. It still asserts the complete original Unicode tokens. The production code is unchanged in this fixture adjustment. The corrected local focused run passed 45 tests on each JDK. Original Windows failure · JDK 8 fixture fix · JDK 17 fixture fix · JDK 21 fixture fix

C05 retired WebSocket generations

A loopback regression blocks endpoint calculation, calls stop(), then resumes the connection thread. Before the change, the retired worker still registered with the center. Session publication now shares the stop boundary, and retiring a socket clears only that generation. Registration, message admission, and late asynchronous result sends check the current generation. Results retained for a verified TLS center remain replayable on an explicit retry. The regression matrix also covers early collect, invalid IDs, overload, deduplication, disconnect and terminal close.

C05 tasks 1.1 and 1.2 now point to the loopback acceptance evidence. The broader lifecycle model and final platform validation remain open. Local full Maven verification passed with zero failures, errors or skips. JDK 8: 2,121 tests · JDK 17: 2,122 tests · JDK 21: 2,121 tests

C05 restartable stop

The old worker kept running an active CLI after stop() returned. Now stop retires its connection and drops queued requests while allowing in-flight work up to five seconds to finish. Outstanding work then receives an invocation-owned cancellation signal. Discarded items release their reservations. Started tasks retain reservations until execution settles. A new connection reuses the same bounded worker pool. Terminal close() still requests cancellation immediately and rejects a subsequent start.

The loopback regression fills the queue while a real CLI child writes a heartbeat under a 20-second command deadline. It checks the stop wait, cancellation of the active process, discarded work, and successful collection after restart. C05 task 2.4 is recorded on all three feature lines. The final platform resource matrix remains open. JDK 8: 2,122 tests · JDK 17: 2,123 tests · JDK 21: 2,122 tests

C05 registration phases and bounded ingress

Each connection now progresses through CONNECTING, REGISTERING and READY, and retires independently. The JSON reader requires a single complete object for registration. A synthetic concatenated acknowledgement previously admitted a collect before a valid reply; it now leaves the worker unregistered. The WebSocket decoder enforces a configurable finite inbound limit, 1 MiB by default, on complete and fragmented messages before a collect can be queued. Oversized inputs close their connection and require a fresh registration.

Three targeted cases reproduced the old behavior. The corrected JDK 17 focused suite passed 34 tests. All full local Maven suites passed with zero failures, errors or skips. C05 task 2.1 is recorded on all three feature lines. JDK 8: 2,128 tests · JDK 17: 2,129 tests · JDK 21: 2,128 tests

C05 failed result delivery and legacy compatibility

A real child completes one invocation and the loopback fixture injects a failure on the first result send. Formerly the worker stayed on the failed connection. The worker now retires that socket, reconnects and registers again. It sends no automatic replay. After the same verified TLS center explicitly retries, it receives the cached success with error: null and the child count stays one. The send exception canary is absent from captured logs.

The existing register, pong and non-cached result envelopes were also checked for exact field counts and expected values. C05 tasks 3.1 and 3.2 are recorded on all three feature lines. The next section records the resource accounting. JDK 8: 2,129 tests · JDK 17: 2,130 tests · JDK 21: 2,129 tests

C05 saturation, disconnect and terminal resource evidence

The loopback regression holds two real CLI children active, queues one request, rejects an overflow, and reconnects before terminal close. Each active child starts once. The queued and overflow requests never start. The test observes two collect threads, one runner and four stream readers during the workload. After close, those SDK threads and any SDK stop workers are gone and both child heartbeats have ceased. Surefire records the measured counts.

Local verification now covers all nine C05 tasks on the three feature lines. This change remains in the draft pending the broader PR gates. JDK 8: 2,130 tests · JDK 17: 2,131 tests · JDK 21: 2,130 tests

C09 default exception chains and privacy matrix

Two failures leaked private values in a full rendered stack. A caller-provided option object's conversion included a nested cause and suppressed value canary. The default low-level process result handler included a native executable path. Both default diagnostics now use fixed summaries. The explicit low-level RunSession.getIoFailure() remains available for authorized raw I/O evidence. The new real-child Adapter DEBUG case verifies that logging prints argument count and the authorized stderr retains the original content.

The existing local-process, HTTP, WebSocket, JSON parser and bounded export matrix passed on all three JDKs. The unimplemented C03 YAML decoder remains a separate privacy review item. JDK 17 and 21 also retain the concurrent Intel macOS CI change. JDK 8: 2,133 tests · JDK 17: 2,134 tests · JDK 21: 2,133 tests

Hosted C09 regression evidence

The hosted subprocess workflows select both exception-privacy regressions. The uploaded Surefire XML confirms that the two methods ran and passed in each completed job, with zero skips in those cases.

Feature line Hosted runner results
JDK 8, db70054 Windows and Intel macOS passed. Run
JDK 17, f2e9e03 Windows, Intel macOS and ARM macOS passed. Branch-specific JVM and OpenSpec strict jobs passed as well. Run
JDK 21, 2c4ddeb Windows, Intel macOS and ARM macOS passed. Surefire XML confirms both privacy regressions on each runner. Run

C04 legacy HTTP response envelopes

A loopback POST /collect fixture exposed seven mismatches. Missing and null status were classified as command failures. Coerced booleans, a numeric error, duplicate fields and concatenated JSON could produce success. The legacy client now requires one JSON object with an explicit boolean success. Invalid shapes produce OpenCliRemoteProtocolException, a subtype of the existing executable-failure exception, with correlation metadata and no parser cause. Valid commands still allow omitted or null items and keep the existing empty array result.

Each line passed all 20 HTTP fixture cases in its full local clean verify. There were zero failures, errors or skips. OpenSpec strict validation passed all ten changes on each line.

Feature line Verified head Local tests GitHub workflow
JDK 8 e725db20be6ca3710802c0181fc3cec8ff87b4de 2144 Platform contracts
JDK 17 cf9360e99647c935d7ee10c87a391ed602647682 2145 OpenCLI Contracts
JDK 21 f0f880b61315de75b4469eb3efb744c956a4cf74 2144 Platform contracts

The fixture covers the SDK boundary. The remaining C04 work includes lossless request admission, finite HTTP body limits, a total deadline, and explicit remote outcome and exit provenance.

C04 legacy HTTP request admission

The executor now rejects Browser sessions, root commands, external passthrough and ambiguous or lossy argv before contacting legacy /collect. A known SDK adapter name can no longer redirect an explicit external passthrough call to HTTP. Local passthrough retains the public executor override. The explicit OpenCliCollectRequest path remains available for applications that have verified their Agent deployment contract.

A loopback regression rejects 16 input forms with zero requests and separately checks the same-name external passthrough. The supported npm search case sends one request and verifies the actual JSON site, command, positional argument and option value. Before the fix, 15 of the 16 rejection cases failed and the same-name passthrough reached the HTTP path. The original local override regressions and all 38 HTTP tests passed in each current full build.

Feature line Local clean verify Verified head GitHub contracts
JDK 8 2162 passed a595434f2cf47f07b6d92f086e39122a96a68f7f Workflow
JDK 17 2163 passed 624e7586da0317e4ae36fa06b1e2d4b01d91004d Workflow
JDK 21 2162 passed 866c65e3ff1c875f00dd4323d60deaad7cd6f041 Workflow

Zero failures, errors or skips. OpenSpec 1.14.1 strict validation passed all ten changes on every line. Per-deployment command and option support still requires server evidence. Response limits, total deadline and explicit outcome and exit provenance remain open.

C04 bounded legacy HTTP bodies

The SDK now reads at most the configured decoded body size plus one byte to detect overflow. The positive maxRemoteResponseBytes setting defaults to 10 MiB. Fixed-length, chunked and gzip responses share this limit, including non-2xx responses and opt-in raw capture. OpenCliRemoteResponseLimitException retains the actual HTTP status, byte limit and correlation ID without a raw body or partial result.

The baseline failed four new checks. After the fix, the loopback server could leave an oversized chunked response open and the SDK rejected it before EOF. Test coverage includes HTTP 200 and 503, compressed bytes below the cap with decoded bytes above it, exact UTF-8 byte counts, a declared non-UTF-8 charset, invalid configuration with zero requests, and reusing the same client after overflow.

Feature line Verified head Local full verify GitHub workflow
JDK 8 c3789a279de96296d8ccefe66d3870cdaa94003b 2168 Platform contracts
JDK 17 bf05ba69dbaaa27002c874ce72b4bee2707c3f64 2169 OpenCLI Contracts
JDK 21 7f17d7532eb8775350d95572fae087e500db9718 2168 Platform contracts

All 44 HTTP cases passed within each full local build, with zero failures, errors or skips. OpenSpec 1.14.1 strict validation passed all ten changes per line. The total HTTP deadline, authenticated fixture and remote outcome and exit provenance remain open.

C04 total legacy HTTP budget

The existing Apache HttpClient transport now exposes a per-request abort handle. Connection-pool waiting, the connection and bounded response I/O share the remaining monotonic invocation budget. An expired budget before submission sends no request. An expired submitted request aborts its own I/O and raises OpenCliRemoteTimeoutException with isRemoteOutcomeUnknown() set. The SDK sends no automatic retry or redirect replay. A timed-out call leaves the client's pool usable. JVM system settings and TLS verification remain active.

The baseline let a 900 ms budget overrun the three-second test window while the Agent sent a chunk every 125 ms. The regression now observes a timeout after one dispatch, with no partial result and a successful subsequent invocation on the same client. Separate fixtures cover zero requests after local budget exhaustion and no replay after an HTTP 307. The previous byte-limit, gzip, charset, diagnostic and malformed-envelope checks passed as well.

Feature line Verified head Local full verify GitHub workflow
JDK 8 9aec36c0e2566d126f78bf15b52acef8461963c9 2171 Platform contracts
JDK 17 8d826a11a5f56c926c1df4946e07390caa65dc0c 2172 OpenCLI Contracts
JDK 21 869bef639c4e9b00c2f298ff70132f16f02be932 2171 Platform contracts

All 47 HTTP cases and all ten strict OpenSpec validations passed on every line. The full local builds had zero failures, errors or skips. This verification covers loopback HTTP transport I/O. System DNS resolver stalls, local parsing delays, an authenticated Agent deployment, and explicit remote exit provenance require additional evidence.

C04 legacy HTTP outcome and exit provenance

OpenCliRemoteExecutionDetails identifies the HTTP status, validated Agent business status, response outcome and items source independently. A valid business envelope still maps to the compatibility exit 0 or 1, labeled SYNTHETIC_COMPATIBILITY. The legacy protocol provides no observed process exit. HTTP and protocol failures expose their status and failure category through the exception's partial result, with no exit code. The bounded, accepted body is available only through opt-in raw capture. Diagnostic export labels the exit source before the numeric value.

The focused baseline failed 13 new provenance assertions, including HTTP 200 with a business failure, HTTP 503, absent items and malformed envelopes. The updated suites also verify null versus absent items, safe diagnostics and explicit capture of a bounded 503 response.

Feature line Verified head Local full verify GitHub workflow
JDK 8 eb9e951728324b88d19c9442ab02d12adbe018c5 2172 Platform contracts
JDK 17 106585e16ea67c6bfde5fc827b1913e4bc73cec9 2173 OpenCLI Contracts
JDK 21 2555ab94e01bac0791dce8d38b1a713db8ca9ec0 2172 Platform contracts

All 48 HTTP fixture cases and all ten OpenSpec strict validations passed on each line. The local suites reported zero failures, errors and skips. Authentication headers and the real Agent deployment contract still require acceptance evidence.

C04 explicit HTTPS credential headers

The SDK accepts one explicitly configured credential header through OpenCliRemoteAuthentication. It sends the header on /collect over verified HTTPS. Plain HTTP with a credential and a base URL containing user information, a query or a fragment fail before dispatch. Invalid header names and control characters fail during configuration. Challenge-based authentication and redirect replay are disabled. Local execution copies omit this configuration.

A loopback HTTPS Agent fixture accepts only the specified test header. The SDK rejects the fixture's untrusted certificate before the handler receives a request. After trust is installed, the handler observes the credential in the header and sees no credential in the URL or JSON. A 401 with a reflected credential leaves the default diagnostics, exception stack and raw-disabled failure snapshot free of the value. Removing the credential produces one unauthenticated request and no implicit retry. The prior WebSocket fixtures now share the same test certificate helper.

Feature line Verified head Local full verify GitHub workflow
JDK 8 c03aac008df9b7868530b73ab9d60bf969afd858 2178 Platform contracts
JDK 17 b40ed5a91ed357478fe0f05b4936e4ac3508ec31 2179 OpenCLI Contracts
JDK 21 1ee75dc15f55ffe10d8c93ee4502db05048dc039 2178 Platform contracts

All 54 HTTP cases, 26 WebSocket session cases, and 10 strict OpenSpec changes passed on every line. Full local builds had zero failures, errors or skips. This acceptance covers the synthetic Agent fixture. Production Agent authorization and command support remain unverified.

C06 real OpenCLI 1.8.8 help fixtures

The published OpenCLI 1.8.8 package and locked tag 8271afc produced nine identical pairs of stdout captures across two isolated runs. Both runs used descriptive commands only. Raw samples and SHA-256 checks are retained on the three feature lines.

  • Root, browser tab and get groups, browser state, meta auth and npm catalog and search outputs are JSON. The root site list is nested under the site_adapters object. Browser paths retain the literal <session> placeholder and separate command, namespace and global options.
  • On this exact release, browser --help -f json appends human-readable examples after the JSON object. list --help -f json emits plain text. Both are retained unchanged as negative fixtures.

Capture evidence

Feature line Verified head Local full verify GitHub workflow
JDK 8 bc630bb166dada9a45971c4bd6f818aab24f4807 2181 Platform contracts
JDK 17 3406ee03b8751cebbd6c68d510c04c634cff3f69 2182 OpenCLI Contracts
JDK 21 e769bb61b85eec050e31607c161bd425795191a0 2181 Platform contracts

Three fixture checks and all ten OpenSpec strict validations passed per line. The full local builds had zero failures, errors or skips. C06 task 1.1 has capture evidence. Runtime discovery and typed binding remain open.

C06 structured help parser

Parses the seven captured JSON help responses from OpenCLI 1.8.8 and preserves command hierarchy, session placeholders, positional arguments, scoped options, explicit defaults and unknown fields. The result retains exact stdout. Text output, mixed JSON/text, invalid JSON and schema mismatches return UNKNOWN. Live discovery, freshness, execution binding and platform acceptance remain open.

Maintenance line Verified source commit Local clean verify Hosted workflow
JDK 8 af62b295c3166c32951ea2dd3238b6290a0dd3b3 2,185 passed Platform contracts
JDK 17 1ff63779142004331660da11226aaa3e53b5dd44 2,186 passed Contracts, CI
JDK 21 6a500818406d244c4104c79c60699eb6d1cf7572 2,185 passed Platform contracts

Each maintenance line passed 10 strict OpenSpec validations. The final commits preserve the tested Java, Maven and fixture contents after rebasing onto the workflow updates.

C06 bounded local root discovery

OpenCliClient.discoverCapabilities() runs fixed version and root-help probes on the caller-trusted absolute local executable, sharing the existing process runtime. It returns the observed version, executable, observation time, configuration digest and root help digest. Truncation, timeout and old-format help have explicit failure states. The tests verify that a failed discovery leaves explicit local invocation available. Command origin remains unresolved and scope is root help.

JDK Feature commit Local clean verify GitHub execution
8 ad77458d80f16992319d5bde49230b62adfa0d6b 2,191 passed Platform contracts
17 b22796f3c4c0b7688fafb42ad26dbaa5a1078f25 2,192 passed Contracts
21 7d85857304aaed42fdeb539adbbe4bc181313794 2,191 passed Platform contracts

Three isolated live executions of pinned OpenCLI 1.8.8 on Node 24.18.0 returned AVAILABLE, version 1.8.8, and identical root help SHA-256 a2c5736472fc773da7c7c34a913192374672c7afcc2111bf01854c5f72979b7f, matching the archived fixture. OpenSpec strict validation passed 10/10 on each branch. Detailed help queries, cache invalidation and STALE handling, and typed execution remain open.

C06 stale snapshot fallback

Each client keeps one successful root snapshot and explicitly re-probes on every request. A failed refresh under the same configuration and with no different observed version returns STALE and preserves the earlier observation time, schema and hash. The failed observation is available separately. A changed configuration or observed version invalidates the snapshot, and an older concurrent completion cannot replace a newer published result.

JDK Remote feature commit Local clean verify GitHub execution
8 57ddf453068991c88b5078a868bf51c6adc6b9a6 2,197 passed Platform contracts
17 532cf673b7ecf7b337e09c3b50c36a0b4ded9f1c 2,198 passed Contracts, CI
21 c8a5b17c0b847fc8ce8739549d6567b1676d1f07 2,197 passed Platform contracts

No failures, errors or skips. Each line passed 10 strict OpenSpec validations. An isolated pinned OpenCLI 1.8.8 run on each line initially matched the canonical root-help fixture, returned STALE when a local fixture injected a nonzero help exit, then returned AVAILABLE again with the same digest after removing the fault. Scope remains root help. Detailed help queries and typed execution remain open.

C06 pinned scoped help discovery

discoverCapabilities(OpenCliHelpScope) supports the nine pinned help queries and matches returned structured metadata to the requested scope. Non-root probes only run on the verified OpenCLI 1.8.8 version. Browser paths use a fixed help-only session token. Each query can fall back only to its matching previous observation. A newly observed configuration or version invalidates old observations for all affected scopes.

JDK Remote feature commit Local clean verify GitHub execution
8 8d1ccb6bd416ad16eea7d67fa0331a95c5f0c141 2,199 passed Platform contracts
17 a6b59b54c3a099bd72d79256d307e3b409d014a7 2,200 passed Contracts, CI
21 e83bc0008a7ac0cf88a44262e18348c92227b626 2,199 passed Platform contracts

All OpenSpec strict checks passed. On each JDK, an isolated Node 24.18.0 process running the published OpenCLI 1.8.8 package produced exact byte matches for all nine archived outputs. Seven were AVAILABLE, browser root returned UNKNOWN/INVALID_JSON, and list returned UNKNOWN/UNSUPPORTED_FORMAT. Typed validation and session-bound execution remain open.

C06 schema-validated local execution

OpenCliClient.invokeDiscovered refreshes the selected scope on the pinned local OpenCLI 1.8.8 executable, binds the explicit browser session when required, validates the selected leaf, and runs literal argv through the same local process runtime. Validation covers option presence, option values and choices, explicit false, negated flags, and variadic positionals. STALE and other non-available observations cannot authorize typed execution. The existing explicit raw invocation path remains available.

JDK Remote feature commit Local clean verify GitHub execution
8 3b97f2c4037aaa49cf0e992e2a9a695988cacd77 2,203 passed Platform contracts
17 441122f129822c70126390331853d28d64faa66c 2,204 passed Contracts, CI
21 f57986547125e41e62ced46442ccf3a1d662ca11 2,203 passed Platform contracts

All local suites passed with zero failures, errors or skips. Strict OpenSpec validation passed 10/10 per line. In addition to local JVM fixtures for browser session execution, each JDK ran the actual pinned OpenCLI npm search adapter with a local in-process registry response fixture. The fixture verified a dash-prefixed positional remained a literal search query and that the validated limit reached the adapter. Real Browser Bridge account/runtime acceptance and explicit plugin/override provenance validation remain open.

Hosted build CI passed at the implementation commit 441122f. The first JVM contract job stopped before Maven execution when Maven Central returned HTTP 429 during the wrapper distribution download. GitHub declined the failed-job rerun while that workflow remained active. A manual contract run was dispatched and resolved to head fcb88f3, whose only addition is the C06 parity evidence in OpenSpec.

C06 real runtime override acceptance

OpenCliCapabilityOverrideIT ran against the published OpenCLI 1.8.8 package on Node 24.18.0 on all three maintenance lines. Each isolated test observed the built-in npm search definition, local override, plugin override and restoration after removing the plugin. The same configuration and version produced different help hashes as the effective definition changed. Every scoped observation reported unresolved origin. Neither override's command handler ran during help discovery.

JDK Remote feature commit Real override integration test
8 1021ad4a43aa48a9f1d1fca4ec377738fa5faaf0 1 passed
17 b77a6c771da624ec80145cb8ae49a6d3c58dc0be 1 passed
21 9f94dbab7c014367477dc75cca307957f1067722 1 passed

No failures, errors or skips. All three lines passed 10 strict OpenSpec validations. The 2.0 contracts workflow now runs this fixture in the existing Windows npm-installed verification step. The manual run on the preceding head passed the JVM contract and Windows jobs. Real Browser Bridge sessions and the rest of the PR scope remain open.

C03 bounded stderr error envelopes

Local failure results now expose an immutable interpretation of captured stderr. The decoder preserves code, message, help, trace, extensions and both the observed process exit and reported envelope exit. It keeps the nonzero, timeout and resource-limit exception decisions in the existing process runtime. JSON uses Jackson strict parsing and YAML uses SnakeYAML 2.7 safe construction with event validation. The limits are one document, 256 KiB UTF-8 and 32 nesting levels. Parser causes are not propagated into diagnostics and AutoFix stays in raw stderr. Legacy HTTP collect retains its existing response and transport classification.

JDK Verified remote feature commit Local clean verify Hosted contracts
8 dbe677ee52aa009a7674a457524cac35e928b5ae 2,209 passed Platform
17 f52262ec6565db6ce84b907be4df20b4c182de60 2,210 passed Contracts
21 25e1c5819ab623191a6f9d9210dcbf0a61de6d76 2,209 passed Platform

All three builds had zero failures, errors and skips and passed 10 strict OpenSpec validations. The pinned OpenCLI 1.8.8 package reproduced the ARGUMENT/2 failure and its own renderer reproduced the controlled AUTH_REQUIRED/77 and EMPTY_RESULT/66 failures on each JDK. All nine captured stderr values matched the archived YAML byte-for-byte. JSON envelope tests use synthetic inputs. The concurrent Windows preload file-URI fix is included in these commits.

C07 strict browser tab and navigation results

tabListTyped() and openTyped() use the existing browser session entry points and validate distinct leaf shapes. An empty array is a valid tab list. Truncated captures, malformed JSON, execution failure and incompatible output have separate statuses. The result retains the raw execution and all reported metadata, including original identifier types. Page ID values avoid floating-point conversion. Existing session close and AX option contracts are covered by regression tests.

JDK Remote feature commit Local clean verify Hosted contracts
8 369232963e079b720675ea8d6df38cc3b3b30f0e 2,214 passed Platform
17 f2feb1868b90964848830526c227ddfecbd56332 2,215 passed Contracts
21 432dac22d1002e44cfc2d06c34a68980f0ab30e0 2,214 passed Platform

Each line passed 10 strict OpenSpec validations. All three JDKs called the actual OpenCLI 1.8.8 leaf actions with a controlled Browser Bridge page fixture. The typed tab list, empty tab list and open results matched the three pinned stdout fixtures byte-for-byte. State/AX result typing, other browser leaves and real browser attachment remain open.

C07 strict DOM and AX state results

snapshotTyped uses explicit DOM or AX selection, then decodes the URL header and preserves the snapshot body unchanged. compareStateSourcesTyped validates the separate JSON output and exposes each source's status, counts and errors independently. Existing String source and compare flags continue through the original options API.

JDK Remote feature commit Local clean verify Hosted contracts
8 4d3d57e490784bb4c5ccda7687b042f7ceca6c0e 2,218 passed Platform
17 b1d83867be42854994d6443ce7be8fad4cb827c5 2,219 passed Contracts
21 5242e1156657133562f6adc338064b726de3f631 2,218 passed Platform

Each line passed 10 strict OpenSpec validations. The real pinned OpenCLI 1.8.8 actions on a controlled page fixture matched the four archived outputs on all three JDKs. The AX text is produced by the pinned AX renderer with a synthetic CDP tree. This covers successful DOM and AX snapshots, combined comparison, and comparison with an isolated AX failure. Real browser attachment and remaining C07 leaves remain open.

C07 strict find, console, network and analyze results

Four additional typed Browser leaf results validate their own wire shapes. Find keeps the total and the limited matches separately and preserves exact reference values. Console and network validate one-shot capture counts, and analyze preserves the complete report as data. Follow and network detail remain available through the raw APIs. The typed methods reject those alternate output modes before execution.

JDK Remote feature commit Local clean verify Hosted contracts
8 a0c66c9b8390e4652b84a60a12ef2a8fae4d358b 2,223 passed Platform
17 115b0955b846290b4c91f6ae5aee91c10e262ae3 2,224 passed Contracts
21 79929725e424bb0deffe9f5f6a0861f12f3ec574 2,223 passed Platform

All three lines passed 10 strict OpenSpec validations. The SDK ran the pinned OpenCLI 1.8.8 actions for the four leaves against a controlled Browser Bridge page fixture. Each JDK produced a byte-for-byte match with the four archived outputs. The evidence document includes the supported leaf/mode table. Actual browser and external service integration remain open.

C08 isolated invocation context

The new immutable context applies invocation overrides before client defaults and preserves explicit keepTab=false. The binder validates options against their root, namespace, leaf or browser-adapter scope before business dispatch. The profile and browser-backed adapter capabilities are backed by two added OpenCLI 1.8.8 help captures. Both discovered and existing Browser session calls place the window option after the literal session token, as required by the upstream preprocessor.

JDK Remote feature commit Local clean verify Hosted contracts
8 68c5b199216cc5a79a19aaf7e6fa660bf54bdbd7 2,227 passed Platform
17 2eb97e4998f9c97d8467aedad664df6cf6bf8508 2,228 passed Contracts
21 5a464a3439f9d5c2bca34fa5a99345b1925428c6 2,227 passed Platform

All three lines passed 10 strict OpenSpec validations. On each JVM, real OpenCLI 1.8.8 routed two concurrent profile/window pairs to an isolated Browser Bridge stub and honored the corrected window flag on an existing explicit session call. The keep-tab false override and unsupported site-session checks ran with a JVM child fixture. Real browser attachment and read-only diagnostics remain open.

C08 read-only diagnostic observations

diagnose() reports separate executable, version, help, Browser Bridge, authentication, daemon and remote transport observations. Local diagnostics use the bounded version fast path on the trusted absolute executable. Previous explicit help is only historical and is matched against current configuration and version. Remote-only configuration skips local checks and does not call collect. Browser, daemon and authentication remain UNKNOWN without a verified read-only probe.

JDK Remote feature commit Local clean verify Hosted contracts
8 afeb522a64630dc84192644fdcc42bc869cde9f3 2,231 passed Platform
17 3c9979ecbd48b0f6ea4fcbb79c920095fefdd1e6 2,232 passed Contracts
21 5c35d33644a76cf686a5cd858b803e3ce8749cd6 2,231 passed Platform

Each line also passed the 22-test targeted run, including an opt-in integration test against actual OpenCLI 1.8.8 on Node 24.18.0. Explicit metadata discovery wrote the controlled startup hook marker. Diagnosis obtained the version without the marker, both before and after explicit help. Each line passed 10 strict OpenSpec validations. The Windows installed-package job now includes the real diagnostic fixture.

C10 per-suite contract evidence

The report now fails if any required suite is missing, empty, skipped or unsuccessful, and rejects attribution of a suite to multiple layers. The three local JVM reports agree on 10 enumeration, 47 argv, 32 process, 88 protocol and 16 typed-result executions. The separate installed-package reports each record two real-execution tests against OpenCLI 1.8.8. The JDK 17 hosted JVM artifact matches the local counts, and its Windows-specific installed report records four passing real-execution tests.

JDK Feature commit Hosted run
8 e858cc092e27ce386a0cdf3090e8149b6af3f2ea Windows launcher follow-up
17 6da93d05102cd9ed334be8d67278fd67c2f9cbc9 JVM and Windows reports
21 c22fe4561f7c384be1206d391dd04c068d15bb1e Windows launcher follow-up

Initial Windows runs on the backport branches failed closed when the required launcher suite was absent, and the JDK 8 run also returned an UNKNOWN version diagnostic. The follow-up adds the launcher test on both lines, keeps both suites required and includes the safe diagnostic reason on a failure. The controlled Browser Bridge evidence added separately covers a real Chrome extension, daemon and a local test page on three JDKs. It does not supply GitHub macOS platform evidence or authenticated website acceptance.

Current Windows evidence

Downloaded the installed-report.json and platform report for each current remote head. All three Windows platform jobs passed and their installed reports each show four executed tests with zero skips, failures or errors.

JDK Verified feature HEAD Hosted Windows artifact
8 e7ca1c07f7859ab199102d71e6fbb57b653b1248 44380944623
17 a35219a5b2d73108e32d64969fdca78a429a872a 44380547693
21 15126bfd8055e74cb4fc4d15c6457e61f86818a1 44380548638

The JDK 8 test fixtures unlink the upstream package junction before JUnit cleans their disposable user directories. The installed stage now reads newly produced Surefire reports from a separate report set. Hosted macOS platform jobs remain queued.

Hosted platform evidence for the provenance commits

The current three feature heads completed the configured hosted platform matrix. Downloaded reports match those commit IDs. Each platform report records 138 executed cases (48 argv, 40 process, 34 protocol and 16 typed-result), with no skips, failures, errors or missing required suites. Each Windows installed-package report records four executed cases with no skips, failures or errors.

JDK Feature head macOS runners Hosted run
8 0fb59609e2e5739eb35c252deaa85bf41d6b5cd5 Intel 44383209617
17 ff9d99934f655883a575d342e852d06bce03db08 Intel and Apple Silicon 44383209355
21 5955fc1fdc96a238bfc67f67e453036832a23b09 Intel and Apple Silicon 44383209272

These artifacts cover the platform fixture layers and Windows installed-package checks. Authenticated external site acceptance and the remaining OpenSpec change requirements stay open.

C03 error envelope acceptance checks

The latest C03 regression runs a real subprocess that writes malformed YAML with a synthetic secret. The SDK retains raw stderr and the observed nonzero exit. The decoder reports invalid YAML. Captured default diagnostics and the complete exception stack omit the synthetic marker.

JDK 8 70746e4, JDK 17 3c0c179, and JDK 21 97aee9a each ran 21 local C03/C09 tests, including eight error-envelope cases, with zero failures, errors or skips. OpenSpec 1.14.1 strict validation passed all ten changes on every branch. The C03 requirements are mapped in the change tasks. The hosted platform matrix is pending for the new heads. PR review, archive and the other OpenSpec acceptance items remain open.

C07 bound tab and typed Browser checks

The real OpenCLI 1.8.8 daemon and Browser Bridge 1.0.24 bound an active tab in a disposable Chrome profile. The tab retained its page ID after a successful typed DOM snapshot, a failed request for a nonexistent target page, and Java client shutdown and reconstruction. The fixture explicitly unbound the session after verification.

Each JDK line ran 24 C07-related tests locally, including three real Browser Bridge tests, with zero failures, errors or skips. OpenSpec strict validation passed ten changes on each line. The verified C07 task-to-requirement mapping is committed at 5335507 (JDK 8), 807801e (JDK 17) and 0bcb405 (JDK 21). The new tests used a local fixture and ephemeral browser profile. Authenticated external website acceptance remains separate.

The preceding C03 heads passed their hosted platform checks on JDK 8, JDK 17, and JDK 21.

C04 incomplete HTTP exchange

The loopback Agent accepted a collect request and then closed the connection either before headers or during a declared response body. Both regressions initially failed because the existing exception had no partial result. The fixed path retains the existing exception class and supplies a TRANSPORT_FAILURE snapshot with an unknown remote outcome. It preserves HTTP 200 when observed, leaves the status absent when no headers arrived, and omits the CLI exit and incomplete body. The Agent received one request in each case.

The three feature heads ee64145, a2b2268 and e5811f1 each passed 81 targeted tests on their matching JDK, including 56 HTTP client tests. All ten OpenSpec changes passed strict validation on each line. These tests use loopback HTTP/TLS fixtures. Production Agent-specific contracts and extensions remain outside the verified fixture scope.

C08 concurrent failure isolation

A two-thread subprocess regression verifies that a failed discovered invocation retains its own profile and window in the partial result. The concurrent success and a subsequent defaulted invocation each retain their own context. The installed OpenCLI 1.8.8 fixture separately verifies that default diagnostics omit the startup hook, while an explicit help probe reaches the hook.

JDK 8 2986a86, JDK 17 a4687d1 and JDK 21 72c9dd8 each passed all eight C08 checks locally with zero failures, errors or skips. Each line passed strict validation of all ten OpenSpec changes. C08 evidence is recorded in the change tasks. Hosted checks for the new commits and PR review remain open.

C02 bounded follow on the locked Browser Bridge

The real OpenCLI 1.8.8 CLI and Browser Bridge 1.0.24 exercised network --follow --all against a disposable local page. A 4,500 ms budget produced EXECUTION_TIMEOUT, and a 2 KiB stdout limit produced OUTPUT_LIMIT. Both kept partial network evidence and confirmed the launched root process exited. The original Chrome process, daemon PID and page were still available afterward. Each JDK ran 35 local process tests with zero failures, errors or skips.

The preceding hosted heads produced eight platform artifacts. Their XML confirms that the interruption, cancellation, unrelated-process and inherited-pipe ownership cases all executed and passed. New feature heads 8133471, bf4f078 and 9b0c385 add the completion-race suite to the required platform reports. Its newly required hosted runs are pending. The portable backend still reports unconfirmed descendant ownership as such.

loong10k and others added 14 commits September 21, 2026 12:45
…s tests

Add shared, hash-locked synthetic argv vectors and a Java 8-compatible child probe.
Add fail-closed layered Surefire reporting with 12 self-tests and pinned OpenSpec strict CI.
This is the intentional C01 RED checkpoint; no product Java sources changed.
Keep C10 integration and the remaining OpenSpec changes open.
…facts

The 2.x script invokes MavenWrapperMain but its launcher JAR was absent.
Reuse the existing repository 3.x launcher blob; retain Maven 3.9.16 distribution.
Use non-hidden scoped evidence directories so upload-artifact can find reports.
No product-source changes; the C01 regression suite remains the RED checkpoint.
…paths

Observed RED at 94de053: 33 real-child contract tests, 21 failures,
0 errors and 0 skips; full suite 2027 tests.
Snapshot submitted tokens, reject null elements without disclosing values,
preserve empty/padded/newline arguments and validate blank command identifiers.
Align two legacy filtering assertions with OC-ARGV-001 without removing tests.
Ordered schema-aware options and remaining C01 closure are still pending.
The first repair left 11 real-child assertions failing because CommandLine.Argument
trims its stored value even with handleQuoting=false. Preserve a separate literal
vector at the native launch boundary; do not relax whitespace/newline assertions.
No implicit shell parsing, quoting, or substitution is added.
Cover repeatable option occurrences, explicit valued false, positive/negative flags,
nonrepeatable and legacy collisions, malformed schemas, and captured mutable inputs.
Use public API reflection so absent API is an assertion failure, not compile failure.
The existing 33 real-child contracts remain enabled.
…inputs

Observed second RED at d02b16d: 2038 tests, 10 assertion failures, 0 errors/skips.
Add explicit flag/value/negatable schemas and immutable option occurrences.
Preserve occurrence order and valued false; reject duplicate/mixed-schema ambiguity.
Snapshot legacy maps and mutable values while retaining Boolean flag compatibility.
Do not claim capability discovery or final three-branch integration is complete.
Use self-bounded offline child processes to expose limiter replacement,
queue deadline bypass, unbounded stdout/stderr and interrupted-child leaks.
Also require explicit shared runtime and pre-cancel semantics.
No production lifecycle implementation changes in this RED checkpoint.
…pture

C02 RED at 31bde9c: 2046 tests, 8 failures, 0 errors/skips.
Use fixed per-client or explicit shared runtimes, monotonic queue/execution budgets,
8MiB stdout and 2MiB stderr caps, per-call cancellation and owned-root cleanup.
Preserve lifecycle reasons, byte counts and unknown descendant status in results.
Quarantine runtimes with unconfirmed owned root/reader cleanup; keep legacy API bridge.
Remote cancellation and unverified descendant ownership are not claimed.
…idence

Add UTF-8 byte-boundary, budget validation, running/queued cancellation,
configuration copy and repeated timeout regression tests.
Report both argv suites and process suites separately from live OpenCLI evidence.
Runner extension observed local RED then GREEN: 13 self-tests pass.
Archive only committed source alongside exact-head CI evidence for reproducible review.
…eview gates

Record exact RED/GREEN commits, 2052-test evidence, 43 argv/14 process contracts,
13 evidence-runner self-tests and ten official OpenSpec strict validations.
Keep remaining edge cases, independent review, platform/backport work and the
three-branch integration gate explicitly open; no OpenSpec tasks are pre-closed.
Preserve the intentional trailing TSV separator with a path-scoped attribute.
No product Java or dependency changes in this documentation checkpoint.
Resolve baseline build and the proposed safe YAML parser for C03.
Export only public Maven artifacts and distribution, never credentials or settings.
Bundle runs only when its workflow changes or is explicitly dispatched.
Run only bounded version/help probes from npm OpenCLI 1.8.8 with lifecycle scripts disabled.
Retain package provenance, hashes and descriptive artifacts; do not invoke website operations.
The registry returned E404 for @jackwener/opencli@1.8.8. Keep that evidence.
Build the previously audited 8271afc commit and label descriptive captures as source-built.
Do not silently substitute another upstream version.

Copy link
Copy Markdown
Collaborator Author

C02 竞态验证增量已推送到 feature/REQ-20261118-wandl-opencli-contracts-20:1d66f1b3681593cf7e66f4af0f8fb6223d219960。新增可重复的故障注入用例,令 cancel、watchdog 超时和自然退出在同一调用中同时可见,检查单一终结原因、已读取的部分输出、根进程退出证据和连续 32 次调用后的许可复用。本地 JDK 17 mvn clean verify:2063 个测试,0 失败/错误/跳过;该提交的 CI 与 OpenCLI Contracts CI 均通过。此用例覆盖一个受控交错,不等于所有取消/完成竞态已验证;PR 继续保持草稿,其余 C02 和 C03–C09 门禁仍开放。

Copy link
Copy Markdown
Collaborator Author

C02 流读取错误证据修复已推送:527faf0b76705ac26392a7a7717c099ba33cceea。故障注入测试让已退出子进程的 stdout 先返回 abc,随后抛出 IOException;旧实现会报告 IO_FAILURE 却把 RunSession.ioFailure 留为 null(红灯已复现)。修复后保留原始异常和部分输出。JDK 17 本地完整 mvn clean verify:2064 个测试,0 失败/错误/跳过;该提交的 CI 和 OpenCLI Contracts CI 均通过。此增量不改变仍开放的 C02 其他清理门禁及 C03–C09 状态,PR 保持草稿。

loong10k added a commit that referenced this pull request Nov 19, 2026
loong10k added a commit that referenced this pull request Nov 19, 2026
@loong10k
loong10k marked this pull request as ready for review November 19, 2026 05:16
@loong10k
loong10k merged commit 2303996 into feature/2.0.x Nov 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant