# Dataset manifest for MKT-005 — field notes from an autonomous engineering fleet.
# Schema: schemas/data-manifest.schema.json (EPIC §8.2).
#
# Every dataset is computed from fixed snapshots of the GitHub record of the
# privateos orchestrator (github.com/Prestige-Worldwide-Algotrading/privateos,
# commit 44a0a6484d677a8063d9a9a6669a915bb96bb77b) and its four workspace
# repositories. Snapshots were fetched 2026-06-11 via the gh CLI; data/README.md
# documents the exact refetch commands. Raw snapshots live gzipped under
# data/raw/ (gitignored); the derived CSVs are committed and reproduced by
# notebook.ipynb running top-to-bottom with no network access.
paper_id: MKT-005
license: cc-by-4.0

datasets:
  # ── raw snapshots (data/raw/, gitignored; cache for the notebook) ──────────
  - id: raw-privateos-prs
    description: |
      All 285 pull requests of the privateos repository (number, title, body,
      timestamps, state, additions, deletions, changed files, labels, head ref,
      author), as returned by gh pr list --state all.
    file: raw/privateos_prs.json.gz
    rows: 285
    source: github-api-snapshot
    collection_window: [2026-04-29, 2026-05-27]
    fetched_at: 2026-06-11T12:48:00Z
    sha256: 80937644aec64f7a8bda1c7981e91f5248f7a8084cc2f68031836284bc586c14
    size_bytes: 273792

  - id: raw-privateos-issues
    description: |
      All 310 issues of the privateos repository (number, title, body,
      timestamps, state, labels), as returned by gh issue list --state all.
    file: raw/privateos_issues.json.gz
    rows: 310
    source: github-api-snapshot
    collection_window: [2026-04-29, 2026-05-27]
    fetched_at: 2026-06-11T12:48:00Z
    sha256: 18049fd7a8ac6645579470d4e0c81dfc891544594bbb99c2d992d831e844928c
    size_bytes: 373887

  - id: raw-privateos-git-numstat
    description: |
      Full git history of the privateos main branch at commit 44a0a64 in
      git log --numstat form: one COMMIT header line (sha, ISO date, subject)
      per commit followed by per-file added/deleted line counts. 376 commits.
    file: raw/privateos_git_numstat.tsv.gz
    rows: 376
    source: git-log-numstat
    collection_window: [2026-04-29, 2026-05-27]
    fetched_at: 2026-06-11T12:48:00Z
    sha256: 26914de9f4b623827d305b020aa1ffc02c96946439be5ec8d23a3acd01141ee5
    size_bytes: 42185

  - id: raw-poly-prs
    description: |
      All 197 pull requests of the poly workspace repository, same fields as
      raw-privateos-prs. Contains 39 agent-authored PRs including poly#191,
      the scope-explosion case study.
    file: raw/poly_prs.json.gz
    rows: 197
    source: github-api-snapshot
    collection_window: [2026-04-29, 2026-05-27]
    fetched_at: 2026-06-11T12:49:00Z
    sha256: 8abedb7aeb84c826548017346d9f51026af3710dbfe5f2b0df0793668281da79
    size_bytes: 179105

  - id: raw-market-ambience-prs
    description: All 41 pull requests of the market-ambience workspace repository.
    file: raw/market-ambience_prs.json.gz
    rows: 41
    source: github-api-snapshot
    collection_window: [2026-04-29, 2026-05-27]
    fetched_at: 2026-06-11T12:49:00Z
    sha256: 448d9975d137f01620e03ad295e71a69b78d5cdfd7b5a3fe60af3c2b450da33e
    size_bytes: 22809

  - id: raw-atol-research-prs
    description: All 49 pull requests of the atol-research workspace repository.
    file: raw/atol-research_prs.json.gz
    rows: 49
    source: github-api-snapshot
    collection_window: [2026-04-29, 2026-05-27]
    fetched_at: 2026-06-11T12:49:00Z
    sha256: f14bee658d2211ddf2914b3a7476927d2c604e45419512f9821cd79a52a5e8cd
    size_bytes: 33724

  - id: raw-privateos-sandbox-prs
    description: The single pull request of the privateos-sandbox smoke-test repository.
    file: raw/privateos-sandbox_prs.json.gz
    rows: 1
    source: github-api-snapshot
    collection_window: [2026-04-29, 2026-04-29]
    fetched_at: 2026-06-11T12:49:00Z
    sha256: 882661428acc66e384fedc872271c90cc318f01489f98b2ce7286e6259945680
    size_bytes: 424

  - id: raw-privateos-tree-loc
    description: |
      Per-file line counts (wc -l) for every tracked *.ts, *.tsx, and
      src/db/migrations/* file in the privateos repository at commit
      44a0a64. Source for the repository-shape numbers in paper section
      4.1 (src 100,863 TypeScript lines, tests 88,454, 66 SQL migrations).
    file: raw/privateos_tree_loc.tsv.gz
    rows: 679
    source: git-ls-files
    collection_window: [2026-04-29, 2026-05-27]
    fetched_at: 2026-06-11T13:35:00Z
    sha256: 8ac6c7353d9d22617e9dbd9689028d2a223696bcfccda2c990f9eb12ded5ad6c
    size_bytes: 6847

  - id: raw-privateos-learnings-files
    description: |
      Listing of the 29 markdown postmortem files under docs/learnings/ in the
      privateos repository at commit 44a0a64, one path per line.
    file: raw/privateos_learnings_files.txt.gz
    rows: 29
    source: git-ls-files
    collection_window: [2026-04-29, 2026-05-27]
    fetched_at: 2026-06-11T12:51:00Z
    sha256: e9feb23179df13cb853905df0eb8b2c640d00cc94d3904d5c4f418007a4b2a5b
    size_bytes: 942

  # ── derived datasets (committed; rebuilt by notebook.ipynb) ────────────────
  - id: agent-prs
    description: |
      The 75 agent-authored pull requests across the four workspace
      repositories, identified by an agent/ head branch or a run-id stamp in
      the PR body, with structure-quality flags (Summary section, issue
      linkage, Scope section, raw node-id branch name) and the before/after
      era split at the 2026-05-05 PR-body contract.
    file: agent_prs.csv
    rows: 75
    schema:
      repo: string
      number: int64
      created: date
      state: enum[MERGED, CLOSED, OPEN]
      additions: int64
      deletions: int64
      changed_files: int64
      era: enum[before, after]
      has_summary: bool
      has_linkage: bool
      has_scope: bool
      nodeid_branch: bool
    source: derived
    derived_from: [raw-poly-prs, raw-market-ambience-prs, raw-atol-research-prs, raw-privateos-sandbox-prs]
    collection_window: [2026-04-29, 2026-05-27]
    license: cc-by-4.0
    sha256: a91da3bb37b3cfd5c02bf75ee9a218a2da395a9591603d107a2bb024bde82351

  - id: pr-quality-eras
    description: |
      Aggregate agent-PR quality before and after the 2026-05-05 PR-body
      contract: merge rate, median blast radius, and counts of PRs carrying a
      Summary section, issue linkage, Scope section, and raw node-id branch
      names. The structure shift (1/4 to 71/71 on summary and linkage) is the
      paper's central finding.
    file: pr_quality_eras.csv
    rows: 2
    schema:
      era: enum[before, after]
      n: int64
      merged: int64
      merge_rate: float64
      median_changed_files: float64
      has_summary: int64
      has_linkage: int64
      has_scope: int64
      nodeid_branch: int64
    source: derived
    derived_from: [agent-prs]
    collection_window: [2026-04-29, 2026-05-27]
    license: cc-by-4.0
    sha256: f2a00859b1bd87845cba4afdb1ad99397baa438c6a6c92c340c11f8ba111b79e

  - id: construction-cadence
    description: |
      Per-day construction activity of the privateos repository over its
      29-day build window (27 active days): commits to main, PRs opened,
      issues opened.
    file: construction_cadence.csv
    rows: 27
    schema:
      date: date
      commits: int64
      prs_created: int64
      issues_opened: int64
    source: derived
    derived_from: [raw-privateos-git-numstat, raw-privateos-prs, raw-privateos-issues]
    collection_window: [2026-04-29, 2026-05-27]
    license: cc-by-4.0
    sha256: 4d7ba368990a502b8b2247a23b68d7f24696d2e7952e4b809232ded636ac8059

  - id: loc-by-subsystem
    description: |
      Lines added per ISO week per subsystem (top-level directory, with src/
      split one level deeper; top eight subsystems by total lines added, rest
      bucketed as other). tests/ is the largest subsystem at 91,382 lines
      added, ahead of src/server at 62,902.
    file: loc_by_subsystem.csv
    rows: 38
    schema:
      week: string
      subsystem: string
      lines_added: int64
    source: derived
    derived_from: [raw-privateos-git-numstat]
    collection_window: [2026-04-29, 2026-05-27]
    license: cc-by-4.0
    sha256: 9850cc01928a8dfa99bf31e675e3bd314ba9099573e640139efe261c65ccb9d6

  - id: incident-registry
    description: |
      The verified incident registry: every failure-mode war story cited in
      the paper mapped to a concrete GitHub artifact (issue or PR), grouped
      into failure families (scope-indiscipline, self-trigger-loop,
      silent-capability-loss, control-ineffective, liveness-misjudgment,
      idempotency-gap, isolation-failure, observability-gap, control-built).
      Each entry is asserted against the snapshots by the notebook.
    file: incident_registry.csv
    rows: 11
    schema:
      slug: string
      family: string
      repo: enum[privateos, poly]
      kind: enum[issue, pr]
      number: int64
      date: date
      state: string
      title: string
    source: derived
    derived_from: [raw-privateos-prs, raw-privateos-issues, raw-poly-prs]
    collection_window: [2026-04-29, 2026-05-27]
    license: cc-by-4.0
    sha256: 3b14ad7cf2ea34773ba934f22365dab587095f09617818583c3d33e6654a80bc

  - id: learnings-catalog
    description: |
      Postmortem counts by category in the privateos docs/learnings/
      directory: 29 single-bug-class postmortems across eight categories,
      the system's institutionalized memory of agent failure.
    file: learnings_catalog.csv
    rows: 8
    schema:
      category: string
      postmortems: int64
    source: derived
    derived_from: [raw-privateos-learnings-files]
    collection_window: [2026-04-29, 2026-05-27]
    license: cc-by-4.0
    sha256: 5bf7b455ceab0e03faa529f22ed4506efc320d09f7286f62340973fef409dbd3

  - id: workspace-summary
    description: |
      Per-workspace agent-PR outcomes: poly 36/39 merged, market-ambience
      12/12, atol-research 8/23, privateos-sandbox 0/1. The spread is the
      domain-dependence finding: agents merge reliably on crisply specified
      backend work and stall where acceptance criteria are aesthetic.
    file: workspace_summary.csv
    rows: 4
    schema:
      repo: string
      agent_prs: int64
      merged: int64
      merge_rate: float64
      first: date
      last: date
      median_changed_files: float64
    source: derived
    derived_from: [agent-prs]
    collection_window: [2026-04-29, 2026-05-27]
    license: cc-by-4.0
    sha256: af2a5b9303707e6fa3d989f6cb09199a56bb9a37d30396a8bfeca3f79081cbdd
