feat(runner): expose the closed hosted session report

Merged
BH
10d ago
+115-8

What and why

  • Expose the session's existing public Report through session.report() once its trace has been written. It returns undefined before that or after a failed write.
  • Retain the report already built by writeHostTrace and clone it for callers. Existing trace rendering/redaction is unchanged.
  • Artifact paths are relative to <output>/results. Caller lifecycle, retries, hosting, and outer test verdicts remain caller-owned.

Refs #1074. Per the maintainer's follow-up, the shared late-secret gap is deferred to #1157, not remediated here. No report-rewriting or cut-tracking machinery is added.

Workflow

flowchart LR
  A[session.close] --> B[Build existing Report]
  B --> C[Write existing trace.md]
  C --> D[Retain Report after successful write]
  D --> E[session.report clones Report]

Verified

On 77e3d49e, locally on a Linux Devbox:

  • pnpm check passed, including the new patch-changeset policy and public Report type assertion.

  • Five owning host test files: 50 passed, no skips. SDK ownership subset: 6 passed, 5 intentionally unselected.

  • Independent review of the combined tree found no new important issues. The main sync preserves its hosted-run ownership/release handling.

  • CI on 77e3d49e: docs, spec, web benchmark, and mobile deterministic tests passed. Web-agent and mobile app-cache jobs were skipped.

  • Cubic completed its check without an AI review because this head is a merge commit. That success status is not current-head AI-review clearance. Maintainer follow-up remains pending.

Prior-head green checks are not current-head validation. No fresh full default/stress suite, testbed/web benchmark, live-provider, or native-device run was performed locally.