Repository navigation
fix(workflows): safely inspect externalized run values - #1070
dovvnloading wants to merge 2 commits into
Conversation
dovvnloading
left a comment
There was a problem hiding this comment.
Source review complete for 3eeaa09. The stored-value union matches the backend journal contract; results, inputs and step outputs branch before inline rendering. The download uses the run-scoped, capability-authenticated endpoint, checks reference metadata and byte length, does not fetch on disclosure/poll, and handles cancellation and retry. The second commit is a test-only MCP cancellation handoff cleanup, not a production backend change. No blocking defect found in the reviewed implementation.
Verified CI: all four required jobs passed, including compile/Ruff/pytest, build, POSIX checks and frontend schema/type/lint/Vitest/build. The frontend log confirms all 9 WorkflowRunsPanel tests passed (195 test files passed overall). MCP browser checks passed. GitHub reports a clean merge, but main has advanced since the CI base, including adjacent workflow input/editor changes.
Remaining pre-merge validation from the PR description: the general Playwright E2E job was skipped by design (scheduled/manual only, not because of draft status); the four new real-backend scenarios and manual UI/theme verification are therefore unverified. Run CI manually on agent/workflow-externalized-run-values with run_browser_tests=true, ideally after integrating current main, or run the focused workflow-operator.spec.ts suite in a configured checkout. Local checkout is blocked by DNS in this environment, and the available GitHub connection cannot dispatch workflows. Marked ready for review; leaving merge pending rather than treating skipped checks as passes.
Summary
Fixes #1035. The detached run journal returns references for large text, JSON and table values rather than the inline fields the inspector previously assumed were present. The inspector now recognizes that storage representation, shows the kind and size without trying to render missing fields, and lets the user explicitly download the original typed JSON envelope.
What Changed
Why
A completed workflow must remain inspectable regardless of how the backend stores its values. Keeping externalized values as references avoids recreating large inline responses on each poll. The explicit download preserves original text, scalar types, columns and rows without interpreting the contents as active markup. The downloaded JSON is the typed envelope, not a converted text or CSV export.
Validation
ed9a41c6f3fcc8222c3a5a419b01652ef0a43040).python -m compileall -q .passes (run from repo root)python -m pytest -qpasses (run from repo root)cd web_ui && npm run checkpassesLocal checkout is blocked:
git ls-remote https://github.com/dovvnloading/Graphlink.git HEADfails because github.com cannot be resolved. The component and Playwright tests are added but have not run locally; full CI and browser review remain required. Focused commands in a configured checkout:npm --prefix web_ui run test -- src/app/chrome/WorkflowRunsPanel.test.tsx npm --prefix web_ui run check npm --prefix web_ui run test:e2e -- e2e/workflow-operator.spec.tsManual verification: Run a text-copy workflow with text at and above 64 KiB, then inspect its result, inputs and step outputs; repeat for a large JSON/table value. Confirm only the Download button fetches the full asset, the download preserves the complete payload, missing assets show an error without breaking the inspector, and Save result as graph remains available. Verify keyboard operation and both themes.
UI Notes
Reuses existing Button and InlineAlert components. Screenshots, keyboard and browser verification are pending.
Additional Context
No backend/schema/dependency changes. This change deliberately provides an explicit download rather than rendering arbitrarily large payloads into the DOM. Missing and corrupt references are simulated in component tests; the real-backend browser tests cover the successful asset route. Draft pending CI and manual review; do not merge until those checks pass.