feat(scheduler-sim-decision-trace): wire the trace commands into the REPL

Task 5.2: trace is routed with the raw line and info trace through info;
help gains a Trace section; set output rejects open trace files; quit
and EOF shut tracing down; the continue-mode rollup reports a traced
round on its own; repl.h gains the interactive-only trace gates. The
baseline transcript changes only in the help and info-usage lines.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-10-08 15:15:04 +00:00
parent 8931833132
commit 6bac16812c
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
9 changed files with 820 additions and 3 deletions

View file

@ -2841,3 +2841,30 @@ sched_repl_trace_emit_test = executable(
test('scheduler repl trace emit test',
sched_repl_trace_emit_test, suite: 'scheduler')
# scheduler-sim-decision-trace task 5.2: the trace commands wired into the
# REPL (design.md "ReplIntegration", "SimIntegration" (repl.h gates),
# "ReplTraceControl"; Requirements 1.11, 7.3, 7.4, 8.4, 8.6, 10.4, 10.5).
# The help Trace section and alignment, `trace`/`info trace` routing,
# `set output` rejecting an open trace file, quit/EOF shutdown, the
# traced-round rollup and the interactive-only gates. Includes repl.c (for
# its static help, dispatch and quit) and links every other scheduler
# source except main.c. Leak detection is off like the other rollup tests:
# repl_count_jobs() (repl.c) never destroys its iterator.
sched_repl_trace_wiring_test_srcs = ['test_repl_trace_wiring.c']
foreach f : scheduler_srcs
if f != 'src/main.c' and f != 'src/repl.c'
sched_repl_trace_wiring_test_srcs += ['../' + f]
endif
endforeach
sched_repl_trace_wiring_test = executable(
'sched_repl_trace_wiring_test',
sched_repl_trace_wiring_test_srcs,
include_directories:[incdir],
dependencies: [scheduler_deps, unity_dep],
install: false)
test('scheduler repl trace wiring test',
sched_repl_trace_wiring_test, suite: 'scheduler',
env: ['ASAN_OPTIONS=detect_leaks=0'])