fix: eliminate target cache mount for build freshness and echo websocket close frame #7
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/build-freshness-and-websocket-close"
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
Build Freshness / Migration 44 Root Cause:
Dockerfile, mounting/app/targetas a persistent cache mount (--mount=type=cache,id=${RUSTFIN_TARGET_CACHE_ID},target=/app/target,sharing=locked) collided with source mtime normalization (scripts/normalize-source-timestamps.shsets file mtimes to 2024 based on content hash)..rlibtimestamps intarget/. Because October 2026 > 2024, Cargo assumed existing workspace crate artifacts (such asrustfin-db-schema) were already up to date and skipped compiling them into the binary./app/targetcache mount fromDockerfile, aligning with the Goldstandardrust-templatewhere Cargo runs in a clean container filesystem and object caching is handled safely by content-hashedsccache.WebSocket RFC 6455 Close Handshake:
crates/rustfin-client-api/src/api/websocket/connection.rs, incomingMessage::Close(frame)was handled by simply breaking out of the loop and dropping the socket without sending a response frame.socket.send(Message::Close(frame)).await; break;) and sendingMessage::Close(None)on cancellation/channel closure, completing the close handshake cleanly.Verification
just fmt && just fmt-check && just clippynode --test scripts/docker-build.test.mjsjust architecture && just deny && just machetejust domain-test realtime_api_testsjust schema-check