Repository navigation
Conversation
…t total time Reading an artifact took three commands and hand-parsing a token (gallery-get → sign → cut t out of download_url → artifact-stream), and the generated artifact-stream printed "OK" for a JSON file and truncated files over 10MB. - `safari artifact-download <art_…|pf_…|link>` resolves the ID (also from a console link), signs, streams to the server's file name (base name only) or --output (- for stdout), and removes a partial file on failure. - `safari artifact-stream --t` stays at its path-name for callers holding a download_url, now curated on the SDK's streaming Artifacts.Download. - Timeouts by kind of call: JSON calls keep the SDK's 30s overall timeout; byte transfers (artifact download, session export, file/skill/CSV uploads) have no total limit and are cancelled after 60s with no bytes moved, with an error that says so. Requires go-flashduty with Artifacts.Download.
…fails Write through a temp file beside the destination and rename it into place, so a failed or stalled download leaves neither a partial file nor a truncated earlier one; devices and FIFOs (-o /dev/null) are written directly. Reject an artifact that resolves to no file_id. Bumps go-flashduty for download-token redaction in logged URLs.
…place local ones A response body's idle clock now runs only while a read waits on the network, so piping a download or export into a slow consumer is not reported as a stalled transfer. Without --output, a server-chosen name that already exists is refused instead of replaced. The temp file is created with 0666 so the umask decides the saved file's mode. go mod tidy drops stale go.sum lines.
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.
Problem
artifact-gallery-get→artifact-sign→ cuttingtout ofdownload_urlwith sed →artifact-stream --t. An agent has to get all of them right.artifact-streamlost data. It went through the typed JSON path:OK: GET /safari/artifact/streamand its bytes were dropped;Change
safari artifact-download <art_…|pf_…|link>.--output(-means stdout).--jsonprints the same as an object.safari artifact-stream --tstays at its path-name (the path-is-king invariant). It is now curated on the SDK's streamingArtifacts.Downloadand saves files the same way.transfer stalled: no bytes moved for 1m0s…instead ofcontext canceled. The idle clock also covers waiting for the response to start. Covered: artifact download/stream, session export,safari send --file, skill upload, mapping CSV upload.go.modpoints at the go-flashduty PR commit that addsArtifacts.Download(feat(artifacts): stream file downloads; no overall timeout on byte transfers go-flashduty#115). Bump it to the release tag before release.Verification
go test ./...passes, includingTestEveryOperationHasPathCommandandTestGeneratorTargetsFullSpec.make check-cardspasses.reflect.Ptrnotes are in untouched files.../../etc/data.jsonis saved verbatim asdata.json;-owith--json;-o -writes to stdout;errTransferStalledand leaves no partial file;art_ID → 18996-byte HTML saved under its server name;-o --json;pf_ID to stdout;ResourceNotFound, exit 1.Follow-up commits
-o /dev/nullare written directly. The temp file is created0666, so the umask decides the saved file's mode.--output, a server-chosen file name that already exists is refused. An explicit--outputpath is overwritten.| lessis therefore not reported as a stall. Uploads keep reset-on-read, because the SDK reads the source only as fast as the network drains it.file_idgets a clear error.Release order
go.modto that tag. The current pin is a branch pseudo-version.