# Changelog

## 0.6.3

- Default Skill, prompt and generated rules to fast submission: descriptive research notes/reports are not prerequisites; immutable snapshots and durable identity remain mandatory.
- Move tracking out of submission: required MLflow gates computation in the worker; optional setup starts after process spawn. Presentation report failures cannot block training.
- Validate checkpoints once after GPU readiness, never on each resource retry. Revalidate legacy artifact paths by SHA-256 rather than trusting a durable label or size/mtime.
- Separate submission, dependency wait, checkpoint checksum/validation, GPU wait, snapshot verification, process spawn and explicitly declared first-update timing. `running`/`started_at` are set only on successful child spawn.
- Make notification ACK monotonic with persistent tombstones, lock concurrent drains, await async send errors and reread after in-flight delivery. Do not rewrite worker-owned Run state from delivery/ACK code. ACK only observed events, not concurrent OOM/exit arrivals.
- Keep busy-session notifications in the durable PRL queue; batch them at idle, attach notification IDs, and deduplicate at the Pi input boundary using session-persisted messages, including reloads. Critical retries remain independent of progress quotas.
- Return compact latest worktree-aware context by default (`full`/`--full` expands history); Pi launch/enqueue/fork use short receipts. Summary inspect no longer reads console.log.
- Expose shared/exclusive mode, MiB memory minimum and safety margin consistently in tools and CLI, preserving legacy resource aliases and double safety probes.
- Add regression coverage for actual checkpoint stream counts under repeated GPU contention, mutable artifact tampering, queued cancellation, tracking isolation, ACK races, async failures, reload deduplication, context freshness and memory policies.

## 0.6.2

- Add explicit shared-GPU opt-in through `resources.allow_foreign_processes` and `--allow-foreign-gpu-processes` while preserving PRL-to-PRL lease exclusivity.
- Apply shared-mode policy to both pre-launch GPU probes, suppress expected intrusion alerts, and persist observed foreign PID/process details in `run.yaml`.
- Add optional `resources.min_free_memory_mb` / `--min-free-gpu-memory-mb` gating to reduce shared-GPU OOM risk.

## 0.6.1

Remove synchronous historical Run scans from the Pi TUI hot path.

- Replace the 750 ms combined polling loop with separate `fs.watch` notification/status paths and independent 10-second low-cost fallbacks.
- Add persistent active-Run and notification-queue indexes. The first upgraded startup migrates existing records once; later startups read only indexed queued/running Runs and pending deliveries.
- Make status widgets and `prl_context` parse only active Run records, not every historical `run.yaml`.
- Keep index entries updated by detached workers and automatically remove terminal/stale entries, including Runs completed by pre-0.6.1 workers.
- Cache successful Git-root discovery per process so repeated `readRun()` calls do not spawn `git rev-parse`.
- Add regression tests proving corrupt/unindexed historical Run and notification files are not touched by the recurring paths.

## 0.6.0

Harden PRL for multi-day, multi-GPU training and large checkpoints.

- Raise the default graceful termination window from 10 to 900 seconds, disable implicit SIGKILL, signal full process groups, add checkpoint-first policies, permanent actor/reason/signal audits, and a distinct `checkpointed_stop` status.
- Replace ephemeral wake files with durable notification records, delivery/ACK history and retry, delivery-based ordinary quotas, and quota-independent critical failure/process-exit delivery.
- Execute every Run from an immutable detached worktree at the recorded commit and verify command file SHA-256 checksums before spawn.
- Add `prl_run_fork` / `prl run fork`, inherited experiment protocol, minimal override records, compatibility classification, and exact/weights-only/fresh resume modes.
- Add immutable checkpoint artifacts with stability and streaming SHA-256 verification; dependencies can pin artifact/checksum/complete marker and accept `checkpointed_stop`.
- Split process/trainer/checkpoint/replica/tracking/notification lifecycle status.
- Batch asynchronous console writes, rotate logs, profile launch stages, reject huge untracked trees, and read bounded research context prefixes without loading entire files.
- Add launch disk-space reservation checks, checkpoint temporary-space estimates, progress-stall warnings, double GPU probes, GPU UUID/PID/memory diagnostics, and non-destructive foreign/ghost PID alerts.
- Classify CUDA OOM from stderr content independently of event IDs.
- Align trainer W&B ID/URL from `PRL_TRACKING_JSON` or normal W&B URLs while keeping the PRL tracking identity separate.
- Add explicit audited Run owner transfer, including pending notification transfer.
- Expand the test suite with safe large-checkpoint stop, process-tree, critical notification quota, immutable queued commit, durable handoff, fork, owner transfer, OOM/W&B/watchdog, and disk preflight coverage.

GPU leases remain cooperative. Use Slurm/PBS or another real scheduler when hard reservation against external jobs is required.

## 0.5.0

Bind PRL Runs, pending notifications, inspection, and control to the Pi session that launched them.

- Persist the owning Pi session ID on every Run launched through the Extension or Pi bash environment.
- Route pending events only to the owning session; other Pi windows leave them untouched.
- Filter the status widget and `prl_context.active_runs` to the current session.
- Reject cross-session `prl_run_inspect` and `prl_run_control` calls.
- Add `prl_run_claim` for explicitly adopting legacy or externally launched unbound Runs.
- Keep owner-session events pending while that window is closed and deliver/coalesce them when the session is resumed.

## 0.4.0

Add autonomous dependent Run scheduling and cooperative GPU handoff.

- Add `prl_run_enqueue` and `depends_on` so successors are scheduled before the parent finishes and do not depend on `wake_agent` latency.
- Validate parent success and an optional non-empty checkpoint before launching the dependent Run.
- Add persistent queued resource state, `nvidia-smi` availability checks, cooperative per-GPU leases, wait timeouts, and automatic `CUDA_VISIBLE_DEVICES` assignment.
- Mark retried parents as superseded, cancel their dependent Runs, and suppress stale pending wakeups.

## 0.3.0

Improve Pi visibility and reduce duplicate Run notifications.

- Show queued/running experiments in the Pi status line and widget.
- Refresh monitored Run state as the background worker progresses.
- Coalesce multiple pending events for the same Run into one agent message.

## 0.2.0

Make a Task/worktree represent a durable hypothesis implementation route instead of a single phase.

- Reuse the active Task for the same hypothesis by default.
- Require an explicit reason for an additional same-hypothesis worktree.
- Add `prl_task_checkpoint` and `prl task checkpoint` for named phase commits.
- Expose all active Tasks in `prl_context` and document the task/phase/run lifecycle.

## 0.1.1

Fix startup behavior when Pi is launched outside a Git repository.

- Suppress expected Git discovery diagnostics for non-repository directories.
- Avoid the pending-event watcher outside Git repositories.

## 0.1.0

Initial public release.

- Git worktree-backed Agent Tasks
- Automatic checkpoint commits with safety checks
- Detached local experiment runner
- `process.exit`, `log.regex`, `timer.timeout`, and `file.created` events
- Persistent pending Pi notifications
- MLflow REST integration and W&B environment injection
- CLI and Pi Extension tools
- Chinese installation and release documentation
