From b117585cfdb3549e2067057304b030a1f028e5c9 Mon Sep 17 00:00:00 2001 From: defiQUG Date: Tue, 7 Apr 2026 22:46:39 -0700 Subject: [PATCH] chore(submodules): miracles deploy-package hygiene; PMM micro-trade scenario - miracles_in_motion: untrack api/deploy-package tsc emit (zip layout from api/dist). - cross-chain-pmm-lps: add gas-budgeted micro-trade scenario JSON + doc. - surgical-clean-submodule-artifacts.sh: miracles_in_motion step; SUBMODULE_HYGIENE note. Made-with: Cursor --- cross-chain-pmm-lps | 2 +- docs/00-meta/SUBMODULE_HYGIENE.md | 2 +- miracles_in_motion | 2 +- .../surgical-clean-submodule-artifacts.sh | 20 +++++++++++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/cross-chain-pmm-lps b/cross-chain-pmm-lps index 589ebaf..f7f3e3b 160000 --- a/cross-chain-pmm-lps +++ b/cross-chain-pmm-lps @@ -1 +1 @@ -Subproject commit 589ebaff86d2b1f69db48d6186a485c05333e14f +Subproject commit f7f3e3b0205dd3098a1366dd52daf31bce403a49 diff --git a/docs/00-meta/SUBMODULE_HYGIENE.md b/docs/00-meta/SUBMODULE_HYGIENE.md index 9b1cd8e..f8d29fc 100644 --- a/docs/00-meta/SUBMODULE_HYGIENE.md +++ b/docs/00-meta/SUBMODULE_HYGIENE.md @@ -31,7 +31,7 @@ Stricter than `git status -sb` (fails on any porcelain output). Use after large ### Surgical artifact cleanup (generated files only) -Some submodules historically tracked **build output** (TypeScript `.js` next to `.ts` under `packages/*/src`, Foundry `artifacts/`, or root `metamask-integration/dist/` from `tsc`). That noise is removed with **gitignore + `git rm --cached`**, not by discarding real source edits. +Some submodules historically tracked **build output** (TypeScript `.js` next to `.ts` under `packages/*/src`, Foundry `artifacts/`, root `metamask-integration/dist/` from `tsc`, or `miracles_in_motion/api/deploy-package/` copies of `api/dist`). That noise is removed with **gitignore + `git rm --cached`**, not by discarding real source edits. - Repeatable helper (idempotent): `bash scripts/maintenance/surgical-clean-submodule-artifacts.sh [--dry-run]` - After it reports changes, **commit inside the submodule**, then bump the **parent** submodule pointer. diff --git a/miracles_in_motion b/miracles_in_motion index 16b9b02..9499d0b 160000 --- a/miracles_in_motion +++ b/miracles_in_motion @@ -1 +1 @@ -Subproject commit 16b9b02d70ed109344c1dbc0e3de28282e4941c2 +Subproject commit 9499d0b064564155681c04e1871ab83c5ecdfc27 diff --git a/scripts/maintenance/surgical-clean-submodule-artifacts.sh b/scripts/maintenance/surgical-clean-submodule-artifacts.sh index c4f886f..7d04cd5 100755 --- a/scripts/maintenance/surgical-clean-submodule-artifacts.sh +++ b/scripts/maintenance/surgical-clean-submodule-artifacts.sh @@ -6,6 +6,7 @@ # the-order — gitignore + untrack tsc emit under packages/*/src (outDir is dist/) # smom-dbis-138 — gitignore + untrack Foundry artifacts/ # metamask-integration — root .gitignore dist/ + git rm --cached dist/ (tsc outDir) +# miracles_in_motion — api/deploy-package tsc copy target: ignore + untrack *.js/*.map/*.d.ts (keep host.json, package.json) # # Idempotent: safe to re-run after commits already landed (no-op if nothing tracked). # @@ -96,6 +97,24 @@ clean_metamask_integration() { git -C "$sub" rm -r -f --cached dist/ 2>/dev/null || true } +clean_miracles_in_motion() { + local sub="$ROOT/miracles_in_motion" + [[ -d "$sub/.git" ]] || return 0 + local files + files=$(git -C "$sub" ls-files 2>/dev/null | grep '^api/deploy-package/' | grep -vE '(host\.json|package\.json)$' || true) + if [[ -z "${files// }" ]]; then + log "miracles_in_motion: no tracked deploy-package emit (OK)" + return 0 + fi + n=$(echo "$files" | grep -c . || true) + if $DRY; then + log "miracles_in_motion: would git rm --cached deploy-package emit ($n files)" + return 0 + fi + log "miracles_in_motion: git rm --cached deploy-package emit ($n files)" + echo "$files" | xargs -r git -C "$sub" rm -f --cached +} + if ! grep -q '^artifacts/' "$ROOT/smom-dbis-138/.gitignore" 2>/dev/null; then log "WARN: smom-dbis-138/.gitignore should contain 'artifacts/' (add before next commit)" fi @@ -103,6 +122,7 @@ fi clean_the_order clean_smom clean_metamask_integration +clean_miracles_in_motion log "Done. Run: bash scripts/verify/submodules-clean.sh" log "Other submodules with only source/config edits need manual commit or stash (not touched here)."