Remove the static runtime-purity scan; enforce purity in review

KT
7d ago
+133-196

Stacked on #14 (which is stacked on #13). Merge #13, then #14, then this. Completes the SOW-0071 regression (.agents/sow/done/SOW-0071-20260530-runtime-purity-and-optional-platform-services.md).

Why

tests/runtime_purity/test_core_runtime_purity.py was a text scan meant to prove that core SDK code never launches programs or probes the host. In practice:

  • it scanned 12 of about 100 core source files (go/journal alone has about 60);
  • it caught exec.Command( but missed exec.CommandContext, os.StartProcess and syscall.ForkExec;
  • no CI workflow ran it.

It gave false confidence, and a code review finds these calls directly.

Changes

  • Deletes tests/runtime_purity/.
  • AGENTS.md (Runtime Purity Architecture): review enforces the rule. It lists the process-launch and host-access forms to search for, and the in-package writer-lock helper files (go/journal/lock*.go, file_lock*.go, journal-core/src/file/lock.rs), which are the only core files allowed to use them.
  • SOW-0098's validation plan no longer cites the removed test.
  • SOW-0071 is closed; both status indexes are updated.

Validation

  • A manual review of every non-test file in go/journal and the Rust SDK library crates found no core impurity. Only the opt-in lock helper reads /proc or calls sysctlbyname.
  • No runtime code, public API or docs change. The purity contract in AGENTS.md, the spec and docs/Getting-Started.md is unchanged.
  • .agents/sow/audit.sh: complete and clean.

Summary by cubic

Removes the static runtime-purity scan and enforces the purity rule through code review instead.

The old test covered 12 of about 100 core source files, missed several process-launch variants, and never ran in CI, so it gave false confidence. Runtime purity stays an AGENTS.md rule; a manual review of the core SDK confirms it is clean, with only the writer-lock helpers reading /proc or calling sysctlbyname.

  • Deletes tests/runtime_purity/.
  • AGENTS.md now directs reviewers to search diffs for process-launch and host-access forms (including exec.Command, exec.CommandContext, and Command::new), and names the in-package writer-lock helper files that are the only core code allowed to use them.
  • Updates SOW-0071 to completed, marks the scan acceptance criterion as superseded, and adjusts SOW-0098's validation plan accordingly. Both SOW status indexes record the completion.