NAME
problem48-resident-path-benchmark - compare fresh helper and resident path requests
PURPOSE
Measures repeated paths -o json requests in new helper processes and through a resident Perl path/config context. It verifies byte-identical responses and refreshes mutable state between requests.
WHY IT EXISTS
Problem 48's 50x request target is below the cold Perl startup floor for some commands. A resident process is the remaining architecture candidate, but it must re-read configuration and call user Folder.pm methods on each request so filesystem or environment changes do not return stale paths.
WHEN TO USE
Use only in the isolated Problem 48 Docker benchmark environment when evaluating a persistent path-command runtime. This is a benchmark prototype, not a production daemon and not evidence for all subroutines.
HOW TO USE
perl script/problem48-resident-path-benchmark
perl script/problem48-resident-path-benchmark --skills 250 --runs 15
The script creates an isolated temporary HOME and state root, verifies exact output parity, then checks config replacement, dynamic Folder.pm environment reads, and skill addition/removal across requests.
WHAT USES IT
Problem 48 research uses this script to determine whether retaining a safe request context makes a resident runtime viable. The dashboard does not invoke it.
EXAMPLES
d2 docker compose -p dd-problem48-bench -f /tmp/d2-problem48-bench.yml -f /tmp/d2-problem48-init.yml run --rm bench perl script/problem48-resident-path-benchmark --skills 50 --runs 9