Skip to content

Commit 7cc5527

Browse files
committed
fix(ledger): validate import marker field types
1 parent 74296fc commit 7cc5527

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/action-ledger-runtime.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ function actionEventShardImportBindings(
762762
}
763763

764764
const bindings = [...producerRuns.values(), ...eventIdentities.values()];
765-
for (const [shardSetKey, group] of shardSets) {
765+
for (const group of shardSets.values()) {
766766
const ordered = [...group].sort((left, right) =>
767767
left.relativePath < right.relativePath ? -1 : left.relativePath > right.relativePath ? 1 : 0,
768768
);

‎src/action-ledger.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,8 +1141,8 @@ function parseActionEventShardImportReservation(
11411141
? reservation.shards.map((entry) => {
11421142
const shard = entry as { path?: unknown; replay_sha256?: unknown };
11431143
return {
1144-
path: String(shard.path ?? ""),
1145-
replay_sha256: String(shard.replay_sha256 ?? ""),
1144+
path: typeof shard.path === "string" ? shard.path : "",
1145+
replay_sha256: typeof shard.replay_sha256 === "string" ? shard.replay_sha256 : "",
11461146
};
11471147
})
11481148
: [];

0 commit comments

Comments
 (0)