fix(deploy): admit isolated INDEX-52 runtime candidate - #3343
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b14dc888d5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ! git merge-base --is-ancestor "$DEPLOY_SHA" "$LATEST_MAIN_SHA"; then | ||
| if [ "$ISOLATED_RUNTIME46" != true ]; then | ||
| if [ "$ISOLATED_INDEX52" = true ]; then | ||
| test "$DEPLOY_SHA" = "9d2877a7e519f768fd741398e76777620770fb71" |
There was a problem hiding this comment.
Reject the unapproved INDEX-52 divergence
When this candidate is not an ancestor of current main, this branch deliberately admits it as a second divergence exception using a staging run for a different SHA. The repository contract requires candidate reachability and exact-SHA staging, and identifies Runtime 46 as the sole audited divergence exception, so an INDEX-52 code-only deployment through this path bypasses the production release boundary; integrate and stage the candidate on main instead.
AGENTS.md reference: AGENTS.md:L114-L116
Useful? React with 👍 / 👎.
| test "$(git rev-list --parents -n 1 "$DEPLOY_SHA" | awk '{print NF}')" -eq 2 | ||
| test "$(git rev-parse "${DEPLOY_SHA}^")" = "$INDEX52_ACTIVE_SHA" | ||
| test "$(git diff --no-renames --name-only "$INDEX52_ACTIVE_SHA" "$DEPLOY_SHA" | sort)" = "$index52_expected_files" | ||
| test "$(git diff --binary "$INDEX52_ACTIVE_SHA" "$DEPLOY_SHA" | sha256sum | awk '{print $1}')" = "$INDEX52_PATCH_SHA256" |
There was a problem hiding this comment.
Hash a canonical full-index patch
When the runner's Git abbreviation setting or fetched object population differs from the environment that produced this constant, git diff --binary can emit different abbreviated blob IDs in textual index lines and therefore a different SHA-256 for the same two file changes. git diff -h documents --full-index as “show full object name on index lines”; add that option, or hash a canonical name/status-plus-blob representation, so the pinned candidate is not spuriously rejected.
Useful? React with 👍 / 👎.
What changed
code_onlydeny rules and the existing Runtime-46 isolated laneWhy
The exact staged main SHA contains content repair assets and unrelated runtime commits, so the generic
code_onlyclassifier correctly refuses its cumulative production delta. A standard deployment is not acceptable because it invokes migration, seed, and CMS baseline-import tasks. The isolated candidate composes only the already-staged read-model blobs onto the exact active production parent and continues to usedeploy:code-only, which omits application-data and authority mutations.Validation
php backend/vendor/bin/phpunit --configuration backend/phpunit.xml backend/tests/Sre/DeployStorageAndDatabaseConfigTest.php backend/tests/Sre/ProductionDeploymentStatusTruthTest.php— 42 tests, 886 assertions passedphp backend/vendor/bin/phpunit --configuration backend/phpunit.xml backend/tests/Feature/V0_5/MbtiCrossTypeComparisonAuthorityReadModelTest.php backend/tests/Feature/V0_5/PersonalityPublicApiTest.php— 59 tests, 4089 assertions passed on the staged-main source blobsphp -lon both isolated candidate runtime files — passedgit diff --check— passedactionlint .github/workflows/deploy-production.yml— no new diagnostics; the same pre-existing ShellCheck diagnostics remain with line offsets onlyIntentionally deferred
Repository rule impact
This is a one-candidate deployment-control exception, not a general policy relaxation. It does not change CMS/runtime authority ownership, publication/indexability, sitemap/llms, or search submission behavior.
Production/CMS/SEO runtime impact
No production action is performed by this PR. The eventual candidate uses only
deploy:code-only; it cannot invoke migration, seed, CMS baseline import, or the INDEX-52 repair command.