Skip to content

Commit ff5264a

Browse files
Merge branch 'main' into fix/adopt-external-plugin-containment
2 parents 9695362 + c4365f1 commit ff5264a

3 files changed

Lines changed: 476 additions & 5 deletions

File tree

‎.github/pull_request_template.md‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<!--
2+
Optional linked context:
3+
Add a visible `Closes #<issue-number>` or `Related: #<issue-number>` line
4+
below this comment.
5+
6+
Required PR title:
7+
type: user-facing description
8+
Use a parenthesized scope only when it adds clarity:
9+
fix(auth): login redirect loops when session cookie is expired
10+
11+
Types: feat, fix, improve, refactor, docs, chore.
12+
For fixes, describe the user-visible symptom and trigger:
13+
fix: task list fails to load when user has no environments
14+
Avoid implementation details such as:
15+
fix: add null check to task query
16+
-->
17+
18+
<details>
19+
<summary>Additional instructions</summary>
20+
21+
**MUST:** Keep **Allow edits from maintainers** enabled for this PR so maintainers
22+
can help update the branch when needed.
23+
24+
</details>
25+
26+
## What Problem This Solves
27+
28+
<!--
29+
Describe the concrete user, product, or operational problem.
30+
For fixes, begin with:
31+
"Fixes an issue where users <do X> would <experience Y> when <condition>."
32+
or:
33+
"Resolves a problem where..."
34+
35+
Name the affected UI surface or workflow. Do not describe the code-level cause here.
36+
-->
37+
38+
## Why This Change Was Made
39+
40+
<!--
41+
In one or two sentences, explain the complete shipped solution, key design
42+
decisions, and relevant boundaries or non-goals. Include implementation detail
43+
only when it helps reviewers understand user-visible behavior or risk.
44+
Avoid file-by-file narration.
45+
-->
46+
47+
## User Impact
48+
49+
<!--
50+
State what users, operators, or developers can now do or expect. Lead with the
51+
concrete benefit and use user-facing language. If there is no user-visible
52+
impact, say so plainly.
53+
-->
54+
55+
## Evidence
56+
57+
<!--
58+
Show the most useful proof that this change works. Screenshots, screencasts,
59+
terminal output, focused tests, CI results, live observations, redacted logs,
60+
and artifact links are all useful. Include before/after evidence for visual
61+
changes when it clarifies the result.
62+
63+
Reviewers will inspect the code, tests, and CI. Use this section to make the
64+
validation easy to understand, not to restate the diff.
65+
-->

‎src/env/snapshots.rs‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::store::{
1111
prepare_env_snapshot_restore, remove_env_snapshot, restore_env_snapshot,
1212
rollback_env_snapshot_restore, summarize_snapshot,
1313
};
14-
use crate::supervisor::sync_supervisor_if_present;
14+
use crate::supervisor::sync_supervisor_env_if_present;
1515

1616
#[derive(Clone, Debug)]
1717
pub struct CreateEnvSnapshotOptions {
@@ -194,17 +194,19 @@ impl<'a> EnvironmentService<'a> {
194194
&self,
195195
options: RestoreEnvSnapshotOptions,
196196
) -> Result<EnvSnapshotRestoreSummary, String> {
197+
let env_name = options.env_name.clone();
197198
let summary = restore_env_snapshot(options, self.env, self.cwd)?;
198-
sync_supervisor_if_present(self.env, self.cwd)?;
199+
sync_supervisor_env_if_present(self.env, self.cwd, &env_name)?;
199200
Ok(summary)
200201
}
201202

202203
pub(crate) fn prepare_snapshot_restore_locked(
203204
&self,
204205
options: RestoreEnvSnapshotOptions,
205206
) -> Result<EnvSnapshotRestoreTransaction, String> {
207+
let env_name = options.env_name.clone();
206208
let transaction = prepare_env_snapshot_restore(options, self.env, self.cwd)?;
207-
sync_supervisor_if_present(self.env, self.cwd)?;
209+
sync_supervisor_env_if_present(self.env, self.cwd, &env_name)?;
208210
Ok(transaction)
209211
}
210212

@@ -219,8 +221,9 @@ impl<'a> EnvironmentService<'a> {
219221
&self,
220222
transaction: EnvSnapshotRestoreTransaction,
221223
) -> Result<(), String> {
224+
let env_name = transaction.summary.env_name.clone();
222225
let cleanup_warning = rollback_env_snapshot_restore(transaction, self.env, self.cwd)?;
223-
let sync_result = sync_supervisor_if_present(self.env, self.cwd).map(|_| ());
226+
let sync_result = sync_supervisor_env_if_present(self.env, self.cwd, &env_name).map(|_| ());
224227
match (cleanup_warning, sync_result) {
225228
(None, Ok(())) => Ok(()),
226229
(Some(cleanup_warning), Ok(())) => Err(cleanup_warning),

0 commit comments

Comments
 (0)