start-from support in cloud#796
Conversation
| "status": "completed", | ||
| "startedAt": "2026-04-27T20:00:33.269Z", | ||
| "completedAt": "2026-04-27T20:08:46.379Z", | ||
| "path": "/Users/khaliqgant/Projects/AgentWorkforce/relay/.trajectories/completed/2026-04/traj_ui5omrgz819d.json" |
There was a problem hiding this comment.
🟡 Trajectory index entry uses hardcoded local machine path instead of repo-relative convention
The new traj_ui5omrgz819d entry in .trajectories/index.json uses the path /Users/khaliqgant/Projects/AgentWorkforce/relay/.trajectories/completed/2026-04/traj_ui5omrgz819d.json, which is a developer's local macOS path. Every other entry in the file uses /home/runner/work/relay/relay/.trajectories/... (the CI runner path). While resolveIndexEntryPath in packages/trajectory/src/integration.ts:82-113 has fallback strategies that extract the relative portion after /.trajectories/, this path is still inconsistent with every other entry and forces unnecessary fallback resolution on every read.
| "path": "/Users/khaliqgant/Projects/AgentWorkforce/relay/.trajectories/completed/2026-04/traj_ui5omrgz819d.json" | |
| "path": "/home/runner/work/relay/relay/.trajectories/completed/2026-04/traj_ui5omrgz819d.json" |
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Fixed in fa1825d — trajectory path now uses CI runner convention.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e1bfbac29
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cloud-sync-')); | ||
| const tmpPatch = path.join(tmpDir, 'changes.patch'); | ||
| fs.writeFileSync(tmpPatch, result.patch, { mode: 0o600 }); | ||
| fs.writeFileSync(tmpPatch, result.patch ?? '', { mode: 0o600 }); |
There was a problem hiding this comment.
Fail when patch payload is missing
Do not coalesce result.patch to an empty string here: if the API returns hasChanges: true but omits patch, this path writes an empty patch and proceeds to git apply, which can succeed with no changes, so users get a false “Patch applied successfully.” Because syncWorkflowPatch() currently validates only hasChanges (not that patch is a string), this change masks malformed responses instead of surfacing them; please throw an explicit error when hasChanges is true and patch is absent.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in fa1825d — result.patch is now validated with an explicit typeof check after the hasChanges guard. If the server reports changes but returns no patch data, we throw instead of silently writing an empty file.
…ectory path - Throw explicit error when hasChanges is true but patch is absent, instead of coalescing to empty string (addresses CodeQL and Codex P2) - Fix trajectory index path to use CI runner convention instead of local macOS path Co-Authored-By: Khaliq Gant <khaliqgant@gmail.com>
start-fromparam