Skip to content

post: report performed hydration independently of the commit decision - #58

Open
piob-io wants to merge 1 commit into
mainfrom
devin/1789773398-hydration-not-persisted
Open

piob-io wants to merge 1 commit into
mainfrom
devin/1789773398-hydration-not-persisted

Conversation

@piob-io

@piob-io piob-io commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

The host classifies a git-mirror hydration as completed / hydrated-not-persisted / clone-failed from two flags the post step sends in commitStickyDisk: shouldCommit and vmHydratedGitMirror. We were pre-ANDing them on the action side:

-      const vmHydratedGitMirror = shouldCommit && performedHydration
       cleanupResult = await blacksmithCache.cleanup({
         ...
         shouldCommit,
-        vmHydratedGitMirror,
+        vmHydratedGitMirror: performedHydration,

so a job whose initial clone succeeded but that could not commit (failed job, throttled/denied commit, sync failure) reached the host as vmHydrated=false and was stamped clone-failed — the hydrated-not-persisted bucket on the hydration funnel was unreachable, and successful clones were being counted as clone failures. cleanup() likewise stops clearing the flag when the sync fails/times out or the unmount fails; it still forces shouldCommit=false in those paths.

Backend safety: the host has computed hydrationPersisted := shouldCommit && VMHydratedGitMirror and sent that to the backend since FastActions/fa#3218 (March), which every deployed agent tag includes — so the backend never sees a raw true for an uncommitted disk; only the outcome label changes.

Tests: sync-failure/timeout cases now assert {shouldCommit: false, vmHydratedGitMirror: true}; new case for shouldCommit=false with a performed hydration (no maintenance, flag passed through). dist/index.js rebuilt.

Link to Devin session: https://app.devin.ai/sessions/53ae2d32138144f4832eae008103aa71
Open in Devin Desktop: https://app.devin.ai/desktop/session/53ae2d32138144f4832eae008103aa71?variant=devin
Requested by: @piob-io


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled. (Staging)

The post step ANDed vmHydratedGitMirror with shouldCommit before sending it
to the host, so a job whose initial clone succeeded but that could not
commit (failed job, throttled commit, sync failure) was indistinguishable
from a job whose clone failed. The host already combines the raw flag with
shouldCommit to decide whether hydration was persisted, and only reports
the persisted result to the backend; the raw flag is what lets it label the
outcome hydrated-not-persisted instead of clone-failed.

Send performedHydration as-is from main.ts and stop clearing it in
cleanup() on sync/unmount failure; shouldCommit is still forced false there.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@piob-io
piob-io marked this pull request as ready for review September 18, 2026 23:35
@piob-io
piob-io requested a review from ajwerner September 18, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant