Skip to content

fix: reduce repeated npm publication evidence requests - #195099

Merged
RomneyDa merged 4 commits into
mainfrom
release-publisher-evidence-reuse-20261108
Nov 8, 2026
Merged

RomneyDa merged 4 commits into
mainfrom
release-publisher-evidence-reuse-20261108

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Reduces repeated acquisition of identical publication evidence for every prepared npm plugin. Trusted preview captures bounded raw evidence; consumers authenticate the exact-attempt carrier and rerun strict validators, not a cached authorization verdict.

User Impact and Boundaries

No change to published package bytes. Attempts, permissions, protected tooling refs, artifact metadata and final authority remain live checks. Only eligible completed job pages are replayed; historical nonterminal pages remain live. Failed-job reruns without a current-attempt preview retain live verification.

The latest change removes one redundant intermediate combined authority check only in private CLI orchestration. Public authenticatePreparedNpmArtifact retains its return-time check. Successful load, consume and authorize retain final checks; load writes its evidence handoff only after final validation. Local consume staging files can be created before that check, as before; publication outputs cannot.

Request Accounting — Measured vs Modeled

  • Measured offline, actual CLI entrypoint: 77 → 59 adapter calls, exactly 18 removed. The removed calls equal one complete callback; the final callback remains. This is not a live HTTP measurement.
  • Production-trace model: the saved 97-command trace contains 41 job-list invocations, including 18 FRV pages beyond page 1. At most 51 occurrences are reusable. Adding 23 evidence freshness reads and 11 carrier reads gives 80; removing the production-shaped 19-call duplicate gives 61.
  • 98-plugin successful-path model: one consume plus one of two mutually exclusive authorize routes per plugin gives 196 adoption invocations: 11,858–11,956 modeled calls, plus preview and other publication traffic, depending on carrier ZIP reuse. This replaces the earlier 15.7k model; it does not guarantee clearance below a 15k hourly quota.

The saved trace records command argv, not response bodies, terminal states, redirects or wire requests. Eligibility and fallback are conditional; no defensible positive lower savings bound follows from that trace alone. Synthetic 51.6% savings with 900 extra job rows per child are not release measurements. Live end-to-end request measurement remains outstanding.

Scope

The original transport/workflow implementation adds 548 net production/workflow lines. The incremental CLI repair adds 12 net production lines (+18/−6). Regression allocation is now exactly 940 net lines: 613 original plus 327 for real CLI/package fixtures and final-boundary revocation coverage; shared scalar is unchanged.

No generic retries, quota orchestration, ClawHub changes, publication dispatch, candidate rebuild or qualification change. Adoption requires landing on main and selecting a new protected publisher-tooling revision. Do not backport to frozen candidate/qualification source; existing pinned tooling does not acquire this automatically.

Validation

  • Latest incremental repair: 64/64 focused tests pass, independently rerun by the parent. Actual CLI tests cover final permission, tag, FRV/carrier attempt and expiry revocation, download-time changes, and public return-time rejection.
  • Latest changed-file lint, formatting, syntax, whitespace and HEAD-relative test-line ratchet pass.
  • Independent static review of the incremental diff over 36086af45e6908cec7ed336231835759ceebfb37: no P0–P2 findings, with unchanged local-staging behavior explicitly noted.
  • Earlier scope: 145 focused tests, 44 archive tests and 119 FRV tests passed; type-aware lint passed for 11 files. Canonical local autoreview and separate source-context review found no remaining concrete P0–P2 finding after the rerun fix. These earlier results are not exact-current-head execution proof.
  • Local full typecheck did not pass because of workspace dependency/setup issues. Earlier hosted production/test typechecks and changed-source/boundary checks passed on 4285ae64a08; exact-current-head checks remain required.
  • Native unzip and hosted end-to-end publication were not exercised; offline transport/extraction fixtures retain production digest and semantic validators.

Current head: cbc9ecdd9e7bb77d601eab69f7c9d3771aa5acb5. Exact-head CI, Security Review and ClawSweeper remain required. Earlier OpenGrep/CodeQL failures need current-run attribution; old quota diagnostics do not establish their cause.

Reuse authenticated raw evidence from the trusted preview while preserving strict local validation and fresh publication authority. Fall back to live verification on failed-job reruns without current-attempt preview evidence.

Co-authored-by: RomneyDa <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XL labels Nov 8, 2026
RomneyDa and others added 2 commits November 8, 2026 07:52
Allocate the exact 613 added regression lines plus the 12-line comparison-base debt reported by CI 42459857594. Leave the shared baseline and reviewed production code unchanged.

Co-authored-by: RomneyDa <[email protected]>
@clawsweeper clawsweeper Bot added 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 8, 2026
Retain public return-time validation and final load/consume/authorize authority checks. Exercise actual CLI boundaries and revocation in offline regression tests.

Co-authored-by: RomneyDa <[email protected]>
@RomneyDa
RomneyDa merged commit c9e6370 into main Nov 8, 2026
115 checks passed
@RomneyDa
RomneyDa deleted the release-publisher-evidence-reuse-20261108 branch November 8, 2026 08:27
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 9, 2026
* fix: reduce repeated npm publication evidence requests

Reuse authenticated raw evidence from the trusted preview while preserving strict local validation and fresh publication authority. Fall back to live verification on failed-job reruns without current-attempt preview evidence.

Co-authored-by: RomneyDa <[email protected]>

* fix: account for inherited test budget debt

Allocate the exact 613 added regression lines plus the 12-line comparison-base debt reported by CI 42459857594. Leave the shared baseline and reviewed production code unchanged.

Co-authored-by: RomneyDa <[email protected]>

* fix: avoid double-counting upstream test allocation

Co-authored-by: RomneyDa <[email protected]>

* fix: defer duplicate CLI evidence authority check

Retain public return-time validation and final load/consume/authorize authority checks. Exercise actual CLI boundaries and revocation in offline regression tests.

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant