@mutmutco/codex-plugin 4.3.1 → 4.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mmi",
3
- "version": "4.3.1",
3
+ "version": "4.3.3",
4
4
  "mmiCompat": "4.x",
5
5
  "description": "MMI workflow skills and org gates delivery.",
6
6
  "author": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mutmutco/codex-plugin",
3
- "version": "4.3.1",
3
+ "version": "4.3.3",
4
4
  "description": "MMI workflow skills and org gates delivery.",
5
5
  "author": {
6
6
  "name": "MMI Future",
@@ -449,8 +449,8 @@ background-task harness surfacing exit codes misreads it as "release failed" whe
449
449
  shipped. Classify from the verdict fields, never the exit code alone: `succeeded` + `pending` means
450
450
  shipped with the follow-up unresolved — watch the enumerated `workflowRuns` to conclusion; only a
451
451
  resolved failure there is a failed follow-up. Read the live release verdict and verify these four
452
- facts instead: the `main..development` count, the tag on `origin`, `gh release view`, and the runs on
453
- the release SHA.
452
+ facts instead: the `main..development` count, the tag on `origin`, the bounded Latest Release read in
453
+ Step 6, and the runs on the release SHA.
454
454
 
455
455
  Required status checks are **per-repo branch protection, not a fixed list** — MMI-Hub's `main` requires
456
456
  `cli` · `infra` · `docs`, but a product repo may require different contexts or none at all (#1045). The
@@ -525,8 +525,29 @@ For `tenant-container` repos, publish the GitHub Release and dispatch the centra
525
525
  gh release create "vX.Y.0" --target main --generate-notes --latest
526
526
  gh workflow run tenant-deploy.yml --repo mutmutco/MMI-Hub \
527
527
  -f slug={slug} -f repo={owner}/{repo} -f ref=main -f stage=main
528
- gh run watch "$(gh run list --workflow tenant-deploy.yml --limit 1 --json databaseId -q '.[0].databaseId')" \
529
- --exit-status # the central prod-deploy run — run this in the BACKGROUND (Bash run_in_background)
528
+ ```
529
+
530
+ On PowerShell, read the run as a structured receipt and filter it natively; do not nest a
531
+ `gh run list` query inside `gh run watch`:
532
+ ```powershell
533
+ $runs = gh run list --workflow tenant-deploy.yml --limit 10 --json databaseId,createdAt,url,status,conclusion | ConvertFrom-Json
534
+ $run = $runs |
535
+ Where-Object { $_.databaseId -and $_.createdAt } |
536
+ Sort-Object { [DateTimeOffset]$_.createdAt } -Descending |
537
+ Select-Object -First 1
538
+ if (-not $run) { throw 'tenant-deploy workflow run was not found' }
539
+ $run | Select-Object databaseId,createdAt,url,status,conclusion | ConvertTo-Json -Compress
540
+ # Run this in the BACKGROUND (PowerShell Start-Job / task runner).
541
+ gh run watch $run.databaseId --exit-status
542
+ ```
543
+
544
+ When several run receipts need collecting, assign the loop output before serializing it; a top-level
545
+ `foreach (...) { ... } | ConvertTo-Json` is a PowerShell parser trap:
546
+ ```powershell
547
+ $out = foreach ($run in $runs) {
548
+ gh run view $run.databaseId --json databaseId,url,status,conclusion,createdAt | ConvertFrom-Json
549
+ }
550
+ $out | ConvertTo-Json -Compress
530
551
  ```
531
552
 
532
553
  For `hub-serverless` (MMI-Hub), publish the GitHub Release but do **not** dispatch `tenant-deploy.yml`:
@@ -614,12 +635,13 @@ Before running `--apply` for MMI-Hub, resolve the real tag first:
614
635
  - **Benefits, active voice, addressed to the reader** — no hype, no internal identifiers.
615
636
 
616
637
  Write the curated summary to a fresh temp file (`f=$(mktemp tmp/release-summary.XXXXXX)`, so a stale prior
617
- summary is never reused). Source from **Hub PR titles only** (`origin/main..origin/development` on
638
+ summary is never reused) and point `--out` at an equally fresh result receipt
639
+ (`r=$(mktemp tmp/release-receipt.XXXXXX)`, #5983). Source from **Hub PR titles only** (`origin/main..origin/development` on
618
640
  `mutmutco/MMI-Hub`), but **rewrite** each line in neutral Hub-subsystem terms (CLI, skills, plugin,
619
641
  workflows, registry, deploy hub) and to the release-type depth the guide demands — **never** a
620
642
  product or brand name (FoFu, Katip, etc.) anywhere in the summary file, Slack post, chat, or release
621
643
  report. Product names are allowed only when releasing **that product's repo**. Then pass the file through:
622
- `mmi-cli devops release --apply --announce-summary-file "$f"`. After the GitHub Release publishes, the CLI posts
644
+ `mmi-cli devops release --apply --announce-summary-file "$f" --json --out "$r"`. After the GitHub Release publishes, the CLI posts
623
645
  the summary to the org alerts channel as the MMI-Future Slack app (token + channel from SSM at run time).
624
646
  For a new MMI-Hub `--apply`, the CLI refuses before promotion when the file is missing, unreadable, or does
625
647
  not contain 3–6 non-empty lines; generated-note fallback is not an agent release path. `--resume` never
@@ -627,6 +649,13 @@ requires or republishes a summary, and non-Hub repos skip the announcement autom
627
649
  summary is accepted, Slack delivery remains best-effort: a transport failure is reported in the result and
628
650
  never rolls back an otherwise completed release.
629
651
 
652
+ **Write the result receipt before bounded monitoring (#5983).** A background-task harness that bounds its
653
+ output retains only the tail of the apply run — exactly where the accepted announcement outcome
654
+ (`announceNote`) can be dropped. With `--out <path>`, the CLI itself writes the full apply result to the
655
+ file as BOM-free UTF-8 (never a shell `>` redirect — see #5802), so the receipt survives any monitor
656
+ bound. `--resume` proves the Release and deploy but does not and should not re-announce, so this receipt
657
+ is the only durable record of the accepted Slack delivery — verify it in Step 6.
658
+
630
659
  **Don't block on the deploy.** Start the watch as a background task and proceed to Steps 4b–5 (docs, project
631
660
  info, branch alignment) while prod deploys. The verdict is collected in Step 6 — verification is not
632
661
  skipped, only un-blocked. Deploy failure → report plainly, then **retry the existing promoted ref by deploy
@@ -702,13 +731,32 @@ mmi-cli oracle org project sync-info --apply # omit --apply for the read-only
702
731
 
703
732
  ## Step 6 — collect deploy verdict + report
704
733
 
734
+ Verify the Slack announcement from the receipt, not from memory (#5983). The `--out` receipt written at
735
+ Step 4 is the durable record of the initial apply result; read its `announceNote` field before the final
736
+ report and state the delivery verdict (`announced`, `skipped`, or the failure note). A monitor that kept
737
+ only the apply output's tail may have dropped that line — the receipt is what keeps that from losing the
738
+ outcome.
739
+
705
740
  The `release --apply` exit code is **not** the release verdict. A nonzero exit with
706
741
  `releaseStatus=succeeded` and `followUpStatus=pending` is the unresolved-follow-up case from Step 3 —
707
742
  the release shipped; the runs enumerated in `workflowRuns` are the outstanding verdict, so watch them
708
743
  to conclusion here rather than re-running or alarming. Report the live release verdict from
709
- the four checks that matter: the `main..development` count, the tag on `origin`, `gh release view`,
710
- and the runs on the release SHA; an alignment PR is normal follow-up work when those checks confirm
711
- the release shipped.
744
+ the four checks that matter: the `main..development` count, the tag on `origin`, the bounded Latest
745
+ Release read, and the runs on the release SHA; an alignment PR is normal follow-up work when those
746
+ checks confirm the release shipped.
747
+
748
+ Use only this bounded Latest Release read:
749
+ ```bash
750
+ gh api repos/{owner}/{repo}/releases/latest --jq '{tagName:.tag_name,targetCommitish:.target_commitish,publishedAt:.published_at,url:.html_url}'
751
+ ```
752
+ Require its `tagName` to equal the expected `$TAG`; a mismatch means Latest does not identify this
753
+ release and is unverified.
754
+
755
+ **`gh release view` has no `isLatest` field (#6019).** Never request Latest status through
756
+ `gh release view`: the field is not in its JSON schema, so gh rejects the whole read and lists its
757
+ supported fields — the check errors instead of answering, and Latest stays unverified. This bounded
758
+ read is the supported Latest probe; `gh release list --json <fields>,isLatest` is the supported form
759
+ only when a list receipt is genuinely the right shape.
712
760
 
713
761
  Collect the backgrounded prod-deploy watch from Step 4 (it has typically finished by now). Confirm prod is
714
762
  healthy (the central deploy workflow smoke step / a health check); **red** → report the failure prominently and flag
@@ -729,9 +777,17 @@ verify`: use their own release-workflow evidence and the publish-visibility cont
729
777
  Hub releases always carry a distribution bump (the Step 1b fold), so the **publish workflow**
730
778
  (`publish.yml`) ships every registry-declared public npm artifact on the GitHub Release from Step 4 —
731
779
  don't publish by hand.
732
- Watch it, then confirm npm caught up:
733
- ```bash
734
- gh run watch "$(gh run list --workflow publish.yml --event release --limit 1 --json databaseId -q '.[0].databaseId')" --exit-status
780
+ Watch the release-triggered `publish.yml` receipt with the same structured PowerShell probe above
781
+ (`--workflow publish.yml --event release`), then confirm npm caught up:
782
+ ```powershell
783
+ $runs = gh run list --workflow publish.yml --event release --limit 10 --json databaseId,createdAt,url,status,conclusion | ConvertFrom-Json
784
+ $run = $runs |
785
+ Where-Object { $_.databaseId -and $_.createdAt } |
786
+ Sort-Object { [DateTimeOffset]$_.createdAt } -Descending |
787
+ Select-Object -First 1
788
+ if (-not $run) { throw 'release-triggered publish workflow run was not found' }
789
+ $run | Select-Object databaseId,createdAt,url,status,conclusion | ConvertTo-Json -Compress
790
+ gh run watch $run.databaseId --exit-status
735
791
  node scripts/release-distribution.mjs verify "X.Y.0" # bare semver — asserts registry versions, BOM identities, and published npm artifacts
736
792
  ```
737
793
  **verify takes bare semver (#5379).** Pass `X.Y.Z`, not the git-tag form `vX.Y.Z`. Checkout still