Skip to content

Expose a durable scan-session artifact index and optional rollout export #187

Open

Description

@kmckiern

Summary

Local observability tools need a durable way to identify the coordinator and descendant worker sessions belonging to a scan, including failed scans, without reconstructing ownership from timestamps and temporary paths.

Available today

These help retrieval and live observation, but do not provide the durable artifact index and optional export requested here.

Remaining workflow

  • Produce a scan-owned session index that identifies the coordinator and descendants while excluding unrelated sessions.
  • Make it accessible to SDK/local tooling on both success and failure.
  • Support an explicit opt-in to retain/export the indexed raw rollouts when needed.
  • Preserve private artifact permissions and the original scan failure if indexing or cleanup also fails.
  • Test ownership filtering, failure-path persistence, and cleanup using synthetic sessions.

Raw rollouts can contain source, prompts, and tool output, so export should remain an explicit local choice. Exact artifact names and any public option/flag are still design decisions.

Historical motivation and related work

The original failed run left 87 valid rollout files, including metadata for 56 child sessions, but associating them with the scan required manual correlation. No raw rollouts are attached here.

#278 is the open proposal for the index/export workflow. This is a local artifact/lookup feature, not a request for a general tracing backend.

Activity

  1. added
    enhancement
    on Aug 3, 2026
  2. 2830500285 commented on Aug 4, 2026

    @2830500285

    I would like to work on this as a focused SDK/CLI enhancement. My proposed shape is:

    • always emit a bounded rollout-session index inside the private scan directory, covering the coordinator and every descendant worker while excluding unrelated Codex sessions;
    • expose that index path in ScanResult / JSON output so observability tools do not have to correlate timestamps or temporary directories;
    • add an explicit SDK option and CLI flag to retain the indexed JSONL rollouts under the scan artifacts directory (opt-in because rollouts can contain source code, prompts, and tool output);
    • produce the index on both success and failure, and never let an indexing/cleanup error hide the original scan failure;
    • validate parent/child filtering, unrelated-session exclusion, private file modes, failure-path persistence, and cleanup behavior with hermetic tests.

    I will keep this limited to local session discovery/retention rather than introducing a general tracing backend. If maintainers prefer a different flag or artifact name, I can adjust before finalizing the PR.

  3. added
    area:cli
    area:reports
    priority:p3
    on Aug 15, 2026
  4. mldangelo-oai commented on Aug 15, 2026

    @mldangelo-oai
    Collaborator

    Scan-session lookup and worker lineage are now available through scans logs after #348, #349, and #426. Keeping this open for the remaining artifact index, programmatic access, and optional session export.

  5. changed the title [-]Expose and optionally retain scan rollout sessions for observability and external indexing[/-] [+]Expose a scan-session artifact index and optional rollout export[/+] on Aug 15, 2026
  6. mldangelo-oai commented on Oct 8, 2026

    @mldangelo-oai
    Collaborator

    Also related: merged #933 prefers complete saved rollouts over truncated copies. It improves log retrieval, but doesn’t provide the artifact index or optional export requested here.

  7. added
    area:artifacts
    area:integrations
    and removed
    area:cli
    area:reports
    on Oct 8, 2026
  8. changed the title [-]Expose a scan-session artifact index and optional rollout export[/-] [+]Expose a durable scan-session artifact index and optional rollout export[/+] on Oct 19, 2026
  9. removed
    area:integrations
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:artifactsenhancementpriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions