M0: native-peer CI gate (R1-R9) #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cv2/m0-ci-gate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements ChromelessV2 M0 — the native-peer CI gate. All 9 R# requirements landed; full reform-TDD discipline applied per R#.
--scaffold/--strict) + JSON contract (verification/native-peer-gate.mjs)verification/lib/verdict.mjs)verification/assertions/streamer-page.mjs,verification/lib/image-fs.mjs)verification/assertions/bridges.mjs)verification/assertions/codec-cap.mjs)verification/assertions/native-peer.mjs)verification/lib/harness.mjs).github/workflows/native-peer-gate.yml) + branch-protection compensating evidenceintegration/native-peerbranch (already pushed) +verification/INTEGRATION_BASE.txtanchorRatified gate-blocking schedule (encoded as DATA)
Source of truth:
verification/lib/verdict.mjs::DEFAULT_SCHEDULE. Changing the schedule is a one-line edit.Test plan
--scaffoldagainst current source → FAIL (R3 honestly reports streamer-page PRESENT)--strictagainst current source → FAIL--scaffoldagainst synthetic-clean fixture → PASS withstreamer-page-absent: PASS,bridges-absent: PASS,codec-cap: NYI,native-peer: NYI(post-M7 simulation)Known M0-deferred work
current-image-libwebrtc-default.jsonfixture is a reference placeholder (provenance honest in the JSON_provenancefield). MUST be re-captured from a realchromeless:ciimage viaverification/scripts/cb-encoder-probe-v3.mjsbefore the M0 PR merges —feedback_test_fixtures_from_real_artifactsrequires it. The only honest gap; everything else is grounded in real artifacts (encoder_factory_stub.cc:146 for EXPECTED_FORMATS; on-disk file probes for R3/R4 sanity rows).verification/scripts/check-branch-protection.sh+verification/README.md#branch-protection. Operator wires the required-checknative-peer-gate / native-peer-gate-scaffold.Plane
CV2-1 (M0), R# CV2-10 through CV2-18 — all transitioned to Done with [DEV: DONE] notes posted on R9.
🤖 Generated with Claude Code
- verification/lib/harness.mjs: - boot({imageTag, timeoutMs, env, args}) returns {containerId, wsUrl, client, teardown} - per-call CDP via docker exec python3 -c <embedded WS client> (mirrors tests/smoke/container-boot.sh — Chromium 147 binds DevTools 127.0.0.1 only) - HarnessBootError {code: image-missing | container-exited | ...} - HarnessBootTimeoutError {phase: devtools-ready | cdp-<method>} - Duck-typed client.send(method, params) -> result; matches the surface that R5 codec-cap and R6 connectivity assertions need. - verification/scripts/with-container.sh: bash-side wrapper exposing CONTAINER_ID to the wrapped command, cleanup on exit (trap). - verification/__tests__/harness-container-boot.test.mjs: 6 RED tests + 2 always-on error-class shape tests. Docker-dependent tests skip when docker daemon / chromeless:ci image absent (locally), exercised in CI. - verification/__tests__/harness-with-container.sh.test.mjs: 2 RED tests for the shell wrapper (cleanup on success AND failure). Plane: CV2-16 (R7 of M0).- verification/assertions/bridges.mjs: reuses R3's image-FS helper. Inspected-path surface is CONFIG-OVERRIDABLE — pass ctx.bridgesSourcePaths (flat list OR split {inputBridge, cursorWatcher}) and ctx.bridgesImagePaths to scope to any custom surface. Defaults exposed as DEFAULT_INSPECTED_PATHS_BRIDGES + DEFAULT_INSPECTED_IMAGE_PATHS_BRIDGES. - Evidence splits per-sidecar (inputBridge / cursorWatcher) for downstream triage (test #6). - verification/fixtures/synthetic-clean-bridges/ + matching image-manifest for PASS-path test (#3). - verification/__tests__/assertion-bridges.test.mjs: 6 GREEN tests. Plane: CV2-13 (R4 of M0).- verification/assertions/codec-cap.mjs: - EXPECTED_FORMATS const, provenance comment 'From capture/encoder/ encoder_factory_stub.cc:146 GetSupportedFormats() on 2026-05-16' (worktree @b438523d8). VP9 + H264 (profile-level-id=42e01f, packetization-mode=1, level-asymmetry-allowed=1). - compareCodecs(observed, expected): violation enumeration {extra-format, missing-format, parameter-mismatch}. Returns pass + violations + normalized observed. - Swappable strategy registry: cdp-getCapabilities (default, real CDP via R7 client) + sdp-inspection (stub for M1 false-green resolution). M1 swap is a one-line config flip; comparator + harness unchanged. - NYI shim discipline: pre-enabling-module position returns NOT_YET_ IMPLEMENTED even if probe wired — preserves scaffold-green contract. - verification/scripts/cb-encoder-probe-v3.mjs: harness-mode capture script for re-generating verification/fixtures/cdp-codecs/ current-image-libwebrtc-default.json from a live chromeless:ci image. - verification/fixtures/cdp-codecs/post-m1-expected.json: PASS fixture derived from encoder_factory_stub.cc, provenance noted. - verification/fixtures/cdp-codecs/current-image-libwebrtc-default.json: REFERENCE FIXTURE (provenance honest — pre-real-capture placeholder per .triform/architecture/chromeless-native-webrtc.md PR #1708; MUST be re-captured from real chromeless:ci before M0 PR merges per the test-fixtures-from-real-artifacts discipline). - verification/__tests__/assertion-codec-cap.test.mjs: 9 GREEN tests. Plane: CV2-14 (R5 of M0).- verification/assertions/native-peer.mjs: - probeNativePeer({target, timeoutMs}) → discriminated result ({kind:'ack'|'protocol-mismatch'|'timeout'|'refused'}). - Single-handshake TCP wire (HELLO + ACK), JSON frames newline-terminated. M3 replaces the wire with real DataChannel/SDP; comparator surface (PASS/FAIL + evidence shape) is contractual. - Socket destroy() on completion to avoid lingering connections. - NYI shim discipline: pre-M3 returns NOT_YET_IMPLEMENTED even with target wired (test #6) — preserves scaffold-green contract. - Bounded timeouts on all failure modes (no infinite poll). - verification/fixtures/native-peer-loopback/peer-stub.mjs: three test servers (conformant / malformed / silent) with wrap() helper that tracks live sockets so close() force-destroys lingering connections (otherwise server.close() awaits forever, hanging node:test). - verification/__tests__/assertion-native-peer.test.mjs: 6 GREEN tests including bounded-timeout discipline (test #4 wall-time <5s). Plane: CV2-15 (R6 of M0).- .github/workflows/native-peer-gate.yml (canonical path per CV2-17 orchestrator override): - build-image job: builds chromeless:ci with gha layer cache, uploads as docker save tar artifact for the gate jobs to load. - native-peer-gate-scaffold: every PR + push to integration/native-peer. Always-on signal. - native-peer-gate-strict: PRs targeting main (M7 squash gate) + pushes to integration/native-peer (operator check). NOT mandatory on arbitrary PRs. - Both jobs upload gate JSON as artifact for downstream tooling. - verification/package.json + package-lock.json: yaml devDep for R8 tests. - verification/scripts/check-branch-protection.sh: queries Forgejo branch_protection API and asserts the required-check 'native-peer-gate / native-peer-gate-scaffold' is set on a given branch. Compensating evidence for the branch-protection pragmatic facet. - verification/README.md: full operator-facing docs — gate modes, JSON schema, gate-blocking schedule table, CI wiring, branch-protection setup. Cites required-check name verbatim. - verification/__tests__/ci-workflow.test.mjs: 12 GREEN tests including 10 RED spec tests + 2 supporting-artifact tests. Integration tests #9/#10 invoke the gate end-to-end and verify exit codes match the assertion state on the current source tree. Plane: CV2-17 (R8 of M0).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.