Repository navigation
learn: retrospective learnings #484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
oss-engineer-bot
wants to merge
1
commit into
main
Choose a base branch
from
ai/learning-distill-pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Learning journal 2026-12-04 | ||
|
|
||
| ### 2026-12-04: Security / local files — Validate then reopen by path is a symlink TOCTOU | ||
| **Context:** PR #520's Volume PUT/GET checked a resolved path against allowed_paths, then reopened it by name, once per retry and again at publish. A symlink swapped into the gap could read or write outside the allowed roots. The fix keeps the validated handle, reads it by offset on retries, and after opening re-resolves the path and requires the same device and inode. | ||
| **Rule:** After validating a local path against allowed roots, do all I/O through the handle you opened and confirm it still matches the path (re-resolve, then compare dev/inode); never reopen the path by name for retries, redirects or publish. | ||
|
|
||
| ### 2026-12-04: Async lifecycle and FFI — Shared once-completion must latch an abandoned non-idempotent transfer | ||
| **Context:** In PR #520 the Volume completion was shared through a OnceCell. If the waiting future was dropped mid-transfer, nothing was cached, so another result stream could rerun a PUT or REMOVE that storage had already applied. The fix sets a started flag, so later calls return Cancelled. | ||
| **Rule:** When several waiters share a once-only side effect, latch a 'started' state before the work begins so that dropping one waiter mid-flight can never let another waiter re-run a non-idempotent operation. | ||
|
|
||
| ### 2026-12-04: HTTP and protocol — Idle timeouts need progress signals and a zero-means-unlimited rule | ||
| **Context:** In PR #520 the storage idle timeout counted only file-read progress. A byte-backed upload never signalled progress, so a large upload that was still moving failed as stalled. A zero timeout ran `sleep(0)` inside `select!`, which raced the work and failed transfers at random. | ||
| **Rule:** For an idle (no-progress) timeout, send every upload source in chunks that each count as progress, and treat a zero duration as no limit instead of passing it to sleep inside select!. | ||
|
|
||
| ### 2026-12-04: HTTP and protocol — Keep gzip decoding on presigned-storage GETs for cross-cloud parity | ||
| **Context:** In PR #520 reviewers asked several times for `no_gzip()` on the Volume storage client. The author kept decoding. GCS decompresses gzip objects itself when the request lacks `Accept-Encoding: gzip`, so turning decoding off would write different bytes on GCP than on AWS and Azure. All three Thrift drivers also decode. | ||
| **Rule:** Keep reqwest gzip decoding enabled for presigned cloud-storage downloads so GCS, AWS and Azure write identical files, and match the Thrift drivers' staging behavior before changing content-encoding handling. | ||
|
|
||
| ### 2026-12-04: Public API and bindings — Put new internal options on crate-private envelopes, not public exhaustive structs | ||
| **Context:** PR #511 added `lz4_compression` to the public, exhaustively constructible `ExecuteParams`. That broke struct literals, including an integration test that had to be edited. The field was moved to the crate-private `ExecutionParams`. | ||
| **Rule:** Carry new per-request options on a crate-private struct; adding a field to a public, non-#[non_exhaustive] struct breaks downstream struct literals. |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Low — Lessons L-0136, L-0137, L-0138 and the L-0083 bump cite #518, #501, #525 and #524. The journal directory holds only 2026-11-18.md and 2026-12-04.md, and no entry mentions those PRs. Restore the 2026-12-03 journal file, or drop these lessons until their source entries land.
🔀 Found by Claude Opus 5.5 · confirmed by the judge