# Copilot SQL-state study: publication assets

This directory accompanies [A clever memory pattern in Copilot’s harness](/writing/why-my-coding-agent-runs-insert-statements).

`copilot-sql-state-study-c3ead8d.tar` is the unchanged, sanitized pre-publication
source snapshot. Its SHA-256 is:

```text
365a589d660ace621caa5a2c8f3e27bd908126f3328a31ae026bf916ddef66ec
```

The snapshot came from local source commit
`c3ead8de28b32a5adcbbf2654d2898641570ea1e`, following the acquired pilot at
`f393a9b4fdd618e737614eb5b9a34eb298ba4fed`. These are provenance identifiers,
not public GitHub links. The historical README and article describe the
pre-publication state. Their wording and all acquired evidence/input bytes
remain unchanged. The reader-facing article is maintained separately in this
portfolio.

## Contents

Extracting the archive creates `copilot-sql-state-study/` containing:

- `articles/DRAFT-why-my-coding-agent-runs-insert-statements.md`
- `projects/copilot-sql-state/README.md`, controller, core, eight offline tests,
  pinned package manifest/lockfile, and public source ledger
- `projects/copilot-sql-state/evidence/pilot-2026-10-15-sql/`, the one completed
  synthetic session
- `projects/copilot-sql-state/evidence/pilot-2026-10-15/`, an earlier zero-prompt
  launch failure whose manifest intentionally identifies the earlier controller

The separately browseable `evidence/` files and `sources.json` are byte-identical
copies of the corresponding archive members. `SHA256SUMS` identifies the whole
download, while each retained `checksums.json` identifies its own evidence files.
The successful run also records the input hashes for its controller and manifests.
These are integrity checks, not signatures or independent acquisition attestations.

No original user screenshot, private runtime files, hidden prompt, reasoning,
checkpoint summary, or credentials are included.

The `sql-working-loop*.svg` and `pre-prompt-readback*.svg` files are original,
editable editorial diagrams, not acquired evidence. Their desktop and mobile
compositions share the [illustration briefs](./illustration-briefs.md).

## Methods and receipts

The [completed run](./evidence/pilot-2026-10-15-sql/report.json) used
`@github/copilot-sdk@1.0.22`, bundled runtime `1.0.98`, protocol `3`, and
Node `v26.10.0` on macOS. The PATH CLI `1.0.90-5` was not used. There was no
model override: initial selection was null; the model-change, all four SQL
starts, all eight ordinary usage events, and compaction identified
`claude-sonnet-5.5`. Four programmed prompts are not four inference requests.

The [events](./evidence/pilot-2026-10-15-sql/events.jsonl) join all four SQL
starts to successful completions by call ID. Compaction completed at #40,
returned at #41, and reported seven messages removed and checkpoint 1.
Readback #42 was unchanged. After a graceful stop/new-runtime/same-session
resume, readback #65 preceded prompt #66. Both owned runtime stops returned
zero errors; no PID, crash, power loss, hidden prompt, or summary was inspected.
The [checksums](./evidence/pilot-2026-10-15-sql/checksums.json) identify retained
files and normalized projections, not physical databases or attestations.

The initial empty readback is not schema proof: the API can return empty
arrays for missing tables or failed reads. No `CREATE TABLE` was issued.
The original screenshot's five-row and three-row INSERT results did not
establish what the second group represented or prove persistence.

The separate [zero-prompt failure](./evidence/pilot-2026-10-15/report.json)
and [stderr observation](./evidence/pilot-2026-10-15/launch-observation.json)
record the bundled runtime rejecting `--disable-builtin-mcps` before session
creation. Its input hashes identify the earlier controller, not a discarded
model trial. The [source ledger](./sources.json) separates public API references
from execution: the July 14 SDK test snapshot was read, not run, and does not
establish a feature-introduction date. Its `approveAll` pattern was not adopted.

The extracted study README documents the exact-query guard, SQL-only initialized
tools, denied unrelated permissions, disabled discovery/memory/cross-session
features, deadlines, cleanup, and allowlisted export. Raw runtime files were not
inspected. The exporter omits reasoning, assistant prose, and checkpoint summaries.
No global configuration, existing application database, or private history was
changed or inspected. Neither the screenshot nor `agent-strace` is an acquired
artifact in this bundle.

## Offline checks

Download the archive and `SHA256SUMS` into a fresh directory, then:

```sh
shasum -a 256 -c SHA256SUMS
tar -xf copilot-sql-state-study-c3ead8d.tar
cd copilot-sql-state-study
npm --prefix projects/copilot-sql-state test
```

No SDK install or model call is needed for these eight tests. Keep the complete
extracted directory structure: the tests also read the historical article.

## New online reproduction

From `copilot-sql-state-study/`, with a supported Node runtime and an existing
authenticated Copilot account:

```sh
npm --prefix projects/copilot-sql-state ci --ignore-scripts --no-audit --no-fund
npm --prefix projects/copilot-sql-state test
PRIVATE_PARENT="$(mktemp -d)"
PRIVATE_PARENT="$(cd "$PRIVATE_PARENT" && pwd -P)"
npm --prefix projects/copilot-sql-state run probe -- \
  --private-parent "$PRIVATE_PARENT" \
  --out evidence/NEW_RUN
```

Choose a fresh output name each time. Canonicalizing `PRIVATE_PARENT` preserves
the runner's guard on macOS temporary-directory aliases. Online reproduction can
consume your existing Copilot allowance and may select a different default model.
Do not upload the generated private runtime directory.

This is not a Desktop parity, spontaneous planning, automatic context-inclusion,
SQL-caused recall, crash durability, physical storage, or cost-savings result.
