Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5718d9521b | |||
| 10abd22f1a | |||
| 2fb10f7b4e | |||
| 2fb41a96ce | |||
| a516bfb4b3 | |||
| 4c84ed75e0 | |||
| 4c6c22074a | |||
| 4019569ab7 | |||
| 1c8761b188 | |||
| e1c8e84502 | |||
| 3cca441874 | |||
| 55431b5ad0 | |||
| a39ac84729 |
+40
-19
@@ -407,8 +407,11 @@ verify_backup_file_shape() {
|
||||
report_backup() {
|
||||
local target="$1" size
|
||||
if ! chmod 600 "$target" 2>/dev/null; then
|
||||
docker run --rm -v "$BACKUP_DIR":/backup -e BACKUP_FILE="$(basename "$target")" \
|
||||
alpine:3 sh -c 'chmod 600 "/backup/$BACKUP_FILE"'
|
||||
if ! docker run --rm -v "$BACKUP_DIR":/backup -e BACKUP_FILE="$(basename "$target")" \
|
||||
alpine:3 sh -c 'chmod 600 "/backup/$BACKUP_FILE"'; then
|
||||
echo "Could not restrict backup permissions for ${target}. Aborting deploy."
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
size="$(du -h "$target" | cut -f1)"
|
||||
echo "Backup verified: ${target} (${size})"
|
||||
@@ -423,10 +426,9 @@ verify_sql_backup() {
|
||||
local has_schema=1 has_trailer=1
|
||||
set +o pipefail
|
||||
if gzip -dc "$target" | grep -q "CREATE TABLE"; then has_schema=0; fi
|
||||
# mariadb-dump / mysqldump write "-- Dump completed on ..." as the last line.
|
||||
# Its absence means the dump died partway through.
|
||||
if gzip -dc "$target" | grep -q "Dump completed"; then has_trailer=0; fi
|
||||
set -o pipefail
|
||||
# Require the final nonblank completion comment, not that phrase in SQL data.
|
||||
if gzip -dc "$target" | awk '{ sub(/\r$/, "") } NF { last=$0 } END { exit !(last ~ /^-- Dump completed( on .*)?$/) }'; then has_trailer=0; fi
|
||||
|
||||
if [ "$has_schema" -ne 0 ]; then
|
||||
echo "Backup ${target} contains no CREATE TABLE statement — it is not a usable dump. Aborting deploy."
|
||||
@@ -451,19 +453,15 @@ verify_volume_backup() {
|
||||
# Prove this is the DATABASE volume, not merely a non-empty tar. This is what
|
||||
# catches an archive taken from the wrong volume, or from a freshly created
|
||||
# empty one.
|
||||
# Listed in the same container that wrote it, not with the host's tar: GNU tar
|
||||
# reads a leading "C:/" as an rsh host and fails outright when this script runs
|
||||
# from Git Bash. Docker is already required to have produced the archive.
|
||||
# Python is already required by deployment validation. Its tar reader handles
|
||||
# Windows paths and checks regular-file/header bytes without extracting files.
|
||||
local has_db=1
|
||||
if docker run --rm \
|
||||
-v "$(dirname "$target")":/backup:ro \
|
||||
-e ARCHIVE_NAME="$(basename "$target")" \
|
||||
alpine:3 sh -c 'tar tzf "/backup/$ARCHIVE_NAME" | grep -q "jobtracker\.db"' >/dev/null 2>&1; then
|
||||
if python3 scripts/validate-sqlite-backup.py "$target"; then
|
||||
has_db=0
|
||||
fi
|
||||
|
||||
if [ "$has_db" -ne 0 ]; then
|
||||
echo "Archive ${target} contains no jobtracker.db — it is not a SQLite data backup. Aborting deploy."
|
||||
echo "Archive ${target} has no valid regular SQLite database member. Aborting deploy."
|
||||
rm -f "$target"
|
||||
return 1
|
||||
fi
|
||||
@@ -559,14 +557,29 @@ apply_backup_retention() {
|
||||
echo "Monthly recovery set retained: ${monthly_dir}"
|
||||
fi
|
||||
|
||||
find "$BACKUP_DIR" -maxdepth 1 -type f -name 'jobtracker-*' -mtime "+$daily_days" -delete
|
||||
if ! find "$BACKUP_DIR" -maxdepth 1 -type f -name 'jobtracker-*' -mtime "+$daily_days" -delete; then
|
||||
echo "Daily backup retention failed. Aborting deploy."
|
||||
return 1
|
||||
fi
|
||||
|
||||
local monthly_dirs=()
|
||||
mapfile -t monthly_dirs < <(find "$monthly_root" -mindepth 1 -maxdepth 1 -type d -name '20??-??' | sort)
|
||||
local monthly_dirs=() monthly_listing
|
||||
# Check the pipeline directly; mapfile cannot report process-substitution failures.
|
||||
if ! monthly_listing="$(find "$monthly_root" -mindepth 1 -maxdepth 1 -type d -name '20??-??' | sort)"; then
|
||||
echo "Could not enumerate monthly backups. Aborting deploy."
|
||||
return 1
|
||||
fi
|
||||
if [ -n "$monthly_listing" ]; then
|
||||
mapfile -t monthly_dirs <<< "$monthly_listing"
|
||||
fi
|
||||
while [ "${#monthly_dirs[@]}" -gt "$monthly_count" ]; do
|
||||
local oldest="${monthly_dirs[0]}"
|
||||
case "$oldest" in
|
||||
"$monthly_root"/20??-??) rm -rf -- "$oldest" ;;
|
||||
"$monthly_root"/20??-??)
|
||||
if ! rm -rf -- "$oldest"; then
|
||||
echo "Monthly backup retention failed. Aborting deploy."
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
*) echo "Refusing to prune unexpected monthly backup path: $oldest"; return 1 ;;
|
||||
esac
|
||||
monthly_dirs=("${monthly_dirs[@]:1}")
|
||||
@@ -660,10 +673,18 @@ finish_deploy() {
|
||||
|
||||
if [ "$status" -ne 0 ] && [ "$replacement_started" = true ]; then
|
||||
if [ -n "$previous_backend_ref" ] && [ -n "$previous_frontend_ref" ]; then
|
||||
echo "Deployment failed after core replacement; restoring previous healthy images."
|
||||
echo "Deployment failed after core replacement; restarting previous core images."
|
||||
if BACKEND_IMAGE="$previous_backend_ref" FRONTEND_IMAGE="$previous_frontend_ref" \
|
||||
compose up -d --force-recreate --remove-orphans backend frontend; then
|
||||
echo "Previous core release restored. Deployment remains failed; inspect the logs above."
|
||||
if curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 --retry-connrefused --retry-max-time 30 "${APP_PUBLIC_BASE_URL%/}/" >/dev/null &&
|
||||
curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 --retry-connrefused --retry-max-time 30 "${APP_PUBLIC_BASE_URL%/}/health" >/dev/null &&
|
||||
curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 --retry-connrefused --retry-max-time 30 "${APP_PUBLIC_BASE_URL%/}/ready" >/dev/null; then
|
||||
echo "Previous core images restarted and public core checks passed. Deployment remains failed; inspect the logs above."
|
||||
else
|
||||
echo "Previous core images restarted, but rollback health verification failed. Manual recovery is required."
|
||||
compose ps || true
|
||||
compose logs --tail=200 backend frontend || true
|
||||
fi
|
||||
else
|
||||
echo "Automatic core rollback failed. Manual recovery is required."
|
||||
compose ps || true
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# First production deployment runbook
|
||||
|
||||
> Historical July 2026 baseline. Current release preparation follows
|
||||
> [the release qualification matrix](../docs/release-readiness/14_RELEASE_ACCEPTANCE_MATRIX.md) and
|
||||
> [recovery specification](../docs/release-readiness/11_BACKUP_RESTORE_ROLLBACK.md).
|
||||
> Reconcile the examples below with the exact candidate, migration history and isolated rehearsal
|
||||
> before operational use. Current rollback health checks are source-tested offline.
|
||||
|
||||
> Written 2026-07-19 against the actual implementation, not against the other docs. Every command and
|
||||
> failure mode below was exercised locally against MariaDB 11 containers. No production data was used.
|
||||
>
|
||||
@@ -220,9 +226,11 @@ everything written since the dump — including anything users did during and af
|
||||
**Restore the database only if the data itself is wrong.** If the backend simply will not start, the
|
||||
code rollback is almost certainly the whole fix.
|
||||
|
||||
Why a code rollback is safe here: every Phase 4/5 migration is a no-op — the reconciler owns those
|
||||
tables — so reverting code never leaves migration history ahead of the schema. The reconciler is
|
||||
additive and never drops a table holding rows, so the older code simply ignores the newer tables.
|
||||
The July 2026 baseline used no-op Phase 4/5 migrations around reconciler-owned tables. Current
|
||||
migrations also perform schema changes, including `AddJobRevision` adding the application Version
|
||||
column and `AddUserOperationEvents` creating its table and indexes. Qualify the exact old/new image
|
||||
pair against the current migration history and representative post-upgrade writes. The recovery
|
||||
specification above includes ownership, revision, document and restore checks for that rehearsal.
|
||||
|
||||
## Procedure
|
||||
|
||||
|
||||
@@ -1,5 +1,36 @@
|
||||
# Recovery implementation review and rehearsal plan
|
||||
|
||||
## RR-17 SQLite archive member format
|
||||
|
||||
18 November2026, isolated source10abd22f from2fb10f7b. Name-only verification accepted ten synthetic link/type/content/path cases that could not establish database bytes. Final29 backup methods and Bash syntax pass with the streaming Python standard-library path/type/signature verifier. No member is extracted. Supported root/dot/nested paths remain; Python3 was already a mandatory deployment dependency. Final native logs and precise intermediate fixture failures are retained in [format evidence](evidence/sqlite-archive-format/README.md). Earlier26/22/21 counts overlap29. This is not SQLite integrity, authoritative path selection, WAL/key/tombstone consistency, restore/RPO/RTO, actual container or production qualification. Original release worktree and A3 remain separate.
|
||||
|
||||
## RR-16 tar failure propagation
|
||||
|
||||
16 November 2026. Source `a516bfb4b38468f9bdc222744a02c07bc5b013c3`, after RR-15 on `codex/release-rollback-health`. A valid gzip stream containing a tar database header without its declared body passed verification: tar failed after printing the matching member and the old pipeline returned grep's success. One deterministic local fixture reproduced this false acceptance and next-gate continuation.
|
||||
|
||||
The existing container command now writes its listing to the container's private temporary filesystem and checks tar success before matching the exact database basename. Every call already runs in a fresh `docker run --rm` container; no new mount, service, image, permissions or dependency was introduced. The local shim substitutes the container-only listing path into its disposable fixture directory.
|
||||
|
||||
- RED: one focused method FAILED. GREEN:22 backup methods PASSED, including the three RR-15 negative names, three valid names and truncated-tar case. Earlier21/19 methods overlap22.
|
||||
- Native Bash syntax receipt records exit0 and current source hash; whitespace check passed. AST refresh passed18,554 nodes/46,015 edges.
|
||||
- Real local GNU tar/gzip were exercised, with Docker and later deployment gates mocked. Actual Alpine/BusyBox image execution, filesystem permissions, usable SQLite contents, regular-file/link safety, path-name ambiguity, database/files/key consistency, encryption and restore remain unqualified. No full deployment script, Docker service, database or remote backup was executed.
|
||||
- The fix stays on the isolated release branch; A3 integration, isolated recovery and final release approval remain open. Previous rollback6 is historical and was not rerun for this unchanged handler.
|
||||
|
||||
Source/native/canonical evidence: [backup-tar-status/SOURCE_RECEIPTS.json](evidence/backup-tar-status/SOURCE_RECEIPTS.json).
|
||||
|
||||
## RR-15 SQLite archive member check
|
||||
|
||||
16 November 2026. Bounded source `4c6c22074a9a097412f63d0d25399d5d1a20424f`, branch `codex/release-rollback-health`, based on `4019569a`. Existing SQLite archive validation accepted any listing containing the substring `jobtracker.db`. Real synthetic gzip/tar archives containing only `jobtracker.db-wal`, `old-jobtracker.db` or `jobtracker.db.backup` each passed format verification and reached the next mocked deploy gate.
|
||||
|
||||
The one-line predicate now requires the exact basename at the end of the member path. Exact `jobtracker.db`, `./jobtracker.db` and `data/jobtracker.db` remain accepted. The existing managed deployment flow, volume inspection, archive creation, permission, retention, upload and failure handling are unchanged; no recovery files were removed outside disposable test fixtures.
|
||||
|
||||
- RED: two test methods, three failed negative subtests and three passing positive scenarios in the control method.
|
||||
- GREEN:21 backup test methods passed, including the two new methods/six archive-name scenarios. The previous19 overlap21; do not add them.
|
||||
- Bash syntax and whitespace check PASSED. Syntax receipt records the actual process exit0 and source hash. AST graph refresh PASSED18,551 nodes/46,011 edges.
|
||||
- Tests use real local tar/gzip archives and execute the actual container tar/grep command through a fake Docker function that substitutes only the mount prefix. Docker, volumes, permissions, remote storage, databases and full deployment are NOT EXECUTED. Data bytes are synthetic, not a SQLite database. This proves only member-name selection, not usable SQLite contents, archive regular-file/link safety, full tar error handling, consistency, decryptability, restore or RPO/RTO.
|
||||
- Rollback handler source is unchanged; earlier six rollback methods are historical and were not rerun for this predicate. Actual recovery, operational security and release gates remain open. This release-branch fix is not yet integrated into the A3 branch.
|
||||
|
||||
Source/native/canonical evidence: [backup-database-member/SOURCE_RECEIPTS.json](evidence/backup-database-member/SOURCE_RECEIPTS.json).
|
||||
|
||||
2026-11-02; source `5cb903b989742b7a96cb22ddf4c0e24993b18980`. Read-only discovery. The entire 765-line `deploy/deploy.sh` was inspected, never executed or sourced. No operational keys, credentials, environment files, databases, containers or remote storage were accessed.
|
||||
|
||||
## Distinct recovery mechanisms
|
||||
@@ -11,7 +42,7 @@
|
||||
| `deploy/deploy.sh:backup_database` | Requires explicit provider; SQL dump for MariaDB, volume archive for SQLite; rejects missing/empty/malformed/trailerless dumps | Format checks do not restore or compare records; emergency skip exists and is not approved here |
|
||||
| `backup_recovery_volumes` | MariaDB additionally archives required application data volume; independently archives tombstones when present | Consistency between dump/files/tombstones and current key availability still needs isolated rehearsal |
|
||||
| Retention/off-host copy | Daily/monthly retention and optional rclone copy | Source message calls remote encrypted but source does not establish actual remote encryption configuration; off-host configuration and recovery remain unverified |
|
||||
| `finish_deploy` | On failure after replacement, restarts previous backend/frontend image references when both exist; retains failed exit | No database reversal, no previous AI image restoration, and no post-rollback health check in this handler |
|
||||
| `finish_deploy` | On failure after replacement, restarts previous backend/frontend references, checks public frontend/liveness/readiness with bounded retries and retains failed exit | Offline stubs verify control flow. Actual recovery, image identity, database reversal and previous AI image restoration remain unqualified |
|
||||
| Tombstone store and replay | Validates ledger records; Program invokes `StageRestoredAccountsAsync` at startup; deleted identities are staged again | Test restored data with latest independent tombstones; corrupt ledger must fail closed. Existing AccountDeletionTests include restore replay, not a complete operational restore |
|
||||
|
||||
Build retry paths prune Docker build/system cache and deployment may warm an Ollama model. Therefore even a proposed "local deploy smoke" must not run this script against the shared workstation. No such action was taken.
|
||||
@@ -71,3 +102,39 @@ The fix explicitly checks preparation and copy. It writes the stamp to a tempora
|
||||
- Red run: **2 failures and 1 passing control** against the pre-fix function. The partial-copy case directly reproduced false completion; the marker-publication case required an atomic rename the old function did not perform.
|
||||
- Green run: **12/12 backup tests** including four monthly cases (successful copy and stamp, partial copy, failed marker rename, existing completed month). Rollback handler and hosted quarantine checks passed **5/5** and **4/4**. Bash syntax validation passed.
|
||||
- Only temporary synthetic files were created or copied. Pruning and upload were stubbed. Approved rehearsal still needs independent checks of artifacts for the marker stamp, encryption, retrieval and actual restore before any release decision.
|
||||
|
||||
## RR-12 post-rollback core health checks
|
||||
|
||||
11 November 2026. Source `a39ac847298e1fbe7667cf42671e7ec265500fcd` on `codex/release-rollback-health`, based on `24a62997`. After a successful previous-image restart, the handler now checks the configured public frontend, `/health` and `/ready`. Each curl request has connection/request timeouts and bounded retries for startup failures. A failed check reports that manual recovery is required and collects status/logs. The deployment's original nonzero status is retained even if diagnostics fail. The success message is limited to restarted core images and passing public core checks.
|
||||
|
||||
The red test run executed six methods and reported four assertion failures because the old handler performed no probes. The green run passed six methods, including failed-probe subcases for all three endpoints, Compose failure, incomplete references, pre-replacement failure and successful deployment. Probe failures and Compose failure also use failing diagnostic stubs to verify original-status preservation. Twelve backup tests and shell syntax validation passed separately. Earlier five-test receipts remain historical and overlap this run.
|
||||
|
||||
Only the extracted exit handler/trap ran with shell functions substituting Compose, Docker, curl and cleanup. The full deployment script was never sourced or executed, and no network/containers/models were used. Raw red/green/backup/syntax receipts are in `evidence/rollback-health/`. Actual startup timing, proxy routing, exact image identity, post-migration writes and database/files/keys/tombstone recovery still need the authorised isolated rehearsal. Passing public probes alone does not establish recovery correctness.
|
||||
|
||||
## RR-13 retention failure propagation
|
||||
|
||||
11 November 2026. Based on `3cca441874abfab6ad581c5a07913a6d66622423` on `codex/release-rollback-health`. Bounded offline remediation under prompt 11, sections 13 and 16. Engineering priority P2: retention failures could falsely report success and permit upload/deployment, leaving retention incomplete; no actual data loss or production impact was observed. No security severity or release-risk acceptance is implied.
|
||||
|
||||
The real conditional deployment caller suppresses Bash errexit within `apply_backup_retention`. Previously a failed daily `find -delete` or monthly `rm` was masked by the final success message. Monthly `find | sort` failures were also hidden by process substitution feeding `mapfile`. Seven retention test methods reproduced four failing assertions: daily prune, monthly enumeration, sorting and monthly prune all returned success and reached the mocked upload/deployment boundary.
|
||||
|
||||
Daily pruning and each monthly removal now explicitly return failure. Monthly enumeration is captured in a checked command substitution under the script's existing `pipefail`, then split into the same ordered array; an empty listing produces an empty array. Failure prevents later monthly removals, upload and deployment, and suppresses the final retention-success message. Existing daily age/count defaults, monthly path guard, copy/atomic-marker behavior, archive/dump/upload functions and backend error handling remain unchanged. Pruning can already have removed some eligible old files before a command fails; this change does not undo prior removals or prove recoverability.
|
||||
|
||||
Fresh evidence, Windows / Python 3.12.10 / Git Bash:
|
||||
|
||||
- `python scripts/test-deploy-backup.py BackupRetentionTests -v`: red run **7 methods, 4 assertion failures** (monthly enumeration has two failing subcases). Four existing methods passed. An additional empty-list control was added afterward.
|
||||
- `python scripts/test-deploy-backup.py -v`: final **16/16 methods PASSED**, including 8 retention, 5 connection-parser and 3 upload methods. Healthy retention requests removal of the two oldest synthetic months in order, preserves current copied bytes/stamp and an existing completed snapshot, and reaches upload/deployment. Daily failure prevents enumeration; either pipeline failure prevents monthly pruning; first monthly removal failure prevents further removals. Empty-list control makes no removal request. The red and earlier green totals overlap; do not add them.
|
||||
- `python scripts/test-deploy-rollback.py -v`: **6/6 PASSED** independently; original failure statuses, rollback diagnostics and health-check gates retained.
|
||||
- Git Bash `bash -n deploy/deploy.sh`: **PASSED**, syntax only. Raw receipts and SHA-256 source identities: [retention-failures evidence](evidence/retention-failures/source-identity.json), alongside `red.txt`, `green-backup.txt`, `rollback.txt`, and `syntax.txt`.
|
||||
- `graphify update .`: AST-only update completed, 18,539 nodes / 45,993 edges. Optional SQL extractor missing and unsupported/no-symbol files reported; no dependency installed or semantic/model extraction run. Generated graph remains untracked local navigation material.
|
||||
|
||||
Tests execute only extracted functions/caller with synthetic temporary files. Every pruning `find`, `rm` and upload operation is a shell stub; sorting uses only mocked listing text. The full deployment script was never executed or sourced. No real backup, deletion, network transfer, containers, database, migration, providers, model, infrastructure repair or production operation was performed. Product/browser/full MariaDB/hosted/security suites were not rerun for this shell-only package. Actual Linux-host pruning, encrypted retrieval/decryption, consistent restore, post-write rollback and agreed RTO/RPO remain unqualified. RR-09/RR-12/RR-13 recovery gates and production NO-GO remain open. Reverting this bounded commit restores the prior failure-masking behavior; no schema or user-data reversal is needed.
|
||||
|
||||
## RR-13 backup permission gate
|
||||
|
||||
Source1c8761b1 follows retention checkpointe1c8e845. report_backup previously ignored failure of both host chmod and its Docker fallback while running under conditional backup gates. Extracted real verification functions and the actual database/recovery conditional gate reproduced continued verification/promotion in both failing permission scenarios.
|
||||
|
||||
The fallback now returns failure explicitly, retaining the artifact and suppressing Backup verified and subsequent deployment gates. Host-success and fallback-success paths retain their behaviour. No Docker command, chmod, archive operation or deployment was executed against real data:permissions/container/size/content verification are stubbed around a synthetic temporary artifact.
|
||||
|
||||
RED:three methods/six scenarios, two failing subtests. GREEN:19 backup methods passed, including three permission methods/six scenarios; Bash syntax passed. The prior six rollback methods were not rerun because the handler is unchanged. Native logs/source bindings: evidence/backup-permissions. Root continued after delegated worker usage limits; test temp/output uses E because C capacity is constrained.
|
||||
|
||||
Actual Linux permissions, encrypted retrieval, full restore, post-write rollback, RPO/RTO and final release qualification remain open. No real permission/prune/upload/deploy/recovery occurred. Revert1c8761b1 and rerun backup checks to roll back the code change; no data migration is involved.
|
||||
|
||||
@@ -15,7 +15,11 @@ Discovery only, 2026-11-02. These are qualification gaps unless a concrete defec
|
||||
| RR-09 | Backup/restore and rollback | Existing procedures and historical seeded rehearsal are not a current restore. Need isolated recovery-set completeness, decryption, tombstone behavior, post-write rollback compatibility and agreed RPO/RTO |
|
||||
| RR-10 | AI quality/activation | Deterministic Docling fixtures are distinct from real-model semantic accuracy. Optional unqualified adapter remains disabled; no AI invocation authorised here |
|
||||
| RR-11 | Backup host parsing rejected supported `Host=` alias and uppercase spelling | FIXED AND OFFLINE-TESTED. See [bounded remediation](RR-11_IMPLEMENTATION.md). Real dump/restore qualification remains open |
|
||||
| RR-12 | Rollback recreates core images without post-rollback health qualification; no schema/data/AI reversal | OFFLINE HANDLER CHECKS PASSED 5/5. See [failure-injection evidence](11_BACKUP_RESTORE_ROLLBACK.md#rr-12-offline-failure-injection). Actual image recovery and health/readiness after migration/writes still require isolated rehearsal |
|
||||
| RR-13 | Off-host encryption and recovery-set consistency need independent proof. Failed transfer and partial monthly copy previously let deployment continue | Transfer and monthly marker failure gates FIXED AND OFFLINE-TESTED. Actual encryption, retrieval/decryption and database/files/key/tombstone consistency require approved isolation |
|
||||
| RR-12 | Previous handler omitted post-rollback health checks; schema/data/AI recovery remains separate | Health probes FIXED in `a39ac847` and six offline handler methods passed, including failed endpoints and diagnostics. See [health follow-up](11_BACKUP_RESTORE_ROLLBACK.md#rr-12-post-rollback-core-health-checks). Actual image identity, startup timing and recovery after migration/writes still require isolated rehearsal |
|
||||
| RR-13 | Off-host encryption and recovery-set consistency need independent proof. Failed transfer, partial monthly copy and retention errors previously let deployment continue | Transfer/marker gates and explicit daily prune, monthly enumeration/sort and removal failure propagation FIXED AND OFFLINE-TESTED. Retention suite16/16 preceded permission protection follow-up1c8761b1; final backup suite19/19 methods. Four retention failure assertions and two permission failure subtests reproduced first. See [retention follow-up](11_BACKUP_RESTORE_ROLLBACK.md#rr-13-retention-failure-propagation). See also [permission follow-up](11_BACKUP_RESTORE_ROLLBACK.md#rr-13-backup-permission-gate). Actual encryption, retrieval/decryption and database/files/key/tombstone consistency require approved isolation |
|
||||
| RR-14 | July first-deploy runbook inferred rollback safety from its no-op migration baseline, while current migration Up methods add schema | Historical scope and current qualification links clarified. `AddJobRevision` adds Version and `AddUserOperationEvents` creates a table/indexes. Exact old/new image compatibility after migration/writes remains an isolated rehearsal gate |
|
||||
| RR-15 | SQLite backup listing accepted a WAL or similarly named file without the database member | FIXED AND OFFLINE-TESTED at `4c6c2207`: exact member basename required; three false-positive archives reproduced first,21 backup methods/syntax passed. [Bounded evidence](11_BACKUP_RESTORE_ROLLBACK.md#rr-15-sqlite-archive-member-check). Real SQLite contents, regular-file/link safety, tar errors, restore and recovery-set consistency remain unqualified |
|
||||
| RR-16 | Tar failure was hidden by a matching member's successful grep | FIXED AND OFFLINE-TESTED at `a516bfb4`: valid gzip/truncated tar reproduced false acceptance; tar listing must succeed before matching.22 backup methods/syntax passed; [bounded evidence](11_BACKUP_RESTORE_ROLLBACK.md#rr-16-tar-failure-propagation). Real target-image/restore/security qualification remains open |
|
||||
| RR-17 | SQLite archive name-only checks accepted links/special entries, non-database bytes and unsafe database paths | FIXED AND OFFLINE-TESTED at `10abd22f`: streaming stdlib validation of relative path, regular member and SQLite signature. Ten false-acceptance subtests reproduced first; final29 backup methods/syntax passed. [Evidence and limits](evidence/sqlite-archive-format/README.md). Header-only format is not integrity/restore/WAL/recovery-set proof; actual host/container/release qualification remains open |
|
||||
|
||||
Continue evidence work against the [source endpoint and environment census](03_ENDPOINT_ENVIRONMENT_CENSUS.md). Actual qualification requires an accepted candidate and isolated environment. Every fix needs minimal scope, targeted verification and the applicable stage approval.
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Release discovery handoff
|
||||
|
||||
18 November2026: isolated codex/recovery-archive-validation from2fb10f7b, source10abd22f. RR-17 streaming SQLite archive member path/type/header validation closes ten reproduced false acceptances;29 offline backup methods/syntax pass. No real backup/restore/container/deployment. [Evidence](evidence/sqlite-archive-format/README.md) retains original failures, Windows test-fixture correction and remaining recovery limits. Original release worktree is untouched; no A3 integration or release acceptance.
|
||||
|
||||
11 November. Branch `codex/release-rollback-health`, baseline `24a62997`, source `a39ac847` adds bounded post-rollback frontend/liveness/readiness probes and failing-diagnostics coverage while preserving the original exit status. Six extracted-handler tests, twelve backup tests and shell syntax validation passed. Full deploy, Docker, network, models and real restore were not executed. [Evidence and remaining qualification](11_BACKUP_RESTORE_ROLLBACK.md#rr-12-post-rollback-core-health-checks).
|
||||
|
||||
RR-14 clarifies that the first-production runbook is a July baseline. Current Up migrations add the Version column and operation-event schema. Its old no-op argument cannot qualify a current old/new image pair. Current candidate, migration/write and recovery rehearsal requirements are now linked from that runbook. This was source/document review only.
|
||||
|
||||
RR-12 offline failure injection passed 5/5 against the unchanged deploy exit handler. The evidence covers synthetic prior-image recreation, failed rollback diagnostics, original exit status and conditions that skip rollback. [Recovery report](11_BACKUP_RESTORE_ROLLBACK.md#rr-12-offline-failure-injection) distinguishes this from a real post-migration/post-write rehearsal. RR-13 off-host retrieval/decryption and consistent restore remain open. No production qualification.
|
||||
|
||||
RR-13 transfer guard [reproduced and fixed offline](11_BACKUP_RESTORE_ROLLBACK.md#rr-13-off-host-upload-failure-handling). Daily and monthly copy errors stop deployment, and the success log makes no encryption claim. Actual remote encryption and restore remain open.
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"sourceCommit": "4c6c22074a9a097412f63d0d25399d5d1a20424f",
|
||||
"sourcesLfSha256": {
|
||||
"deploy/deploy.sh": "f83f0849ac2ef9dc4930ef28c78e9c002ffeec68d4670fc52c6890b43cce59a8",
|
||||
"scripts/test-deploy-backup.py": "4fd83765d7bd97873648a8bdf91bc69d69ef304708b53ecbd322c99b7063c9c1"
|
||||
},
|
||||
"evidenceLfSha256": {
|
||||
"backup-member-red.txt": "0a4c1bfb7df8781015f98f68f551f2a2f39460e46003cc6ae8edbae247a8a7b6",
|
||||
"backup-member-green.txt": "69cf80e4b729fe4f88a258f2e8b7155fe63d0ebd9cd0fdb8d74c413b2ab54ba3",
|
||||
"backup-member-syntax.json": "1aba597fa7781a75566d67f8e1bea43b1d4c17e325e39d0671404183d7115310",
|
||||
"backup-member-graph.txt": "d138893351d58f3ff37dd0790673b8e3e50ac84929ff4b278dc5cc9f2d1928fd"
|
||||
},
|
||||
"nativeReceipts": [
|
||||
{
|
||||
"path": "backup-member-red.txt",
|
||||
"gzipPath": "backup-member-red.txt.gz",
|
||||
"rawSha256": "3424c1dbaef2b8b2530b02f38d6e0fe0276656089c5e964606b85628b7cae81a",
|
||||
"gzipSha256": "aa60b0113383770e81e2016ecefd585855279939bb0b7ef229930f82bc888f88"
|
||||
},
|
||||
{
|
||||
"path": "backup-member-green.txt",
|
||||
"gzipPath": "backup-member-green.txt.gz",
|
||||
"rawSha256": "2de7d8de7364e7363ef509fb3e077c6460ef5430b2a2bfc73e7babdb0834cc17",
|
||||
"gzipSha256": "7e34f56c3e20dbec324ced65e3693a46eda607625694ad622e2ca3e4a28531fe"
|
||||
},
|
||||
{
|
||||
"path": "backup-member-syntax.json",
|
||||
"gzipPath": "backup-member-syntax.json.gz",
|
||||
"rawSha256": "c17f21f8e836becc1a9b8577cf95428ae4fe07569991d69c6a25b76d9fe7355b",
|
||||
"gzipSha256": "34e9b815f50c4a95c31887608ce1f5e96828c146034217aaa2e255790c3ef439"
|
||||
},
|
||||
{
|
||||
"path": "backup-member-graph.txt",
|
||||
"gzipPath": "backup-member-graph.txt.gz",
|
||||
"rawSha256": "dc01d7a59065a45f499e7e0769e714cc606d02f92358abb5ceb3ee22bd490993",
|
||||
"gzipSha256": "03c71e330e26ff30451b075e024dfa2aec733ede4317369deedc69451bd1f804"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
Re-extracting code files in . (no LLM needed)...
|
||||
[graphify watch] 326 file(s) not classified (no supported extension or shebang), skipped: .dockerignore, .env.example, .git, .gitattributes, .gitignore, App.css (+320 more)
|
||||
AST cache: 1934/2345 files served from cache (82%); 411 to extract
|
||||
AST extraction: 100/411 uncached files (24%) [16 workers]
|
||||
AST extraction: 200/411 uncached files (48%) [16 workers]
|
||||
AST extraction: 300/411 uncached files (72%) [16 workers]
|
||||
AST extraction: 400/411 uncached files (97%) [16 workers]
|
||||
AST extraction: 411/411 uncached files (100%) [16 workers]
|
||||
warning: 8 .sql file(s) contributed nothing to the graph because a dependency is missing: tree_sitter_sql not installed. Install it with: pip install "graphifyy[sql]" (#1745)
|
||||
warning: 139 code file(s) yielded no symbols (0.13 MB) — a data file, or source this extractor models no symbols for: JobTrackerApi.Tests/PdfBrowserStub/Program.cs, JobTrackerApi/Program.cs, JobTrackerApi/Properties/AssemblyInfo.cs, browser-extension/tests/capture-url.test.mjs, docs/audits/2026-09-07/validation/evidence/b05-excel-probe.ps1 (+134 more)
|
||||
[graphify watch] community set changed since labeling (0 saved labels, 1056 communities now; renamed 150 community(ies) by their hub). Run `graphify label` to refresh names with the LLM.
|
||||
Graph has 18551 nodes (above 5000 limit). Building aggregated community view...
|
||||
graph.html written (aggregated: 1056 community nodes, 3099 cross-community edges)
|
||||
Tip: run with --obsidian for full node-level detail.
|
||||
[graphify watch] Rebuilt: 18551 nodes, 46011 edges, 1056 communities
|
||||
[graphify watch] graph.json, graph.html and GRAPH_REPORT.md updated in graphify-out
|
||||
Code graph updated. For doc/paper/image changes run /graphify --update in your AI assistant.
|
||||
Tip: set GEMINI_API_KEY or GOOGLE_API_KEY to use Gemini for semantic extraction.
|
||||
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
test_empty_password_is_preserved (__main__.BackupConnectionTests.test_empty_password_is_preserved) ... ok
|
||||
test_invalid_or_ambiguous_input_never_invokes_dump_or_exposes_input (__main__.BackupConnectionTests.test_invalid_or_ambiguous_input_never_invokes_dump_or_exposes_input) ... ok
|
||||
test_quoted_separators_and_shell_characters_remain_data (__main__.BackupConnectionTests.test_quoted_separators_and_shell_characters_remain_data) ... ok
|
||||
test_single_quoted_unicode_password_and_database_alias_are_preserved (__main__.BackupConnectionTests.test_single_quoted_unicode_password_and_database_alias_are_preserved) ... ok
|
||||
test_supported_host_alias_and_case_reach_dump_unchanged (__main__.BackupConnectionTests.test_supported_host_alias_and_case_reach_dump_unchanged) ... ok
|
||||
test_exact_database_member_at_root_or_in_a_directory_is_accepted (__main__.BackupDatabaseMemberTests.test_exact_database_member_at_root_or_in_a_directory_is_accepted) ... ok
|
||||
test_sidecar_or_similar_name_is_not_the_database_member (__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member) ... ok
|
||||
test_both_permission_failures_block_verification_and_next_gate (__main__.BackupPermissionTests.test_both_permission_failures_block_verification_and_next_gate) ... ok
|
||||
test_fallback_permission_success_preserves_verification (__main__.BackupPermissionTests.test_fallback_permission_success_preserves_verification) ... ok
|
||||
test_host_permission_success_does_not_need_fallback (__main__.BackupPermissionTests.test_host_permission_success_does_not_need_fallback) ... ok
|
||||
test_completed_monthly_snapshot_contains_both_artifacts_and_stamp (__main__.BackupRetentionTests.test_completed_monthly_snapshot_contains_both_artifacts_and_stamp) ... ok
|
||||
test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy) ... ok
|
||||
test_empty_monthly_enumeration_does_not_request_removal (__main__.BackupRetentionTests.test_empty_monthly_enumeration_does_not_request_removal) ... ok
|
||||
test_marker_publish_failure_does_not_expose_complete_marker_or_proceed (__main__.BackupRetentionTests.test_marker_publish_failure_does_not_expose_complete_marker_or_proceed) ... ok
|
||||
test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy) ... ok
|
||||
test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy) ... ok
|
||||
test_partial_monthly_copy_cannot_mark_snapshot_complete_or_proceed (__main__.BackupRetentionTests.test_partial_monthly_copy_cannot_mark_snapshot_complete_or_proceed) ... ok
|
||||
test_preserves_the_existing_completed_monthly_snapshot (__main__.BackupRetentionTests.test_preserves_the_existing_completed_monthly_snapshot) ... ok
|
||||
test_daily_copy_failure_stops_before_remaining_files_and_monthly_copy (__main__.BackupUploadTests.test_daily_copy_failure_stops_before_remaining_files_and_monthly_copy) ... ok
|
||||
test_monthly_copy_failure_blocks_deploy (__main__.BackupUploadTests.test_monthly_copy_failure_blocks_deploy) ... ok
|
||||
test_uploads_only_current_daily_files_then_monthly_snapshot (__main__.BackupUploadTests.test_uploads_only_current_daily_files_then_monthly_snapshot) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 21 tests in 10.094s
|
||||
|
||||
OK
|
||||
Binary file not shown.
@@ -0,0 +1,40 @@
|
||||
test_exact_database_member_at_root_or_in_a_directory_is_accepted (__main__.BackupDatabaseMemberTests.test_exact_database_member_at_root_or_in_a_directory_is_accepted) ... ok
|
||||
test_sidecar_or_similar_name_is_not_the_database_member (__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member) ...
|
||||
test_sidecar_or_similar_name_is_not_the_database_member (__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member) (member='jobtracker.db-wal') ... FAIL
|
||||
test_sidecar_or_similar_name_is_not_the_database_member (__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member) (member='old-jobtracker.db') ... FAIL
|
||||
test_sidecar_or_similar_name_is_not_the_database_member (__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member) (member='jobtracker.db.backup') ... FAIL
|
||||
|
||||
======================================================================
|
||||
FAIL: test_sidecar_or_similar_name_is_not_the_database_member (__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member) (member='jobtracker.db-wal')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-backup.py", line 397, in test_sidecar_or_similar_name_is_not_the_database_member
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_sidecar_or_similar_name_is_not_the_database_member (__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member) (member='old-jobtracker.db')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-backup.py", line 397, in test_sidecar_or_similar_name_is_not_the_database_member
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_sidecar_or_similar_name_is_not_the_database_member (__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member) (member='jobtracker.db.backup')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-backup.py", line 397, in test_sidecar_or_similar_name_is_not_the_database_member
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 2 tests in 1.486s
|
||||
|
||||
FAILED (failures=3)
|
||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"command": [
|
||||
"bash",
|
||||
"-n",
|
||||
"deploy/deploy.sh"
|
||||
],
|
||||
"exitCode": 0,
|
||||
"stdout": "",
|
||||
"stderr": "",
|
||||
"sourceLfSha256": "f83f0849ac2ef9dc4930ef28c78e9c002ffeec68d4670fc52c6890b43cce59a8"
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"baseline": "e1c8e84502e08144a32f496af8b03cb26f0ec815",
|
||||
"sourceCommit": "1c8761b1880279902dc17ab2ce0b58d44018562b",
|
||||
"sourcesLfSha256": {
|
||||
"deploy/deploy.sh": "723ace6d66b74d6578f3a941b8a73a451ec5ceabd4d5a1c9d49c1e0a40496ce6",
|
||||
"scripts/test-deploy-backup.py": "62063c97b743e17a15f58166329cffe4ebbcc326f060c3e20f39e9d81cddd6ff"
|
||||
},
|
||||
"red": "Three methods/six permission scenarios; two failed subtests.",
|
||||
"green": "19 backup methods passed, including three permission methods/six scenarios.",
|
||||
"limits": "Extracted functions and actual conditional gates; chmod/Docker/du/gzip/archive shape are synthetic stubs. No real permissions, deployment, deletion or recovery."
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
test_empty_password_is_preserved (__main__.BackupConnectionTests.test_empty_password_is_preserved) ... ok
|
||||
test_invalid_or_ambiguous_input_never_invokes_dump_or_exposes_input (__main__.BackupConnectionTests.test_invalid_or_ambiguous_input_never_invokes_dump_or_exposes_input) ... ok
|
||||
test_quoted_separators_and_shell_characters_remain_data (__main__.BackupConnectionTests.test_quoted_separators_and_shell_characters_remain_data) ... ok
|
||||
test_single_quoted_unicode_password_and_database_alias_are_preserved (__main__.BackupConnectionTests.test_single_quoted_unicode_password_and_database_alias_are_preserved) ... ok
|
||||
test_supported_host_alias_and_case_reach_dump_unchanged (__main__.BackupConnectionTests.test_supported_host_alias_and_case_reach_dump_unchanged) ... ok
|
||||
test_both_permission_failures_block_verification_and_next_gate (__main__.BackupPermissionTests.test_both_permission_failures_block_verification_and_next_gate) ... ok
|
||||
test_fallback_permission_success_preserves_verification (__main__.BackupPermissionTests.test_fallback_permission_success_preserves_verification) ... ok
|
||||
test_host_permission_success_does_not_need_fallback (__main__.BackupPermissionTests.test_host_permission_success_does_not_need_fallback) ... ok
|
||||
test_completed_monthly_snapshot_contains_both_artifacts_and_stamp (__main__.BackupRetentionTests.test_completed_monthly_snapshot_contains_both_artifacts_and_stamp) ... ok
|
||||
test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy) ... ok
|
||||
test_empty_monthly_enumeration_does_not_request_removal (__main__.BackupRetentionTests.test_empty_monthly_enumeration_does_not_request_removal) ... ok
|
||||
test_marker_publish_failure_does_not_expose_complete_marker_or_proceed (__main__.BackupRetentionTests.test_marker_publish_failure_does_not_expose_complete_marker_or_proceed) ... ok
|
||||
test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy) ... ok
|
||||
test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy) ... ok
|
||||
test_partial_monthly_copy_cannot_mark_snapshot_complete_or_proceed (__main__.BackupRetentionTests.test_partial_monthly_copy_cannot_mark_snapshot_complete_or_proceed) ... ok
|
||||
test_preserves_the_existing_completed_monthly_snapshot (__main__.BackupRetentionTests.test_preserves_the_existing_completed_monthly_snapshot) ... ok
|
||||
test_daily_copy_failure_stops_before_remaining_files_and_monthly_copy (__main__.BackupUploadTests.test_daily_copy_failure_stops_before_remaining_files_and_monthly_copy) ... ok
|
||||
test_monthly_copy_failure_blocks_deploy (__main__.BackupUploadTests.test_monthly_copy_failure_blocks_deploy) ... ok
|
||||
test_uploads_only_current_daily_files_then_monthly_snapshot (__main__.BackupUploadTests.test_uploads_only_current_daily_files_then_monthly_snapshot) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 19 tests in 11.903s
|
||||
|
||||
OK
|
||||
@@ -0,0 +1,34 @@
|
||||
test_both_permission_failures_block_verification_and_next_gate (__main__.BackupPermissionTests.test_both_permission_failures_block_verification_and_next_gate) ...
|
||||
test_both_permission_failures_block_verification_and_next_gate (__main__.BackupPermissionTests.test_both_permission_failures_block_verification_and_next_gate) (kind='database') ... FAIL
|
||||
test_both_permission_failures_block_verification_and_next_gate (__main__.BackupPermissionTests.test_both_permission_failures_block_verification_and_next_gate) (kind='recovery') ... FAIL
|
||||
test_fallback_permission_success_preserves_verification (__main__.BackupPermissionTests.test_fallback_permission_success_preserves_verification) ... ok
|
||||
test_host_permission_success_does_not_need_fallback (__main__.BackupPermissionTests.test_host_permission_success_does_not_need_fallback) ... ok
|
||||
|
||||
======================================================================
|
||||
FAIL: test_both_permission_failures_block_verification_and_next_gate (__main__.BackupPermissionTests.test_both_permission_failures_block_verification_and_next_gate) (kind='database')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-backup.py", line 355, in test_both_permission_failures_block_verification_and_next_gate
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : HOST PERMISSIONS
|
||||
FALLBACK PERMISSIONS
|
||||
Backup verified: E:/Storage/Projects/Active/temp docs/jobjakt-local-build/frozen-document-integrity/temp/backup-permission-fg2554w_/synthetic-backup.gz (1K)
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_both_permission_failures_block_verification_and_next_gate (__main__.BackupPermissionTests.test_both_permission_failures_block_verification_and_next_gate) (kind='recovery')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-backup.py", line 355, in test_both_permission_failures_block_verification_and_next_gate
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : HOST PERMISSIONS
|
||||
FALLBACK PERMISSIONS
|
||||
Backup verified: E:/Storage/Projects/Active/temp docs/jobjakt-local-build/frozen-document-integrity/temp/backup-permission-ri_ir06o/synthetic-backup.gz (1K)
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 3 tests in 2.133s
|
||||
|
||||
FAILED (failures=2)
|
||||
@@ -0,0 +1 @@
|
||||
PASS: C:/Program Files/Git/bin/bash.exe -n deploy/deploy.sh; exit0
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"sourceCommit": "a516bfb4b38468f9bdc222744a02c07bc5b013c3",
|
||||
"sourcesLfSha256": {
|
||||
"deploy/deploy.sh": "2c743f45bc658a4aca225e43d5db0a572f64d547a7f59d0e176d4900cc3b1e6b",
|
||||
"scripts/test-deploy-backup.py": "1a5171c66ce0c6e84bdd977e3243e11b388cbcadcea90558196339e802335e2d"
|
||||
},
|
||||
"evidenceLfSha256": {
|
||||
"backup-tar-red.txt": "c8c2379521732202468215731471a4e2f95ebd529bb221055842c95c4eb4ec4f",
|
||||
"backup-tar-green.txt": "13f0827655aaeec58d9813221c77662bb5a40e09ec06a89531acb2bef2ff6807",
|
||||
"backup-tar-syntax.json": "cd7b504df0752e308efcb533f4dc66a8ade8a8f473e9e3caf3ca19885bfa0d00",
|
||||
"backup-tar-graph.txt": "c82670cc55f5e0913895e41c1cebe63be6a38e176722979e918e38bf998c0181"
|
||||
},
|
||||
"nativeReceipts": [
|
||||
{
|
||||
"path": "backup-tar-red.txt",
|
||||
"gzipPath": "backup-tar-red.txt.gz",
|
||||
"rawSha256": "03855b0190e7536ccecef5d231566a5dbfa37e791fb2fe6f0e024fcc441514b5",
|
||||
"gzipSha256": "f5f193a162a32fd9039cd4715ea1064eb0b6e2f2f4bbb123608996eaac21934c"
|
||||
},
|
||||
{
|
||||
"path": "backup-tar-green.txt",
|
||||
"gzipPath": "backup-tar-green.txt.gz",
|
||||
"rawSha256": "eedcd9ff7addf9bc70ce97d2b58f9ee8c77e92a49c92c5287c15bcfda70dd784",
|
||||
"gzipSha256": "125a6efda6e271cb09ed94abf46e4206db92ff69fc271e78633091be206a9792"
|
||||
},
|
||||
{
|
||||
"path": "backup-tar-syntax.json",
|
||||
"gzipPath": "backup-tar-syntax.json.gz",
|
||||
"rawSha256": "56561c68f65ad606da2faccbc45b9e783a509ea47997ea5dd736afa1f48a7d6f",
|
||||
"gzipSha256": "82ef3bebbc56ffdaa47a533add5bccc27ab83f13fc82e434efc8f7a12b22fa88"
|
||||
},
|
||||
{
|
||||
"path": "backup-tar-graph.txt",
|
||||
"gzipPath": "backup-tar-graph.txt.gz",
|
||||
"rawSha256": "7bcdd1d183f74e8eecd9bc5c64e4b3cfde106ca4ddf3972ad9c0f9103dd837db",
|
||||
"gzipSha256": "52b0e14413dcf05d84494c19cd63c5a9573f6424b5c66deda03f57f2b532ba4e"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
Re-extracting code files in . (no LLM needed)...
|
||||
[graphify watch] 330 file(s) not classified (no supported extension or shebang), skipped: .dockerignore, .env.example, .git, .gitattributes, .gitignore, App.css (+324 more)
|
||||
AST cache: 1935/2347 files served from cache (82%); 412 to extract
|
||||
AST extraction: 100/412 uncached files (24%) [16 workers]
|
||||
AST extraction: 200/412 uncached files (48%) [16 workers]
|
||||
AST extraction: 300/412 uncached files (72%) [16 workers]
|
||||
AST extraction: 400/412 uncached files (97%) [16 workers]
|
||||
AST extraction: 412/412 uncached files (100%) [16 workers]
|
||||
warning: 8 .sql file(s) contributed nothing to the graph because a dependency is missing: tree_sitter_sql not installed. Install it with: pip install "graphifyy[sql]" (#1745)
|
||||
warning: 139 code file(s) yielded no symbols (0.13 MB) — a data file, or source this extractor models no symbols for: JobTrackerApi.Tests/PdfBrowserStub/Program.cs, JobTrackerApi/Program.cs, JobTrackerApi/Properties/AssemblyInfo.cs, browser-extension/tests/capture-url.test.mjs, docs/audits/2026-09-07/validation/evidence/b05-excel-probe.ps1 (+134 more)
|
||||
[graphify watch] community set changed since labeling (0 saved labels, 1071 communities now; renamed 151 community(ies) by their hub). Run `graphify label` to refresh names with the LLM.
|
||||
Graph has 18554 nodes (above 5000 limit). Building aggregated community view...
|
||||
graph.html written (aggregated: 1071 community nodes, 3090 cross-community edges)
|
||||
Tip: run with --obsidian for full node-level detail.
|
||||
[graphify watch] Rebuilt: 18554 nodes, 46015 edges, 1071 communities
|
||||
[graphify watch] graph.json, graph.html and GRAPH_REPORT.md updated in graphify-out
|
||||
Code graph updated. For doc/paper/image changes run /graphify --update in your AI assistant.
|
||||
Tip: set GEMINI_API_KEY or GOOGLE_API_KEY to use Gemini for semantic extraction.
|
||||
Binary file not shown.
@@ -0,0 +1,27 @@
|
||||
test_empty_password_is_preserved (__main__.BackupConnectionTests.test_empty_password_is_preserved) ... ok
|
||||
test_invalid_or_ambiguous_input_never_invokes_dump_or_exposes_input (__main__.BackupConnectionTests.test_invalid_or_ambiguous_input_never_invokes_dump_or_exposes_input) ... ok
|
||||
test_quoted_separators_and_shell_characters_remain_data (__main__.BackupConnectionTests.test_quoted_separators_and_shell_characters_remain_data) ... ok
|
||||
test_single_quoted_unicode_password_and_database_alias_are_preserved (__main__.BackupConnectionTests.test_single_quoted_unicode_password_and_database_alias_are_preserved) ... ok
|
||||
test_supported_host_alias_and_case_reach_dump_unchanged (__main__.BackupConnectionTests.test_supported_host_alias_and_case_reach_dump_unchanged) ... ok
|
||||
test_exact_database_member_at_root_or_in_a_directory_is_accepted (__main__.BackupDatabaseMemberTests.test_exact_database_member_at_root_or_in_a_directory_is_accepted) ... ok
|
||||
test_sidecar_or_similar_name_is_not_the_database_member (__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member) ... ok
|
||||
test_valid_gzip_with_truncated_tar_database_member_is_rejected (__main__.BackupDatabaseMemberTests.test_valid_gzip_with_truncated_tar_database_member_is_rejected) ... ok
|
||||
test_both_permission_failures_block_verification_and_next_gate (__main__.BackupPermissionTests.test_both_permission_failures_block_verification_and_next_gate) ... ok
|
||||
test_fallback_permission_success_preserves_verification (__main__.BackupPermissionTests.test_fallback_permission_success_preserves_verification) ... ok
|
||||
test_host_permission_success_does_not_need_fallback (__main__.BackupPermissionTests.test_host_permission_success_does_not_need_fallback) ... ok
|
||||
test_completed_monthly_snapshot_contains_both_artifacts_and_stamp (__main__.BackupRetentionTests.test_completed_monthly_snapshot_contains_both_artifacts_and_stamp) ... ok
|
||||
test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy) ... ok
|
||||
test_empty_monthly_enumeration_does_not_request_removal (__main__.BackupRetentionTests.test_empty_monthly_enumeration_does_not_request_removal) ... ok
|
||||
test_marker_publish_failure_does_not_expose_complete_marker_or_proceed (__main__.BackupRetentionTests.test_marker_publish_failure_does_not_expose_complete_marker_or_proceed) ... ok
|
||||
test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy) ... ok
|
||||
test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy) ... ok
|
||||
test_partial_monthly_copy_cannot_mark_snapshot_complete_or_proceed (__main__.BackupRetentionTests.test_partial_monthly_copy_cannot_mark_snapshot_complete_or_proceed) ... ok
|
||||
test_preserves_the_existing_completed_monthly_snapshot (__main__.BackupRetentionTests.test_preserves_the_existing_completed_monthly_snapshot) ... ok
|
||||
test_daily_copy_failure_stops_before_remaining_files_and_monthly_copy (__main__.BackupUploadTests.test_daily_copy_failure_stops_before_remaining_files_and_monthly_copy) ... ok
|
||||
test_monthly_copy_failure_blocks_deploy (__main__.BackupUploadTests.test_monthly_copy_failure_blocks_deploy) ... ok
|
||||
test_uploads_only_current_daily_files_then_monthly_snapshot (__main__.BackupUploadTests.test_uploads_only_current_daily_files_then_monthly_snapshot) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 22 tests in 9.967s
|
||||
|
||||
OK
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
test_valid_gzip_with_truncated_tar_database_member_is_rejected (__main__.BackupDatabaseMemberTests.test_valid_gzip_with_truncated_tar_database_member_is_rejected) ... FAIL
|
||||
|
||||
======================================================================
|
||||
FAIL: test_valid_gzip_with_truncated_tar_database_member_is_rejected (__main__.BackupDatabaseMemberTests.test_valid_gzip_with_truncated_tar_database_member_is_rejected)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-backup.py", line 417, in test_valid_gzip_with_truncated_tar_database_member_is_rejected
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 1 test in 0.214s
|
||||
|
||||
FAILED (failures=1)
|
||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"command": [
|
||||
"bash",
|
||||
"-n",
|
||||
"deploy/deploy.sh"
|
||||
],
|
||||
"exitCode": 0,
|
||||
"stdout": "",
|
||||
"stderr": "",
|
||||
"sourceLfSha256": "2c743f45bc658a4aca225e43d5db0a572f64d547a7f59d0e176d4900cc3b1e6b"
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
test_empty_password_is_preserved (__main__.BackupConnectionTests.test_empty_password_is_preserved) ... ok
|
||||
test_invalid_or_ambiguous_input_never_invokes_dump_or_exposes_input (__main__.BackupConnectionTests.test_invalid_or_ambiguous_input_never_invokes_dump_or_exposes_input) ... ok
|
||||
test_quoted_separators_and_shell_characters_remain_data (__main__.BackupConnectionTests.test_quoted_separators_and_shell_characters_remain_data) ... ok
|
||||
test_single_quoted_unicode_password_and_database_alias_are_preserved (__main__.BackupConnectionTests.test_single_quoted_unicode_password_and_database_alias_are_preserved) ... ok
|
||||
test_supported_host_alias_and_case_reach_dump_unchanged (__main__.BackupConnectionTests.test_supported_host_alias_and_case_reach_dump_unchanged) ... ok
|
||||
test_completed_monthly_snapshot_contains_both_artifacts_and_stamp (__main__.BackupRetentionTests.test_completed_monthly_snapshot_contains_both_artifacts_and_stamp) ... ok
|
||||
test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy) ... ok
|
||||
test_empty_monthly_enumeration_does_not_request_removal (__main__.BackupRetentionTests.test_empty_monthly_enumeration_does_not_request_removal) ... ok
|
||||
test_marker_publish_failure_does_not_expose_complete_marker_or_proceed (__main__.BackupRetentionTests.test_marker_publish_failure_does_not_expose_complete_marker_or_proceed) ... ok
|
||||
test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy) ... ok
|
||||
test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy) ... ok
|
||||
test_partial_monthly_copy_cannot_mark_snapshot_complete_or_proceed (__main__.BackupRetentionTests.test_partial_monthly_copy_cannot_mark_snapshot_complete_or_proceed) ... ok
|
||||
test_preserves_the_existing_completed_monthly_snapshot (__main__.BackupRetentionTests.test_preserves_the_existing_completed_monthly_snapshot) ... ok
|
||||
test_daily_copy_failure_stops_before_remaining_files_and_monthly_copy (__main__.BackupUploadTests.test_daily_copy_failure_stops_before_remaining_files_and_monthly_copy) ... ok
|
||||
test_monthly_copy_failure_blocks_deploy (__main__.BackupUploadTests.test_monthly_copy_failure_blocks_deploy) ... ok
|
||||
test_uploads_only_current_daily_files_then_monthly_snapshot (__main__.BackupUploadTests.test_uploads_only_current_daily_files_then_monthly_snapshot) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 16 tests in 6.842s
|
||||
|
||||
OK
|
||||
|
||||
PROCESS_EXIT=0
|
||||
@@ -0,0 +1,84 @@
|
||||
test_completed_monthly_snapshot_contains_both_artifacts_and_stamp (__main__.BackupRetentionTests.test_completed_monthly_snapshot_contains_both_artifacts_and_stamp) ... ok
|
||||
test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy) ... FAIL
|
||||
test_marker_publish_failure_does_not_expose_complete_marker_or_proceed (__main__.BackupRetentionTests.test_marker_publish_failure_does_not_expose_complete_marker_or_proceed) ... ok
|
||||
test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy) ...
|
||||
test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy) (operation='monthly-find') ... FAIL
|
||||
test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy) (operation='sort') ... FAIL
|
||||
test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy) ... FAIL
|
||||
test_partial_monthly_copy_cannot_mark_snapshot_complete_or_proceed (__main__.BackupRetentionTests.test_partial_monthly_copy_cannot_mark_snapshot_complete_or_proceed) ... ok
|
||||
test_preserves_the_existing_completed_monthly_snapshot (__main__.BackupRetentionTests.test_preserves_the_existing_completed_monthly_snapshot) ... ok
|
||||
|
||||
======================================================================
|
||||
FAIL: test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-backup.py", line 258, in test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy
|
||||
self.assertEqual(1, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 1 != 0 : Monthly recovery set retained: C:/Users/Connor/AppData/Local/Temp/tmp_6t6unbl/monthly/2099-01
|
||||
PRUNING WOULD START
|
||||
CLEANUP REQUEST -rf --
|
||||
MONTHLY PRUNE 2098-11
|
||||
CLEANUP REQUEST -rf --
|
||||
MONTHLY PRUNE 2098-12
|
||||
Backup retention applied: 30 days daily, 1 monthly sets.
|
||||
UPLOAD WOULD START
|
||||
DEPLOY WOULD CONTINUE
|
||||
MONTHLY ENUMERATION
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy) (operation='monthly-find')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-backup.py", line 270, in test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy
|
||||
self.assertEqual(1, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 1 != 0 : Monthly recovery set retained: C:/Users/Connor/AppData/Local/Temp/tmpk3z7klep/monthly/2099-01
|
||||
PRUNING WOULD START
|
||||
CLEANUP REQUEST -rf --
|
||||
MONTHLY PRUNE 2098-11
|
||||
CLEANUP REQUEST -rf --
|
||||
MONTHLY PRUNE 2098-12
|
||||
Backup retention applied: 30 days daily, 1 monthly sets.
|
||||
UPLOAD WOULD START
|
||||
DEPLOY WOULD CONTINUE
|
||||
MONTHLY ENUMERATION
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy) (operation='sort')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-backup.py", line 270, in test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy
|
||||
self.assertEqual(1, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 1 != 0 : Monthly recovery set retained: C:/Users/Connor/AppData/Local/Temp/tmp6bu45jcv/monthly/2099-01
|
||||
PRUNING WOULD START
|
||||
Backup retention applied: 30 days daily, 1 monthly sets.
|
||||
UPLOAD WOULD START
|
||||
DEPLOY WOULD CONTINUE
|
||||
MONTHLY ENUMERATION
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-backup.py", line 279, in test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy
|
||||
self.assertEqual(1, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 1 != 0 : Monthly recovery set retained: C:/Users/Connor/AppData/Local/Temp/tmpesmkwjd9/monthly/2099-01
|
||||
PRUNING WOULD START
|
||||
CLEANUP REQUEST -rf --
|
||||
MONTHLY PRUNE 2098-11
|
||||
CLEANUP REQUEST -rf --
|
||||
MONTHLY PRUNE 2098-12
|
||||
Backup retention applied: 30 days daily, 1 monthly sets.
|
||||
UPLOAD WOULD START
|
||||
DEPLOY WOULD CONTINUE
|
||||
MONTHLY ENUMERATION
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 7 tests in 1.787s
|
||||
|
||||
FAILED (failures=4)
|
||||
|
||||
PROCESS_EXIT=1
|
||||
@@ -0,0 +1,13 @@
|
||||
test_each_failed_health_probe_preserves_failure_and_requires_manual_recovery (__main__.DeployRollbackTests.test_each_failed_health_probe_preserves_failure_and_requires_manual_recovery) ... ok
|
||||
test_failed_replacement_recreates_only_prior_core_images (__main__.DeployRollbackTests.test_failed_replacement_recreates_only_prior_core_images) ... ok
|
||||
test_failure_before_replacement_does_not_recreate_any_service (__main__.DeployRollbackTests.test_failure_before_replacement_does_not_recreate_any_service) ... ok
|
||||
test_incomplete_previous_release_does_not_recreate_any_service (__main__.DeployRollbackTests.test_incomplete_previous_release_does_not_recreate_any_service) ... ok
|
||||
test_rollback_failure_retains_original_status_and_collects_diagnostics (__main__.DeployRollbackTests.test_rollback_failure_retains_original_status_and_collects_diagnostics) ... ok
|
||||
test_success_does_not_recreate_any_service (__main__.DeployRollbackTests.test_success_does_not_recreate_any_service) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 6 tests in 0.369s
|
||||
|
||||
OK
|
||||
|
||||
PROCESS_EXIT=0
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"baseline": "3cca441874abfab6ad581c5a07913a6d66622423",
|
||||
"python": "3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]",
|
||||
"files": {
|
||||
"deploy/deploy.sh": "f25723f68aa93f2e1ad6afd467facba5d0fd97004122f02db3f77f967237f334",
|
||||
"scripts/test-deploy-backup.py": "a9d3a69214888c76407b9a47c9e5394144f4a5f01dba134717d0ea9ff8f40ef1",
|
||||
"scripts/test-deploy-rollback.py": "4d3ec3074ca7582fda52960285909e5f4fbad1e497343b9dbe54a8d8acc90fc4"
|
||||
},
|
||||
"checks": [
|
||||
{
|
||||
"name": "green-backup",
|
||||
"command": [
|
||||
"python",
|
||||
"scripts/test-deploy-backup.py",
|
||||
"-v"
|
||||
],
|
||||
"exit": 0
|
||||
},
|
||||
{
|
||||
"name": "rollback",
|
||||
"command": [
|
||||
"python",
|
||||
"scripts/test-deploy-rollback.py",
|
||||
"-v"
|
||||
],
|
||||
"exit": 0
|
||||
},
|
||||
{
|
||||
"name": "syntax",
|
||||
"command": [
|
||||
"C:/Program Files/Git/bin/bash.exe",
|
||||
"-n",
|
||||
"deploy/deploy.sh"
|
||||
],
|
||||
"exit": 0
|
||||
}
|
||||
],
|
||||
"red_deploy_sha256": "e5290bf766627517701c269c866398d6466843c05d1dcb832a866815c228291d",
|
||||
"red_note": "Seven retention methods against baseline deploy source; empty-list control added afterward. Raw worktree SHA-256 identities preserve exact tested bytes, including line endings."
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
PROCESS_EXIT=0
|
||||
@@ -0,0 +1,5 @@
|
||||
............
|
||||
----------------------------------------------------------------------
|
||||
Ran 12 tests in 5.884s
|
||||
|
||||
OK
|
||||
@@ -0,0 +1,73 @@
|
||||
FFFF....
|
||||
======================================================================
|
||||
FAIL: test_each_failed_health_probe_preserves_failure_and_requires_manual_recovery (__main__.DeployRollbackTests.test_each_failed_health_probe_preserves_failure_and_requires_manual_recovery) (path='/')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-rollback.py", line 72, in test_each_failed_health_probe_preserves_failure_and_requires_manual_recovery
|
||||
self.assertEqual(self.probes()[:index + 1], calls[1:-2])
|
||||
AssertionError: Lists differ: ['CALL curl -fsS --connect-timeout 5 --max[97 chars]id/'] != []
|
||||
|
||||
First list contains 1 additional elements.
|
||||
First extra element 0:
|
||||
'CALL curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 --retry-connrefused --retry-max-time 30 https://synthetic.invalid/'
|
||||
|
||||
+ []
|
||||
- ['CALL curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 '
|
||||
- '--retry-connrefused --retry-max-time 30 https://synthetic.invalid/']
|
||||
|
||||
======================================================================
|
||||
FAIL: test_each_failed_health_probe_preserves_failure_and_requires_manual_recovery (__main__.DeployRollbackTests.test_each_failed_health_probe_preserves_failure_and_requires_manual_recovery) (path='/health')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-rollback.py", line 72, in test_each_failed_health_probe_preserves_failure_and_requires_manual_recovery
|
||||
self.assertEqual(self.probes()[:index + 1], calls[1:-2])
|
||||
AssertionError: Lists differ: ['CALL curl -fsS --connect-timeout 5 --max[247 chars]lth'] != []
|
||||
|
||||
First list contains 2 additional elements.
|
||||
First extra element 0:
|
||||
'CALL curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 --retry-connrefused --retry-max-time 30 https://synthetic.invalid/'
|
||||
|
||||
+ []
|
||||
- ['CALL curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 '
|
||||
- '--retry-connrefused --retry-max-time 30 https://synthetic.invalid/',
|
||||
- 'CALL curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 '
|
||||
- '--retry-connrefused --retry-max-time 30 https://synthetic.invalid/health']
|
||||
|
||||
======================================================================
|
||||
FAIL: test_each_failed_health_probe_preserves_failure_and_requires_manual_recovery (__main__.DeployRollbackTests.test_each_failed_health_probe_preserves_failure_and_requires_manual_recovery) (path='/ready')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-rollback.py", line 72, in test_each_failed_health_probe_preserves_failure_and_requires_manual_recovery
|
||||
self.assertEqual(self.probes()[:index + 1], calls[1:-2])
|
||||
AssertionError: Lists differ: ['CALL curl -fsS --connect-timeout 5 --max[396 chars]ady'] != []
|
||||
|
||||
First list contains 3 additional elements.
|
||||
First extra element 0:
|
||||
'CALL curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 --retry-connrefused --retry-max-time 30 https://synthetic.invalid/'
|
||||
|
||||
+ []
|
||||
- ['CALL curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 '
|
||||
- '--retry-connrefused --retry-max-time 30 https://synthetic.invalid/',
|
||||
- 'CALL curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 '
|
||||
- '--retry-connrefused --retry-max-time 30 https://synthetic.invalid/health',
|
||||
- 'CALL curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 '
|
||||
- '--retry-connrefused --retry-max-time 30 https://synthetic.invalid/ready']
|
||||
|
||||
======================================================================
|
||||
FAIL: test_failed_replacement_recreates_only_prior_core_images (__main__.DeployRollbackTests.test_failed_replacement_recreates_only_prior_core_images)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\.codex\worktrees\release-readiness-discovery\Job tracker\scripts\test-deploy-rollback.py", line 55, in test_failed_replacement_recreates_only_prior_core_images
|
||||
self.assertEqual([
|
||||
AssertionError: Lists differ: ['CAL[121 chars]ous]', 'CALL curl -fsS --connect-timeout 5 --m[398 chars]ady'] != ['CAL[121 chars]ous]']
|
||||
|
||||
First list contains 3 additional elements.
|
||||
First extra element 1:
|
||||
'CALL curl -fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 --retry-connrefused --retry-max-time 30 https://synthetic.invalid/'
|
||||
|
||||
Diff is 808 characters long. Set self.maxDiff to None to see it.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 6 tests in 0.420s
|
||||
|
||||
FAILED (failures=4)
|
||||
@@ -0,0 +1 @@
|
||||
Git Bash bash -n deploy/deploy.sh exited 0. Full script was not executed.
|
||||
@@ -0,0 +1,5 @@
|
||||
......
|
||||
----------------------------------------------------------------------
|
||||
Ran 6 tests in 0.374s
|
||||
|
||||
OK
|
||||
@@ -0,0 +1,39 @@
|
||||
# Offline SQL completion-marker selection
|
||||
|
||||
18 November 2026. Branch `codex/release-offline-recovery`, baseline `2fb41a96ce51847ac2ed2d1c9b2e08d8a2ff1129` recovered from `codex/release-rollback-health`. Original checkout/source was left unchanged; its existing untracked graph was preserved. The full authoritative `E:/Storage/Projects/Active/temp docs/final/prompt 11 - release readiness.txt` was read. Sections 13 and 16 permit safe offline investigation and focused remediation; they do not grant live recovery or release permission. Existing release handoff, recovery report, remediation register and acceptance matrix retain their gates.
|
||||
|
||||
## Reproduced defect
|
||||
|
||||
The real `verify_sql_backup` function described a required final dump trailer, but accepted the substring `Dump completed` anywhere in decompressed SQL. Two valid-gzip, incomplete synthetic dumps passed and reached the next mocked deployment gate:
|
||||
|
||||
- A `CREATE TABLE` followed by `INSERT INTO synthetic VALUES ('Dump completed');`, with no completion comment.
|
||||
- A completion comment followed by another SQL statement, so that comment was not a final trailer.
|
||||
|
||||
Before changing the shell source, the four new test methods reported **two assertion failures and two passing controls**. Both negative cases returned exit 0 and printed `FORMAT VERIFIED` and `NEXT DEPLOY GATE WOULD START`. This is an offline false-acceptance defect, not evidence that a real deployed backup is damaged. Engineering priority proposed P2; no release-risk acceptance or security severity is implied.
|
||||
|
||||
## Minimal change
|
||||
|
||||
The verifier now checks the final nonblank line for a completion comment, using the existing host awk dependency. CRLF is normalised for this check; trailing blank/whitespace-only lines remain allowed. Both the actual timestamped `-- Dump completed on ...` form and the short `-- Dump completed` fixture form remain accepted. Existing pipefail is restored before this full-stream check, so a decompression/pipeline failure cannot be hidden by its last command. The schema predicate, permissions, retention, archive verification, transfer, tombstone handling and rollback code are unchanged.
|
||||
|
||||
The tests run only extracted `verify_backup_file_shape`/`verify_sql_backup` functions under the real conditional caller shape. Real local gzip creates/tests/decompresses synthetic files; real Git Bash/awk evaluate the predicate. The new fixture stubs the invalid-artifact removal and final report boundaries. It never sources or executes the complete deployment script. It creates no SQL database and performs no restore, container operation, network transfer, pruning or live deletion. Python removes only its disposable synthetic temporary directories. Temp/output were kept in the isolated E-drive worktree.
|
||||
|
||||
## Verification
|
||||
|
||||
```powershell
|
||||
rtk proxy python scripts/test-deploy-backup.py BackupSqlTrailerTests -v
|
||||
rtk proxy python scripts/test-deploy-backup.py -v
|
||||
rtk proxy "C:/Program Files/Git/bin/bash.exe" --noprofile --norc -n deploy/deploy.sh
|
||||
rtk git diff --check
|
||||
```
|
||||
|
||||
- RED: four new methods; two expected failures, two positive/negative controls passed.
|
||||
- GREEN: **26/26 backup methods passed**, including four new methods. The 22 inherited methods were rerun because the changed verifier also participates in the existing permission/backup-gate fixtures. Do not add the overlapping four-method or historical 22-method runs to this total. Native output: [green-backup.txt](green-backup.txt).
|
||||
- Bash syntax: exit 0, no stdout/stderr. Source identities and native log SHA-256: [SOURCE_RECEIPTS.json](SOURCE_RECEIPTS.json).
|
||||
- Whitespace check passed. No new package, dependency installation, app/.NET build, browser or server lane was used.
|
||||
- Graph-first query used the existing release graph before source inspection. It was copied as an isolated update seed, then `graphify update . --no-cluster` ran AST-only here to avoid clustering CPU during the separate full-Jest lane. No semantic/model extraction or shared graph mutation was requested. Generated graph stays untracked local navigation material; optional extractor warnings are not runtime evidence.
|
||||
|
||||
## Remaining gates and rollback
|
||||
|
||||
This validates completion-marker selection only. It is not a SQL parser, usable-data proof, consistent recovery-set verification, cryptographic authenticity check, Linux-host qualification or restore rehearsal. A syntactically plausible completion comment alone cannot prove the SQL is executable or complete. Actual dump-tool/version output, encrypted off-host retrieval/decryption, permissions, database/files/keys/tombstone consistency, post-migration/post-write rollback and agreed RPO/RTO still require authorised isolated qualification. RR-09/RR-12/RR-13 and production NO-GO remain open.
|
||||
|
||||
The six rollback methods were not rerun because that handler is unchanged. Product, MariaDB, container, provider, hosted CI, off-host, real-model and production checks were not run. Root owns publication/integration and central records. Reverting this bounded source commit restores the previous false-acceptance behaviour; there is no database/schema/data migration to reverse.
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"baseline": "2fb41a96ce51847ac2ed2d1c9b2e08d8a2ff1129",
|
||||
"scope": "offline SQL completion-marker selection only; no recovery qualification",
|
||||
"python": "3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]",
|
||||
"sourceSha256": {
|
||||
"deploy\\deploy.sh": "a86c532f6689e386ab68bd49322718abd4e303bd70b450e990d7ce8106cd2132",
|
||||
"scripts\\test-deploy-backup.py": "a6f9e5e3523c45a898e0a340f64cbcb3d06cc8f1873e249983ad513125f4886b"
|
||||
},
|
||||
"bashSyntax": {
|
||||
"command": [
|
||||
"C:/Program Files/Git/bin/bash.exe",
|
||||
"--noprofile",
|
||||
"--norc",
|
||||
"-n",
|
||||
"deploy/deploy.sh"
|
||||
],
|
||||
"exitCode": 0,
|
||||
"stdout": "",
|
||||
"stderr": ""
|
||||
},
|
||||
"testReceiptSha256": "643fe0e73c222f33d98465c070d0173332558bbca244341fee20b64e8ed05934",
|
||||
"productDatabaseContainerNetworkRestoreTests": "NOT RUN"
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
test_empty_password_is_preserved (__main__.BackupConnectionTests.test_empty_password_is_preserved) ... ok
|
||||
test_invalid_or_ambiguous_input_never_invokes_dump_or_exposes_input (__main__.BackupConnectionTests.test_invalid_or_ambiguous_input_never_invokes_dump_or_exposes_input) ... ok
|
||||
test_quoted_separators_and_shell_characters_remain_data (__main__.BackupConnectionTests.test_quoted_separators_and_shell_characters_remain_data) ... ok
|
||||
test_single_quoted_unicode_password_and_database_alias_are_preserved (__main__.BackupConnectionTests.test_single_quoted_unicode_password_and_database_alias_are_preserved) ... ok
|
||||
test_supported_host_alias_and_case_reach_dump_unchanged (__main__.BackupConnectionTests.test_supported_host_alias_and_case_reach_dump_unchanged) ... ok
|
||||
test_exact_database_member_at_root_or_in_a_directory_is_accepted (__main__.BackupDatabaseMemberTests.test_exact_database_member_at_root_or_in_a_directory_is_accepted) ... ok
|
||||
test_sidecar_or_similar_name_is_not_the_database_member (__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member) ... ok
|
||||
test_valid_gzip_with_truncated_tar_database_member_is_rejected (__main__.BackupDatabaseMemberTests.test_valid_gzip_with_truncated_tar_database_member_is_rejected) ... ok
|
||||
test_both_permission_failures_block_verification_and_next_gate (__main__.BackupPermissionTests.test_both_permission_failures_block_verification_and_next_gate) ... ok
|
||||
test_fallback_permission_success_preserves_verification (__main__.BackupPermissionTests.test_fallback_permission_success_preserves_verification) ... ok
|
||||
test_host_permission_success_does_not_need_fallback (__main__.BackupPermissionTests.test_host_permission_success_does_not_need_fallback) ... ok
|
||||
test_completed_monthly_snapshot_contains_both_artifacts_and_stamp (__main__.BackupRetentionTests.test_completed_monthly_snapshot_contains_both_artifacts_and_stamp) ... ok
|
||||
test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy) ... ok
|
||||
test_empty_monthly_enumeration_does_not_request_removal (__main__.BackupRetentionTests.test_empty_monthly_enumeration_does_not_request_removal) ... ok
|
||||
test_marker_publish_failure_does_not_expose_complete_marker_or_proceed (__main__.BackupRetentionTests.test_marker_publish_failure_does_not_expose_complete_marker_or_proceed) ... ok
|
||||
test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy) ... ok
|
||||
test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy (__main__.BackupRetentionTests.test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy) ... ok
|
||||
test_partial_monthly_copy_cannot_mark_snapshot_complete_or_proceed (__main__.BackupRetentionTests.test_partial_monthly_copy_cannot_mark_snapshot_complete_or_proceed) ... ok
|
||||
test_preserves_the_existing_completed_monthly_snapshot (__main__.BackupRetentionTests.test_preserves_the_existing_completed_monthly_snapshot) ... ok
|
||||
test_completion_comment_before_more_sql_is_not_a_final_trailer (__main__.BackupSqlTrailerTests.test_completion_comment_before_more_sql_is_not_a_final_trailer) ... ok
|
||||
test_completion_phrase_in_sql_value_is_not_a_dump_trailer (__main__.BackupSqlTrailerTests.test_completion_phrase_in_sql_value_is_not_a_dump_trailer) ... ok
|
||||
test_final_completion_comment_is_accepted_with_supported_line_endings (__main__.BackupSqlTrailerTests.test_final_completion_comment_is_accepted_with_supported_line_endings) ... ok
|
||||
test_missing_completion_comment_remains_rejected (__main__.BackupSqlTrailerTests.test_missing_completion_comment_remains_rejected) ... ok
|
||||
test_daily_copy_failure_stops_before_remaining_files_and_monthly_copy (__main__.BackupUploadTests.test_daily_copy_failure_stops_before_remaining_files_and_monthly_copy) ... ok
|
||||
test_monthly_copy_failure_blocks_deploy (__main__.BackupUploadTests.test_monthly_copy_failure_blocks_deploy) ... ok
|
||||
test_uploads_only_current_daily_files_then_monthly_snapshot (__main__.BackupUploadTests.test_uploads_only_current_daily_files_then_monthly_snapshot) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 26 tests in 10.986s
|
||||
|
||||
OK
|
||||
@@ -0,0 +1,14 @@
|
||||
# RR-17: SQLite archive database member validation
|
||||
|
||||
Baseline2fb10f7b, isolated codex/recovery-archive-validation. The old name-only tar listing accepted symlinks/hardlinks/FIFO/device entries, empty or unrelated bytes named jobtracker.db, and database paths outside the archive root. Ten negative subtests freshly reproduced successful verification and continuation to the mocked next deployment gate.
|
||||
|
||||
The existing deployment verifier now calls a small Python standard-library streaming tar reader. Python3 is already required by the mandatory ingress validator. It checks each matching database basename for a safe relative path, regular-file type and the16-byte SQLite signature; it reads through the archive without extracting members. Root, dot-prefixed and nested supported database names remain accepted. Real SQLite test fixtures are created with stdlib sqlite3. No package, database/schema, production configuration or persistent data is changed by these tests.
|
||||
|
||||
- Final29/29 backup methods PASSED,0skips; includes earlier26 and three new methods/ten negative subtests. Bash syntax/whitespace PASSED. Existing dump/parser, upload, retention and permission checks remain. Real local gzip and Python tar/SQLite fixture creation were exercised; no Docker, actual backup, recovery or deployment.
|
||||
- Initial red fixture had14 Windows cleanup errors because a context-managed sqlite connection had not been closed. After explicitly closing it, corrected red had10 failures and0errors; these are the valid application defect reproductions. Original draft errors are retained and are not product defects.
|
||||
- First whole-suite green exposed three inherited permission-fixture failures: those tests mocked the old Docker validator over arbitrary bytes. Recovery permission fixtures now use a genuine gzip/tar with a format header and the real Python validator, preserving byte-equality/no-removal/next-gate assertions. Final29 rerun adds a Docker trap in member tests to prove no container validation occurs. Intermediate results overlap29.
|
||||
- Exact native logs/gzip plus final source hashes: [receipts](SOURCE_RECEIPTS.json). Original production baseline is bound. Red test fixture bytes were not frozen at execution; don't claim an immutable full red-test snapshot. Test helper changes after red and all intermediate failures are documented.
|
||||
|
||||
This checks **format**, not SQLite integrity or usefulness: a signature-only regular file satisfies this bounded predicate. It does not validate arbitrary other archive members, select an authoritative database among multiple compatible paths, prove WAL consistency, restore records, verify keys/tombstones/off-host encryption, qualify RPO/RTO or replace recovery rehearsal. MariaDB's dump path is unchanged. Actual Linux/container/host deployment remains NOT RUN. No release/security approval is granted.
|
||||
|
||||
Rollback restores verify_volume_backup and removes the helper/associated fixture changes on this isolated branch. No data rollback is required. Original release worktree and A3 application branch remain untouched by this package.
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"baseline": "2fb10f7b4e1968e40158773aff68b9136b6366b6",
|
||||
"sources": [
|
||||
{
|
||||
"file": "deploy/deploy.sh",
|
||||
"sha256Lf": "f0b23f3a94ce62df037995e24514806e0dfe390d8bab83cc98f0006c004b7bf3"
|
||||
},
|
||||
{
|
||||
"file": "scripts/test-deploy-backup.py",
|
||||
"sha256Lf": "b5d78c98cb3fac20e6a5a01de45ffaed6c039445f04e9af4b6e4fdca5a5cd763"
|
||||
},
|
||||
{
|
||||
"file": "scripts/validate-sqlite-backup.py",
|
||||
"sha256Lf": "b643ca6997b735014634efc64e47175e7e94a8d2e26efce58a15c30af45dadbb"
|
||||
}
|
||||
],
|
||||
"nativeArtifacts": [
|
||||
{
|
||||
"file": "archive-red.txt",
|
||||
"rawSha256": "b6b74f520908b9dbdab1795394e6b060418fa81d6960bdcc95e57618b6761f7e",
|
||||
"gzipSha256": "da9cdc67fd3788f5fee37116cc3f28f172e6af41f64018f1801071df49a14d47",
|
||||
"canonicalSha256": "8fbe782bcb534264b8ec67c78b4d4f13b93bb799313267f76985f3398c1d149a"
|
||||
},
|
||||
{
|
||||
"file": "archive-red-corrected.txt",
|
||||
"rawSha256": "f609f90035c2ad3a6ad892cc1889b899c64d40e38b5d76b4e0d2b5f0f4fd5296",
|
||||
"gzipSha256": "8b88d44088d8c2414b9568d669ab7aca03c81397ede832aa70e24c6dbe7e445e",
|
||||
"canonicalSha256": "e975026e58575724c8de19997a6754023da8b4f390772b4a3c0eedd060eb2682"
|
||||
},
|
||||
{
|
||||
"file": "archive-green.txt",
|
||||
"rawSha256": "099a5507befb5a39b24925a56974b35ae022926012297c8bc51b2ee8c9f8ecac",
|
||||
"gzipSha256": "82a57389cdcd7753ceea35b88ca03bc4db9b592a46cca65ae319e1f296e05bde",
|
||||
"canonicalSha256": "cd869864c07943aae4c87105d9b352dce9fedacc41b1a64516f27bce08696807"
|
||||
},
|
||||
{
|
||||
"file": "archive-green-final.txt",
|
||||
"rawSha256": "fe75805217c87fe7e31601ac226015c754a385fab40e81bb32569b88ea69bdc7",
|
||||
"gzipSha256": "ffa1a1f6e34c4acff97476abd315fd8d5cd81046436ca3b781fed7f3fd2da335",
|
||||
"canonicalSha256": "55ac699218412a437daaeb3b0d6de51cbcb21809a2b9d1a81fa95b08e3160a39"
|
||||
},
|
||||
{
|
||||
"file": "archive-qualified.txt",
|
||||
"rawSha256": "be26b9a73900d322f4f6b417ad9e7d1800e5d71b42e5809b37b51adf3a383252",
|
||||
"gzipSha256": "aad2d2295d57a6d3ac8b7f8d89b816f8f959ce14a78bd9fed573504ec2fb9d8a",
|
||||
"canonicalSha256": "5f397b90c78a3fecde2eed7a3a41d8549cf70944d4ea0e0d0e04ec14630a4d2a"
|
||||
}
|
||||
],
|
||||
"checks": {
|
||||
"backupMethods": 29,
|
||||
"backupExitCode": 0,
|
||||
"bashSyntaxExitCode": 0
|
||||
},
|
||||
"limits": [
|
||||
"SQLite header/type/path format only; no integrity check/restore/container/recovery acceptance",
|
||||
"Red test fixture bytes were not frozen at execution; original production baseline and native failure logs retained."
|
||||
],
|
||||
"baselineDeployBlob": "77a5781ff22b2b7fc11cef3d3969b0f47bb9dded"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
python : .............................
|
||||
At line:1 char:124
|
||||
+ ... =$env:TEMP; python scripts/test-deploy-backup.py *> ".tmp/archive-gre ...
|
||||
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
+ CategoryInfo : NotSpecified: (.............................:String) [], RemoteException
|
||||
+ FullyQualifiedErrorId : NativeCommandError
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 29 tests in 15.186s
|
||||
|
||||
OK
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,62 @@
|
||||
python : ...........FFF...............
|
||||
At line:1 char:124
|
||||
+ ... =$env:TEMP; python scripts/test-deploy-backup.py *> ".tmp/archive-gre ...
|
||||
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
+ CategoryInfo : NotSpecified: (...........FFF...............:String) [], RemoteException
|
||||
+ FullyQualifiedErrorId : NativeCommandError
|
||||
|
||||
======================================================================
|
||||
FAIL: test_both_permission_failures_block_verification_and_next_gate
|
||||
(__main__.BackupPermissionTests.test_both_permission_failures_block_verification_and_next_gate) (kind='recovery')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 358, in
|
||||
test_both_permission_failures_block_verification_and_next_gate
|
||||
result = self.permission_gate(kind, 1, 23)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 334, in permission_gate
|
||||
self.assertNotIn('UNEXPECTED REMOVAL', result.stdout)
|
||||
AssertionError: 'UNEXPECTED REMOVAL' unexpectedly found in 'Archive E:/Storage/Projects/Active/temp
|
||||
docs/jobjakt-local-build/recovery-archive-validation/.tmp/backup-permission-wekbjtnf/synthetic-backup.gz has no valid
|
||||
regular SQLite database member. Aborting deploy.\nUNEXPECTED REMOVAL\n'
|
||||
|
||||
======================================================================
|
||||
FAIL: test_fallback_permission_success_preserves_verification
|
||||
(__main__.BackupPermissionTests.test_fallback_permission_success_preserves_verification) (kind='recovery')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 349, in
|
||||
test_fallback_permission_success_preserves_verification
|
||||
result = self.permission_gate(kind, 1, 0)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 334, in permission_gate
|
||||
self.assertNotIn('UNEXPECTED REMOVAL', result.stdout)
|
||||
AssertionError: 'UNEXPECTED REMOVAL' unexpectedly found in 'Archive E:/Storage/Projects/Active/temp
|
||||
docs/jobjakt-local-build/recovery-archive-validation/.tmp/backup-permission-56pyov4f/synthetic-backup.gz has no valid
|
||||
regular SQLite database member. Aborting deploy.\nUNEXPECTED REMOVAL\n'
|
||||
|
||||
======================================================================
|
||||
FAIL: test_host_permission_success_does_not_need_fallback
|
||||
(__main__.BackupPermissionTests.test_host_permission_success_does_not_need_fallback) (kind='recovery')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 340, in
|
||||
test_host_permission_success_does_not_need_fallback
|
||||
result = self.permission_gate(kind, 0, 23)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 334, in permission_gate
|
||||
self.assertNotIn('UNEXPECTED REMOVAL', result.stdout)
|
||||
AssertionError: 'UNEXPECTED REMOVAL' unexpectedly found in 'Archive E:/Storage/Projects/Active/temp
|
||||
docs/jobjakt-local-build/recovery-archive-validation/.tmp/backup-permission-fwk2luv_/synthetic-backup.gz has no valid
|
||||
regular SQLite database member. Aborting deploy.\nUNEXPECTED REMOVAL\n'
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 29 tests in 17.076s
|
||||
|
||||
FAILED (failures=3)
|
||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
python : .............................
|
||||
At line:1 char:124
|
||||
+ ... =$env:TEMP; python scripts/test-deploy-backup.py *> ".tmp/archive-qua ...
|
||||
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
+ CategoryInfo : NotSpecified: (.............................:String) [], RemoteException
|
||||
+ FullyQualifiedErrorId : NativeCommandError
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 29 tests in 13.104s
|
||||
|
||||
OK
|
||||
Binary file not shown.
@@ -0,0 +1,144 @@
|
||||
python : FFF.FFFF.FFF.
|
||||
At line:1 char:124
|
||||
+ ... =$env:TEMP; python scripts/test-deploy-backup.py BackupDatabaseMember ...
|
||||
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
+ CategoryInfo : NotSpecified: (FFF.FFFF.FFF.:String) [], RemoteException
|
||||
+ FullyQualifiedErrorId : NativeCommandError
|
||||
|
||||
======================================================================
|
||||
FAIL: test_empty_or_non_sqlite_database_bytes_block_the_next_gate
|
||||
(__main__.BackupDatabaseMemberTests.test_empty_or_non_sqlite_database_bytes_block_the_next_gate) (contents=b'')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 499, in
|
||||
test_empty_or_non_sqlite_database_bytes_block_the_next_gate
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_empty_or_non_sqlite_database_bytes_block_the_next_gate
|
||||
(__main__.BackupDatabaseMemberTests.test_empty_or_non_sqlite_database_bytes_block_the_next_gate) (contents=b'unrelated
|
||||
application bytes')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 499, in
|
||||
test_empty_or_non_sqlite_database_bytes_block_the_next_gate
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_empty_or_non_sqlite_database_bytes_block_the_next_gate
|
||||
(__main__.BackupDatabaseMemberTests.test_empty_or_non_sqlite_database_bytes_block_the_next_gate) (contents=b'SQLite
|
||||
format 3X\x00')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 499, in
|
||||
test_empty_or_non_sqlite_database_bytes_block_the_next_gate
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
(__main__.BackupDatabaseMemberTests.test_links_and_special_members_do_not_substitute_for_database_bytes) (kind=b'2')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 491, in
|
||||
test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
(__main__.BackupDatabaseMemberTests.test_links_and_special_members_do_not_substitute_for_database_bytes) (kind=b'1')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 491, in
|
||||
test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
(__main__.BackupDatabaseMemberTests.test_links_and_special_members_do_not_substitute_for_database_bytes) (kind=b'6')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 491, in
|
||||
test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
(__main__.BackupDatabaseMemberTests.test_links_and_special_members_do_not_substitute_for_database_bytes) (kind=b'3')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 491, in
|
||||
test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_unsafe_database_member_paths_block_the_next_gate
|
||||
(__main__.BackupDatabaseMemberTests.test_unsafe_database_member_paths_block_the_next_gate) (name='../jobtracker.db')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 507, in
|
||||
test_unsafe_database_member_paths_block_the_next_gate
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_unsafe_database_member_paths_block_the_next_gate
|
||||
(__main__.BackupDatabaseMemberTests.test_unsafe_database_member_paths_block_the_next_gate) (name='/jobtracker.db')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 507, in
|
||||
test_unsafe_database_member_paths_block_the_next_gate
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_unsafe_database_member_paths_block_the_next_gate
|
||||
(__main__.BackupDatabaseMemberTests.test_unsafe_database_member_paths_block_the_next_gate)
|
||||
(name='data/../../jobtracker.db')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 507, in
|
||||
test_unsafe_database_member_paths_block_the_next_gate
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 6 tests in 3.674s
|
||||
|
||||
FAILED (failures=10)
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,619 @@
|
||||
python : FFFEEEEEEEEEEEEEE
|
||||
At line:1 char:182
|
||||
+ ... | Out-Null; python scripts/test-deploy-backup.py BackupDatabaseMember ...
|
||||
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
+ CategoryInfo : NotSpecified: (FFFEEEEEEEEEEEEEE:String) [], RemoteException
|
||||
+ FullyQualifiedErrorId : NativeCommandError
|
||||
|
||||
======================================================================
|
||||
ERROR: test_exact_database_member_at_root_or_in_a_directory_is_accepted
|
||||
(__main__.BackupDatabaseMemberTests.test_exact_database_member_at_root_or_in_a_directory_is_accepted)
|
||||
(member='jobtracker.db')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpxsvw39ie\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 475, in
|
||||
test_exact_database_member_at_root_or_in_a_directory_is_accepted
|
||||
result = self.verify_archive(name)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpxsvw39ie\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_exact_database_member_at_root_or_in_a_directory_is_accepted
|
||||
(__main__.BackupDatabaseMemberTests.test_exact_database_member_at_root_or_in_a_directory_is_accepted)
|
||||
(member='./jobtracker.db')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpxal3zgni\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 475, in
|
||||
test_exact_database_member_at_root_or_in_a_directory_is_accepted
|
||||
result = self.verify_archive(name)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpxal3zgni\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_exact_database_member_at_root_or_in_a_directory_is_accepted
|
||||
(__main__.BackupDatabaseMemberTests.test_exact_database_member_at_root_or_in_a_directory_is_accepted)
|
||||
(member='data/jobtracker.db')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpbf17iu6o\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 475, in
|
||||
test_exact_database_member_at_root_or_in_a_directory_is_accepted
|
||||
result = self.verify_archive(name)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpbf17iu6o\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
(__main__.BackupDatabaseMemberTests.test_links_and_special_members_do_not_substitute_for_database_bytes) (kind=b'2')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpp54g45zx\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 489, in
|
||||
test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
result = self.verify_archive('jobtracker.db', member_type=kind)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpp54g45zx\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
(__main__.BackupDatabaseMemberTests.test_links_and_special_members_do_not_substitute_for_database_bytes) (kind=b'1')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpr68bdxgv\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 489, in
|
||||
test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
result = self.verify_archive('jobtracker.db', member_type=kind)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpr68bdxgv\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
(__main__.BackupDatabaseMemberTests.test_links_and_special_members_do_not_substitute_for_database_bytes) (kind=b'6')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpvy0f3suo\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 489, in
|
||||
test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
result = self.verify_archive('jobtracker.db', member_type=kind)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpvy0f3suo\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
(__main__.BackupDatabaseMemberTests.test_links_and_special_members_do_not_substitute_for_database_bytes) (kind=b'3')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpgd_8ky4z\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 489, in
|
||||
test_links_and_special_members_do_not_substitute_for_database_bytes
|
||||
result = self.verify_archive('jobtracker.db', member_type=kind)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpgd_8ky4z\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_sidecar_or_similar_name_is_not_the_database_member
|
||||
(__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member)
|
||||
(member='jobtracker.db-wal')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpqyiwrtov\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 467, in
|
||||
test_sidecar_or_similar_name_is_not_the_database_member
|
||||
result = self.verify_archive(name)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpqyiwrtov\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_sidecar_or_similar_name_is_not_the_database_member
|
||||
(__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member)
|
||||
(member='old-jobtracker.db')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmp4j8sqngn\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 467, in
|
||||
test_sidecar_or_similar_name_is_not_the_database_member
|
||||
result = self.verify_archive(name)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmp4j8sqngn\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_sidecar_or_similar_name_is_not_the_database_member
|
||||
(__main__.BackupDatabaseMemberTests.test_sidecar_or_similar_name_is_not_the_database_member)
|
||||
(member='jobtracker.db.backup')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpdn9dgzlq\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 467, in
|
||||
test_sidecar_or_similar_name_is_not_the_database_member
|
||||
result = self.verify_archive(name)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpdn9dgzlq\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_unsafe_database_member_paths_block_the_next_gate
|
||||
(__main__.BackupDatabaseMemberTests.test_unsafe_database_member_paths_block_the_next_gate) (name='../jobtracker.db')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmp1qtpiiuf\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 505, in
|
||||
test_unsafe_database_member_paths_block_the_next_gate
|
||||
result = self.verify_archive(name)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmp1qtpiiuf\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_unsafe_database_member_paths_block_the_next_gate
|
||||
(__main__.BackupDatabaseMemberTests.test_unsafe_database_member_paths_block_the_next_gate) (name='/jobtracker.db')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmphovjwsze\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 505, in
|
||||
test_unsafe_database_member_paths_block_the_next_gate
|
||||
result = self.verify_archive(name)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmphovjwsze\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_unsafe_database_member_paths_block_the_next_gate
|
||||
(__main__.BackupDatabaseMemberTests.test_unsafe_database_member_paths_block_the_next_gate)
|
||||
(name='data/../../jobtracker.db')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmp00j9gsus\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 505, in
|
||||
test_unsafe_database_member_paths_block_the_next_gate
|
||||
result = self.verify_archive(name)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmp00j9gsus\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
ERROR: test_valid_gzip_with_truncated_tar_database_member_is_rejected
|
||||
(__main__.BackupDatabaseMemberTests.test_valid_gzip_with_truncated_tar_database_member_is_rejected)
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 633, in _rmtree_unsafe
|
||||
os.unlink(fullname)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpx9s_a2rf\\fixture.db'
|
||||
|
||||
During handling of the above exception, another exception occurred:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 481, in
|
||||
test_valid_gzip_with_truncated_tar_database_member_is_rejected
|
||||
result = self.verify_archive('jobtracker.db', truncated_tar=True)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 424, in verify_archive
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 950, in __exit__
|
||||
self.cleanup()
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 954, in cleanup
|
||||
self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 934, in _rmtree
|
||||
_shutil.rmtree(name, onexc=onexc)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 781, in rmtree
|
||||
return _rmtree_unsafe(path, onexc)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 635, in _rmtree_unsafe
|
||||
onexc(os.unlink, fullname, err)
|
||||
File "C:\Users\Connor\AppData\Local\Programs\Python\Python312\Lib\tempfile.py", line 909, in onexc
|
||||
_os.unlink(path)
|
||||
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
|
||||
'E:\\Storage\\Projects\\Active\\temp
|
||||
docs\\jobjakt-local-build\\recovery-archive-validation\\.tmp\\tmpx9s_a2rf\\fixture.db'
|
||||
|
||||
======================================================================
|
||||
FAIL: test_empty_or_non_sqlite_database_bytes_block_the_next_gate
|
||||
(__main__.BackupDatabaseMemberTests.test_empty_or_non_sqlite_database_bytes_block_the_next_gate) (contents=b'')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 498, in
|
||||
test_empty_or_non_sqlite_database_bytes_block_the_next_gate
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_empty_or_non_sqlite_database_bytes_block_the_next_gate
|
||||
(__main__.BackupDatabaseMemberTests.test_empty_or_non_sqlite_database_bytes_block_the_next_gate) (contents=b'unrelated
|
||||
application bytes')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 498, in
|
||||
test_empty_or_non_sqlite_database_bytes_block_the_next_gate
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
======================================================================
|
||||
FAIL: test_empty_or_non_sqlite_database_bytes_block_the_next_gate
|
||||
(__main__.BackupDatabaseMemberTests.test_empty_or_non_sqlite_database_bytes_block_the_next_gate) (contents=b'SQLite
|
||||
format 3X\x00')
|
||||
----------------------------------------------------------------------
|
||||
Traceback (most recent call last):
|
||||
File "E:\Storage\Projects\Active\temp
|
||||
docs\jobjakt-local-build\recovery-archive-validation\scripts\test-deploy-backup.py", line 498, in
|
||||
test_empty_or_non_sqlite_database_bytes_block_the_next_gate
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
AssertionError: 0 == 0 : FORMAT VERIFIED
|
||||
NEXT DEPLOY GATE WOULD START
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 6 tests in 3.889s
|
||||
|
||||
FAILED (failures=3, errors=14)
|
||||
Binary file not shown.
@@ -1,10 +1,14 @@
|
||||
"""Exercise deployment backup functions with synthetic commands; never deploy."""
|
||||
import os
|
||||
import io
|
||||
import gzip
|
||||
from pathlib import Path
|
||||
import shlex
|
||||
import shutil
|
||||
import sqlite3
|
||||
import subprocess
|
||||
import sys
|
||||
import tarfile
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
@@ -175,11 +179,29 @@ class BackupRetentionTests(unittest.TestCase):
|
||||
'set -euo pipefail',
|
||||
'BACKUP_DIR=' + shlex.quote(folder.as_posix()),
|
||||
'BACKUP_STAMP=synthetic',
|
||||
'BACKUP_DAILY_RETENTION_DAYS=30',
|
||||
'BACKUP_MONTHLY_RETENTION_COUNT=1',
|
||||
'FAIL_OPERATION=' + shlex.quote(fail_operation),
|
||||
'date() { echo 2099-01; }',
|
||||
'upload_current_backup_set() { echo "UPLOAD WOULD START"; }',
|
||||
'find() { if [[ "$*" == *-delete* ]]; then echo "PRUNING WOULD START"; fi; }',
|
||||
'rm() { echo "CLEANUP REQUEST $1 $2"; }',
|
||||
'find() {',
|
||||
' if [[ "$*" == *-delete* ]]; then',
|
||||
' echo "PRUNING WOULD START";',
|
||||
' [ "$FAIL_OPERATION" != daily-find ]; return;',
|
||||
' fi;',
|
||||
' echo "MONTHLY ENUMERATION" >&2;',
|
||||
' if [ "$FAIL_OPERATION" = empty-enumeration ]; then return 0; fi;',
|
||||
' printf "%s/monthly/%s\\n" "$BACKUP_DIR" 2098-12 "$BACKUP_DIR" 2099-01 "$BACKUP_DIR" 2098-11;',
|
||||
' [ "$FAIL_OPERATION" != monthly-find ];',
|
||||
'}',
|
||||
'sort() { if [ "$FAIL_OPERATION" = sort ]; then return 25; fi; command sort "$@"; }',
|
||||
'rm() {',
|
||||
' echo "CLEANUP REQUEST $1 $2";',
|
||||
' if [ "$1" = -rf ]; then',
|
||||
' echo "MONTHLY PRUNE ${3##*/}";',
|
||||
' [ "$FAIL_OPERATION" != monthly-rm ];',
|
||||
' fi;',
|
||||
'}',
|
||||
'cp() {',
|
||||
' if [ "$FAIL_OPERATION" = cp ]; then',
|
||||
' printf partial > "${@: -1}/partial"; return 23;',
|
||||
@@ -206,6 +228,8 @@ class BackupRetentionTests(unittest.TestCase):
|
||||
'jobtracker-files-synthetic.tar.gz': b'files fixture',
|
||||
'.complete': b'synthetic\n'}, artifacts)
|
||||
self.assertIn('PRUNING WOULD START', result.stdout)
|
||||
self.assertEqual(['MONTHLY PRUNE 2098-11', 'MONTHLY PRUNE 2098-12'],
|
||||
[line for line in result.stdout.splitlines() if line.startswith('MONTHLY PRUNE ')])
|
||||
self.assertIn('UPLOAD WOULD START', result.stdout)
|
||||
self.assertIn('DEPLOY WOULD CONTINUE', result.stdout)
|
||||
|
||||
@@ -234,6 +258,260 @@ class BackupRetentionTests(unittest.TestCase):
|
||||
self.assertEqual({'jobtracker-db-earlier.sql.gz': b'earlier fixture', '.complete': b'earlier\n'}, artifacts)
|
||||
self.assertIn('DEPLOY WOULD CONTINUE', result.stdout)
|
||||
|
||||
def test_daily_prune_failure_blocks_monthly_pruning_upload_and_deploy(self):
|
||||
result, _ = self.retain('daily-find')
|
||||
self.assertEqual(1, result.returncode, result.stdout + result.stderr)
|
||||
self.assertIn('Daily backup retention failed', result.stdout)
|
||||
self.assertNotIn('MONTHLY ENUMERATION', result.stderr)
|
||||
self.assertNotIn('MONTHLY PRUNE', result.stdout)
|
||||
self.assertNotIn('UPLOAD WOULD START', result.stdout)
|
||||
self.assertNotIn('DEPLOY WOULD CONTINUE', result.stdout)
|
||||
self.assertNotIn('Backup retention applied', result.stdout)
|
||||
|
||||
def test_monthly_enumeration_failure_blocks_pruning_upload_and_deploy(self):
|
||||
for operation in ['monthly-find', 'sort']:
|
||||
with self.subTest(operation=operation):
|
||||
result, _ = self.retain(operation)
|
||||
self.assertEqual(1, result.returncode, result.stdout + result.stderr)
|
||||
self.assertIn('Could not enumerate monthly backups', result.stdout)
|
||||
self.assertNotIn('MONTHLY PRUNE', result.stdout)
|
||||
self.assertNotIn('UPLOAD WOULD START', result.stdout)
|
||||
self.assertNotIn('DEPLOY WOULD CONTINUE', result.stdout)
|
||||
self.assertNotIn('Backup retention applied', result.stdout)
|
||||
|
||||
def test_monthly_prune_failure_stops_before_remaining_months_upload_and_deploy(self):
|
||||
result, _ = self.retain('monthly-rm')
|
||||
self.assertEqual(1, result.returncode, result.stdout + result.stderr)
|
||||
self.assertIn('Monthly backup retention failed', result.stdout)
|
||||
self.assertIn('MONTHLY PRUNE 2098-11', result.stdout)
|
||||
self.assertNotIn('MONTHLY PRUNE 2098-12', result.stdout)
|
||||
self.assertNotIn('UPLOAD WOULD START', result.stdout)
|
||||
self.assertNotIn('DEPLOY WOULD CONTINUE', result.stdout)
|
||||
self.assertNotIn('Backup retention applied', result.stdout)
|
||||
|
||||
def test_empty_monthly_enumeration_does_not_request_removal(self):
|
||||
result, _ = self.retain('empty-enumeration')
|
||||
self.assertEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertNotIn('MONTHLY PRUNE', result.stdout)
|
||||
self.assertIn('Backup retention applied', result.stdout)
|
||||
self.assertIn('UPLOAD WOULD START', result.stdout)
|
||||
self.assertIn('DEPLOY WOULD CONTINUE', result.stdout)
|
||||
|
||||
|
||||
class BackupPermissionTests(unittest.TestCase):
|
||||
def permission_gate(self, kind, host_status, fallback_status):
|
||||
source = (ROOT / 'deploy/deploy.sh').read_text(encoding='utf-8')
|
||||
functions = []
|
||||
for name in ['report_backup', 'verify_sql_backup', 'verify_volume_backup']:
|
||||
start = source.index(name + '() {')
|
||||
functions.append(source[start:source.index('\n}\n', start) + 3])
|
||||
caller = 'backup_database' if kind == 'database' else 'backup_recovery_volumes'
|
||||
start = source.index('if ! ' + caller + '; then')
|
||||
gate = source[start:source.index('\nfi\n', start) + 4]
|
||||
with tempfile.TemporaryDirectory(prefix='backup-permission-') as directory:
|
||||
target = Path(directory) / 'synthetic-backup.gz'
|
||||
payload = b'synthetic permission fixture'
|
||||
if kind == 'recovery':
|
||||
output = io.BytesIO()
|
||||
with tarfile.open(fileobj=output, mode='w:gz') as bundle:
|
||||
member = tarfile.TarInfo('jobtracker.db')
|
||||
member.size = 16
|
||||
bundle.addfile(member, io.BytesIO(b'SQLite format 3\x00'))
|
||||
payload = output.getvalue()
|
||||
target.write_bytes(payload)
|
||||
script = '\n'.join([
|
||||
'set -euo pipefail',
|
||||
'BACKUP_DIR=' + shlex.quote(Path(directory).as_posix()),
|
||||
'TARGET=' + shlex.quote(target.as_posix()),
|
||||
'python3() { ' + shlex.quote(Path(sys.executable).as_posix()) + ' "$@"; }',
|
||||
'chmod() { echo "HOST PERMISSIONS"; return ' + str(host_status) + '; }',
|
||||
'docker() { if [[ "${@: -1}" == *chmod* ]]; then echo "FALLBACK PERMISSIONS"; return ' + str(fallback_status) + '; fi; return 0; }',
|
||||
'du() { printf "1K\\tsynthetic\\n"; }',
|
||||
'rm() { echo "UNEXPECTED REMOVAL"; return 99; }',
|
||||
'gzip() { printf "CREATE TABLE synthetic (id int);\\n-- Dump completed\\n"; }',
|
||||
'verify_backup_file_shape() { [ -s "$1" ]; }',
|
||||
*functions,
|
||||
'backup_database() { verify_sql_backup "$TARGET"; }',
|
||||
'backup_recovery_volumes() { verify_volume_backup "$TARGET"; }',
|
||||
gate,
|
||||
'echo "NEXT DEPLOY GATE WOULD START"',
|
||||
])
|
||||
result = subprocess.run([BASH, '--noprofile', '--norc'], input=script, text=True,
|
||||
encoding='utf-8', capture_output=True, cwd=ROOT)
|
||||
self.assertEqual(payload, target.read_bytes(), 'Permission failure must not remove the backup artifact')
|
||||
self.assertNotIn('UNEXPECTED REMOVAL', result.stdout)
|
||||
return result
|
||||
|
||||
def test_host_permission_success_does_not_need_fallback(self):
|
||||
for kind in ['database', 'recovery']:
|
||||
with self.subTest(kind=kind):
|
||||
result = self.permission_gate(kind, 0, 23)
|
||||
self.assertEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertNotIn('FALLBACK PERMISSIONS', result.stdout)
|
||||
self.assertIn('Backup verified', result.stdout)
|
||||
self.assertIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
def test_fallback_permission_success_preserves_verification(self):
|
||||
for kind in ['database', 'recovery']:
|
||||
with self.subTest(kind=kind):
|
||||
result = self.permission_gate(kind, 1, 0)
|
||||
self.assertEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertIn('FALLBACK PERMISSIONS', result.stdout)
|
||||
self.assertIn('Backup verified', result.stdout)
|
||||
self.assertIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
def test_both_permission_failures_block_verification_and_next_gate(self):
|
||||
for kind in ['database', 'recovery']:
|
||||
with self.subTest(kind=kind):
|
||||
result = self.permission_gate(kind, 1, 23)
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertNotIn('Backup verified', result.stdout)
|
||||
self.assertNotIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
|
||||
class BackupSqlTrailerTests(unittest.TestCase):
|
||||
def verify_dump(self, text):
|
||||
source = (ROOT / 'deploy/deploy.sh').read_text(encoding='utf-8')
|
||||
functions = []
|
||||
for name in ['verify_backup_file_shape', 'verify_sql_backup']:
|
||||
start = source.index(name + '() {')
|
||||
functions.append(source[start:source.index('\n}\n', start) + 3])
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
folder = Path(temporary)
|
||||
target = folder / 'synthetic.sql.gz'
|
||||
with gzip.open(target, 'wb') as bundle:
|
||||
bundle.write(text.encode('utf-8'))
|
||||
script = '\n'.join([
|
||||
'set -euo pipefail',
|
||||
'report_backup() { echo "FORMAT VERIFIED"; }',
|
||||
'rm() { echo "INVALID ARTIFACT REJECTION REQUESTED"; }',
|
||||
*functions,
|
||||
'if ! verify_sql_backup ' + shlex.quote(target.as_posix()) + '; then exit 1; fi',
|
||||
'echo "NEXT DEPLOY GATE WOULD START"',
|
||||
])
|
||||
return subprocess.run([BASH, '--noprofile', '--norc'], input=script,
|
||||
text=True, encoding='utf-8', capture_output=True, cwd=ROOT,
|
||||
timeout=10, env={key: value for key, value in os.environ.items()
|
||||
if key.upper() in {'PATH', 'SYSTEMROOT', 'WINDIR', 'TEMP', 'TMP'}})
|
||||
|
||||
def test_completion_phrase_in_sql_value_is_not_a_dump_trailer(self):
|
||||
result = self.verify_dump("CREATE TABLE synthetic (value text);\nINSERT INTO synthetic VALUES ('Dump completed');\n")
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertNotIn('FORMAT VERIFIED', result.stdout)
|
||||
self.assertNotIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
def test_completion_comment_before_more_sql_is_not_a_final_trailer(self):
|
||||
result = self.verify_dump("CREATE TABLE synthetic (value text);\n-- Dump completed on synthetic-date\nINSERT INTO synthetic VALUES ('more work');\n")
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertNotIn('FORMAT VERIFIED', result.stdout)
|
||||
self.assertNotIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
def test_final_completion_comment_is_accepted_with_supported_line_endings(self):
|
||||
for trailer, ending in [('-- Dump completed on synthetic-date', '\n'),
|
||||
('-- Dump completed', '\n'),
|
||||
('-- Dump completed on synthetic-date', '\r\n')]:
|
||||
with self.subTest(trailer=trailer, ending=repr(ending)):
|
||||
result = self.verify_dump(ending.join(['CREATE TABLE synthetic (id int);', trailer, '', ' ', '']))
|
||||
self.assertEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertIn('FORMAT VERIFIED', result.stdout)
|
||||
self.assertIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
def test_missing_completion_comment_remains_rejected(self):
|
||||
result = self.verify_dump('CREATE TABLE synthetic (id int);\n')
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertNotIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
|
||||
class BackupDatabaseMemberTests(unittest.TestCase):
|
||||
def verify_archive(self, member_name, truncated_tar=False, member_type=tarfile.REGTYPE, contents=None):
|
||||
source = (ROOT / 'deploy/deploy.sh').read_text(encoding='utf-8')
|
||||
functions = []
|
||||
for name in ['verify_backup_file_shape', 'verify_volume_backup']:
|
||||
start = source.index(name + '() {')
|
||||
functions.append(source[start:source.index('\n}\n', start) + 3])
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
folder = Path(temporary)
|
||||
archive = folder / 'synthetic.tar.gz'
|
||||
member = tarfile.TarInfo(member_name)
|
||||
member.type = member_type
|
||||
if member_type in (tarfile.SYMTYPE, tarfile.LNKTYPE):
|
||||
member.linkname = 'missing-database'
|
||||
if contents is None:
|
||||
database = folder / 'fixture.db'
|
||||
with sqlite3.connect(database) as connection:
|
||||
connection.execute('CREATE TABLE synthetic (id INTEGER PRIMARY KEY, value TEXT)')
|
||||
connection.execute("INSERT INTO synthetic(value) VALUES ('fixture only')")
|
||||
connection.close()
|
||||
contents = database.read_bytes()
|
||||
if truncated_tar:
|
||||
member.size = 4096
|
||||
with gzip.open(archive, 'wb') as bundle:
|
||||
bundle.write(member.tobuf())
|
||||
else:
|
||||
member.size = len(contents) if member_type == tarfile.REGTYPE else 0
|
||||
with tarfile.open(archive, 'w:gz') as bundle:
|
||||
bundle.addfile(member, io.BytesIO(contents) if member_type == tarfile.REGTYPE else None)
|
||||
script = '\n'.join([
|
||||
'set -euo pipefail',
|
||||
'BACKUP_DIR=' + shlex.quote(folder.as_posix()),
|
||||
'python3() { ' + shlex.quote(Path(sys.executable).as_posix()) + ' "$@"; }',
|
||||
'report_backup() { echo "FORMAT VERIFIED"; }',
|
||||
'docker() { echo "Unexpected Docker validation call" >&2; return 99; }',
|
||||
*functions,
|
||||
'if ! verify_volume_backup "$BACKUP_DIR/synthetic.tar.gz"; then exit 1; fi',
|
||||
'echo "NEXT DEPLOY GATE WOULD START"',
|
||||
])
|
||||
return subprocess.run([BASH, '--noprofile', '--norc'], input=script,
|
||||
text=True, encoding='utf-8', capture_output=True, cwd=ROOT,
|
||||
timeout=10, env={key: value for key, value in os.environ.items()
|
||||
if key.upper() in {'PATH', 'SYSTEMROOT', 'WINDIR', 'TEMP', 'TMP'}})
|
||||
|
||||
def test_sidecar_or_similar_name_is_not_the_database_member(self):
|
||||
for name in ['jobtracker.db-wal', 'old-jobtracker.db', 'jobtracker.db.backup']:
|
||||
with self.subTest(member=name):
|
||||
result = self.verify_archive(name)
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertNotIn('FORMAT VERIFIED', result.stdout)
|
||||
self.assertNotIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
def test_exact_database_member_at_root_or_in_a_directory_is_accepted(self):
|
||||
for name in ['jobtracker.db', './jobtracker.db', 'data/jobtracker.db']:
|
||||
with self.subTest(member=name):
|
||||
result = self.verify_archive(name)
|
||||
self.assertEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertIn('FORMAT VERIFIED', result.stdout)
|
||||
self.assertIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
def test_valid_gzip_with_truncated_tar_database_member_is_rejected(self):
|
||||
result = self.verify_archive('jobtracker.db', truncated_tar=True)
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertNotIn('FORMAT VERIFIED', result.stdout)
|
||||
self.assertNotIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
def test_links_and_special_members_do_not_substitute_for_database_bytes(self):
|
||||
for kind in [tarfile.SYMTYPE, tarfile.LNKTYPE, tarfile.FIFOTYPE, tarfile.CHRTYPE]:
|
||||
with self.subTest(kind=kind):
|
||||
result = self.verify_archive('jobtracker.db', member_type=kind)
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertNotIn('FORMAT VERIFIED', result.stdout)
|
||||
self.assertNotIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
def test_empty_or_non_sqlite_database_bytes_block_the_next_gate(self):
|
||||
for contents in [b'', b'unrelated application bytes', b'SQLite format 3X\x00']:
|
||||
with self.subTest(contents=contents):
|
||||
result = self.verify_archive('jobtracker.db', contents=contents)
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertNotIn('FORMAT VERIFIED', result.stdout)
|
||||
self.assertNotIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
def test_unsafe_database_member_paths_block_the_next_gate(self):
|
||||
for name in ['../jobtracker.db', '/jobtracker.db', 'data/../../jobtracker.db']:
|
||||
with self.subTest(name=name):
|
||||
result = self.verify_archive(name)
|
||||
self.assertNotEqual(0, result.returncode, result.stdout + result.stderr)
|
||||
self.assertNotIn('FORMAT VERIFIED', result.stdout)
|
||||
self.assertNotIn('NEXT DEPLOY GATE WOULD START', result.stdout)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
@@ -10,12 +10,14 @@ BASH = 'C:/Program Files/Git/bin/bash.exe' if os.name == 'nt' else shutil.which(
|
||||
|
||||
|
||||
class DeployRollbackTests(unittest.TestCase):
|
||||
def exit_deploy(self, status, *, replaced=True, backend=True, frontend=True, compose_status=0):
|
||||
def exit_deploy(self, status, *, replaced=True, backend=True, frontend=True, compose_status=0, failed_probe='', diagnostics_status=0):
|
||||
source = (ROOT / 'deploy/deploy.sh').read_text(encoding='utf-8')
|
||||
start = source.index('finish_deploy() {')
|
||||
handler = source[start:source.index('\ntrap finish_deploy EXIT\n', start) + len('\ntrap finish_deploy EXIT\n')]
|
||||
script = '\n'.join([
|
||||
'set -euo pipefail',
|
||||
'exec 3>&1',
|
||||
'APP_PUBLIC_BASE_URL=https://synthetic.invalid/',
|
||||
f'replacement_started={str(replaced).lower()}',
|
||||
'previous_backend_ref=' + ('synthetic/backend:previous' if backend else ''),
|
||||
'previous_frontend_ref=' + ('synthetic/frontend:previous' if frontend else ''),
|
||||
@@ -23,11 +25,15 @@ class DeployRollbackTests(unittest.TestCase):
|
||||
'auth_config_headers_file=synthetic-headers',
|
||||
'rm() { printf "CALL rm %s\\n" "$*"; }',
|
||||
'docker() { echo "CALL unexpected docker"; return 99; }',
|
||||
'curl() { echo "CALL unexpected curl"; return 99; }',
|
||||
'curl() {',
|
||||
' printf "CALL curl %s\\n" "$*" >&3;',
|
||||
f' if [ "${{@: -1}}" = "https://synthetic.invalid{failed_probe}" ]; then return 22; fi;',
|
||||
' return 0;',
|
||||
'}',
|
||||
'compose() {',
|
||||
' printf "CALL compose %s [%s] [%s]\\n" "$*" "${BACKEND_IMAGE:-}" "${FRONTEND_IMAGE:-}";',
|
||||
f' if [ "$1" = up ]; then return {compose_status}; fi;',
|
||||
' return 0;',
|
||||
f' return {diagnostics_status};',
|
||||
'}',
|
||||
handler,
|
||||
f'exit {status}',
|
||||
@@ -49,11 +55,28 @@ class DeployRollbackTests(unittest.TestCase):
|
||||
self.assertEqual([
|
||||
'CALL compose up -d --force-recreate --remove-orphans backend frontend '
|
||||
'[synthetic/backend:previous] [synthetic/frontend:previous]',
|
||||
*self.probes(),
|
||||
], calls)
|
||||
self.assertIn('public core checks passed', stdout)
|
||||
self.assertIn('Deployment remains failed', stdout)
|
||||
|
||||
@staticmethod
|
||||
def probes():
|
||||
flags = '-fsS --connect-timeout 5 --max-time 5 --retry 5 --retry-delay 2 --retry-connrefused --retry-max-time 30'
|
||||
return [f'CALL curl {flags} https://synthetic.invalid{path}' for path in ['/', '/health', '/ready']]
|
||||
|
||||
def test_each_failed_health_probe_preserves_failure_and_requires_manual_recovery(self):
|
||||
for index, path in enumerate(['/', '/health', '/ready']):
|
||||
with self.subTest(path=path):
|
||||
stdout, calls = self.exit_deploy(41, failed_probe=path, diagnostics_status=17)
|
||||
self.assertEqual(self.probes()[:index + 1], calls[1:-2])
|
||||
self.assertEqual(['CALL compose ps [] []', 'CALL compose logs --tail=200 backend frontend [] []'], calls[-2:])
|
||||
self.assertIn('rollback health verification failed', stdout)
|
||||
self.assertIn('Manual recovery is required', stdout)
|
||||
self.assertNotIn('public core checks passed', stdout)
|
||||
|
||||
def test_rollback_failure_retains_original_status_and_collects_diagnostics(self):
|
||||
stdout, calls = self.exit_deploy(41, compose_status=19)
|
||||
stdout, calls = self.exit_deploy(41, compose_status=19, diagnostics_status=17)
|
||||
self.assertEqual([
|
||||
'CALL compose up -d --force-recreate --remove-orphans backend frontend '
|
||||
'[synthetic/backend:previous] [synthetic/frontend:previous]',
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
"""Check database member identity/type/header without extracting an archive.
|
||||
|
||||
This is format qualification, not SQLite integrity, a restore or recovery-set proof.
|
||||
"""
|
||||
from pathlib import PurePosixPath
|
||||
import sys
|
||||
import tarfile
|
||||
|
||||
|
||||
def validate(archive):
|
||||
found = False
|
||||
with tarfile.open(archive, mode='r|gz') as bundle:
|
||||
for member in bundle:
|
||||
path = PurePosixPath(member.name)
|
||||
if path.name != 'jobtracker.db':
|
||||
continue
|
||||
if path.is_absolute() or '..' in path.parts or '\\' in member.name:
|
||||
raise ValueError('SQLite backup has an unsafe database member path.')
|
||||
if not member.isfile() or member.size < 16:
|
||||
raise ValueError('SQLite backup database must be a nonempty regular file.')
|
||||
with bundle.extractfile(member) as data:
|
||||
if data.read(16) != b'SQLite format 3\x00':
|
||||
raise ValueError('SQLite backup database header is invalid.')
|
||||
found = True
|
||||
if not found:
|
||||
raise ValueError('SQLite backup contains no database member.')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
if len(sys.argv) != 2:
|
||||
raise ValueError('Provide one SQLite backup archive.')
|
||||
validate(sys.argv[1])
|
||||
except (ValueError, OSError, EOFError, tarfile.TarError):
|
||||
# Archive names, member names and database contents may contain private data.
|
||||
print('SQLite backup member validation failed.', file=sys.stderr)
|
||||
sys.exit(1)
|
||||
Reference in New Issue
Block a user