Run artifact

workspace/targets/DrydockStats/LINEAGE.json

{
  "version": 1,
  "import": {
    "root": "/mnt/c/Users/barlo/projects/drydock/uat/DrydockStats/runs/20261024.141859/sources",
    "format": "markdown"
  },
  "sources": {
    "INSTRUCTIONS.md": {
      "state": "current",
      "versions": [
        {
          "commit": "f2cf8b9",
          "date": "2026-10-24",
          "hash": "26e9f16d1cb531d7ebbc324cdfa9a03e31fcf317e285018fb385409111cdc3cc",
          "release": "",
          "state": "consumed",
          "via": "plan",
          "ticket": null,
          "requirements": [
            {
              "name": "build-go-cli",
              "text": "Implement in Go 1.22 or newer using only the standard library. The application root is a Go\nmodule, and its executable is the main package at `./cmd/ddkstat`. Tests run under `go test`.",
              "stories": [
                "cli-delivery"
              ]
            },
            {
              "name": "run-scoring-harness",
              "text": "`sources/run.sh` is the scoring entry point. Drydock runs it with `sh sources/run.sh` from the completed application root and takes its exit code and output as the score.",
              "stories": [
                "cli-delivery"
              ]
            },
            {
              "name": "preserve-scoring-assets",
              "text": "These files are the exam. Do not modify, rewrite, regenerate, or substitute them:",
              "stories": [
                "log-intake",
                "report-generation",
                "cli-delivery"
              ]
            },
            {
              "name": "parse-and-filter-records",
              "text": "The reporter reads only these and ignores every other field:",
              "stories": [
                "log-intake"
              ]
            },
            {
              "name": "skip-invalid-lines",
              "text": "1. **Blank lines** are ignored and not counted.\n2. **Skipped lines.** A line is skipped when it is not a JSON object, when any of `execution_id`,\n  `started_at`, `status`, `job.command_name`, or `job.target` is absent or not a non-empty\n  string, or when its `execution_id` already appeared on an earlier line. The first occurrence of\n  an `execution_id` is kept. Each skipped line writes one warning to standard error naming its\n  line number. Skipping never changes the exit code.",
              "stories": [
                "log-intake"
              ]
            },
            {
              "name": "handle-missing-statistics",
              "text": "3. **Missing numbers.** An absent or `null` token count, cost, or duration counts as zero. A\n  record with no `result.stats` object at all is still a record.\n4. **Model.** A record's model is `result.stats.model` when present and non-empty, otherwise\n  `job.model`.",
              "stories": [
                "log-intake",
                "report-generation"
              ]
            },
            {
              "name": "classify-failed-calls",
              "text": "5. **Failed.** A record is failed when `status` is not `succeeded`.",
              "stories": [
                "log-intake",
                "report-generation"
              ]
            },
            {
              "name": "filter-reports",
              "text": "6. **Filters** apply to every report. The `skipped` count in `summary` counts skipped lines in the\n  whole file regardless of filters.",
              "stories": [
                "log-intake",
                "report-generation"
              ]
            },
            {
              "name": "format-report-metrics",
              "text": "7. **Minutes.** A minutes column is the group's summed `elapsed_ms` written in tenths of a minute:\n  `t = (ms + 3000) / 6000` in integer division, written as `t / 10`, a `.`, and `t % 10`.\n  `95000` ms is `1.6`.\n8. **Cost.** A cost column is the group's summed `cost_usd` written with exactly four decimal\n  places, as Go's `%.4f` writes a `float64`.\n9. **Ordering.** Text is compared by byte value.",
              "stories": [
                "report-generation"
              ]
            },
            {
              "name": "csv-report-output",
              "text": "Every report writes CSV to standard output: one header row, then data rows, comma-separated, `\\n`\nline endings. Every report except `summary` and `failures` ends with a `TOTAL` row over all\nfiltered records. When no record matches, a report writes its header and, where it has one, a\n`TOTAL` row of zeros (`0.0` minutes, `0.0000` cost).",
              "stories": [
                "report-generation"
              ]
            },
            {
              "name": "implement-six-reports",
              "text": "| Report | Header | Rows |\n|---|---|---|\n| `summary` | `records,skipped,succeeded,failed,first,last,input_tokens,cached_tokens,output_tokens,cost_usd,minutes` | One row. `first` and `last` are the earliest and latest start dates, empty when no record matches. |\n| `commands` | `command,calls,failed,input_tokens,cached_tokens,output_tokens,minutes` | One per command, by calls descending, then command ascending. Then `TOTAL,\u2026`. |\n| `targets` | `target,calls,failed,input_tokens,cached_tokens,output_tokens,cost_usd,minutes` | One per Target, by Target ascending. Then `TOTAL,\u2026`. |\n| `models` | `provider,model,calls,failed,input_tokens,cached_tokens,output_tokens,cost_usd` | One per provider and model pair, by provider then model ascending. Then `TOTAL,,\u2026`. |\n| `daily` | `date,calls,failed,tokens,minutes` | One per start date, ascending. `tokens` is input plus cached plus output. Then `TOTAL,\u2026`. |\n| `failures` | `started_at,target,command,model,returncode,timed_out` | One per failed record, by `started_at` then `execution_id` ascending. `returncode` is empty when `null` or absent. `timed_out` is `true` or `false`. |",
              "stories": [
                "report-generation"
              ]
            },
            {
              "name": "handle-cli-errors",
              "text": "A failing command writes nothing to standard output and one diagnostic line to standard error.",
              "stories": [
                "cli-delivery"
              ]
            },
            {
              "name": "exit-codes",
              "text": "| Code | Meaning |\n|---|---|\n| `0` | Success, including a log with skipped lines or no matching records. |\n| `1` | Operational failure: the log cannot be opened or read. |\n| `2` | Usage error: unknown report or option, missing option value, invalid date, missing or extra log path. |",
              "stories": [
                "cli-delivery"
              ]
            },
            {
              "name": "test-suite",
              "text": "The completed application provides a POSIX-compatible `bin/test.sh` that runs `go vet ./...` and `go test ./...` from the application root and exits zero only when both pass.",
              "stories": [
                "cli-delivery"
              ]
            }
          ]
        }
      ]
    },
    "llm_sample.jsonl": {
      "state": "current",
      "versions": [
        {
          "commit": "f2cf8b9",
          "date": "2026-10-24",
          "hash": "19a092d921393ca299df3dbdb1b65370649bda5aaea44c2fe4f7f1080cc5f217",
          "release": "",
          "state": "consumed",
          "via": "plan",
          "ticket": null,
          "requirements": [
            {
              "name": "parse-execution-records",
              "text": "{\"schema_version\":1,\"execution_id\":\"20261014.063754.176Z-00bfbe21\",\"started_at\":\"2026-10-14T06:37:54.176Z\",\"status\":\"succeeded\",\"job\":{\"command_name\":\"import_compass\",\"target\":\"ReadingList\",\"llm\":\"claude\",\"model\":\"haiku\"},\"prompt\":{\"bytes\":191082},\"result\":{\"returncode\":0,\"timed_out\":false,\"stats\":{\"cached_input_tokens\":263315,\"elapsed_ms\":54872,\"input_tokens\":843,\"output_tokens\":7751,\"turns\":16,\"cost_usd\":0.0659295,\"model\":\"claude-haiku-5-5\"}}}",
              "stories": [
                "log-intake"
              ]
            },
            {
              "name": "aggregate-and-format-reports",
              "text": "{\"schema_version\":1,\"execution_id\":\"20261014.063754.176Z-00bfbe21\",\"started_at\":\"2026-10-14T06:37:54.176Z\",\"status\":\"succeeded\",\"job\":{\"command_name\":\"import_compass\",\"target\":\"ReadingList\",\"llm\":\"claude\",\"model\":\"haiku\"},\"prompt\":{\"bytes\":191082},\"result\":{\"returncode\":0,\"timed_out\":false,\"stats\":{\"cached_input_tokens\":263315,\"elapsed_ms\":54872,\"input_tokens\":843,\"output_tokens\":7751,\"turns\":16,\"cost_usd\":0.0659295,\"model\":\"claude-haiku-5-5\"}}",
              "stories": [
                "report-generation"
              ]
            },
            {
              "name": "command-line-delivery-and-conformance",
              "text": "{\"schema_version\":1,\"execution_id\":\"20261014.063754.176Z-00bfbe21\",\"started_at\":\"2026-10-14T06:37:54.176Z\",\"status\":\"succeeded\",\"job\":{\"command_name\":\"import_compass\",\"target\":\"ReadingList\",\"llm\":\"claude\",\"model\":\"haiku\"},\"prompt\":{\"bytes\":191082},\"result\":{\"returncode\":0,\"timed_out\":false,\"stats\":{\"cached_input_tokens\":263315,\"elapsed_ms\":54872,\"input_tokens\":843,\"output_tokens\":7751,\"turns\":16,\"cost_usd\":0.0659295,\"model\":\"claude-haiku-5-5\"}}",
              "stories": [
                "cli-delivery"
              ]
            }
          ]
        }
      ]
    },
    "run.sh": {
      "state": "current",
      "versions": [
        {
          "commit": "f2cf8b9",
          "date": "2026-10-24",
          "hash": "0cc2ee483269886e4d61e5bfdbefec2419121f8a49a10ef33f182f855ba889d3",
          "release": "",
          "state": "consumed",
          "via": "plan",
          "ticket": null,
          "requirements": [
            {
              "name": "build-main-package",
              "text": "if ! (cd \"$APP\" && go build -o \"$BIN\" ./cmd/ddkstat); then\n    echo \"error: go build ./cmd/ddkstat failed at the application root $APP.\" >&2\n    echo \"The deliverable is a Go module whose main package is ./cmd/ddkstat.\" >&2\n    exit 1\nfi",
              "stories": [
                "cli-delivery"
              ]
            },
            {
              "name": "verify-reports-and-exit-codes",
              "text": "# Builds ./cmd/ddkstat with `go build` and compares every report's exit code and standard output\nover the supplied sample log with the known answer below. Standard error is never compared.",
              "stories": [
                "cli-delivery"
              ]
            },
            {
              "name": "generate-six-reports",
              "text": "# \u2500\u2500 A. Every report over the whole sample \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
              "stories": [
                "report-generation"
              ]
            },
            {
              "name": "filter-reports",
              "text": "# \u2500\u2500 B. Filters \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
              "stories": [
                "log-intake",
                "report-generation"
              ]
            },
            {
              "name": "handle-no-match-filters",
              "text": "# \u2500\u2500 C. A filter that matches nothing \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
              "stories": [
                "log-intake",
                "report-generation"
              ]
            },
            {
              "name": "handle-operational-failures",
              "text": "# \u2500\u2500 E. Operational failures \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
              "stories": [
                "cli-delivery"
              ]
            },
            {
              "name": "handle-usage-errors",
              "text": "# \u2500\u2500 U. Usage errors \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",
              "stories": [
                "cli-delivery"
              ]
            }
          ]
        }
      ]
    }
  }
}