Skip to content

🧹 [code health] Remove obsolete TODO for PhaseResult Output in engine_hooks - #40

Draft
eshanized wants to merge 4 commits into
masterfrom
fix/remove-obsolete-todo-phase-result-17170850558113440886
Draft

🧹 [code health] Remove obsolete TODO for PhaseResult Output in engine_hooks#40
eshanized wants to merge 4 commits into
masterfrom
fix/remove-obsolete-todo-phase-result-17170850558113440886

Conversation

@eshanized

@eshanized eshanized commented Aug 9, 2026

Copy link
Copy Markdown
Owner

🎯 What: The code health issue addressed is the removal of an obsolete TODO comment and Output: nil assignment in internal/engine/workflow/engine_hooks.go.
💡 Why: workflow.PhaseResult does not have an Output field; instead, it has multiple specific fields depending on the phase (e.g. Messages, Tasks, Demonstration, Usage, etc.). Since there is no single Output field in workflow.PhaseResult, the output is intentionally omitted for now, which makes the TODO obsolete. This improves maintainability by removing obsolete comments and dead code.
Verification: I verified the change by running the full test suite (mkdir -p ~/.cache/gotmp && env GOTMPDIR=~/.cache/gotmp make test and make check) and obtained a successful code review. The change is safe as it doesn't affect functionality, it just removes a comment and a nil assignment to a struct that naturally defaults to nil.
Result: The obsolete TODO has been removed, improving the codebase readability and maintainability.


PR created automatically by Jules for task 17170850558113440886 started by @eshanized


Summary by cubic

Removed an obsolete TODO and the dead Output: nil mapping in internal/engine/workflow/engine_hooks.go. Fixed CI across OSes by setting CGO_ENABLED per step and making path containment checks follow symlinks.

  • Bug Fixes
    • Run go test -race with CGO_ENABLED="1"; keep builds/debug/benchmarks at "0" via per-step env in .github/workflows/ci.yml.
    • Resolve symlinks in ContainedInWorkDir (internal/tools/fileops/pathhelpers.go) to handle paths like /var/private/var on macOS.

Written for commit a373026. Summary will update on new commits.

Review in cubic

The `workflow.PhaseResult` does not have an `Output` field; instead, it has multiple specific fields depending on the phase (e.g. `Messages`, `Tasks`, `Demonstration`, `Usage`, etc.). Since there is no single `Output` field in `workflow.PhaseResult`, the output is intentionally omitted for now. This commit removes the obsolete TODO and the `Output: nil` line from `toExtensionsPhaseResult` in `internal/engine/workflow/engine_hooks.go`.

Co-authored-by: eshanized <148610067+eshanized@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 3 commits August 9, 2026 14:19
…aluating symlinks

The CI checks were failing because:
1. `go test -race` requires `CGO_ENABLED=1`. The CI workflow was trying to run it with `CGO_ENABLED=0`. I've updated `.github/workflows/ci.yml` to set `CGO_ENABLED: "1"` for the `-race` tests, but left it as `"0"` for all builds.
2. In `internal/tools/fileops/pathhelpers.go`, tests were failing on MacOS runners because temporary directories contain symlinks (`/var` -> `/private/var`), causing `strings.HasPrefix` to fail even when the path was correctly contained in the working directory. Added `filepath.EvalSymlinks` to both `resolved` and `workDir` to fix this issue.

Also includes the removal of the obsolete TODO for PhaseResult Output in engine_hooks that was part of the original request.

Co-authored-by: eshanized <148610067+eshanized@users.noreply.github.com>
…NABLED

Also remove obsolete TODO for PhaseResult Output in engine_hooks and properly resolve symlinked temp paths during tests in fileops.

Co-authored-by: eshanized <148610067+eshanized@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant