Export consent-gated thread traces in the WEKA format #218
Evidence
Shipped in the release at 8c53d09, promoted 2026-08-26.
1 pushes receipt
- AtlantisPleb opened this issue 2d ago
-
A Author 2d ago Exporter core landed on main in d808cf1: OpenAgents.Threads.WekaExport with the chained-hash 64-token-block anonymization, wider-than-dark consent gate, and byte-identical reproducibility for a fixed thread and salt (43 thread tests green). Remaining for acceptance: the AIPerf replay proof and any HTTP/corpus surface, which stays a separate decision.
-
A Author 2d ago The replay half landed on monorepo main in 2a54d8f5aa:
bench/replay_weka.pyreconstructs each session's request shape from a weka-trace-v1 document — per turn, how many context blocks it carried and how many repeat blocks already seen earlier in that session. That repetition is the prefix reuse this format exists to measure, and the chained block hashes make it computable, which is the point of the construction: the tool reads hashes and never content, because there is no plaintext to read.It reports per session and corpus-wide (turns, total blocks, repeated blocks, reuse ratio, context growth), has a
--jsonmode, skips a malformed document rather than crashing, and ships a synthetic fixture with a self-check pinning the reported ratio to a hand-computed expectation.So the acceptance is now evaluable, which it was not before. What remains to actually close this issue is running it against a real exported corpus from consenting threads and comparing the measured reuse against the source sessions — that needs real consenting threads and is a run rather than a build. Leaving open for that.
-
AtlantisPleb
closed this as completed in
e57f5ea1d ago -
A Author 1d ago Shipped in d808cf1 (exporter core) and e57f5ea (the format, the corpus, and the measurement).
Consent gate — the contract's first clause.
OpenAgents.Threads.WekaExport.export/2refuses adarkthread with:consent_required, by struct and by id. The gate is per thread, not per subtree, because a consenting parent may spawn a narrower child (THREAD-003): adarkchild produces no sub-agent entry, no request, no block count, and no id.corpus/2takes a recorded thread-id set rather than running a query — a query is how a consent gate gets widened by accident — and records each refusal by id and reason instead of the trace. Proven intest/openagents/threads/weka_export_test.exs("a dark thread refuses, by struct and by id", "a dark child of a consenting parent contributes nothing", "a named thread that has not consented is refused, not exported") and again at the operator surface intest/mix/tasks/openagents_weka_export_test.exs.The format. d808cf1 emitted a
weka-trace-v1document with aneventsarray — plausible-looking, but not the format AIPerf reads, and per-event chunking destroyed the one property a corpus exists to carry. e57f5ea emits the real WEKA v1 session:block_size: 64,hash_id_scope: "local", and an orderedrequestslist of{t, type, model, in, out, hash_ids, api_time, think_time}, matchingproxy_to_weka.pyin the InferenceX reference. Only whole blocks are hashed, soinis exactly what a replay would send. Consenting children becomesubagententries with fresh context in the shared id space — the nested-thread ledger THREAD-003 added, so the conditional clause is no longer conditional. Proven by "a consenting thread exports a replayable weka trace" and "a consenting child becomes a sub-agent entry".Anonymization. 64-token blocks replaced by session-salted chained SHA-256, remapped to session-local integers. The chain is load-bearing: a repeated block at a different context position is not cache-equivalent, and "the same block text at a different context position gets a different id" proves the two are told apart. "no transcript text survives the export" proves nothing readable leaves.
Acceptance — prefix reuse measurably matching the source.
prefix_reuse/1reports reused leading blocks over all blocks, per agent. "the anonymized trace reports the source session's prefix reuse" computes the same statistic independently over the raw transcript — plain 64-token text blocks, no hashing, no id remap — and holds the two equal, plus the structural identity that every block of every call but the last is carried forward. An exporter that chunked per event, salted per request, or reordered would fail it.Reproducibility. "a corpus is reproducible from its recorded thread-id set and revision" rebuilds a corpus from its own
requested_thread_idsandcode_revisionand compares bytes.Surface.
mix openagents.weka.export --threads SET_FILE --out CORPUS_FILE. No route publishes a corpus; publication stays a separate, explicit decision, as the contract says.THREAD-002 records the new consumer; section 5 of
docs/2026-08-24-benchmark-workbench-agentx.mdrecords what shipped.Not in scope and not claimed: the replay itself runs in the OpenAgentsInc/openagents bench lane (#33), which now has a corpus to read. The
tracefamily in the export ledger stays:blocked— that is the ATIF upload surface's missing read-back (#217), a different family from thread transcripts, and this change adds no route.
Outcome
An exporter from
thread_eventsto the WEKA trace format used by AgentX: content tokenized into 64-token blocks and replaced with session-scoped chained hashes, preserving timing, context growth, prefix-reuse patterns, and (once the nested-thread ledger exists) sub-agent structure, while revealing no content — the same privacy construction the AgentX dataset uses.Contract
Acceptance
An exported OpenAgents corpus from consenting threads replays under the axis-1 harness with prefix-reuse characteristics measurably matching the source sessions.
Source
docs/2026-08-24-benchmark-workbench-agentx.mdsection 5; anonymization method per the AgentX methodology (chained-hash blocks).