Choose the data purpose before collecting or exporting it. A conversation useful for operational diagnosis is not automatically an approved training example. Redacting a credential does not make the surrounding prompts, documents or service records public.

This guide targets Sonny 0.12.7. Installed checks used a supplied synthetic corpus and one native synthetic trace in a disposable HOME/XDG profile. They qualified local splitting, scoped collection and the ordinary-trace export refusal. No real account history, live upload collector, fine-tuning job or verified production training dataset was used.

Keep the four paths distinct

PathInput and effectReview boundary
training collectReads selected assistant-source directories and writes a local redacted corpus.Can span projects and conversations. A credential-shaped session can be dropped; collection is not a verified-label check.
training datasetTurns a corpus and behavior rules into local train/test evaluation suites and a split manifest.Windows and rule cases are not independent source conversations; preserve parent groups.
training exportConverts eligible native conversation traces into metadata-bearing training records.Requires verifier-backed outcomes, explicit consent and pinned provenance/partition/parent metadata.
training uploadSends trace files to a configured aggregation service; optional queue/watch behavior retains or transfers more data.Separate destination, identity, access and retention review. No live upload is qualified by this guide.

Understand the collection scope

The tested command form is:

sonny training collect --sources sonny --out ./reviewed-corpus.jsonl --min-messages 2

Review the account and source directories first. --sources sonny selects Sonny’s trace sources; it does not mean only the current directory, task or Recipe. The pinned collector uses the account’s XDG trace root and a legacy home trace directory. Other source choices can inspect other assistant stores. The release excludes the broad HOME-walking aider collector by default. Inspect training collect --help before selecting sources.

The actual fixture used a private profile containing only the synthetic trace. It scanned one file and retained one session, leaving the source bytes unchanged. Its output retained user/assistant text, including the ordinary confidential marker and a redaction marker from the trace. Tool/system turns were not present in that result. This is not a qualification of every collector or a guarantee that every private value is recognized and removed.

The source collection policy drops credential-shaped sessions and masks some identifiers. Pattern matching has limits. Inspect retained text and metadata, including paths and model/source labels, before sharing or constructing cases. Do not enable autonomous cross-project collection merely to fill a corpus. Use privacy and data locations for the wider stores and diagnostics for trace capture limits.

Build a small non-coding split

Download the reviewed synthetic corpus and behavior rules into a private working directory. They prohibit invented missing-note rates and unsupported satisfaction claims. This is a command demonstration, not a representative production corpus.

sonny training dataset --corpus ./corpus.jsonl --rules ./rules.yaml --limit 32 --test-ratio 0.4 --out-dir ./pilot-split

The installed result wrote train.suite.yaml, test.suite.yaml and split_manifest.json. Repeating the same inputs produced byte-identical files. Six conversation records yielded six windows and twelve rule cases: ten train and two test cases. There were only five independent parents because a resumed record shared its parent’s group. No parent appeared on both sides.

The ratio routes parents deterministically; it does not promise an exact case-count fraction on a small corpus. Inspect the actual groups, counts and rule triggers. An input of --test-ratio 2 did not fail in the installed check: it resolved to the default 0.4 split. Do not assume an out-of-range request was honored or rejected; read the manifest and use a deliberate valid fraction.

Rules use Go RE2. A lookahead expression was refused as unsupported; use supported patterns and check the generated cases. A rule match is not a human review of citation support, arithmetic or missing evidence. A window can create multiple rule cases without creating another independent observation.

The two-case holdout remained below the optimizer’s default 25-case minimum. Use genuinely representative, independent source material before promotion; do not duplicate windows or change thresholds just to obtain a passing count. See the fixed evaluation and optimization gates .

Inspect verified trace export eligibility

For a selected, reviewed trace directory, the command form is:

sonny training export --trace-dir <reviewed-trace-directory> --out ./training.jsonl

The installed export of the ordinary synthetic conversation returned zero but produced no training records. Diagnostics explained that its outcome was unknown and dataset consent, partition and parent-group metadata were missing. The internal MCP-server trace also lacked an authoritative outcome. Both were skipped. The source traces remained unchanged.

A successful process exit therefore does not prove a dataset contains eligible records. Inspect skip reasons, record count and metadata before using the output. Do not edit a trace to invent verifier evidence, consent, a redaction receipt or a split identity. Those must be established by the supported verifier-integrated workflow and actual data owner.

The release lists five metadata-bearing export formats: openai_chat, openai_tools, sharegpt, sharegpt_tool and chatml. The tested path used its default openai_chat; it did not qualify all formats or a positive verified training-label workflow. Live per-run export is opt-in through --training-format, which defaults empty in the pinned source. JSONL tracing is a separate default.

Treat upload and retention separately

training upload and training server are explicit service operations. Review the intended collector, client/server identity material, access rules and retention before transferring data. The upload command’s default address is localhost:50051, batch size 50, three workers and a 30-second batch timeout. Those are configuration defaults, not permission to use a service or evidence that it accepts the current trace format.

The release exposes certificate/key/CA options and optional server client-CN restrictions. --queue-dir can retain a persistent retry queue and --watch can continue transferring new files. A queue or retry must not be mistaken for an acknowledgement, and restarting a client can repeat a transfer. The actual collector/format/transport/authorization workflow remains unqualified here.

Deleting a corpus, disabling tracing or stopping an upload process does not remove existing session data, exported files, remote copies or backups. Follow reviewed backup and recovery procedures for each store. Keep the recorded inputs, rules, split and eligibility evidence with any approved dataset so later reviewers can identify its purpose and limits.