Skip to content

[ENG-3120] Inject build fingerprint in mark-build for manifest parity#30

Merged
devlob merged 1 commit into
mainfrom
feature/ENG-3120-manifest-parity-heartbeat
Jul 2, 2026
Merged

[ENG-3120] Inject build fingerprint in mark-build for manifest parity#30
devlob merged 1 commit into
mainfrom
feature/ENG-3120-manifest-parity-heartbeat

Conversation

@devlob

@devlob devlob commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What & why

connect mark-build now stamps built HTML with the build fingerprint — the manifest checksum computed from the lockfile — injected as window.__PATCHSTACK_BUILD__ beside the existing production flag. The embedded disclosure widget reads it and reports it, so Patchstack can compare the running build against the last scanned manifest ("manifest parity").

  • New computeManifestChecksum (src/checksum.ts) — byte-for-byte identical to the server's PulseController::storeManifest checksum (sorted-package SHA-256, first 12 hex). Verified against the live SaaS endpoint (c14377037ec1 on both sides).
  • New src/mark-build.ts — resolves the build dir, injects __PATCHSTACK_PROD__ + __PATCHSTACK_BUILD__, idempotent re-runs.
  • mark-build CLI switched to the fingerprint injector; removes the superseded flag-only buildFlag.ts.

Testing

  • vitest run — 107/107 (incl. new checksum + mark-build suites)
  • tsc --noEmit clean
  • Full browser e2e: real connect scanmark-build → widget heartbeat → SaaS parity.

Cross-repo (3-repo feature)

Ref ENG-3120

🤖 Generated with Claude Code

@coderbuds

coderbuds Bot commented Jul 1, 2026

Copy link
Copy Markdown

Injects build fingerprint and production flag cleanly with modular code.

🎯 Quality: 100% Elite · 📦 Size: Large — consider splitting if possible

📈 This month: Your 53rd PR — above team average · Averaging Excellent

See how your team is trending →

mark-build now computes the manifest checksum from the lockfile and injects it (window.__PATCHSTACK_BUILD__) beside the production flag, so the disclosure widget can report the running build for manifest-parity checks. The fingerprint matches the server's byte-for-byte. Replaces the flag-only injector.
@devlob devlob force-pushed the feature/ENG-3120-manifest-parity-heartbeat branch from 01ef539 to 6e9b869 Compare July 2, 2026 07:38
@devlob

devlob commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

/review

@devlob devlob merged commit 08909c1 into main Jul 2, 2026
4 checks passed
@devlob devlob deleted the feature/ENG-3120-manifest-parity-heartbeat branch July 2, 2026 15:10
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