Repository navigation
feat(explorer): read prompt-response trajectory URLs under either key - #102
Merged
Merged
Conversation
The explorer reads a prompt response's trajectory URL and per-turn URLs through one accessor, lib/trajectory-url.ts: the S3-named key first while both are written, falling through to the object-store name when it is null or missing, as core reads them. The task-instance viewer, the tab bar's downloads and the runner's materialized conversation use it, so an instance recorded under either key shows its trajectories. The viewer's unused compact_trajectory_s3_uri field goes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Core now writes a prompt response's trajectory URLs under object-store names (
agent_trajectory_object_url,target_agent_per_turn_trajectory_object_urls) beside the S3-named keys (#101). This is the explorer side: it reads either.lib/trajectory-url.ts:trajectoryUrlandperTurnTrajectoryUrlsread the S3-named key first while both are written, falling through to the object-store name when it is null or missing. That is the order core'sread_dual_keyeduses. A per-turn entry that isn't a URL staysnull, as a failed turn's upload is today, and an empty S3-named list stays empty.hasTrajectories), the tab bar's downloads and the runner's materialized conversation all go through it. An instance recorded under either key shows its trajectories, downloads and turns.compact_trajectory_s3_uritype field goes. Nothing read it, and core no longer sets it on a response.Internal names such as
s3Uri/_entryS3Uriare unchanged here; renaming them is wording, done separately.No release needed: the UI source is excluded from the wheel.
Testing
Smoke (
npm run test:smoke): 14 ran, 2 skipped on their allowed capability reasons, 0 failed.trajectory-url.smoke.tscovers:null;materializeInstancebuilding its turns from either key.bar-downloads.smoke.tslists trajectories recorded under either key.Typecheck, lint (no new warnings) and static export: pass.
Chaos (built UI in headless Chrome,
agent-env upon local stores, this branch vsmain): each case is a task instance whose trajectories each carry a unique marker. The check is which object URLs the page fetched and which markers rendered.mainnull, other setnull) turn[object Object]and shows a store errorNo uncaught exceptions or console errors from the app in any case.
Mutants (out-of-tree): 9 of 10 caught.
materializeread.||for??differs only when the S3-named key is an empty string, which nothing writes.🤖 Generated with Claude Code
The PR appears safe to merge; no actionable issue was found.
Summary
The explorer now reads prompt-response trajectory URLs under either the S3-named or object-store-named fields, preferring the S3-named value when both are present.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Prompt response] --> B[Read S3-named key first] B --> C{Missing or null?} C -- Yes --> D[Read object-store key] C -- No --> E[Use S3-named value] D --> F[Viewer, downloads, runner] E --> FReviews (1) · Last reviewed commit: "feat(explorer): read prompt-response tra..." · Reviewed by Greptile