Repository navigation
test(auto-reply): canonicalize session export expectations - #118138
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 2, 2026, 3:13 PM ET / 19:13 UTC. ClawSweeper reviewWhat this changesThe PR changes two session-export filesystem test expectations so they compare against the canonical absolute workspace path returned by the fs-safe root. Merge readinessThis remains necessary: current main still expects lexical temporary-directory paths while the session-export owner returns the canonical filesystem path. The two-line test-only repair matches that owner contract and introduces no correctness or security concern, but the protected Priority: P3 Review scores
Verification
How this fits togetherThe auto-reply session-export command writes an HTML export through the fs-safe workspace boundary, then reports the resolved output path to the command reply. The changed helper verifies that relative, absolute, and symlinked workspace requests preserve that canonical path contract without changing production export behavior. flowchart LR
A[Export command request] --> B[Session export writer]
B --> C[fs-safe workspace root]
C --> D[Canonical filesystem path]
D --> E[Export result]
E --> F[Auto-reply confirmation]
D --> G[Filesystem test expectations]
Decision needed
Why: Repository policy keeps Before merge
Agent review detailsSecurityNone. PR surfaceSource 0. Total 0 across 1 file. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the expectation-only repair after the latest reviewable head has green required checks, retaining the fs-safe writer’s canonical-path contract and leaving production export policy untouched. Do we have a high-confidence way to reproduce the issue? Yes, with medium confidence: the reported macOS path-alias reproduction uses the focused session-export test, and current source shows the lexical expected path diverging from the production Root-resolved path. This read-only review did not execute a macOS run locally. Is this the best way to solve the issue? Yes. Updating the two faulty test expectations is the narrowest maintainable repair because the production writer intentionally owns canonical path resolution and the patch does not weaken its workspace or symlink policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 920a265d8179. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready proof for exact head
Scope remains two test expectations with zero production LOC; workspace confinement, symlink rejection, overwrite, permissions, collision handling, docs, config, storage, and changelog behavior are unchanged. |
|
Merged via squash.
|
Summary
RootRoot cause and fix
macOS exposes temporary directories lexically as
/var/..., while fs-safe resolves the workspace to its canonical/private/var/...identity before returningabsolutePath. Three assertions built their expected path from the lexical fixture, so they failed despite writing and reading the correct file.The expectations now resolve the fixture workspace before joining the export path. Production delta is 0 lines.
Closes #118137
Proof
Exact candidate head:
57f32d62a9087c0a9c9ae60fe1eb9967a7096af6node scripts/run-vitest.mjs src/auto-reply/reply/commands-export-session.test.ts— 34/34 passed after final rebasenode scripts/check-changed.mjs -- src/auto-reply/reply/commands-export-session-file.test-support.ts— passed on Blacksmith Testboxtbx_01kz1xjxsy9qcwp1q5a7hb12ky(run)Changelog
Not required: test-only reliability fix with no runtime behavior change.