Skip to content

fix(devloop): cap future-dated file times in the change baseline (#26228) (CP: 25.3) - #26259

Merged
vaadin-bot merged 1 commit into
25.3from
cherry-pick-26228-to-25.3-1791471183457
Oct 8, 2026
Merged

vaadin-bot merged 1 commit into
25.3from
cherry-pick-26228-to-25.3-1791471183457

Conversation

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #26228 to branch 25.3.


Review risk: two-way door — dev loop daemon only; affects how change detection treats files dated in the future

behavior deviation · flow-devloop-daemon · projects whose files are dated ahead of the local clock

With the dev loop, every apply restarted the application even when nothing was edited, first with "application.properties changed" and, once that was out of the way, because unchanged Java sources were recompiled each time. This happens when project files carry a modification time in the future, for example a starter zip extracted in a time zone behind the one it was packed in. It lasted until the clock caught up, hours later. Workaround: touch the affected files.

Risks:

  • ⚠️ Behaviour change: a file dated more than a minute ahead of the clock is now taken as read at startup, and its time is no longer compared with its compiled class. An edit always gets the current time, so this does not hide a real edit.
  • ⚠️ Edge case: a future-dated source whose existing .class was built from different content (an archive shipping prebuilt classes) is not recompiled on timestamp grounds until it is edited. A real edit cannot cause this.
  • ✅ No public API, security, memory, serialization, threading, performance or migration impact

Context. Change detection asks two timestamp questions: was the file written after the app started (the baseline), and is the source newer than its class file (the artifact check). A file dated in the future answers yes to both for hours: a startup-only resource restarted the app on every apply, and a future-dated source was recompiled on every apply, restarting the app when it was an entity.

  • Modification times more than 60 s ahead of the clock are now capped when seeding the baseline for sources, resources and frontend files
    • The 60 s margin keeps real edits on shares or container mounts with a slightly faster clock visible
  • The source-versus-class time check now skips sources dated more than 60 s ahead; the baseline still catches edits to them
  • Added tests for a future-dated application.properties and a future-dated source, both unchanged and edited

)

**Review risk:** two-way door — dev loop daemon only; affects how change
detection treats files dated in the future

**behavior deviation** · flow-devloop-daemon · projects whose files are
dated ahead of the local clock

With the dev loop, every `apply` restarted the application even when
nothing was edited, first with "application.properties changed" and,
once that was out of the way, because unchanged Java sources were
recompiled each time. This happens when project files carry a
modification time in the future, for example a starter zip extracted in
a time zone behind the one it was packed in. It lasted until the clock
caught up, hours later. Workaround: `touch` the affected files.

**Risks:**
- ⚠️ Behaviour change: a file dated more than a minute ahead of the
clock is now taken as read at startup, and its time is no longer
compared with its compiled class. An edit always gets the current time,
so this does not hide a real edit.
- ⚠️ Edge case: a future-dated source whose existing `.class` was built
from different content (an archive shipping prebuilt classes) is not
recompiled on timestamp grounds until it is edited. A real edit cannot
cause this.
- ✅ No public API, security, memory, serialization, threading,
performance or migration impact

**Context.** Change detection asks two timestamp questions: was the file
written after the app started (the baseline), and is the source newer
than its class file (the artifact check). A file dated in the future
answers yes to both for hours: a startup-only resource restarted the app
on every apply, and a future-dated source was recompiled on every apply,
restarting the app when it was an entity.

- Modification times more than 60 s ahead of the clock are now capped
when seeding the baseline for sources, resources and frontend files
- The 60 s margin keeps real edits on shares or container mounts with a
slightly faster clock visible
- The source-versus-class time check now skips sources dated more than
60 s ahead; the baseline still catches edits to them
- Added tests for a future-dated `application.properties` and a
future-dated source, both unchanged and edited

---------

Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>
Co-authored-by: Artur Signell <artur@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Tomi Virtanen <tltv@vaadin.com>
@github-actions github-actions Bot added the +0.0.1 label Oct 8, 2026
@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

This PR is eligible for auto-merging policy, so it has been approved automatically. If there are pending conditions, auto merge (with 'squash' method) has been enabled for this PR [Message is sent from bot]

@vaadin-bot
vaadin-bot enabled auto-merge (squash) October 8, 2026 15:02
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Test Results

 1 504 files  ±0   1 589 suites  ±0   1h 53m 24s ⏱️ - 5m 4s
11 979 tests +4  11 911 ✅ +4  68 💤 ±0  0 ❌ ±0 
12 547 runs  +4  12 479 ✅ +4  68 💤 ±0  0 ❌ ±0 

Results for commit ce308b4. ± Comparison against base commit 50ecfc2.

@vaadin-bot
vaadin-bot merged commit 542ec52 into 25.3 Oct 8, 2026
@vaadin-bot
vaadin-bot deleted the cherry-pick-26228-to-25.3-1791471183457 branch October 8, 2026 15:13
@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

This ticket/PR has been released with Vaadin 25.3.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants