@groeponline/pi-missions 0.3.10 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.11] - 2026-09-05
11
+
12
+ ### Fixed
13
+ - persist history onto fresh mission state (#18)
14
+
15
+ ### Documentation
16
+ - disambiguate schema_version from SCHEMA_VERSION (#12)
10
17
  ## [0.3.10] - 2026-08-30
11
18
 
12
19
  ### Maintenance
package/dist/index.js CHANGED
@@ -2158,24 +2158,25 @@ function spawnWorker(mission, config) {
2158
2158
  }
2159
2159
  try {
2160
2160
  const missionId = mission.id;
2161
- appendHistory(mission, {
2162
- event: "worker_finished",
2163
- featureId: config.featureId,
2164
- note: `Exit ${code}${signal ? ` (${signal})` : ""} in ${Math.round(durationMs / 1e3)}s`,
2165
- details: {
2166
- exitCode: code,
2167
- signal: signal ?? void 0,
2168
- durationMs,
2169
- killed,
2170
- missionId,
2171
- stdoutLen: stdout.length,
2172
- stderrLen: stderr.length,
2173
- model,
2174
- orchestraCorrelation: config.orchestraCorrelation
2175
- }
2176
- });
2177
- saveMissionSafe(mission).catch(() => {
2178
- });
2161
+ const freshMission = loadMissionFromDisk(missionId);
2162
+ if (freshMission?.id === missionId) {
2163
+ appendHistory(freshMission, {
2164
+ event: "worker_finished",
2165
+ featureId: config.featureId,
2166
+ note: `Exit ${code}${signal ? ` (${signal})` : ""} in ${Math.round(durationMs / 1e3)}s`,
2167
+ details: {
2168
+ exitCode: code,
2169
+ signal: signal ?? void 0,
2170
+ durationMs,
2171
+ killed,
2172
+ missionId,
2173
+ stdoutLen: stdout.length,
2174
+ stderrLen: stderr.length,
2175
+ model,
2176
+ orchestraCorrelation: config.orchestraCorrelation
2177
+ }
2178
+ });
2179
+ }
2179
2180
  } catch {
2180
2181
  }
2181
2182
  resolve3(result);