← Back to Pull requests

fix(ci): deploy default assets through the asset-server script #2212

Merged
endaye merged 5 files (172 lines) on Oct 14, 2026 10:19 UTC
View on GitHub
endaye endaye commented on Oct 14, 2026 10:07 UTC
Author

Summary

Plan docs/plans/2026-10-14-script-hygiene-followups.md, Task F3, PR 1 of 2. This brings deploy-default-assets.yml up to the deploy-workflow standard. The Environment stays creator-canary here; PR 2 switches it to default-assets.

  • Deploy now goes through scripts/asset-server.sh deploy instead of calling Wrangler inline. LMDJ_WRANGLER points at the Wrangler that npm ci --ignore-scripts installed from the tools/wrangler lock. The script needed no change: its deploy reruns check and then runs only "$LMDJ_WRANGLER" deploy --config tools/asset-server/wrangler.json, without installing anything. Locally, npm ci --ignore-scripts leaves node_modules/wrangler/bin/wrangler.js executable (-rwxr-xr-x), so the script can exec it directly.

  • WRANGLER_SEND_METRICS: 'false' is set on the deploy step, as in the other deploy workflows.

  • Every step now has a timeout-minutes (3 or 5). The values come from the only two runs, 37014873365 and 37041945548 (2026-10-02), where every step finished in 7 s or less. The job budget stays at 20.

  • New tests/build/default_assets_deploy_workflow_test.py pins: the locked install, the script entry point with no inline wrangler.js call, the script's install-free deploy branch, the metrics opt-out, the deploy token reaching only the deploy step, the SHA-pinned actions, persist-credentials: false, the creator-canary Environment and the step budgets.

  • Routing follows the sibling *_deploy_workflow_test.py files. A new tests/build/default_assets_deploy_ prefix rule maps to deploy_contract, the test is added to the deploy-contract job in ci.yml and to local_lanes.json, and the workflow and scripts/asset-server.sh now also select deploy_contract so that changing either one runs the test.
  • F3 progress: steps 1–3 are in this PR. Step 4 (switch the Environment to default-assets) follows in PR 2, which merges only after CLOUDFLARE_API_TOKEN exists in that Environment.

    Related Issue

    Related issue: None — reason: plan Task F3 from the 2026-10-14 script hygiene audit (#2209), with no tracking Issue.

    Verification

    Base: origin/main 6f79e0f160a8b9211ea9468c04effb61f4099a9d (rebased; #2211 touches no file here).

  • python3 tests/build/default_assets_deploy_workflow_test.py: OK (10) at the final head. A second proof re-indents the step list: every step-dependent test fails with the named why: the step scan cannot find ... message instead of a KeyError.

  • First head: OK (9). Revert proof: with only deploy-default-assets.yml restored to origin/main, 10 failures across exactly three tests: the script entry point, the metrics opt-out, and the step budgets (one per step, 8 in total). With the change restored by git checkout, the result is OK again.

  • python3 -m unittest tests.build.ci_wrangler_lock_test tests.build.ci_cloudflare_preview_workflow_test tests.build.ci_local_preflight_test tests.build.ci_workflow_topology_test: OK (233). This covers the locked-install gate and DeploySecretActionPinTest, which stays green.

  • python3 tests/build/ci_change_scope_test.py: OK (76). The new file has explicit ownership.

  • actionlint .github/workflows/deploy-default-assets.yml: exit 0.

  • Not exercised: a live deploy run. The workflow is workflow_dispatch only and runs behind the protected Environment. Lanes selected only for batch runs were not run as complete lanes locally (#1996), including the full deploy_contract release suite. Their inputs here are limited to the one new test command, which ran above.
  • PR Review

    Head 3a87577e4: eligible automated review (run 38547414552) with two findings.
    1. The step parser depended on exact indentation and a pinned step count (test line 38). Fixed in cfb3df727. Named-step lookups now fail with the scan's indentation contract, test_the_step_scan_sees_the_named_steps owns that failure, and the count is no longer pinned, so a new step is budget-checked instead of rejected. Verified by the re-indent proof above.
    2. The deploy step's 5-minute budget may be tight now that it goes through the script. Declined, with reasoning: the script adds only the corpus check, which measured 5–7 s in both runs, before the 5–6 s upload. That is about 13 s against 300 s. The workflow comment now records this. A live run of the new path is listed as not exercised.

    Head cfb3df727: eligible automated review (run 38547966033) with one finding. It said the step scan misses steps written as - name: X on one line. Declined, with evidence: all 8 steps already use that form, and steps() returns all 8 names, because the regex's optional indentation matches name: at block offset 0. All three threads were replied to and resolved.

    CI Scope

    Expected mode: full
    Expected selected lanes: ci_contract core_asan core_coverage core_macos core_ubuntu creator deploy_contract docs_static package portal web_runtime_host web_runtime_lab web_toolchain
    Expected skipped lanes:
    ci:full required: no
    Reason: .github/workflows/ci.yml is a central CI control-plane path (full rule); advisory only.

    Version Management

    Version impact: none
    Reason: CI deploy workflow, routing and test only; no Product Build, Module, Provider or Contract changes.

    Documentation Impact

    Documentation impact: none
    Reason: no portal page documents this workflow's internals. docs/operations/default-assets.md is not projected, and it stays accurate because the Environment is unchanged here.

    Pitfall Impact

    Pitfall impact: none — reason: a standards alignment fully expressed by the new workflow contract test.

    Release Impact

    Release impact: none
    Candidate tag: none
    Profile: none
    Channel: none
    Intent disposition: none
    Release assets: none
    Release gates: none
    Reason: CI deploy tooling only; no release or deployment is performed.

    Transition authority

    Authorized transitions: push | PR | merge | cleanup
    No tag, Release, deploy, publication, or Channel promotion is implied.

    🤖 Generated with Claude Code

    Diff: 172 lines (+168 / -4) across 5 files Reviewer: endaye Review duration: 11m
    All Vouch review confidence checks passed
    Residual risk 0.12 = Change Risk (0.77) × (1 − Review Confidence (0.85)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.77 · 172 lines diff across 5 files
    0.77
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.93 · 5 substantive comment(s)
    0.93
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    84%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.308
    Self Review self_review
    0.140
    Sensitive Paths sensitive_paths
    0.077
    Real PR Conversation Timeline
    9 items
    github-actions[bot] github-actions[bot] commented on code on Oct 14, 2026 10:09 UTC
    Code Review
    tests/build/default_assets_deploy_workflow_test.py:1
    @@ -0,0 +1,130 @@
    +#!/usr/bin/env python3
    +"""Contract tests for the original default asset Worker deployment.
    +
    +`deploy-default-assets.yml` hands the Cloudflare deploy token to Wrangler. It
    +used to call Wrangler inline, with no metrics opt-out and no step budgets.
    +These tests pin it to the deploy-workflow standard the Web Host deployments
    +follow: one locked Wrangler, SHA-pinned actions, no persisted checkout
    +credentials, its protected Environment, metrics off, a budget on every step,
    +and `scripts/asset-server.sh deploy` as the only deploy entry point.
    +"""
    +
    +from __future__ import annotations
    +
    +from pathlib import Path
    +import re
    +import unittest
    +
    +
    +ROOT = Path(__file__).resolve().parents[2]
    +WORKFLOW = ROOT / ".github/workflows/deploy-default-assets.yml"
    +SCRIPT = ROOT / "scripts/asset-server.sh"
    +ENVIRONMENT = "creator-canary"
    +WRANGLER_PREFIX = "$RUNNER_TEMP/default-assets-wrangler"
    +EXPECTED_ACTION_PINS = {
    +    "actions/checkout": ("de0fac2e4500dabe0009e67214ff5f5447ce83dd", "v6.0.2"),
    +    "actions/setup-python": ("a309ff8b426b58ec0e2a45f0f869d46889d02405", "v6.2.0"),
    +    "actions/setup-node": ("249970729cb0ef3589644e2896645e5dc5ba9c38", "v6.5.0"),
    +    "actions/upload-artifact": ("b7c566a772e6b6bfb58ed0dc250532a479d7789f", "v6.0.0"),
    +}
    +DEPLOY_STEP = "Deploy independent asset Worker"
    +
    +
    +def directives(source: str) -> str:
    +    """Comments may explain retired forms; only directives are policed."""
    +    return "\n".join(line for line in source.splitlines() if not line.lstrip().startswith("#"))
    +
    +
    +def steps(source: str) -> dict[str, str]:

    <!-- lmdj-review: deepseek -->
    <!-- lmdj-review-v2 endaye/lmdj 2212 3a87577e41bc26dee23372d711095fa270bb82a8 38547414552 1 deepseek sha256=45574b5b3bae4240c37ca6a74a8641dbfdf26aecc5ea85d25daf5a7b97bad8be -->
    Step parser depends on exact indentation and step count: steps() splits on the literal "\n steps:\n" and on ^ - , and test_job_and_every_step_have_a_budget asserts len(self.steps) == 8. Any reformatting of the workflow (e.g. a step added, or a step list indented differently) makes self.steps[DEPLOY_STEP] raise KeyError or the count assertion fail, producing a confusing failure rather than a clear contract violation. This is a test-robustness concern, not a production defect; the trigger is a future edit to deploy-default-assets.yml.

    github-actions[bot] github-actions[bot] commented on code on Oct 14, 2026 10:09 UTC
    Code Review
    .github/workflows/deploy-default-assets.yml:1
    @@ -13,38 +13,48 @@ jobs:
         runs-on: ubuntu-24.04
         timeout-minutes: 20
         steps:
    +      # Step budgets are hang detection sized from the 2026-10-02 runs
    +      # (37014873365, 37041945548): every step finished within 7 seconds.
           - name: Checkout exact protected integration revision
    +        timeout-minutes: 3
             uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
             with:
               ref: ${{ github.sha }}
               persist-credentials: false
           - name: Set up Python
    +        timeout-minutes: 3
             uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
             with:
               python-version: '3.11'
           - name: Set up pinned Worker upload Node
    +        timeout-minutes: 3
             uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
             with:
               node-version: '22.16.0'
           - name: Verify original corpus and Worker route boundaries
    +        timeout-minutes: 3
             run: scripts/asset-server.sh check
           - name: Install pinned Wrangler
    +        timeout-minutes: 5
             shell: bash
             run: |
               set -euo pipefail
               mkdir -p "$RUNNER_TEMP/default-assets-wrangler"
               cp tools/wrangler/package.json tools/wrangler/package-lock.json "$RUNNER_TEMP/default-assets-wrangler/"
               npm ci --prefix "$RUNNER_TEMP/default-assets-wrangler" --ignore-scripts --no-audit --no-fund
           - name: Deploy independent asset Worker
    +        timeout-minutes: 5

    <!-- lmdj-review: deepseek -->
    <!-- lmdj-review-v2 endaye/lmdj 2212 3a87577e41bc26dee23372d711095fa270bb82a8 38547414552 1 deepseek sha256=45574b5b3bae4240c37ca6a74a8641dbfdf26aecc5ea85d25daf5a7b97bad8be -->
    Deploy step budget may be tight for the added script path: The deploy step is now timeout-minutes: 5 while it runs scripts/asset-server.sh deploy, which performs the corpus check and the Wrangler upload. The comment cites 2026-10-02 runs where every step finished within 7 seconds, but those runs used the previous inline invocation; if the script adds meaningful work or the upload is slow, the step can be killed mid-deploy. The job-level budget is 20 minutes, so a hung step is still bounded. Worth confirming the 5-minute budget against a real run of the new script path.

    github-actions[bot] github-actions[bot] commented on Oct 14, 2026 10:09 UTC
    Reviewer

    <!-- lmdj-review: deepseek -->
    <!-- lmdj-review-v2 endaye/lmdj 2212 3a87577e41bc26dee23372d711095fa270bb82a8 38547414552 1 deepseek sha256=45574b5b3bae4240c37ca6a74a8641dbfdf26aecc5ea85d25daf5a7b97bad8be -->
    <!-- lmdj-review-history-v2 codec=zlib-base64 sha256=45574b5b3bae4240c37ca6a74a8641dbfdf26aecc5ea85d25daf5a7b97bad8be eNqFVmmvG7cV/SuEvtQGpHmzLzLyIYCNAKmbBIkBo4hdiUNeSsybrSRHqhr4v/eQIz3JLZoID3izXN7tnHvu/L7izlE/Obva/vr7quXimQa52q4k0WSJnlfrlRhPZPiBdvbI06LEyzIWPEnTSpVUqaqtkpzqNuG14jyv60xSSkmVVGlLac6Lum2VkiIp8zKtqpJTC6c0HPRAqy1izoPswhWXfHJk7nFkm8Y1V3ku6wLuW14UUvE4FVUmeV40TV3ItClkwnMpW1WWWZErlbYyFY1q0gZxuBFHfaJde3G06xDVHVfbrEzqLM7j+P7+HjPPZJLIvG54XTVUN1nR1ryKZVWUZSEzvGuzKmtULhJRNnGlkqIRpRRK4LZJEFOS4nPndmIclD7cXWc1epJkTSolr5o8FSkXTSw5/pW1alOZZLxRsuZZxUVcxXGZxbGsM7QgadA3uO75oBVZd3eaConEMtX4qpNWyLzJqrRO68a3AH2L46Kq8rQUNdpWctWInGe8QOpKNEkFp4b+OWtDPQ3O7rpRPN+9i1bxhosWyVZlUYm2lWhJwtOyopqLpE6aJhMInjdxXSZ5DMiTVJUyrWXKmxLerfMe3Qhi6X8DXW4tPeSf5yVviqwWbSmyvKasSMokRbtFXLdxoxA0K/OmIHRJKUVFw4tW4ZVQoFwqV1/Wq4H3INBqMhvQdHC+pHlwuqcrBIFmjwTI4zRFZi9Vcq6qinjM04QQWfowKFoWAuwqk0zVZa6yPCYVC1igBS3P00QoAj0o9TnYcTbCB+x77eCzyOIqxTRQLrK24KVoOFVZrKhUbZEqUai4kXEpkCzGy+pxwKE4yoso9u7ImNHsRIdurbbD3HXAfpTUhTkRbubdw5BuFOyO8DQZLfRw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F9tn//t7ff7z7+/O0P371/9/OeTaMegpxxt6gstrkClTe+NzzAc6PgesEanN2Evl/HAIBIbXnbIcsXtjrq8MHhzGUR4XCQ35XGzymbOvDLinGip46DY2dtkMhCgRdV9aIRqu+hjyeE6Mbx2TuyEFQ/A6GqG2re718slswEJQp0tfB3Hm+qhSRMcI4z0C+E2/73Wfuwt8AshU9jP9k3tjxKPqzH88DuO2H9MrYPsgGra6ce6LxojyGvtyfyqnhz7DXEq8xNGiL2g0/fGFTkBXjth3c22qG1vqoZbwZx8SMnueObbrT2KsXszDHAfuVopQGkHr7eWFeGocF+9YCAYVUGRPxW73hLnd/p4fl2GDECn/3a5zZ8enxImZ0n7Gjyusg8sZZtETwA85MW9ObaDuzu3suQ0yIMFUMGfjt28MoCnRdNwclo9cV/cAG/GdGvnxn4dPmjMcK6cqO5RCd8rP0HZgZvAg== -->

    deepseek advisory review

    The change routes the default-assets deploy through scripts/asset-server.sh deploy with LMDJ_WRANGLER pointing at the lockfile-installed Wrangler, adds per-step timeouts, disables Wrangler telemetry, and adds a contract test plus scope/lane wiring. The workflow edits themselves look consistent with the new test's expectations. Two concerns are worth noting: the new test's step parser is fragile against the workflow's own formatting, and the deploy step's timeout budget is tight relative to the work it now performs. No correctness, security, concurrency or data-loss defect was identified in the workflow change itself.

    Human takeover: inspect this exact revision and reply to or resolve each finding. This COMMENT review does not approve, reject or merge the PR.

    Scope reason: T2 supplies no LMDJ test-scope advice; the deterministic path floor alone sets the scope.

    <!-- lmdj-test-scope-record-v2 codec=zlib-base64 eNrlVduO3DYM/RXDz7sz1sUXTZ+KPuUbisCgJGpGWdkyLHkXgyD/Xsoz07TbRYD0NW8mKR5Shzzy1xr8GEBjSPXpzzpjyqc5zlh/fqo1mBecbX2qLeKSEF/q4kw4pguQt3O9wsaxroFBK84YgpLdYBqJzumOOdkoBcpSlrnAfEY7LpAvo/VnKkMAzBnZQq+h5RKMYw1rbGsJVvTa4iC5QuRdL4TViAA9A8e0VP2AAxOyfQ+83+Bw9vmy6eNbXF9ciG/paPzhOgU6+9+QxSXE67NFB1vIz5AS5nQ/nczql1zSjyEaCMTSjOnwJcX539Fk4oLjEoM310e48JiOevPBHu/o4w19vNUcH02M5ehhuRbCTZyWgBnrU143LPac1xh+nm5yoMn+lZC+1i9+n6HbQrnWikAt7lQVT7VuAU+VQaoEofrjU3UvWi3lvpSwzSZQ6955tFWh+SPfqfoB7x+c/jG5HyT8D0Kf6lcI3la/f6rSdi4r5+niFVhb7SP7rcoXvFYzvuJKJzQRYHLxVZZmsE5+9pRiKgKNaxlP2jxhF+aMH3eaKKHsYFyRmoH58W0iQcIZH/YEJqaHsWLAXUN5xfS3N1P6O9emtzlvxaKZZWrhqb5f9R+1bTSJ8oAaJWshxd7qLnHNUMh/Qz2uBOQnHC8x5Xcukv7dk2MMpCY/15+/PdUXBHvfOwFD3/Y9SqYN7+gp4EL03PaMNap1wPtG64HDsFctIvgucK6U4MoxW4TNrTOtEdgMzkndCNu3QuEAnVI9E43plAPRCeUMGuyka50qkOs4b5PGtT5xznhZYGLHfq+hBYAFyXrpBt02XPat4k43XTMoo7FrmQFtFGsG2VIvAtqWdZLTGwJaWGN2TSwxeaL4Snj04sEVj2GyX0qI5DHeNuAXltIvtvwUHyFnnBZaMHazPQ1eDK3sJZNty8sf4IJT0UfZlIPxz4Ws5/1lObyy+ttfzZaKOg== -->

    endaye endaye commented on code on Oct 14, 2026 10:13 UTC
    Code Review
    tests/build/default_assets_deploy_workflow_test.py:1
    @@ -0,0 +1,130 @@
    +#!/usr/bin/env python3
    +"""Contract tests for the original default asset Worker deployment.
    +
    +`deploy-default-assets.yml` hands the Cloudflare deploy token to Wrangler. It
    +used to call Wrangler inline, with no metrics opt-out and no step budgets.
    +These tests pin it to the deploy-workflow standard the Web Host deployments
    +follow: one locked Wrangler, SHA-pinned actions, no persisted checkout
    +credentials, its protected Environment, metrics off, a budget on every step,
    +and `scripts/asset-server.sh deploy` as the only deploy entry point.
    +"""
    +
    +from __future__ import annotations
    +
    +from pathlib import Path
    +import re
    +import unittest
    +
    +
    +ROOT = Path(__file__).resolve().parents[2]
    +WORKFLOW = ROOT / ".github/workflows/deploy-default-assets.yml"
    +SCRIPT = ROOT / "scripts/asset-server.sh"
    +ENVIRONMENT = "creator-canary"
    +WRANGLER_PREFIX = "$RUNNER_TEMP/default-assets-wrangler"
    +EXPECTED_ACTION_PINS = {
    +    "actions/checkout": ("de0fac2e4500dabe0009e67214ff5f5447ce83dd", "v6.0.2"),
    +    "actions/setup-python": ("a309ff8b426b58ec0e2a45f0f869d46889d02405", "v6.2.0"),
    +    "actions/setup-node": ("249970729cb0ef3589644e2896645e5dc5ba9c38", "v6.5.0"),
    +    "actions/upload-artifact": ("b7c566a772e6b6bfb58ed0dc250532a479d7789f", "v6.0.0"),
    +}
    +DEPLOY_STEP = "Deploy independent asset Worker"
    +
    +
    +def directives(source: str) -> str:
    +    """Comments may explain retired forms; only directives are policed."""
    +    return "\n".join(line for line in source.splitlines() if not line.lstrip().startswith("#"))
    +
    +
    +def steps(source: str) -> dict[str, str]:

    Fixed in cfb3df727. Named-step lookups now go through step(), which fails with the scan's indentation contract (why:/remedy:). test_the_step_scan_sees_the_named_steps owns that failure, and the step count is no longer pinned, so an added step is budget-checked instead of rejected. Proof: with the step list re-indented, every step-dependent test fails with why: the step scan cannot find ... instead of a KeyError.

    endaye endaye commented on code on Oct 14, 2026 10:13 UTC
    Code Review
    .github/workflows/deploy-default-assets.yml:1
    @@ -13,38 +13,48 @@ jobs:
         runs-on: ubuntu-24.04
         timeout-minutes: 20
         steps:
    +      # Step budgets are hang detection sized from the 2026-10-02 runs
    +      # (37014873365, 37041945548): every step finished within 7 seconds.
           - name: Checkout exact protected integration revision
    +        timeout-minutes: 3
             uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
             with:
               ref: ${{ github.sha }}
               persist-credentials: false
           - name: Set up Python
    +        timeout-minutes: 3
             uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
             with:
               python-version: '3.11'
           - name: Set up pinned Worker upload Node
    +        timeout-minutes: 3
             uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
             with:
               node-version: '22.16.0'
           - name: Verify original corpus and Worker route boundaries
    +        timeout-minutes: 3
             run: scripts/asset-server.sh check
           - name: Install pinned Wrangler
    +        timeout-minutes: 5
             shell: bash
             run: |
               set -euo pipefail
               mkdir -p "$RUNNER_TEMP/default-assets-wrangler"
               cp tools/wrangler/package.json tools/wrangler/package-lock.json "$RUNNER_TEMP/default-assets-wrangler/"
               npm ci --prefix "$RUNNER_TEMP/default-assets-wrangler" --ignore-scripts --no-audit --no-fund
           - name: Deploy independent asset Worker
    +        timeout-minutes: 5

    Declined, with reasoning. The script adds only check before the same Wrangler upload. That step measured 5–7 s and the upload 5–6 s in both 2026-10-02 runs (37014873365, 37041945548), so about 13 s against 300 s. The workflow comment now records this (cfb3df727). A live run of the new path is listed in the PR as not exercised.

    github-actions[bot] github-actions[bot] commented on code on Oct 14, 2026 10:14 UTC
    Code Review
    tests/build/default_assets_deploy_workflow_test.py:1
    @@ -0,0 +1,148 @@
    +#!/usr/bin/env python3
    +"""Contract tests for the original default asset Worker deployment.
    +
    +`deploy-default-assets.yml` hands the Cloudflare deploy token to Wrangler. It
    +used to call Wrangler inline, with no metrics opt-out and no step budgets.
    +These tests pin it to the deploy-workflow standard the Web Host deployments
    +follow: one locked Wrangler, SHA-pinned actions, no persisted checkout
    +credentials, its protected Environment, metrics off, a budget on every step,
    +and `scripts/asset-server.sh deploy` as the only deploy entry point.
    +"""
    +
    +from __future__ import annotations
    +
    +from pathlib import Path
    +import re
    +import unittest
    +
    +
    +ROOT = Path(__file__).resolve().parents[2]
    +WORKFLOW = ROOT / ".github/workflows/deploy-default-assets.yml"
    +SCRIPT = ROOT / "scripts/asset-server.sh"
    +ENVIRONMENT = "creator-canary"
    +WRANGLER_PREFIX = "$RUNNER_TEMP/default-assets-wrangler"
    +EXPECTED_ACTION_PINS = {
    +    "actions/checkout": ("de0fac2e4500dabe0009e67214ff5f5447ce83dd", "v6.0.2"),
    +    "actions/setup-python": ("a309ff8b426b58ec0e2a45f0f869d46889d02405", "v6.2.0"),
    +    "actions/setup-node": ("249970729cb0ef3589644e2896645e5dc5ba9c38", "v6.5.0"),
    +    "actions/upload-artifact": ("b7c566a772e6b6bfb58ed0dc250532a479d7789f", "v6.0.0"),
    +}
    +DEPLOY_STEP = "Deploy independent asset Worker"
    +CHECKOUT_STEP = "Checkout exact protected integration revision"
    +INSTALL_STEP = "Install pinned Wrangler"
    +
    +
    +def directives(source: str) -> str:
    +    """Comments may explain retired forms; only directives are policed."""
    +    return "\n".join(line for line in source.splitlines() if not line.lstrip().startswith("#"))
    +
    +
    +def steps(source: str) -> dict[str, str]:
    +    """Map each step name to its whole block.
    +
    +    The scan reads the one job's step list at its current indentation; a
    +    reshaped workflow fails `test_the_step_scan_sees_the_named_steps` with
    +    that cause instead of a KeyError in an unrelated contract test.
    +    """
    +    _, found, listing = source.partition("\n    steps:\n")
    +    blocks = re.split(r"(?m)^      - ", listing)[1:] if found else []
    +    named = {}
    +    for item in blocks:
    +        name = re.search(r"(?m)^(?:        )?name: (.+)$", item)

    <!-- lmdj-review: deepseek -->
    <!-- lmdj-review-v2 endaye/lmdj 2212 cfb3df7277aa18f4af47d219bb38023bfd59624d 38547966033 1 deepseek sha256=882acafdbdbd5e53c71e03a6667f1509dcb5edc35b8972c1bb4fa86a4434c975 -->
    Step scan drops steps whose name: is indented differently: steps() splits blocks on ^ - and then matches the step name with ^(?: )?name: (.+)$, i.e. only 8 spaces or no leading spaces. A step written as - name: ... (name on the same line as the dash, which is valid YAML and used elsewhere in this repo's workflows) is not matched, so the block is keyed by its first line instead of its name. test_the_step_scan_sees_the_named_steps would then fail with a misleading "keep the deploy job's steps at six-space indentation" message even though the workflow is valid, and test_deploy_token_reaches_only_the_deploy_step / test_job_and_every_step_have_a_budget would silently skip or misattribute such a step. Trigger: reformat any step in deploy-default-assets.yml to - name: X on one line. Remedy: also accept ^ - name: (.+)$ when deriving the key.

    github-actions[bot] github-actions[bot] commented on Oct 14, 2026 10:14 UTC
    Reviewer

    <!-- lmdj-review: deepseek -->
    <!-- lmdj-review-v2 endaye/lmdj 2212 cfb3df7277aa18f4af47d219bb38023bfd59624d 38547966033 1 deepseek sha256=882acafdbdbd5e53c71e03a6667f1509dcb5edc35b8972c1bb4fa86a4434c975 -->
    <!-- lmdj-review-history-v2 codec=zlib-base64 sha256=882acafdbdbd5e53c71e03a6667f1509dcb5edc35b8972c1bb4fa86a4434c975 eNp9Vu+P47YR/VcIo0Du0LVWvyU6H4IDUhQILilwPSApmsQekcM1Y1lSSMpbN7j/PY+yfLuHAvWHXVkczrx582bGf2woBD5PwW92//5j05E68aA3u41mnjzzafOwUeOFHT3x3h8pr2ocZkXTNVoqbgojU13Xumad1bXSmewyWZYypxrfU1M2bUNGNUVeq1pllc6UZgmnPDzZgTc7xJwH3S9PpGkK7F7i6C5PWzJlqdsqo7ajqtKG0hz+NJWVlG2lcwmnVGrdmbouqtKYvNO5kkbmMQ45dbQX3nfXwPseUcNxsyvqrC3SMk1fzl9iloXOMl22ktpGciuLqmupSXVT1XWlC5x1RVNIU6pM1TJtTFZJVWtlFL7KDDE1G5r7sFfjYOzTi+uizZo8K2SuNTWyzFVOCvQR/tWt6XKdFSSNbqloSKVNmtZFmuq2AAWZrInh+kyDNezDi9NcaQBDHWLWWad0KYsmb/NWRgrAW5pWTVOC/xa01WSkKqmgCtCNklkDp45/n63jMw/B7/tRnV68q86QJNUBbFNXjeo6DUoyyuuGW1JZm0lZKAQvZdrWWZl2nGe5qXXe6pxkDe8+RI9hhLDsf1Fd8p5f4S/LmmRVtKqrVVG2XFRZneWgW6Vtl0qDoEVdyorBkjGGK0lVZ3CkTAccevPpYTPQGQLaTG4LmQ4hpjQPwZ55LcEis9cCKNM8B7LPWRKZpmFKKc8YkXUMg6R1paCuOitMW5emKFM2q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B5NxWBe5Af3PWmteUiCeyZ4DCXRWRGTP0MVatx4seehjhnHIBADK81G29PY2/VVbCODdeP4yk68hYghnDLKiIf+Hnxm4h/wJkanWMVBvREtFbshtsweDEUMc91DsRWZ8T7+suOOc7DaeH+7Lm/IEGasBUchgV+jkV5LA2x5BAHeE9wEsf38n43QIqbX+KEJ79smY85ZD9hFHMMKmIpFiTbxQNYuljFX6+1xm+8sx2QpVUiak8AEZqI+ijwRQDLeIw3k82nuFsxCWZEXzcKttT/Ex6mYhjdNblgL/8JXnmmvg== -->

    deepseek advisory review

    The change routes the default-assets deploy through scripts/asset-server.sh deploy with LMDJ_WRANGLER pointing at the lockfile-installed Wrangler, adds per-step timeouts, disables Wrangler telemetry, and adds a contract test plus scope/lane wiring. The workflow and policy edits look consistent with the new test. One correctness concern in the new test file is noted below; the workflow hunks themselves appear sound.

    Human takeover: inspect this exact revision and reply to or resolve each finding. This COMMENT review does not approve, reject or merge the PR.

    Scope reason: T2 supplies no LMDJ test-scope advice; the deterministic path floor alone sets the scope.

    <!-- lmdj-test-scope-record-v2 codec=zlib-base64 eNrlVcGO3DYM/RXD590ZS7Ita3oqeso3FIFBSdSMsrJlWPIuBkH+vZRnpmm3iwDpNTeTFB+pRz75aw1+DKAxpPr0Z50x5dMcZ6w/P9UazAvOtj7VFnFJiC91cSYc0wXI2zupsHGsb2DQijOGoNp+ME2LzumeubZRCpSlLHOB+Yx2XCBfRuvPVIYAmDNtB1JDx1swjjWssZ0lWCG1xaHlCpH3UgirEQEkA8d0q+SAAxNt9x54v8Hh7PNl08e3uL64EN/S0fjDdQp09r8hi0uI12eLDraQnyElzOl+OpnVL7mkH0M0EIilGdPhS4rzv6PJxAXHJQZvro9w4TEd9eaDPd7Rxxv6eKs5PpoYy9HDci2EmzgtATPWp7xuWOw5rzH8PN3kQJP9KyF9rV/8PkO3hXKtFYFa3KkqnmrdAp4qg1QJQvXHp+petFrKfSlhm02g1r3zaKtC80e+U/UD3j84/WNyP0j4H4Q+1a8QvK1+/1Sl7VxWztPFK7C22kf2W5UveK1mfMWVTmgiwOTiqyzNYJ387CnFVAQa1zKetHnCLswZP+40UULZwbgiNQPz49tEgoQzPuwJTEwPY8WAu4byiulvb6b0d65Nb3PeikUzy9TCU32/6j9q22gS5QE1StZCir3VXeKaoZD/hnpcCchPOF5iyu9cJP27J8cYSE1+rj9/e6ovCPa+d8ZpYZ3kUgKwwbXgWmk5U1qLoeFCO9upnrd2r1pE8F3gXCnBlWO2CJtbZzojsBmca3UjrOyEwgF6pSQTjemVA9EL5Qwa7FvXOVUg13HeJo1rfeKc8bLAxI79XgN63euBC9p80+EgB2mMpRelYV2PVNwKwQV12HHBGy0Vtz1SrUEwptAIuWtiickTxVfCoxcPrngMk/1SQiSP8bYBv7CUfrHlp/gIOeO00IKxm+1p8GLoWqn6vhGi/AEuOBV9lE05GP9cyHreX5bDK6u//QXLGIpl -->

    endaye endaye commented on code on Oct 14, 2026 10:15 UTC
    Code Review
    tests/build/default_assets_deploy_workflow_test.py:1
    @@ -0,0 +1,148 @@
    +#!/usr/bin/env python3
    +"""Contract tests for the original default asset Worker deployment.
    +
    +`deploy-default-assets.yml` hands the Cloudflare deploy token to Wrangler. It
    +used to call Wrangler inline, with no metrics opt-out and no step budgets.
    +These tests pin it to the deploy-workflow standard the Web Host deployments
    +follow: one locked Wrangler, SHA-pinned actions, no persisted checkout
    +credentials, its protected Environment, metrics off, a budget on every step,
    +and `scripts/asset-server.sh deploy` as the only deploy entry point.
    +"""
    +
    +from __future__ import annotations
    +
    +from pathlib import Path
    +import re
    +import unittest
    +
    +
    +ROOT = Path(__file__).resolve().parents[2]
    +WORKFLOW = ROOT / ".github/workflows/deploy-default-assets.yml"
    +SCRIPT = ROOT / "scripts/asset-server.sh"
    +ENVIRONMENT = "creator-canary"
    +WRANGLER_PREFIX = "$RUNNER_TEMP/default-assets-wrangler"
    +EXPECTED_ACTION_PINS = {
    +    "actions/checkout": ("de0fac2e4500dabe0009e67214ff5f5447ce83dd", "v6.0.2"),
    +    "actions/setup-python": ("a309ff8b426b58ec0e2a45f0f869d46889d02405", "v6.2.0"),
    +    "actions/setup-node": ("249970729cb0ef3589644e2896645e5dc5ba9c38", "v6.5.0"),
    +    "actions/upload-artifact": ("b7c566a772e6b6bfb58ed0dc250532a479d7789f", "v6.0.0"),
    +}
    +DEPLOY_STEP = "Deploy independent asset Worker"
    +CHECKOUT_STEP = "Checkout exact protected integration revision"
    +INSTALL_STEP = "Install pinned Wrangler"
    +
    +
    +def directives(source: str) -> str:
    +    """Comments may explain retired forms; only directives are policed."""
    +    return "\n".join(line for line in source.splitlines() if not line.lstrip().startswith("#"))
    +
    +
    +def steps(source: str) -> dict[str, str]:
    +    """Map each step name to its whole block.
    +
    +    The scan reads the one job's step list at its current indentation; a
    +    reshaped workflow fails `test_the_step_scan_sees_the_named_steps` with
    +    that cause instead of a KeyError in an unrelated contract test.
    +    """
    +    _, found, listing = source.partition("\n    steps:\n")
    +    blocks = re.split(r"(?m)^      - ", listing)[1:] if found else []
    +    named = {}
    +    for item in blocks:
    +        name = re.search(r"(?m)^(?:        )?name: (.+)$", item)

    Declined, with evidence. The same-line form - name: X is the form every step in this workflow uses (8 of 8). After the split on ^ - , each block starts with name: X, which the regex's optional indentation group matches at offset 0. Running steps() on the current workflow returns all 8 step names as keys. Only a step that has no name: at all is keyed by its first line, and it is still budget-checked by test_job_and_every_step_have_a_budget.

    Reviewers
    Assignees
    endaye endaye
    Labels
    risk: low confidence: 84.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 76.9% (HIGH) · Higher = larger blast radius
    76.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 84.5% · Lower = rushed or shallow review
    84.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 11.9% · Safe to merge
    11.9%
    Repository