Skip to content

fix: preserve admitted plugin release families - #4098

Merged
Patrick-Erichsen merged 2 commits into
mainfrom
preserve-plugin-release-families
Oct 28, 2026
Merged

Patrick-Erichsen merged 2 commits into
mainfrom
preserve-plugin-release-families

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A package's current plugin family cannot describe both historical bundles and newer native releases. Persist each new release's admitted plugin family, then use that snapshot for version, detail, security, artifact, scanner and publish-claim metadata. Legacy releases retain the parent fallback; Claw and skill boundaries remain authoritative.

 selectedReleaseMetadata
-  family = package.family
+  family = pluginRelease.pluginFamily ?? package.family

This is the history-preservation prerequisite for the guarded legacy-family recovery in #4086. The migration must snapshot historical releases before changing a parent.

Evidence

  • Before: the same persisted local Convex database reports an old bundle1.0.0 as code-plugin under a native parent.
    After: version/security/detail/scanner reads report bundle-plugin for1.0.0 and code-plugin for2.0.0. Both HTTP200 downloads preserve the original file SHA256. Fixture scan metadata is synthetic; this proves runtime selection and bytes, not production scanning.
  • Actual HTTP version/security/artifact controls pass; artifact metadata had a separately reproduced failing-before regression. Package/fingerprint binding, contradictory claims and Claw boundary controls pass.
  • Test-only CI follow-up reuses the real80MiB DEFLATE boundary fixture:1579→796ms locally; all20import controls and a deliberately disabled-byte-guard mutant confirm preserved coverage. Caps/timeouts are unchanged.
  • 8,225 tests pass /3 skipped; ci:static, ci:types-build, strict native Convex push and regenerated API pass. Independent Sol/high/Standard P0–P3 review is scoped-clean.

Merge Danger

Door: two-way

Blast Radius: plugins

The optional field preserves legacy fallback. Production reclassification and affected release retries require the subsequent guarded repair and separate verification.

@clawsweeper

clawsweeper Bot commented Oct 28, 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.

@Patrick-Erichsen
Patrick-Erichsen requested a review from a team as a code owner October 28, 2026 00:17
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
clawhub Ready Ready Preview Oct 28, 2026 12:56am UTC

Request Review

@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. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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 Oct 28, 2026
@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR stores each plugin release’s admitted family and uses it in release-specific metadata and scanner claims.

Example: Bundle release 1.0.0 and native release 2.0.0 share a package whose current family is code-plugin.

  • Before: Version-specific readers describe both releases as code-plugin.
  • After: Readers describe 1.0.0 as bundle-plugin and 2.0.0 as code-plugin, preserving downloaded bytes.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused implementation and real persisted-runtime evidence support this prerequisite, but it deliberately delivers only part of the linked publication recovery.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The supplied local Convex before/after output exercises version, security, detail, scanner-target reads and public downloads against retained database state, showing corrected families and unchanged hashes; production scanning and recovery are explicitly outside the demonstrated scenario.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: Historical bundle releases can be described and scanned as native plugins after their parent package is reclassified.
Reason: The collaborator-authored direction preserves release identity without relaxing admission; it intentionally leaves the parent-family repair and publication retries requested in #4086 for subsequent work.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: current main lacks release-specific family preservation, and the collaborator-authored change has no actionable code findings.

Priority: P2
Reviewed head: ce1cc02e68933987cde3d75b348501d3a767ac7c

Before merge

None.

Findings

None.

Agent review details

How this fits together

ClawHub’s Convex registry accepts package publications, stores releases, and supplies metadata and artifacts to public HTTP readers and security workers.

flowchart LR
  A[Package publication] --> B[Release admission]
  B --> C[Stored release family]
  D[Current package family] --> E[Release family resolver]
  C --> E
  E --> F[Public version metadata]
  E --> G[Security worker claims]
Loading

Technical review

Best possible solution:

Land release-family preservation before a separate guarded repair snapshots historical releases and changes eligible parent families.

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

Current-main readers derive historical release metadata from the current parent family, and the supplied same-database runtime trace demonstrates the resulting misclassification.

Is this the best way to solve the issue?

This is the best scoped fix: release-owned snapshots preserve history across existing readers, whereas changing only parent rows or individual HTTP responses would leave scanner claims and other consumers inconsistent.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Patrick Erichsen: Raw commit 91400ed adds convex/publishAttempts.ts:651 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 91400edc0c6e; files: convex/publishAttempts.ts)
  • Peter Steinberger: Raw commit fc7d4da adds convex/schema.ts:605 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: fc7d4dadca25; files: convex/schema.ts)

Review metrics

Metric Value Why it matters
Production versus tests Production +56/-9; tests +170/-8; generated types +2; spec +8 Most growth covers release-family selection, contradictory claims, and retained boundary behavior; production changes reuse existing publication and reader owners.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.

Label justifications:

  • P2: A focused registry correctness prerequisite with limited plugin scope; the broader blocked-publication incident remains separately tracked.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-28T00:31:00.356Z sha ee1034c :: needs maintainer review before merge. :: none

Reviewed October 27, 2026, 9:01 PM ET / October 28, 2026, 01:01 UTC (Revision 2).

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator Author

Native persisted-runtime proof (local-only, same database and original stored file bytes):

  1. Seed historical bundle1.0.0 plus native2.0.0 under the current native parent. Prior scan metadata is synthetic; this is metadata/visibility/byte proof, not a real production scan.
  2. Push the pre-change package/scanner readers, then call the actual version/security/detail queries and public download HTTP routes.
  3. Push candidate readers into the same persisted database and repeat the same queries/downloads.

Before

{
  "mode": "before",
  "families": {
    "1.0.0": {
      "version": "code-plugin",
      "security": "code-plugin",
      "detail": "code-plugin",
      "downloadStatus": 200,
      "originalSha256": "dd4e975886089a82280ab2f761d8d13aad7e49a8fb8b4913a5d688949569e34d"
    },
    "2.0.0": {
      "version": "code-plugin",
      "security": "code-plugin",
      "detail": "code-plugin",
      "downloadStatus": 200,
      "originalSha256": "dd4e975886089a82280ab2f761d8d13aad7e49a8fb8b4913a5d688949569e34d"
    }
  },
  "oldScanTargetFamily": "code-plugin",
  "localOnly": true,
  "checks": "Synthetic stored clean metadata; no real security scan or production recovery claimed."
}

After

{
  "mode": "after",
  "families": {
    "1.0.0": {
      "version": "bundle-plugin",
      "security": "bundle-plugin",
      "detail": "bundle-plugin",
      "downloadStatus": 200,
      "originalSha256": "dd4e975886089a82280ab2f761d8d13aad7e49a8fb8b4913a5d688949569e34d"
    },
    "2.0.0": {
      "version": "code-plugin",
      "security": "code-plugin",
      "detail": "code-plugin",
      "downloadStatus": 200,
      "originalSha256": "dd4e975886089a82280ab2f761d8d13aad7e49a8fb8b4913a5d688949569e34d"
    }
  },
  "oldScanTargetFamily": "bundle-plugin",
  "localOnly": true,
  "checks": "Synthetic stored clean metadata; no real security scan or production recovery claimed."
}

All persisted package/release/job IDs were retained and compared locally. Both versions' downloaded original file hashes are unchanged. Temporary fixture functions were removed before review/publication. Exact candidate8225tests/3skipped/static/types/native push and independent P0–P3 review passed.

Hosted unit retry remains blocked by the unrelated existing80MiB ZIP boundary fixture15s timeout (two failures;8225other tests passed). A test-only follow-up preserves the actual80MiB DEFLATE acceptance and1byte-overflow rejection, with a mutant proving the byte guard is still exercised. It cuts local fixture time1579→796ms without changing application code, caps, or timeouts;20import controls and independent P0–P3 review pass. Full-suite rerun is active before upload.

@Patrick-Erichsen

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. proof: sufficient Contributor real behavior proof is sufficient. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 28, 2026
@Patrick-Erichsen
Patrick-Erichsen merged commit b611bf8 into main Oct 28, 2026
67 of 68 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the preserve-plugin-release-families branch October 28, 2026 01:04

This branch was successfully deployed

1 active deployment
Preview – clawhub — ce1cc02e Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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