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
This commit is contained in:
defiQUG
2026-04-07 22:46:39 -07:00
parent 08940e85aa
commit b117585cfd
4 changed files with 23 additions and 3 deletions

View File

@@ -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.

View File

@@ -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)."