feat: gate releases on verification + test-parity fixes - #13
Open
abienkowski wants to merge 3 commits into
Open
Conversation
- Add ci-verify and release-verify Make targets with backend-parameterized quint verify - CI runs on pull requests only, reusing Make targets per job - Release workflow gates tag creation on release-verify, publishes draft prerelease, then flips to release only after all artifacts upload - Document local verification gates in docs/release.md
Cross-language parity fixes surfaced by auditing test coverage and running the full suite from a clean checkout: - Go: match image prefixes only on namespace boundaries, so 'evilfoo/bar' or 'foo-backup' can no longer match a 'foo' prefix; add readonly and validation-path middleware tests - Rust: rewrite the forwarded Content-Length to match the (possibly mutated) body length, preventing daemon-side JSON truncation - TS: honor --flag=value form; listen on the parsed host/port (the old string overload made the listen a no-op); set Content-Length from the actual forwarded body bytes; port handler tests to match Go/Rust - Integration: parameterize compose build context and project name by IMPL (go/rs/ts), rebuild images with --build, add -rs/-ts targets, run all three in CI; use numeric user uid:gid for scratch-based images - Spec: route pause to allowAction and record 9 invariants in README - Beacon sample policy: pin the host systemd account to uid/gid 100 (system user), independent of the in-container user
…t tests The group-restricted Unix socket is the security boundary, so a connect that fails with EACCES/EPERM must be indistinguishable from a middleware policy denial: return 403 Forbidden instead of 502 Bad Gateway. - Go: ReverseProxy ErrorHandler maps EACCES/EPERM on the socket dial to 403 (transport.go); add transport tests (502 for missing socket, 403 for permission, errno unwrapping) - Rust: new TransportError::SocketPermission variant mapped to 403 in the handler; transport + handler tests for both 403 and 502 paths - TS: Transport emits 403 for EACCES/EPERM; new isPermissionDenied helper with tests - TS --docker-host flag accepts only a Unix socket path (rejects tcp/http/ unix schemes) so all three implementations run the sock integration suite - Makefile: parameterize test-integration-sock by IMPL with --build, add -rs/-ts variants; remove the TCP variant (docker-compose.tcp.yml) — TCP bypasses user/group socket ownership and its dial was already broken for Go/Rust which are unix-only - Add audit-log unit tests in all three languages (temp-file JSON round-trip) - AGENTS.md: update test counts (Go 74, Rust 112, TS 108) Verified: unit suites green; sock suite 8/8 for go and rs (403 on denied socket); main integration 26/26 for go, rs, and native ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gates the release pipeline on full verification before tagging artifacts, closes the test-parity gaps found while auditing coverage, and enforces the Unix-socket security boundary across the sock integration suite.
Part 1 — Release verification gate
verify(BACKEND=), newci-verify(Quint TS backend) andrelease-verify(Quint Rust backend) aggregate targetsrelease-verifygate job blocking tag creation;versionjob creates a draft prerelease; newpublish-releasejob flips draft → published only after all three artifact jobs succeedCloses part of #6 and #8.
Part 2 — Test-parity fixes (audit follow-up)
Go
chainsafe/lodestarno longer matchesevilfoo-lodestarorlodestar-backup(manager.go)Rust
Content-Lengthis rewritten to match the (possibly mutated) body length — fixes daemon-side JSON truncation (handler.rs)TypeScript
--flag=valueform (new flags.ts module + tests)Content-Lengthderived from the bytes actually forwarded (transport.ts)Integration / CI
IMPL(go/rs/ts)--buildon integration runs; newtest-integration-rs/test-integration-tstargetsuser: "0:0"for scratch-based Rust/TS imagesSpec & config
POST /containers/:name/pauseto allowAction; README documents 9 invariants (6 P0 / 3 P1)Part 3 — Unix-socket security boundary (403 on socket permission denial)
The group-restricted Docker Unix socket is the security model; connecting under a group that lacks access must surface as 403 Forbidden, indistinguishable from a middleware policy denial:
ReverseProxyErrorHandler mapsEACCES/EPERMon the socket dial → 403 (transport.go); tests for 502 (missing socket), 403 (permission), and errno unwrappingTransportError::SocketPermissionvariant → 403 in the handler; transport + handler tests for both 403 and 502 pathsTransportemits 403 onEACCES/EPERM(transport.ts,isPermissionDeniedhelper)--docker-host: accepts a Unix socket path only — rejectstcp:///http:///unix://schemes so all three implementations run the sock suite over a real sockettest-integration-sockparameterized byIMPLwith--build+-rs/-tsvariantsdocker-compose.tcp.yml+test-integration-tcp: TCP forwarding bypasses user/group socket ownership, and the dial path was already unix-only (broken) for Go/RustVerification
go vetcleancargo checkcleantscclean--docker-hostflag