Skip to content

feat: rewind a training moment with an independent leak check - #64

Merged
apresmoi merged 9 commits into
mainfrom
feat/training-rewind
Oct 11, 2026
Merged

apresmoi merged 9 commits into
mainfrom
feat/training-rewind

Conversation

@apresmoi

Copy link
Copy Markdown
Collaborator

Implements training phase P4 (rewind): materialize one trial's inputs at the dataset example's instant, without running cognition.

spawnfile train ./Spawnfile --agent agent:writer --materialize [role:]<example> --history DIR --out OUT
  • Inputs = every effective workspace resource, accessible memory bank and attached Moltnet network; example overrides replace declarations by id (P2 resolution). Every input is materialized or the moment is refused - never today's data.
  • git/bundle: declared full-hex pin, moment-record pin, deploy resource log (deployResourcesAt), else first-parent commit dated at or before the instant (approximate). Clean repository holding only objects reachable from the chosen commit; raw blob extraction (no export-subst); bundles exact only with a matching recorded sha256.
  • Fed volumes: record or landing log (feedLandingAt; transition window = approximate), else the feed rule evaluated at the instant incl. ${date:<zone>} paths (approximate). Bytes verified against the revision; prepared output labelled approximate.
  • Memory: Mneme ledger prefix (cut, never filter); no derived index or audit files (Mneme rebuilds the index from the ledger before every read). Generations refused (Mneme has none).
  • Moltnet: JSON and SQLite stores cut at the instant (messages, threads, rooms, attachment events, future agent registrations); memberships otherwise best-effort as now.
  • Unfed volumes: recorder snapshot trees verified against their manifests; refused without a snapshot unless overridden.
  • Moment records consumed in the merged spawnfile.moment-record.v1 format; a matched record moves the trial instant to its wake.startedAt.
  • Fidelity per input: exact | approximate | overridden, with basis and notes, in moment.json.
  • Independent leak check re-reads the bundle from disk (file times incl. atime, git objects/index/worktree payload anywhere, memory, Moltnet, feed provenance and bytes, dated paths, snapshots, symlink escapes, closed layouts) and refuses on any finding; refusal leaves only the report.
  • Task-clock contract helpers (NOOPOLIS_TASK_CLOCK for the harness, libfaketime offset or MNEME_CLOCK_* for child processes - exactly one offset owner per process), range 1970-9999.
  • Spec: specs/TRAINING.md "Rewind" section plus generated schemas for spawnfile.materialized-moment.v1, spawnfile.leak-check.v1, spawnfile.task-clock.v1.

Related: noopolis/mneme#4 (injectable clock), noopolis/daimon-harness#45 (task-clock consumer, draft).

@apresmoi
apresmoi merged commit ef75a8e into main Oct 11, 2026
1 check passed
@apresmoi
apresmoi deleted the feat/training-rewind branch October 13, 2026 21:34
apresmoi added a commit that referenced this pull request Oct 13, 2026
feat: rewind a training moment with an independent leak check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant