fix(receipt): finalize and guard all egress paths#150
Conversation
Sigilix OverviewEffort: 4/5 (large) Quality gates
Summary — latest pushFinalizes and guards all egress paths by preventing partial request-body hashes from being signed as complete, redacting transport error details from receipts, and recording VNC WebSocket handshakes through the egress chokepoint. The change introduces a mutex-protected hashingBody that tracks stream completion, adds a DialWebSocket helper with a bounded handshake timeout, and uses an explicit category context key for protocol handshakes. A specialist review flagged security and logic risks around the redaction approach and concurrency handling that must be addressed before merging. Important files
Sequence diagramsequenceDiagram
participant C as Caller
participant D as DialWebSocket
participant R as receiptTransport
participant H as hashingBody
participant S as Remote Server
C->>D: DialWebSocket(ctx, url, opts)
D->>D: WithCategory(ctx, vnc-control)
D->>R: RoundTrip(req)
R->>H: Wrap req.Body
R->>S: Send Request
S-->>R: Response / Error
R->>H: snapshot() [mutex locked]
H-->>R: bytes, digest, complete
R->>R: Record Entry in Receipt
R-->>D: Response / Error
D-->>C: Conn / Error
Confidence: 2/5The specialist review flagged P1/P2 security and logic risks around error redaction and concurrency handling that remain unaddressed in the current diff.
Suggested labels:
|
✅ QualityMax Pipeline
Powered by QualityMax — AI-Powered Test Automation |
Summary
Verification