|
9 | 9 | - 'web/sites/guides/package.json' |
10 | 10 | - 'web/sites/guides/src/sidebars/v4-0-0.json' |
11 | 11 | - '.github/workflows/docs-verify.yml' |
| 12 | + # The harness exercises the checkout's CLI module (overlaid onto the |
| 13 | + # installed brew CLI below), so CLI changes can flip {test:cli} blocks |
| 14 | + # red — run the docs gate when the CLI module changes (#3042). |
| 15 | + - 'cli/lucli/**' |
12 | 16 |
|
13 | 17 | jobs: |
14 | 18 | verify: |
|
21 | 25 | runs-on: ubuntu-latest |
22 | 26 | timeout-minutes: 20 |
23 | 27 |
|
| 28 | + env: |
| 29 | + # Attestation mode (#3042): consumed by lib/exec.mjs |
| 30 | + # wheelsBinaryAttestation() and echoed by the smoke-test step, so the |
| 31 | + # log states exactly whose CLI code the {test:cli}/{test:tutorial} |
| 32 | + # blocks dispatched to. github.sha is hex-only (injection-safe). |
| 33 | + WHEELS_ATTEST_MODE: "checkout cli/lucli module overlay @ ${{ github.sha }} (released LuCLI runtime via brew)" |
| 34 | + |
24 | 35 | steps: |
25 | 36 | - name: Checkout |
26 | 37 | uses: actions/checkout@v6 |
@@ -70,23 +81,45 @@ jobs: |
70 | 81 | sed -i 's|/openjdk.jdk/Contents/Home||g' "$WRAPPER" |
71 | 82 | grep JAVA_HOME "$WRAPPER" |
72 | 83 |
|
| 84 | + - name: Overlay checkout CLI module (branch attestation) |
| 85 | + # Binary attestation (#3042): `wheels` is the released LuCLI runtime |
| 86 | + # plus a CFML module — and the module IS this repo's cli/lucli/ (the |
| 87 | + # brew formula ships it verbatim as wheels-module-<ver>.tar.gz, plus |
| 88 | + # vendor/wheels/ staged inside it). The wrapper installed above syncs |
| 89 | + # that released module to $HOME/.wheels/modules/wheels the first time |
| 90 | + # a non-intercepted command runs. Write that directory from the |
| 91 | + # CHECKOUT instead, before anything triggers the first-run sync, so |
| 92 | + # every `wheels` invocation in this job dispatches to the branch's |
| 93 | + # CLI module. {test:cli} blocks then attest to the tree under review: |
| 94 | + # a branch change to a command's output flips its block red. |
| 95 | + # |
| 96 | + # The .module-version marker is copied from the formula so the |
| 97 | + # wrapper's version-diff sync never overwrites the overlay with the |
| 98 | + # released module mid-job. (Note: `wheels --version` and `--help` |
| 99 | + # are intercepted in the wrapper itself — kept in sync with |
| 100 | + # Module.cfc — so those two surfaces still answer with released |
| 101 | + # wrapper text; every real subcommand runs branch code.) |
| 102 | + # |
| 103 | + # Out of scope: the LuCLI runtime stays at the released version the |
| 104 | + # formula pins — runtime changes ship via LuCLI releases, not this |
| 105 | + # repo's PRs. |
| 106 | + run: | |
| 107 | + MODULE_DST="$HOME/.wheels/modules/wheels" |
| 108 | + rm -rf "$MODULE_DST" |
| 109 | + mkdir -p "$MODULE_DST/vendor/wheels" |
| 110 | + cp -R "$GITHUB_WORKSPACE/cli/lucli/." "$MODULE_DST/" |
| 111 | + cp -R "$GITHUB_WORKSPACE/vendor/wheels/." "$MODULE_DST/vendor/wheels/" |
| 112 | + cp "$(brew --prefix wheels)/share/wheels/.module-version" "$MODULE_DST/.module-version" |
| 113 | + echo "Overlaid $MODULE_DST from checkout (marker: $(cat "$MODULE_DST/.module-version"))" |
| 114 | +
|
73 | 115 | - name: Smoke-test the CLI (binary attestation) |
74 | | - # Binary attestation (#3042): this workflow installs the RELEASED |
75 | | - # brew CLI, so {test:cli}/{test:compile}/{test:tutorial} blocks |
76 | | - # attest to that release — not a CLI built from this checkout. |
77 | | - # verify-docs.mjs prints the same "wheels binary: <path> ... " line |
78 | | - # at run start. To attest to a branch-built CLI instead, export |
79 | | - # WHEELS_BIN pointing at it (not wired up yet — issue #3042 tracks |
80 | | - # building the CLI from the checkout here). |
| 116 | + # verify-docs.mjs prints the full attestation line (binary path, |
| 117 | + # resolution source, version, and WHEELS_ATTEST_MODE) at run start; |
| 118 | + # this step is the early, human-greppable copy of the same facts. |
81 | 119 | run: | |
82 | 120 | command -v wheels |
83 | 121 | wheels --version |
84 | | -
|
85 | | - - name: Warm up wheels module (first-run copy) |
86 | | - # Homebrew wrapper copies the module to $HOME/.wheels/modules/wheels |
87 | | - # on first invocation. Trigger it so the module is in place before |
88 | | - # the harness spawns `wheels`. |
89 | | - run: wheels --version >/dev/null |
| 122 | + echo "attest mode: $WHEELS_ATTEST_MODE" |
90 | 123 |
|
91 | 124 | - name: Run harness unit tests |
92 | 125 | working-directory: web/sites/guides |
|
0 commit comments