PlotDirector/Docs/Deployment/Transport-20261125.md

10 KiB
Raw Blame History

Signed transport and receipt qualification — 25 November 2026

Installed and non-activating verified on web1 on 25 November 2026. All 54 reviewed files match. Production remains 9b1770d9, PID 26493, with unchanged DLL, current link, active marker and all 67 captured configuration file hashes. No application release, restart, database backup or migration occurred. Both sites pass normal public HTTPS validation.

The retained successful routine package is an uncompressed USTAR archive: 554260480 bytes / 528.58 MiB, SHA-256 e4990e90c3d32084e87af5bb149c5aff393b61e7e0c03f8e3c5120771686a4d7. The application was not rebuilt. Each candidate was compressed, decompressed to a real temporary file and checked against that original SHA-256. Source/signature and manifest/file/DLL identity were separately verified using the full retained signed release. No application dependencies or other package contents were removed.

Compression benchmark

Compression/decompression durations, sizes and encoder peak RSS below were measured on Atlas, sequentially at nice 10. Transfer durations are estimates using the prior observed 1.888 MiB/s file-payload throughput. Combined time is compression + estimated transfer + measured Atlas decompression. SHA verification was performed separately from the benchmark decoder timer. These are single warm fixture trials, not statistically significant comparisons of subsecond differences.

Method Compression s MiB Estimated transfer s Atlas decode s Combined s Peak encoder MiB
uncompressed 0.000 528.58 279.97 0.000 279.97 0.0
gzip-1 5.747 192.50 101.96 2.067 109.78 7.7
gzip-6 17.991 173.40 91.85 1.845 111.68 7.7
zstd-1-T1 1.652 180.28 95.49 0.623 97.76 17.7
zstd-1-T4 0.481 180.28 95.49 0.619 96.59 30.8
zstd-1-T8 0.408 180.28 95.49 0.656 96.55 46.4
zstd-3-T1 2.447 166.86 88.38 0.668 91.50 50.9
zstd-3-T4 0.788 166.86 88.38 0.660 89.83 91.1
zstd-3-T8 0.735 166.86 88.38 0.670 89.79 142.9
zstd-6-T1 6.684 157.91 83.64 0.645 90.97 52.3
zstd-6-T4 2.027 157.91 83.64 0.661 86.33 95.4
zstd-6-T8 1.627 157.91 83.64 0.671 85.94 154.9

Select Zstandard level 6, four workers, frame checksum enabled. It produces 165585450 bytes / 157.91 MiB (29.87% of original, approximately 70.1% smaller). Measured compression 2.027s, Atlas decompression 0.661s, estimated transfer 83.64s; combined 86.33s versus the 280s uncompressed transfer baseline. Estimated transfer savings are about 196s. Eight workers saved only approximately 0.4s, while increasing CPU consumption from 8.33 to 12.37 CPU seconds and peak RSS from 95.4 to 155.0 MiB. Level 3 compresses faster, but its larger output adds more transfer time overall. Gzip also helps substantially, but is slower overall than the selected Zstandard.

Measured on web1 during installation verification: 1.209s decoder-only, with original tar SHA-256 verified separately; 1.520s instrumented decompression, including verifier integrity work. Actual compressed transfer was 79.445s at 1.988 MiB/s. The complete existing-bundle transfer/validation/receipt/public acceptance workflow took 92.767s. This is not a genuine release activation. Against the prior 280s raw transfer, observed transfer reduction is approximately 200.6s across separate runs.

Keeping other baseline timings unchanged, replacing transfer and bespoke reporting suggests approximately 4.3 minutes overall. The automated pipeline can reduce orchestration further; a 3–5 minute target is an estimate, not a measured genuine release. Ten minutes remains the normal upper target, subject to essential safety. The next genuine application release is the definitive end-to-end benchmark.

Implementation and focused qualification

  • Original authorization/manifest signatures remain byte-identical. A separately signed transport envelope binds original authorization hash, original tar hash and size, compressed hash and size, release/source identity and codec settings. Corrupt compressed bytes are rejected before the decoder is launched. Decoded bytes must match both the original signature and complete manifest/file index.
  • Original raw packages remain supported. Decoder output is capped to the signed size and 4 GiB global maximum, with a 128 MB decoder window limit and CPU/wall limits. Existing regular-file-only archive extraction, no-follow snapshots, traversal/link/special-member/duplicate checks and count/size limits remain. Space checks include reconstructed archive, extraction and installation.
  • Upload remains unprivileged, fixed-member, bounded and serialised. Upload and validation never stop a service. Failed/incomplete staging is retained for review. Backup, transaction, history immutability, deployment lock, activation and qualified rollback safeguards remain. No incremental/unsigned active-file patching.
  • Root creates sanitized JSON/text receipts; the fixed receipt ID SSH operation reads only those receipts. It cannot read protected logs/configuration. The directory is root:plotdirector-deploy 0750, files 0640; the account gains no write or general sudo/shell privilege. Credential-like fields/values are defensively redacted; raw exceptions and command arguments are not copied into receipts.
  • Receipts contain actual before/after release identity, package/application/DLL checksums, transport sizes/ratio, transfer provenance/throughput, backup result, measured migration counts, read-back activation row, health, failures/recovery, monotonic timing and otherwise unattributed overhead. Service inactive-to-start, inactive-to-readiness and independently observed public outage are distinct. SQL worker history durations are measured with Stopwatch; UTC child endpoints are null when unavailable, never estimated. Unperformed phases remain explicit.
  • deploy.py is the measured Atlas workflow. It defaults to validate only; activation is explicit, and pending history requires a separately authorised allow-migrations run. It retrieves failed server receipts too. Its JSON/text summary replaces lengthy bespoke routine reports. Postactivation history checks happen inside the worker and its successful activation record is read back, avoiding another full package extraction solely to obtain these facts.

Focused qualification: 68 deployment regression tests passed, including all previous tests and compression/signature/checksum/corruption/truncation/expansion, unsafe archive, lock, upload failure, timing, receipt/redaction, activation/backup/ rollback and permission cases. A real root-owned Atlas filesystem fixture proved intended-group read-only access, other-user denial, symlink and foreign-owner rejection. A new tiny isolated SQL fixture proved 2 executed / 1 baselined count, zero-execution replay and failed transaction/history rollback, then was removed. The common C# activation-record reader was checked against retained Test history. No full application/Companion suite, recovered-database restore or Production migration was repeated. Only DatabaseWorker was published on Atlas.

Completed installation and verification

The existing qualified worker output was reused without rebuilding the application or repeating completed qualification. Installation held the deployment and upload locks. Previous tooling and the raw incoming bundle are preserved root-private at /srv/backups/configuration/plotdirector-tooling-before-20261125T202018Z/. All 54 installed hashes match the reviewed inventory. Configuration, SQL permissions, SSH/sudo rules, services and certificates were preserved.

The retained eadda6f6 signed package was compressed and uploaded without changing its original tar/authorization/manifest bytes. Validation only passed signature, checksum, archive, schema, immutable-history and active-work checks. The installed verifier also accepted the retained legacy raw package. No activate/rollback/migrate or service-control operation was invoked. Production continues running 9b1770d9.

Receipt 20261125T202311Z-621fb47a47f8 was retrieved through the restricted account. It records unchanged 320 migration records (210 baselines / 110 historically executed), three successful releases, latest source 9b1770d9, measured phase durations and unattributed overhead. Unperformed backup/service/activation phases remain explicit; their prior focused qualification stands until the next genuine release.

Receipt files are root:plotdirector-deploy 0640 in a 0750 directory. Transfer read and read-only access passed; runtime/other-user read and transfer writes were denied. Protected logs/migration credentials remain inaccessible to transfer, migration credentials remain inaccessible to runtime, unrestricted sudo is denied, arbitrary SSH commands and receipt path traversal are rejected. No privileges were expanded.

Installation checks paused on private-path traversal during the staged read-only worker check. Staging moved to a separate root-owned traversable directory and the worker received a non-secret manifest copy; backup permissions remained private. An explicit receipt-directory chmod corrected umask reducing requested 0750 to 0700. No database permissions were changed and no application operation occurred during these pauses. Temporary staging was removed; recovery artifacts remain retained.

Only the temporary Atlas administrator key was removed after verification; both existing administrator key lines were preserved byte-for-byte. New Atlas admin SSH authentication is rejected; restricted receipt retrieval still works.

Measured pipeline receipt. Unchanged state and permission verification. The next genuine application release provides the definitive end-to-end performance benchmark. The 3–5 minute target remains estimated, with 10 minutes the normal upper target subject to safeguards.

Further reduction opportunity: Windows runtime directories alone occupy about 276 MiB. Other RIDs and native variants also contribute. A future qualified framework-dependent linux-x64 publish may exclude unnecessary platform assets; no files were removed here, and download/Companion dependencies must be reviewed before such a change. The full immutable package remains the unit of deployment.

Machine-readable measurements.