Skip to content

fix(build): reuse stamps after identical pnpm installs - #206282

Merged
vincentkoc merged 1 commit into
mainfrom
perf-ci-qa-runtime-artifact-reuse-20261127
Nov 27, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
perf-ci-qa-runtime-artifact-reuse-20261127

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Repeating an identical pnpm 12 installation changes its cache-pruning timestamp. The source runtime fingerprints that timestamp, so an otherwise reusable build is rejected and build/runtime preparation asks to run again.

User Impact

Identical installs can retain their build and runtime stamps. Dependency graph, layout, install policy, compiler, source, platform and environment changes still invalidate them. Unsupported metadata formats keep their existing byte-sensitive behavior.

Why This Change Was Made

Normalize only the top-level string prunedAt in recognized pnpm 12/layout-5 JSON metadata at the existing fingerprint owner. Every other field remains part of the fingerprint; no parser dependency, stamp rewrite or workflow bypass is added.

Evidence

  • The real stamp-reader regression fails on the base: changing only the timestamp requests both build and runtime work. With the fix, both stamp readers permit reuse. This is a preparation decision, not a measured count of executed builds.
  • Dependency/layout/policy and unknown-field changes still reject reuse; unsupported JSON/YAML retains raw-byte sensitivity. Existing source, lockfile, missing-output and strict-head checks are retained.
  • Two separately installed exact-revision checkouts produced different fingerprints before the fix and identical build/runtime fingerprints afterward, without replacing either metadata file.
  • Focused typecheck, lint and formatting pass. All 9 stamp-reader cases, 6 existing build-stamp cases and 7 artifact-transfer cases pass, including the sparse native-Node harness. The new regression was red on the base. Last artifact/build-stamp run: 78.73s wrapper wall; final stamp file: 113.72s wrapper wall / 11.332s tests on a loaded host. These are validation costs, not speedup measurements. Local ClawSweeper reviewed the complete committed range e3dd914318e748a03cbc0a7e1d6c0865bc1ca2d5..19aac8e2605ee7a4e5490d499045ca8a7a4c8bd2 at high reasoning effort: no actionable findings. The separate independent source review was also clear; neither review reran tests.

This removes a demonstrated false invalidation. Cross-job runtime artifacts are not enabled here, and no whole-CI runtime or billing saving is claimed.

@vincentkoc vincentkoc self-assigned this Nov 27, 2026
@clawsweeper

clawsweeper Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S labels Nov 27, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 27, 2026
@clawsweeper

clawsweeper Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR excludes pnpm 12’s pruning timestamp from build and runtime fingerprints while preserving other installation metadata.

Example: An identical pnpm 12.15.0 installation changes prunedAt from November 26 to November 27.

  • Before: Equivalent-input preparation rejects both existing stamps.
  • After: Both stamps remain reusable when all other inputs and required outputs match.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused implementation and regression coverage are sound on inspection, but required shipped-entry-point proof is absent and broad build/test checks have not run.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An identical dependency installation can unnecessarily request another build and runtime preparation.
Reason: Removing a demonstrated incidental fingerprint input restores intended reuse, and the maintainer-authored PR supplies direction approval.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a current false invalidation in the shared build-input fingerprint owner; no actionable code defect was found.

Reviewed head: 19aac8e2605ee7a4e5490d499045ca8a7a4c8bd2

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide a redacted terminal capture through the shipped runtime-preparation command showing that a real identical pnpm reinstall changes prunedAt while existing build/runtime artifacts are reused; redact IPs, API keys, phone numbers and non-public endpoints.
Agent review details

How this fits together

Source-runtime preparation fingerprints source, tooling, environment and installed-dependency metadata, then compares those fingerprints with build and runtime stamps to decide whether preparation is needed.

flowchart TD
  A[Source and tooling] --> C[Shared input fingerprint]
  B[pnpm installation metadata] --> C
  C --> D[Build and runtime stamp readers]
  E[Existing stamps and outputs] --> D
  D --> F[Test runtime preparation]
Loading

Technical review

Best possible solution:

Keep the narrow normalization in the existing fingerprint owner and finish validation through real runtime preparation.

Do we have a high-confidence way to reproduce the issue?

Current-main source deterministically hashes the changed timestamp, and the PR reports a base-red/head-green stamp-reader regression; no target code was executed during this read-only review.

Is this the best way to solve the issue?

The change repairs the shared identity calculation without adding dependencies, competing reuse policy or stamp rewrites, and the added test inputs protect distinct invalidation boundaries.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against fc25865d99bd.

Provenance checked

  • Installed-dependency input identity keeps the original intent (cfe8791: Equivalent-source runtime reuse fingerprints effective production and dependency inputs while retaining strict CLI and deployment checks; later refactors preserved content-based invalidation.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Shakker: Raw commit cfe8791 adds scripts/lib/run-node-input-state.mts:329 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: cfe8791ca920; files: scripts/lib/run-node-input-state.mts)

PR surface

Tests +71, Other +24. Total +95 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 73 2 +71
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 24 0 +24
Total 2 97 2 +95

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Supply the real reinstall-to-preparation capture described in the proof assessment.
  • Complete the required build and test gates for the ready PR head.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 26, 2026, 8:49 PM ET / November 27, 2026, 01:49 UTC.

@vincentkoc
vincentkoc marked this pull request as ready for review November 27, 2026 02:31
@vincentkoc
vincentkoc merged commit ab9193f into main Nov 27, 2026
190 checks passed
@vincentkoc
vincentkoc deleted the perf-ci-qa-runtime-artifact-reuse-20261127 branch November 27, 2026 03:41
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 27, 2026
* commit '7df6cb759f9e604921536a700e2f527c5516e7de': (185 commits)
  docs: clarify what telemetry OpenClaw sends and how to opt out
  refactor(ui): remove retired stream-follow test seams (#206316)
  fix: distinguish missing command results from unknown outcomes (#206313)
  fix(build): reuse stamps after identical pnpm installs (#206282)
  chore(ci): inventory Gateway model catalog worker lifecycles (#206251)
  fix: keep failed image inspections inside chat activity (#206283)
  fix: clarify sent-message labels and chat activity icons (#206048)
  fix(cron): use the service's free memory for extra automation runs (#206322)
  test(android): reuse the shared TLS fixture (#206280)
  fix(ui): restore New Session recovery during startup (#206319)
  test(macos): align new Gateway URL expectations (#206281)
  feat: let doctor --fix tell when its startup repairs have nothing to do (#206246)
  fix(android): pause idle gateway discovery without blocking consumers (#196209)
  fix(ci): prepare the Android SDK for scheduled CodeQL scans (#203843)
  fix(memory): read delegated cgroup pressure from the mapped leaf (#206308)
  improve(config): reuse plugin metadata during auto-enable (#206289)
  improve: copy only the selected model for agent completions (#206287)
  fix(pr): refresh tooling before preparing reviewed incoming PRs (#206236)
  fix: keep Gateway ready while plugins drain after updates (#206299)
  fix(crabbox): keep unused prepared mirrors reusable (#206267)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant