diff --git a/evidence/laravel-modular-migration-inventory/SHA256SUMS b/evidence/laravel-modular-migration-inventory/SHA256SUMS new file mode 100644 index 0000000..d9f925d --- /dev/null +++ b/evidence/laravel-modular-migration-inventory/SHA256SUMS @@ -0,0 +1,8 @@ +934a04b5d6ec9aa62cb991fb2f57256c439bac4b2ac110cabd524ad456e59491 ./capabilities-after.json +934a04b5d6ec9aa62cb991fb2f57256c439bac4b2ac110cabd524ad456e59491 ./capabilities-before.json +bc04e0a24a001d2ef37d4094f5528b70b244ea8fa4261e3ba5d9f43ad8d00b14 ./framework-ci.txt +4afcae0a0d3824b06cbbc2762d974c26b5b18df0c3a3c90956c177c594c32d48 ./laravel-inventory.json +4e788c450803b53914390e85812231c5c1405d6ccd69a2f5aba4910068426c0f ./scope.txt +54f8a44945572514c3c6416c4a09aa0297adca7da2296dfe5bb27a8161642683 run.sh +dc8cd7dc91e7bd20c766c5c7e6613aec2cdf4e2eae3d899d77a1118eb77d7a9f probe.py +41b745079ac469f8134f3f010a457bc689dbac0750fcf3426a23199b693f0ec1 inventory.php diff --git a/evidence/laravel-modular-migration-inventory/capabilities-after.json b/evidence/laravel-modular-migration-inventory/capabilities-after.json new file mode 100644 index 0000000..30d3c30 --- /dev/null +++ b/evidence/laravel-modular-migration-inventory/capabilities-after.json @@ -0,0 +1,19 @@ +{ + "commands": [ + "validate", + "capabilities", + "inventory", + "retention-plan", + "provision-plan", + "site-policy", + "registry-validate", + "preflight" + ], + "database_restore_enabled": false, + "deployment_execution_enabled": false, + "format_version": 1, + "migration_execution_enabled": false, + "permanent_deletion_enabled": false, + "production_ready": false, + "provisioning_execution_enabled": false +} diff --git a/evidence/laravel-modular-migration-inventory/capabilities-before.json b/evidence/laravel-modular-migration-inventory/capabilities-before.json new file mode 100644 index 0000000..30d3c30 --- /dev/null +++ b/evidence/laravel-modular-migration-inventory/capabilities-before.json @@ -0,0 +1,19 @@ +{ + "commands": [ + "validate", + "capabilities", + "inventory", + "retention-plan", + "provision-plan", + "site-policy", + "registry-validate", + "preflight" + ], + "database_restore_enabled": false, + "deployment_execution_enabled": false, + "format_version": 1, + "migration_execution_enabled": false, + "permanent_deletion_enabled": false, + "production_ready": false, + "provisioning_execution_enabled": false +} diff --git a/evidence/laravel-modular-migration-inventory/framework-ci.txt b/evidence/laravel-modular-migration-inventory/framework-ci.txt new file mode 100644 index 0000000..592b472 --- /dev/null +++ b/evidence/laravel-modular-migration-inventory/framework-ci.txt @@ -0,0 +1,108 @@ +=== ABSDEV FRAMEWORK CI === +Python 3.14.4 + +=== PYTHON SYNTAX VALIDATION === +PASS: 88 Python sources compiled + +=== COMPLETE UNIT REGRESSION SUITE === +........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ +---------------------------------------------------------------------- +Ran 904 tests in 17.685s + +OK + +=== VERIFY PRODUCTION CAPABILITY RESTRICTIONS === +PASS: production_ready=false +PASS: deployment_execution_enabled=false +PASS: migration_execution_enabled=false +PASS: provisioning_execution_enabled=false +PASS: database_restore_enabled=false +PASS: permanent_deletion_enabled=false +PASS: Unsupported command rejected: deploy +PASS: Unsupported command rejected: migrate +PASS: Unsupported command rejected: rollback +PASS: Unsupported command rejected: restore +PASS: Unsupported command rejected: provision +PASS: Unsupported command rejected: delete + +=== EXAMPLE CONFIGURATION === +PASS: Configuration valid +Site: example-absdev-net +Domain: example.absdev.net +Database: mysql +Schema: 1 +No deployment performed +{ + "configuration_fingerprint": "8067fa8477a7d50cbcc42b585961bcd4dbce5407fc7e4bffcfb3e07af529e483", + "execution_permitted": false, + "fingerprint": "d271a3a3ed2cbda032f905558fe9ada653c380c74306fc714ebc594483a63042", + "format_version": 1, + "runtime_verified": false, + "site": "example-absdev-net", + "static_policy_verified": true, + "status": "VALID" +} +{ + "configuration_fingerprint": "8067fa8477a7d50cbcc42b585961bcd4dbce5407fc7e4bffcfb3e07af529e483", + "database": { + "container": "platform-mysql", + "driver": "mysql", + "name": "example_db", + "username": "example_app" + }, + "database_creation_permitted": false, + "directories": [ + "/opt/laravel-sites/example-absdev-net", + "/opt/laravel-sites/example-absdev-net/app", + "/opt/laravel-sites/example-absdev-net/app/releases", + "/opt/laravel-sites/example-absdev-net/app/shared", + "/opt/laravel-sites/example-absdev-net/deployment", + "/opt/laravel-sites/example-absdev-net/backups", + "/opt/laravel-sites/example-absdev-net/deployment/state", + "/opt/laravel-sites/example-absdev-net/deployment/approvals", + "/opt/laravel-sites/example-absdev-net/deployment/archives" + ], + "docker": { + "networks": [ + "laravel_backend", + "laravel_proxy" + ], + "project": "site-example-absdev-net", + "services": [ + "php", + "web", + "queue", + "scheduler" + ] + }, + "domain": "example.absdev.net", + "execution_permitted": false, + "filesystem_permissions_verified": false, + "fingerprint": "d8432e17dc1b91ce4712ab656c14c0b5a0957c54700b027b22444dc3a4c19feb", + "format_version": 1, + "origin_port": 8199, + "repository": { + "branch": "main", + "url": "git@example.invalid:example/application.git" + }, + "resource_conflicts_checked": false, + "retention": { + "automatic_deletion": false, + "keep_releases": 5 + }, + "root": "/opt/laravel-sites/example-absdev-net", + "secrets_required": true, + "site": "example-absdev-net", + "site_policy_fingerprint": "d271a3a3ed2cbda032f905558fe9ada653c380c74306fc714ebc594483a63042", + "static_policy_verified": true, + "status": "PLAN_ONLY" +} + +=== REFERENCE INTEGRITY === +SKIP: Private reference excluded from checkout + +======================================== +PASS: FRAMEWORK CI +UNIT TESTS AND STATIC VALIDATION ONLY +DATABASE INTEGRATION NOT EXECUTED +======================================== diff --git a/evidence/laravel-modular-migration-inventory/inventory.php b/evidence/laravel-modular-migration-inventory/inventory.php new file mode 100644 index 0000000..456d37f --- /dev/null +++ b/evidence/laravel-modular-migration-inventory/inventory.php @@ -0,0 +1,16 @@ +newInstanceWithoutConstructor(); +$reflection->getProperty('files')->setValue($migrator, new Filesystem()); +$paths = array_map(fn ($path) => '/release/'.$path, array_slice($argv, 1)); +$files = $migrator->getMigrationFiles($paths); +$relative = array_map(fn ($file) => substr($file, strlen('/release/')), $files); +echo json_encode([ + 'version' => Composer\InstalledVersions::getPrettyVersion('laravel/framework'), + 'migrations' => $relative, +], JSON_THROW_ON_ERROR); diff --git a/evidence/laravel-modular-migration-inventory/laravel-inventory.json b/evidence/laravel-modular-migration-inventory/laravel-inventory.json new file mode 100644 index 0000000..d01baf7 --- /dev/null +++ b/evidence/laravel-modular-migration-inventory/laravel-inventory.json @@ -0,0 +1,23 @@ +{ + "host": "ABSDEV-CI", + "laravel_version": "v13.44.1", + "laravel_inventory": { + "0001_create_users": "database/migrations/0001_create_users.php", + "0002_create_orders": "database/migrations/0002_create_orders.php", + "0003_add_order_details": "Modules/Orders/Database/Migrations/0003_add_order_details.php", + "0004_add_product_details": "modules/products/database/migrations/0004_add_product_details.php", + "0005_add_billing_details": "Modules/Billing/database/Migrations/0005_add_billing_details.php" + }, + "framework_inventory": { + "Modules/Billing/database/Migrations/0005_add_billing_details.php": "7492c4624ace05175e795841a2a1f9d91e46af66f0d0b6f5990387b4da32a756", + "Modules/Orders/Database/Migrations/0003_add_order_details.php": "7492c4624ace05175e795841a2a1f9d91e46af66f0d0b6f5990387b4da32a756", + "database/migrations/0001_create_users.php": "6b1c4722e1ab3ac3588b0a75a4a29e0a29da049e0db7feaf92d1405a7569b18d", + "database/migrations/0002_create_orders.php": "098b1d49c2865a6c7dc1a918821404abd5acedc013482572a2b764147f56051f", + "modules/products/database/migrations/0004_add_product_details.php": "7492c4624ace05175e795841a2a1f9d91e46af66f0d0b6f5990387b4da32a756" + }, + "mixed_case_and_standard_paths_match_laravel": true, + "nonmatching_and_nested_files_excluded": true, + "laravel_collision_collapses_to_one_basename": true, + "framework_rejected_duplicate_basename": true, + "migrations_executed": false +} diff --git a/evidence/laravel-modular-migration-inventory/probe.py b/evidence/laravel-modular-migration-inventory/probe.py new file mode 100644 index 0000000..f8b1b1f --- /dev/null +++ b/evidence/laravel-modular-migration-inventory/probe.py @@ -0,0 +1,87 @@ +import hashlib +import json +import subprocess +import sys +from pathlib import Path + +sys.path.insert(0, str(Path("tests/unit").resolve())) +from test_provenance import ProvenanceTests +from core.compatibility import CompatibilityError +from core.dev3.provenance import CompleteProvenance + +IMAGE = "sha256:cac70f6c4aa761a1c04c6813c03a7678b9a5c061cc67a413a12736253e7128ee" +DEPS = "/var/tmp/absdev-dev3-ci.8yBxcV/public-fixture" +DIRS = [ + "database/migrations", + "Modules/Orders/Database/Migrations", + "modules/products/database/migrations", + "Modules/Billing/database/Migrations", +] +fixture = ProvenanceTests() + +def write(path): + for root in (fixture.repository, fixture.release): + entry = root / path + entry.parent.mkdir(parents=True, exist_ok=True) + entry.write_text(" "$out/scope.txt" +python3 -B bin/absdev-deploy capabilities > "$out/capabilities-before.json" +python3 -B -c 'import json,sys; d=json.load(open(sys.argv[1])); f=[v for k,v in d.items() if k.endswith("_enabled") or k=="production_ready"]; assert len(f)==6 and all(v is False for v in f)' "$out/capabilities-before.json" +python3 -B probe.py > "$out/laravel-inventory.json" || { cat "$out/laravel-inventory.json" >&2; exit 1; } +bash scripts/ci-check.sh > "$out/framework-ci.txt" 2>&1 || { tail -80 "$out/framework-ci.txt" >&2; exit 1; } +python3 -B bin/absdev-deploy capabilities > "$out/capabilities-after.json" +cmp "$out/capabilities-before.json" "$out/capabilities-after.json" +(cd "$out" && sha256sum ./* > SHA256SUMS) +tar -czf - -C "$out" . diff --git a/evidence/laravel-modular-migration-inventory/scope.txt b/evidence/laravel-modular-migration-inventory/scope.txt new file mode 100644 index 0000000..5c1cd4b --- /dev/null +++ b/evidence/laravel-modular-migration-inventory/scope.txt @@ -0,0 +1,2 @@ +host=absdev-ci +revision=5d3ea0d536ee00e4b235f3a195ea39aaf3224b47