rcpanel 0.3.5 - verification record
Date: 2026-11-09

Environment: Linux, Python 3.12.14, standard-library curses.
Command: python3 -m unittest discover -s tests -q
Result: 608 tests passed in 11.653 seconds, 0 failures, 0 errors.

The test suite covers:

- Service argument boundaries, name membership, privileges, and OS checks.
- Separate startup and runtime state, unknown status, and command failures.
- Targeted single-service status with fresh membership, no unrelated daemon
  probes, silent boot-status exit codes, and conservative check-output parsing.
- Child-process timeout, output bounds, and literal argv without a shell.
- Cooperative read cancellation before launch, while capturing output, and
  after a child closes stdout but keeps running; real children are reaped.
- Thread-local cancellation, nested protected scopes, discovery descriptor
  cleanup, bounded parser checkpoints, and canceled package search/preview/
  catalog publication without stale authorization or leaked locks.
- Streaming beyond capture limits, split UTF-8 sequences, and observer failure
  without abandoning the child; explicit execution without a timeout; caller
  capture bounds for full repository indexes.
- Shared executable trust, fixed PATH resolution, unsafe root path refusal,
  clean account environment, nested-editor quoting, and invalid deadline refusal.
- Pipe/selector setup failures before child launch, descriptor cleanup, and
  actual surviving background children after the immediate command exits.
- Service mutations without a panel kill timer, retained query limits, valid
  leading-underscore service names, and refusal of comment-truncated flags.
- Configuration conflicts, file identity, encoding, size, and permissions.
- Symlinks, hard links, FIFOs, altered directories, and unsafe destinations.
- Validation failure, validator mutation, rename failure, and sync failure.
- Approval bound to the displayed candidate, foreign/stale reviews, replacement
  inodes, validation-path substitution, changed candidates during backup work,
  actual FIFO substitution without a hang, and stage cleanup identity.
- Exact original backups, restore staging, and preserved file metadata.
- DNS configuration roots, cross-root locking, bounded browsing, unsafe prefix
  and traversal refusal, and backup identity across configuration trees.
- Strict HTTP and SMTP form parsing; 840 HTTP field combinations are exercised
  inside the HTTP roundtrip test, in addition to malformed-input cases.
- Menu selection, scrolling, resizing, text editing, and terminal escaping.
- Complete Editor preference help at 60, 80, and 120 columns; wrapped prompt
  help, paging through every word, preserved field editing while resizing,
  escaped-control expansion, and shrink between size check and redraw.
- Stable map paths, search and breadcrumbs, every handler destination, and
  endpoint navigation without implicit execution.
- General native manuals under System, file-specific syntax references, actual
  name(section) labels, and legacy shortcuts returning through System menus.
- Numeric navigation, literal numeric input, and remembered selection/scroll
  through Help and terminal-size changes.
- Startup notice, resize without acceptance, terminal restoration at suspend,
  resumption at the notice, and Ctrl+C exit without entering the map.
- Saved startup pages, favorites, bounded session history, and command presets
  that load choices without executing an action.
- Back through service/package details, kernel values, and configuration
  directories without automatic reloads; explicit refresh and stale-state
  notes after successful or partially failed change attempts.
- Viewer wrapping, searches across soft wraps, next/previous matches on the
  final visible page, page overlap, and optional hints.
- Compact viewer layout for 200,000 short lines and a 1 MiB single line;
  viewport allocation limits, resize anchors, blank lines, and escaped text.
- Explicit End markers for short and paged output, paging with Page Down and
  Space, no-query guidance for n/N, and updated extent after wrapping/resizing.
- Preference drafts, validation, save/reload/default recovery, effective-user
  state, atomic replacement, stale-write detection, strict JSON, file identity,
  symlinks, hard links, permissions, bounded reads, and reported sync failures.
- Relocated manual startup/favorite codes normalized without writing on load;
  explicit canonical saves, alias/canonical favorite collisions, removing a
  relocated favorite, strict invalid-data refusal, and concurrent-edit guards.
- Named command validation, round trips, replacement/removal, malformed state,
  and concurrent edits without silently overwriting another session.
- Actual program discovery against temporary trees, scan bounds, manual output
  formatting, exact report membership, and privileged executable path checks.
- Reviewed native-program handoff, literal argv/cwd, clean environment,
  cancellation, terminal restoration, and demo execution refusal.
- Sysctl tree parsing, exact current names, runtime/persistence separation,
  failed changes, native normalization, refreshed values, and inventory notices.
- One-command selected-scalar reads, cached names used only for read selection,
  fresh write membership, exact multiline result parsing, and retained snapshots
  after malformed/incomplete output or cancellation.
- Native package argv, inventory/search parsing, installed/manual-tag snapshots,
  private locking, exact selected package names, and one-use plan validation.
- Failed, truncated, altered, forged, stale, foreign, or reused package plans
  cannot apply; cancellation and native failure do not trigger retries.
- Package UI preview/confirmation/application order, bounded progress, details,
  refreshed installed markers, and in-memory demo mutation without native tools.
- Downloaded available-name catalogs, release/stable and snapshot sources,
  exact repository filenames, complete bounded indexes, cache provenance,
  refresh failures, corrupt/stale catalogs, and atomic persistent caching.
- Repository changes invalidating live search, install, update, and update-all
  plans; deletion independence from repository availability.
- Hostile oversized HTML tags and legitimate large directory-index parsing.
- Local available-package filtering, sorting, installed-name exclusion, explicit
  refresh, and reopening a saved demo catalog without a repository query.
- One catalog validation per browser-entry snapshot, one installed inventory,
  cancellation before inventory, and independent later tamper checks.
- Cancellation, whole-file replacement confirmation, and no implicit reload.
- Actual delivery of SIGINT, SIGHUP, and SIGTERM during bounded worker jobs.
- Escape cancellation without result/error viewers, cancellation racing normal
  completion, ten cancel/reopen cycles without live workers or leaked tokens,
  and cleanup before a real staged configuration transaction can close.
- Protected mutations continue after Escape with an explicit notice; read
  cancellation restores input and signal handlers, including on disconnect.
- Deferred suspension during a worker job and normal foreground job control
  around editors and explicitly launched native programs.
- Editor failure/recovery, signal handling, and private staged-file handoff.
- Versioned installation, isolated interpreter startup, and unsafe reuse refusal.
- Sticky installation directories, untrusted live interpreters, directory-sync
  ordering before launcher replacement, and honest post-replacement failures.
- Parent-directory synchronization for the first saved settings file.
- CLI help, status, map filtering, program filtering, package output, settings
  output, mutually exclusive modes, demo isolation, and live-mode refusal on
  Linux.

Nine end-to-end tests use real pseudo-terminals. They exercise a full HTTP form
edit, review, installation, reopening the saved form, repeated SIGWINCH resize,
editor handoff, discard without changing the live demo file, and clean exit.
They also cover a package preview cancelled before a later approved install,
updated installed-state display, map-code navigation, kernel-name search,
explicit runtime change, and a fresh observed kernel snapshot.
Package and kernel flows now request their state refresh explicitly; backing
out leaves the previous snapshot available instead of starting another job.
The four added flows cover Ctrl+C at the startup notice, Ctrl+Z followed by
SIGCONT and an ordinary continuation key, saving and reopening preferences,
and explicitly downloading and filtering the demo available-package catalog.
The suspend flow checks that canonical terminal input and echo are restored
while stopped and that resumption does not dismiss the notice.
The first 0.3.5 full run exposed a timing race in that terminal fixture which
also reproduced in unchanged 0.3.4. It sent Ctrl+Z on an early heading before
the initial curses refresh returned. Local ncurses 6.5 temporarily ignores
SIGTSTP while drawing. The fixture now establishes terminal dimensions before
launch, suppresses synthetic resizing for this initial check, and waits for
the actual input boundary. It still sends the real Ctrl+Z byte and checks the
stop event, restored terminal modes, and resumed notice. Production job-control
code is unchanged; this test does not claim suspension during a curses redraw.
A new real-terminal flow starts a deliberately slow 30-second service status
query, taps Escape once, and requires return to the usable parent within
1.5 seconds. It repeats cancellation/reopening three times, then exits cleanly.
The installer test launches the installed program with a hostile PYTHONPATH
and working directory and confirms that its selected modules are used.

Additional checks:

- All delivered source and documentation are ASCII text.
- All Python source parses with Python 3.10 grammar.
- The mdoc manual renders with groff -Tascii -mdoc without diagnostics.
- Installed test launchers successfully print demo status with isolated imports.
- A separate process with a 128 MiB address-space limit rejected a 4,194,341-byte
  hostile HTML index with PanelError in approximately 0.002 seconds. Peak RSS
  was 20,824 KiB on this Linux host. These are local measurements, not portable
  performance guarantees.

Test-boundary note:

The workspace Python executable lives under a runtime directory owned by a
different UID. Runner unit fixtures simulate ordinary-account path policy for
harmless Python child processes; separate tests assert root path refusal.
The real terminal editor fixture uses the root-trusted platform interpreter.
Production executable checks were not relaxed for tests or demo mode.

Local VPS-oriented performance comparison:

The shipped tools/benchmark_vps.py was run against the archived 0.3.4 source
and the 0.3.5 source. Each number below is the median of three serial runs in
fresh Linux/Python 3.12.14 processes on the same development host. The window
and catalog are simulated, with no native service commands or network traffic.
CPU time covers opening and immediately leaving the view; process peak RSS
also includes interpreter imports and fixture construction. Timing and process
memory vary between runs and hosts.

Workload                       CPU ms: 0.3.4 -> 0.3.5   RSS KiB: 0.3.4 -> 0.3.5
1 MiB short lines, unwrapped          281.1 -> 41.2            77,904 -> 23,688
1 MiB short lines, wrapped            364.5 -> 108.6           72,284 -> 23,680
1 MiB ordinary lines, unwrapped        64.6 -> 3.64            19,876 -> 17,452
1 MiB ordinary lines, wrapped          67.9 -> 6.16            19,764 -> 17,468
1 MiB single line, unwrapped          137.0 -> 1.98            25,716 -> 15,488
1 MiB single line, wrapped             64.5 -> 1.53            24,780 -> 15,488
50,000-name package browser           211.6 -> 134.7           33,420 -> 33,424

The short-line report has 524,288 lines; the ordinary report has 16,384 lines.
The saved catalog contains 50,000 names in 950,153 bytes of JSON. Both versions
build the same 50,006 menu choices. Catalog loads fall from two to one; peak
catalog-browser memory is effectively unchanged. The short-line unwrapped
viewer uses approximately 70% less peak memory and 85% less CPU in this test.
These synthetic Linux results are not measured OpenBSD VPS performance.

The single-service command count remains three for a root daemon query, but
the boot query and runtime probe address only the selected service. Reading
a selected kernel scalar after inventory falls from two full-tree scans plus
one targeted query to one targeted query. Tests assert command scope and fresh
validation at mutation boundaries; they do not invent native elapsed times.

The existing busy-screen loop was also measured locally. A three-second idle
progress display consumed about 0.006 CPU seconds and sent 1,519 bytes through
an 80x24 xterm pseudo-terminal, including entry and exit. It was left intact.
Its measured cost did not justify changing input or cancellation timing.

VPS.txt documents reproduction and the actual-server observation workflow.

See SECURITY-REVIEW.txt for findings, preconditions, fixes, and residual limits.

Native status:

Live OpenBSD service tools, native syntax validators, system reports, sysctl,
manuals, and package operations were NOT run in this Linux workspace. Command
interfaces were checked against official OpenBSD manuals; the initial target is
OpenBSD 7.8. Native syntax acceptance, daemon behavior, real package transactions,
actual system state, and packaged Python compatibility remain to be verified
on OpenBSD. docs/OPENBSD-CHECKLIST.txt records that work.

No host service, firewall, SSH configuration, or live /etc file was changed
by these tests. Demo validation is explicitly simulated and is never reported
as a passed native OpenBSD configuration check.
