Skip to content

Commit bd57186

Browse files
committed
docs(codex): explain preserved session bridge copies
1 parent 1c0082b commit bd57186

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/codex/wsl-codex-session-bridge.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ export function buildWslCodexSessionBridgeShellCommand(
105105
' [ "${#hash}" -eq 64 ] || return 1',
106106
' printf \'%s\' "$hash"',
107107
'}',
108+
// Why: sourceSize records the verified copied prefix, not the source's
109+
// current full size, because an active rollout may still be growing.
108110
'write_copy_marker() {',
109111
' local marker_file="$1" source_file="$2" target_file="$3"',
110112
' mkdir -p -- "$(dirname -- "$marker_file")" 2>/dev/null || return 1',
@@ -146,6 +148,8 @@ export function buildWslCodexSessionBridgeShellCommand(
146148
' preserved_fingerprint=$(file_sha256 "$preserved_file") || return 1',
147149
` ( set -o noclobber; printf '{"version":1,"sourcePath":"%s","originalTargetPath":"%s","preservedPath":"%s","displacedTargetPath":"%s","preservedFingerprintSha256":"%s"}\\n' "$source_json" "$target_json" "$preserved_json" "$displaced_json" "$preserved_fingerprint" >"$record_file" ) 2>/dev/null`,
148150
'}',
151+
// Why: preserve the pre-refresh inode so open file descriptors stay observable;
152+
// once that evidence exists, halt automatic refresh until human review.
149153
'refresh_copy() {',
150154
' local marker_file="$1" source_file="$2" target_file="$3" relative_path="$4"',
151155
' local target_size source_size target_size_after target_fingerprint_before target_fingerprint_after',

0 commit comments

Comments
 (0)