Skip to content

artifacts: cheaper latest-outcome lookup for run listings #147

Closed

Description

@ElbertePlinio

artifacts list, MCP artifact_list and the pickforge://runs resource read each lab run's whole actions.jsonl to find the latest outcome record (#145, latestOutcomeStatus). Reads are sequential so peak memory is one journal, but a root with 20 runs near the 100 MiB cap still parses every line of every journal on each listing, and clients poll the runs resource.

  • Either tail-read the last N KiB of the journal and scan backwards for the last complete "kind":"outcome" line, or persist the latest outcome status into the manifest summary when recordEvidenceOutcome appends (write-path change; keep the journal authoritative)
  • Keep the corrupt-journal and non-evidence null rules
  • Add a test with a journal near the line cap to bound listing time

Refs #117, #145.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions