vpsvip 0.4.0 - verification record
Date: 2026-11-16

Environment: Linux, Python 3.12.14, standard-library curses, effective UID 1000.
Command: python3 -m unittest discover -s tests -v
Result: 674 tests run in 12.829 seconds: 671 passed, 3 skipped, 0 failures,
0 errors. The three skips require a real root process for package-lock
ownership, mode, symlink, and contention checks. They remain acceptance work.

Baseline: the retrieved vpsvippanel 0.3.6 archive was tested before editing.
It ran 618 tests in 11.244 seconds: 615 passed, the same 3 skipped.
This release adds 56 test methods, including the guided setup workflow and
regressions for the failures found during review. There are 10 real
pseudo-terminal tests within the 674-test total, not in addition to it.

NEW RELEASE COVERAGE

- Built-in draft write, fsync, and replace failures retain the prior complete
  draft and review. Concurrent editor changes are preserved; unchanged text
  does not rewrite the draft or invalidate its review.
- Saved-state cleanup releases locks and directory descriptors even if unlink
  fails. Exclusive-create collisions do not delete somebody else's entry.
- Truncated native validator output prevents configuration installation.
- Truncated or diagnostic-bearing boot-status output prevents flag changes;
  incomplete settings output prevents opening the flags editor.
- Exact generated HTTP/SMTP files from vpsvip, vpsvippanel, and rcpanel remain
  recognized. Modified/manual files are not silently adopted.
- Native rc.d symlink aliases remain available through status and start.
- Existing rcpanel and vpsvippanel launchers, including a previously migrated
  rcpanel launcher, execute the new release. Customized historical commands
  survive; a primary-name collision and observed concurrent change are refused.
- Invalid versions, unsupported interpreter spellings, missing entry modules,
  module compile errors, and missing documentation fail installer preflight.
- Search reveals matches far into long lines, wrapping/resizing preserve the
  visible character position, and escaped text has correct prompt cursors.
- Ctrl+C is restored at the native-program return prompt after the child exits.
- Closing previews releases retained output and authorization. Cancellation
  just after plan creation but before UI result handoff also discards the plan.
- Package lock close/open failures cannot strand the in-process mutex. These
  new error-path tests inject failure; they do not replace real root checks.
- The single-zero native query is rejected before repository/native activity.
- CLI --status SERVICE selects one exact daemon; malformed/unknown names fail.
- 21 guided-setup tests use temporary demo files and real application methods.
  Navigation/cancel does not mutate; enable/start retain separate confirmations
  and ordinary backup creation; failures do not trigger retry or enablement;
  custom paths preserve validation boundaries; stale snapshots and warnings
  survive failed refresh; verification reports only observed state.
- A new real pseudo-terminal flow opens setup, explicitly enables and starts
  demo httpd, then refreshes and observes its running state.

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
  for each exact current/legacy header, in addition to malformed-input cases.
  Fixed legacy fixtures are accepted, and edited or extended files remain
  protected against automatic form adoption. New renders use the new name.
- 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.
- The new installer itself runs with -I under a hostile working directory and
  PYTHONPATH. Genuine legacy launchers become isolated compatibility commands;
  clean installs create only the new command. Customized, wrong-prefix,
  symlinked, hard-linked, unsafe, or concurrently changed legacy entries remain
  unchanged. Earlier version files survive, and partial compatibility-command
  failures explicitly identify the already installed new command.
- 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.

Ten 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 request their state refresh explicitly; backing
out leaves the previous snapshot available instead of starting another job.
Other 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.
One 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.
Installer tests launch the installed program and its recognized compatibility
command with a hostile PYTHONPATH and working directory, and confirm that the
selected new modules are used.

ADDITIONAL CHECKS FOR 0.4.0

- All delivered source and documentation are ASCII text.
- All 64 Python source/entry/test/tool files parse with Python 3.10 grammar.
  The executed interpreter is Python 3.12.14; grammar parsing alone does not
  claim an execution run under every supported Python version.
- Installer tests run actual staged launchers under isolated imports and a
  hostile current directory/PYTHONPATH. Native installation was not performed.
- Viewer and catalog performance probes run with both the prior vpsvippanel
  tree and the new vpsvip tree. Large line, 524,288 short-line, and 50,000-name
  catalog fixtures complete within their established bounds. These are local
  smoke measurements, not native OpenBSD latency or throughput results.
  A subsequent serial three-pair check of the short-line viewer measured
  median CPU 51.30 ms (0.3.6) and 54.87 ms (0.4.0), with the same 26,060 KiB
  median peak process RSS. This small local sample establishes no speedup.
- The mdoc manual was inspected and updated. No mandoc, groff, or nroff
  executable is available in this environment, so this manual was not rendered.
- The system-map documentation is regenerated from the shipped map: 12 root
  categories, 333 nodes, 286 endpoints, 47 reports, and 47 configuration paths.

NATIVE ACCEPTANCE LIMIT

Live OpenBSD service tools, native syntax validators, system reports, sysctl,
manuals, and package operations were not run in this Linux environment.
The target remains OpenBSD 7.8. Native syntax acceptance, service behavior,
real package transactions, real root lock ownership, and packaged Python
compatibility remain to be verified using docs/OPENBSD-CHECKLIST.txt.

No host service, firewall, SSH configuration, or live /etc file was changed.
Demo validation is simulated and is not reported as a native configuration
check. The new setup workspace likewise reports observed state without
claiming network readiness or deployment acceptance.

The following performance record is retained from the earlier release;
it was not rerun for the 0.4.0 numbers above.

Historical local VPS-oriented performance comparison (0.3.5):

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.
