Skip to content

add advanced runtimeuse client coverage and handler diagnostics#9

Merged
vijit-lark merged 6 commits intomainfrom
vd-20260316-1120
Mar 17, 2026
Merged

add advanced runtimeuse client coverage and handler diagnostics#9
vijit-lark merged 6 commits intomainfrom
vd-20260316-1120

Conversation

@vijit-lark
Copy link
Copy Markdown
Contributor

@vijit-lark vijit-lark commented Mar 16, 2026

Summary

  • add end-to-end and advanced LLM coverage for runtimeuse client flows including artifacts, pre/post commands, and full invocation lifecycle
  • improve runtime handlers with secret redaction, richer tool/upload logging, and local shell support for OpenAI agent execution
  • make sandbox-backed tests more reliable with configurable websocket targets, S3 signing config, and sandbox setup updates

Test plan

  • Run pytest packages/runtimeuse-client-python/test/e2e packages/runtimeuse-client-python/test/llm
  • Run the relevant packages/runtimeuse test suite for handler and session changes

Made with Cursor

… invocation lifecycle

- Add local HTTP server fixture (stdlib, no new deps) for serving downloadable
  files and receiving artifact upload PUTs
- Add READ_FILE command to echo handler for verifying downloaded files
- TestArtifactUploadIntegration: verify uploaded content reaches HTTP target
- TestPreAgentDownloadables: verify files downloaded into runtime, failure case
- TestFullInvocationLifecycle: combined ordering (download → pre-cmd → agent →
  post-cmd → artifact upload)
- Pre-create artifacts_dir to fix chokidar race on non-existent directories

Made-with: Cursor
Previously secrets were only redacted from pre/post command stdout/stderr.
Now redaction is applied at the send() boundary in session.ts so every
outgoing WebSocket message (result, assistant, error) is scrubbed. The
logger is also wrapped to prevent secrets from appearing in server logs.

- Add createRedactingLogger in logger.ts
- Store secrets and redact in session.send()
- Add STREAM_TEXT echo handler command for testing
- Add TestSecretsRedaction e2e tests (command output, assistant msg,
  result text, error message)
- Add session.test.ts unit tests for redaction

Made-with: Cursor
…, and full lifecycle

Covers Claude and OpenAI agents with real E2B sandboxes:
- pre/post command execution with cwd and failure handling
- artifact upload via real S3 presigned URLs with polling helper
- full invocation lifecycle (download → pre-cmd → agent → post-cmd → upload)

Made-with: Cursor
Add USE_LOCAL_WS escape hatch in conftest to run tests against a local
server. Make pre/post command tests write sentinel files for more robust
assertions. Install websocat in E2B sandbox and expose a WS-to-SSH proxy
for live debugging. Ensure artifacts dir is created before the watcher
starts and apply post-invocation delay when artifacts are present.

Made-with: Cursor
Make the test harness configurable for remote websocket targets and S3 uploads while adding richer agent tool logging and local shell support for debugging runtime behavior.

Made-with: Cursor
@vijit-lark vijit-lark merged commit 4cd2c24 into main Mar 17, 2026
5 checks passed
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