René's URL Explorer Experiment


Title: fix(fleet): /files/write reports offset+len instead of durable size on overlapping replay; fake oracle truncates the temp tail · Issue #14601 · developing-today/code · GitHub

Open Graph Title: fix(fleet): /files/write reports offset+len instead of durable size on overlapping replay; fake oracle truncates the temp tail · Issue #14601 · developing-today/code

X Title: fix(fleet): /files/write reports offset+len instead of durable size on overlapping replay; fake oracle truncates the temp tail · Issue #14601 · developing-today/code

Description: Problem /files/write is documented as offset-idempotent (pkgs/fleet/crates/fleet-proxy/src/files.rs:14-17: "Writes are idempotent at a given offset, so retries are safe"). Both sides of that contract mishandle a write fully interior to t...

Open Graph Description: Problem /files/write is documented as offset-idempotent (pkgs/fleet/crates/fleet-proxy/src/files.rs:14-17: "Writes are idempotent at a given offset, so retries are safe"). Both sides of that contra...

X Description: Problem /files/write is documented as offset-idempotent (pkgs/fleet/crates/fleet-proxy/src/files.rs:14-17: "Writes are idempotent at a given offset, so retries are safe"). Both sides of t...

Opengraph URL: https://github.com/developing-today/code/issues/14601

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fix(fleet): /files/write reports offset+len instead of durable size on overlapping replay; fake oracle truncates the temp tail","articleBody":"## Problem\n\n`/files/write` is documented as offset-idempotent (`pkgs/fleet/crates/fleet-proxy/src/files.rs:14-17`: \"Writes are idempotent at a given offset, so retries are safe\"). Both sides of that contract mishandle a write fully interior to the existing temp (offset \u003c have, offset+len \u003c have) — i.e. a retry/replay of an already-durable chunk:\n\n1. **Real daemon under-reports** (`pkgs/laptop-agent/src/laptop_agent.py:1505`): `size = offset + len(data)` is the end of *this* write, not the durable temp length `max(have, offset+len)`. Replaying 10 identical bytes at offset 0 of a 100-byte temp returns `{\"size\": 10}` while 100 bytes remain durable. Worse, the client's strict check (`files.rs:516-522`, `written != offset + len`) *passes* on the wrong number (10 == 0+10), so the divergence is silent.\n2. **Fake oracle destroys data** (`files.rs:1242-1248`): `slot.truncate(offset + overlap)` shrinks a 100-byte slot to 10 bytes on the same replay, then reports 10. The oracle that is supposed to pin the daemon's semantics corrupts the transfer it models.\n3. **Fixing (1) alone breaks the client**: once the daemon returns the durable size (100), the strict `written != offset+len` check rejects a benign identical replay (100 != 10). The check must accept the durable size on overlap.\n\n## Repro (file-backed sim of both code paths)\n\nhave=100 temp, replay identical bytes [0,10):\n- real daemon logic: returns 10, durable 100 → MISREPORT (and client check passes)\n- fake oracle logic: returns 10, durable 10 → tail destroyed\n\nNormal sequential/appending writes are unaffected on both sides; the existing `write_idempotency_and_conflict` test only replays the *full* temp (where truncate is a no-op), so neither bug is covered.\n\n## Reachability today\n\nThe shipped `put_stream` never re-sends an interior chunk (resume restarts at temp size, no retry loop), so this is latent in production — but the design explicitly blesses retries, and any retry added on top of this contract hits silent size divergence (daemon) or temp corruption (any harness using the fake).\n\n## Fix shape (suggested, not prescribed)\n\n- daemon `_files_write`: return the durable length (`max(have, offset + len(data))`, e.g. via `f.tell()`/stat after the write) instead of `offset + len(data)`.\n- fake `FakeDaemon` write: only grow — replace unconditional `truncate(offset+overlap)` with extend-only logic (`new_end = max(len, offset+data.len())`), keeping the conflict check.\n- client `put_stream` write check: accept `written == max(offset+len, pre-existing durable)` — at minimum, tolerate `written >= offset+len` when the overlapping bytes matched (the daemon cannot prove the match to the client, so document why >= is safe: a conflicting rewrite is still refused with an error).\n- tests: interior-replay case on both sides (identical replay is a no-op success preserving length; conflicting interior rewrite is refused and preserves the temp).\n\n## Acceptance\n\n- [ ] Identical interior replay returns the durable temp size on the daemon and leaves all bytes intact.\n- [ ] Fake oracle interior replay preserves the slot tail and reports `slot.len()`.\n- [ ] `put_stream` accepts a benign identical replay without failing the transfer.\n- [ ] New regression tests cover interior replay (identical + conflicting) against both daemon and fake.\n- [ ] Full-file replay and resume-from-temp-size behavior unchanged (existing tests still pass).\n\n## Dedupe\n\nSearched open/all issues for `files/write size offset fleet-part`, `put_stream`, `laptop-agent files`: only #5759 (design), #10355 (build verbs), #12193, #11714 (framing) — no duplicate of this size-reporting defect.\n\n\u003c!-- pm-metadata:start -->\n```json\n{\n  \"direct_parent\": null,\n  \"links\": [],\n  \"lineage\": {\n    \"design\": null,\n    \"roadmap_item\": null,\n    \"priority\": null\n  },\n  \"pm_meta\": 1,\n  \"provenance\": {\n    \"queue_id\": null,\n    \"scheduled_start\": null,\n    \"picked_up_at\": null,\n    \"work_started_at\": null,\n    \"created_at\": \"2026-11-24T20:54:37Z\",\n    \"session_id\": \"ses_e5df0bfb09affe4Q17SgmJVueH\",\n    \"lane\": null,\n    \"host\": \"amd\",\n    \"worktree\": \"/home/user/git/code\",\n    \"model\": null,\n    \"lane_start_issues\": [],\n    \"workspace_ref\": {\n      \"kind\": \"worktree\",\n      \"id\": \"/home/user/git/code\",\n      \"repo\": \"developing-today/code\",\n      \"branch\": \"main\",\n      \"sha\": \"6fd30c93b62a4b6fba19e6444c7d69f343fb93a1\"\n    },\n    \"auth_subject\": \"oc-code-06\",\n    \"stamped_by\": \"fleet 0.1.0 (native)\"\n  }\n}\n```\n\u003c!-- pm-metadata:end -->\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-11-24T20:54:42Z","url":"https://github.com/developing-today/code/issues/14601"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:25a670b6-7a16-6102-7c08-30d74ad456c6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE2F2:C802B:116D1:17D6E:6B060AD0
html-safe-nonce4fe9dcc4572fed255aef68e79c4e7d2c73e91d39b647e0fcb61d9ec10d5289dc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkYyOkM4MDJCOjExNkQxOjE3RDZFOjZCMDYwQUQwIiwidmlzaXRvcl9pZCI6IjMwMTg3MjE1MTUyOTU2MDc1MDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac170fb41f4de27a9bf96ce6dd357d0e8cc87b0265d05b16b98f10c95a1e71cbd4
hovercard-subject-tagissue:6591210728
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/14601/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5d67f7b2c2012f0d872e9f31ee46ed0a89fa8bc4265ac200ae8625670611d3af/developing-today/code/issues/14601
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5d67f7b2c2012f0d872e9f31ee46ed0a89fa8bc4265ac200ae8625670611d3af/developing-today/code/issues/14601
og:image:altProblem /files/write is documented as offset-idempotent (pkgs/fleet/crates/fleet-proxy/src/files.rs:14-17: "Writes are idempotent at a given offset, so retries are safe"). Both sides of that contra...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedezren39
hostnamegithub.com
expected-hostnamegithub.com
None47127d2f2009e000f3401193f8b4163109ac669adad0804de1ee0e6333ca7b9e
turbo-cache-controlno-preview
go-importgithub.com/developing-today/code git https://github.com/developing-today/code.git
octolytics-dimension-user_id26439447
octolytics-dimension-user_logindeveloping-today
octolytics-dimension-repository_id627308783
octolytics-dimension-repository_nwodeveloping-today/code
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627308783
octolytics-dimension-repository_network_root_nwodeveloping-today/code
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0760ea46a027ba5099cdef7abd54f27865eb4f44
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/developing-today/code/issues/14601#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F14601
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeveloping-today%2Fcode%2Fissues%2F14601
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=developing-today%2Fcode
Reloadhttps://github.com/developing-today/code/issues/14601
Reloadhttps://github.com/developing-today/code/issues/14601
Reloadhttps://github.com/developing-today/code/issues/14601
developing-todayhttps://github.com/developing-today
codehttps://github.com/developing-today/code
Codehttps://github.com/developing-today/code
Issues1.1k (1.1k)https://github.com/developing-today/code/issues
Pull requests144 (144)https://github.com/developing-today/code/pulls
Discussionshttps://github.com/developing-today/code/discussions
Actionshttps://github.com/developing-today/code/actions
Projectshttps://github.com/developing-today/code/projects
Wikihttps://github.com/developing-today/code/wiki
Security and qualityhttps://github.com/developing-today/code/security
Insightshttps://github.com/developing-today/code/insights
https://github.com/developing-today/code
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/14601
New issuehttps://github.com/login?return_to=https://github.com/developing-today/code/issues/14601
#14621https://github.com/developing-today/code/pull/14621
fix(fleet): /files/write reports offset+len instead of durable size on overlapping replay; fake oracle truncates the temp tailhttps://github.com/developing-today/code/issues/14601#top
#14621https://github.com/developing-today/code/pull/14621
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
meta/protocol-gaphttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22meta%2Fprotocol-gap%22
priority/highhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fhigh%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
status:in-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Ain-review%22
task/small-fixhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Fsmall-fix%22
user/reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22user%2Freview%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#issue-6591210728
#5759https://github.com/developing-today/code/issues/5759
#10355https://github.com/developing-today/code/issues/10355
#12193https://github.com/developing-today/code/issues/12193
#11714https://github.com/developing-today/code/issues/11714
dezren39https://github.com/dezren39
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
task/small-fixhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Fsmall-fix%22
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
priority/highhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fhigh%22
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#event-37179171811
https://github.com/apps/developing-today
developing-todayhttps://github.com/apps/developing-today
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#issuecomment-7144222399
developing.todayhttps://kaneo.security.cab
CODE-5366https://kaneo.security.cab/dashboard/workspace/6oQgIkST0YGrCcxrnhbHPOUCfgdD3cqE/project/pfcq432h349r20up18gttfv4/task/g5uotbs1ewgauqlrlynnp2ht
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#issuecomment-7144334993
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#issuecomment-7144408571
#5759https://github.com/developing-today/code/issues/5759
#10355https://github.com/developing-today/code/issues/10355
#14601https://github.com/developing-today/code/issues/14601
dezren39https://github.com/dezren39
status/needs-triagehttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fneeds-triage%22
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#event-37180816127
https://github.com/apps/developing-today-fleet
developing-today-fleethttps://github.com/apps/developing-today-fleet
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#issuecomment-7144830198
developing.today fleethttps://kaneo.security.cab
https://github.com/apps/developing-today-fleet
developing-today-fleethttps://github.com/apps/developing-today-fleet
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#issuecomment-7144865303
developing.today fleethttps://kaneo.security.cab
developing-today-fleethttps://github.com/apps/developing-today-fleet
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#event-37182009119
https://github.com/apps/developing-today-fleet
developing-today-fleethttps://github.com/apps/developing-today-fleet
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#issuecomment-7144931163
developing.today fleethttps://kaneo.security.cab
developing-today-fleethttps://github.com/apps/developing-today-fleet
user/reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22user%2Freview%22
meta/protocol-gaphttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22meta%2Fprotocol-gap%22
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#event-37182118872
dezren39https://github.com/dezren39
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#event-37183054296
fix(fleet): /files/write reports durable size and fake preserves temp…https://github.com/developing-today/code/commit/fee7f42bd3817ad8e059ba57bde91d7d710326dc
fee7f42https://github.com/developing-today/code/commit/fee7f42bd3817ad8e059ba57bde91d7d710326dc
developing-todayhttps://github.com/apps/developing-today
status:in-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Ain-review%22
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#event-37183385149
https://github.com/dezren39
dezren39https://github.com/dezren39
on Nov 24, 2026https://github.com/developing-today/code/issues/14601#issuecomment-7145282390
#14621https://github.com/developing-today/code/pull/14621
#14621https://github.com/developing-today/code/pull/14621
#14601https://github.com/developing-today/code/issues/14601
Sign up for freehttps://github.com/signup?return_to=https://github.com/developing-today/code/issues/14601
Sign in to commenthttps://github.com/login?return_to=https://github.com/developing-today/code/issues/14601
kind/bughttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22kind%2Fbug%22
meta/protocol-gaphttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22meta%2Fprotocol-gap%22
priority/highhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22priority%2Fhigh%22
queue/claimedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22queue%2Fclaimed%22
source/creatorhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22source%2Fcreator%22
status/in-progresshttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%2Fin-progress%22
status:in-reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22status%3Ain-review%22
task/small-fixhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22task%2Fsmall-fix%22
user/reviewhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22user%2Freview%22
work/assignedhttps://github.com/developing-today/code/issues?q=state%3Aopen%20label%3A%22work%2Fassigned%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.