Skip to content

Vendor Bootsharp build pipeline: one script, one doc, no stash dependency#42

Merged
OptimusPi merged 1 commit into
masterfrom
claude/document-build-process-btirz
May 25, 2026
Merged

Vendor Bootsharp build pipeline: one script, one doc, no stash dependency#42
OptimusPi merged 1 commit into
masterfrom
claude/document-build-process-btirz

Conversation

@OptimusPi
Copy link
Copy Markdown
Owner

Why

Every fresh session of building Motely.Wasm has been burning hours rediscovering the local Bootsharp pipeline because the documentation rotted:

  • CLAUDE.md named two different branches (feat/delegates and feat/raw-interop)
  • BOOTSHARP-BUILD.md named a third (feat/overload)
  • The actual current branch is feat/spec — neither file said so
  • The "projectability patch" (touches GlobalType.cs + TypeInspector.cs) lived only as a stash on the maintainer's Windows machine, with no record of its contents anywhere a remote agent could read
  • The 3-commit publish-fixes patch sat at the repo root as bootsharp-fixes-vs-6edaa2c.patch; nothing automated applying it
  • Every step (reset, patch, bump, pack core, pack FileSystem, purge NuGet cache, bump pins, publish, smoke) was hand-typed prose with no script

What

One PowerShell script does the whole pipeline. One doc explains it. The patch series is vendored into patches/.

                    BEFORE                                          AFTER
       ┌──────────────────────────────┐               ┌─────────────────────────────────┐
       │ CLAUDE.md  (build details)   │──contradict──▶│ CLAUDE.md (pointer + hard rules)│
       │ BOOTSHARP-BUILD.md           │               └──────────────┬──────────────────┘
       │   - says feat/overload       │                              │ links to
       │   - references stash@{N}     │                              ▼
       │   - no automation            │               ┌─────────────────────────────────┐
       └──────────────────────────────┘               │ BOOTSHARP-BUILD.md (sole truth) │
                                                      │   - branch: feat/spec           │
       ┌──────────────────────────────┐               │   - one script invocation       │
       │ bootsharp-fixes-vs-6edaa2c   │               │   - explicit troubleshoot table │
       │   .patch (3 commits)         │               └──────────────┬──────────────────┘
       │ ??? projectability patch     │                              │ executes
       │   (lives in a private stash) │                              ▼
       └──────────────────────────────┘               ┌─────────────────────────────────┐
                                                      │ scripts/build-bootsharp.ps1     │
                                                      │   reset → apply patches →       │
                                                      │   bump → pack core →            │
                                                      │   pack FileSystem →             │
                                                      │   bump MotelyJAML pins →        │
                                                      │   dotnet publish Motely.Wasm →  │
                                                      │   node motely.test.mjs          │
                                                      └─────────────────────────────────┘
                                                                     ▲
                                                                     │ applies
                                                      ┌─────────────────────────────────┐
                                                      │ patches/                        │
                                                      │   01-projectability.patch (NEW) │
                                                      │   02-publish-fixes.patch        │
                                                      │     (= the existing one)        │
                                                      └─────────────────────────────────┘

Files

File Change
scripts/build-bootsharp.ps1 NEW. 11-step end-to-end pipeline. -WhatIf walks every step without executing.
BOOTSHARP-BUILD.md Rewritten. Sole source of truth. Branch feat/spec. Troubleshooting table maps actual error strings to causes/fixes.
CLAUDE.md Build-pipeline section collapsed to a 5-line pointer at the script. All @D:/bootsharp/... ambient-context refs removed (they only resolved on your machine). Everything else kept.
patches/02-publish-fixes.patch Renamed from bootsharp-fixes-vs-6edaa2c.patch, content byte-identical.
patches/01-projectability.patch.PLACEHOLDER NEW. Surfaces the stash dependency. Replace with the real export.

TODO before this lands cleanly: ⚠️ one-time stash export ⚠️

The projectability patch still lives only as a stash on the Windows machine. Until you export it, dotnet publish Motely.Wasm will still fail (the script's other steps run fine, but the publish step trips when the inspector hits Motely's non-projectable members).

On your Windows machine:

cd D:\bootsharp
git stash list
# find: "On feat/spec: !!GitHub_Desktop<feat/spec>"
git stash show -p stash@{N} `
    > X:\JammySeedFinder\src\MotelyJAML\patches\01-projectability.patch

# then:
Remove-Item X:\JammySeedFinder\src\MotelyJAML\patches\01-projectability.patch.PLACEHOLDER
git add patches/
git commit -m "Vendor projectability patch from stash"
git push

The script picks the new .patch file up automatically — patches/*.patch is sorted lexically and applied in order. If the fix later lands upstream, just delete the file.

Verified here (Linux container)

  • grep -rE 'feat/(spec|overload|delegates|raw-interop)' CLAUDE.md BOOTSHARP-BUILD.md scripts/ patches/ returns only feat/spec references.
  • ✅ No file references the old bootsharp-fixes-vs-6edaa2c.patch name.
  • ✅ No @D:/bootsharp/... ambient-context refs remain in CLAUDE.md.
  • patches/02-publish-fixes.patch opens with the same From 65af54bd… SHA-keyed header as the original (git rename detected at 100% similarity).
  • ✅ Script parses cleanly under PowerShell 7.4.6 ([Parser]::ParseInput returns no errors).
  • pwsh scripts/build-bootsharp.ps1 -WhatIf -SkipSmoke -BootsharpRoot /tmp/fake -BootsharpFsRoot /tmp/fake2 prints all 11 ==> step banners and exits 0.

Test plan (only you can do these, on your Windows machine)

  • Export the projectability patch from the stash (see TODO above). Delete the .PLACEHOLDER.
  • Run pwsh ./scripts/build-bootsharp.ps1 -WhatIf and read through the 11 banners. Sanity-check the paths and version-bump logic against your actual layout.
  • Run pwsh ./scripts/build-bootsharp.ps1 for real. Expect RESULT: PASS from both smoke tests at the end.
  • If you keep your Bootsharp checkouts somewhere other than D:\bootsharp / D:\extra\bootsharp, pass -BootsharpRoot and -BootsharpFsRoot.
  • After it's green: open a PR upstream to Elringus with patches/02-publish-fixes.patch (and 01-projectability.patch once vendored). git am will replay the commits with the original authorship.

Generated by Claude Code

…ency

Replace the scattered build prose (CLAUDE.md disagreed with BOOTSHARP-BUILD.md
on which Bootsharp branch is current — neither said `feat/spec`) with a single
PowerShell script that runs the full rebuild end-to-end. Every fresh agent
session was burning hours rediscovering this; that stops here.

What changed:

- scripts/build-bootsharp.ps1: 11-step pipeline (sanity-check, reset, apply
  patches/*.patch in order, bump alpha, pack core + FileSystem, purge NuGet
  cache, XML-edit Directory.Packages.props pins, dotnet publish Motely.Wasm,
  run Node smoke tests, summarize). `-WhatIf` walks every step without
  executing. Path/tool checks downgrade to warnings under -WhatIf so a fresh
  agent can dry-run on a machine without the toolchain.

- patches/02-publish-fixes.patch: renamed from bootsharp-fixes-vs-6edaa2c.patch
  (content byte-identical, three-commit series unchanged). Script applies it.

- patches/01-projectability.patch.PLACEHOLDER: surfaces the missing piece —
  the projectability fix currently lives only as a stash on the maintainer's
  Windows machine. One-time export command is in the placeholder; replace
  with the real patch and the script picks it up automatically.

- BOOTSHARP-BUILD.md: rewritten as sole source of truth. TL;DR points at the
  script; troubleshooting table maps actual error strings to causes/fixes.

- CLAUDE.md: build-pipeline section collapsed to a 5-line pointer at the
  script. All `@D:/bootsharp/...` ambient-context @-refs removed (they only
  resolve on the maintainer's machine and prevented remote agents from
  reading them anyway). Everything else in CLAUDE.md kept.
@OptimusPi
Copy link
Copy Markdown
Owner Author

CLOD

@OptimusPi OptimusPi merged commit ecc8ad5 into master May 25, 2026
1 check failed
@OptimusPi OptimusPi deleted the claude/document-build-process-btirz branch May 25, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants