Skip to content

fix(release): admit first-hop sources by candidate schemas - #169012

Merged
steipete merged 1 commit into
mainfrom
upd/upd-l1556
Oct 11, 2026
Merged

steipete merged 1 commit into
mainfrom
upd/upd-l1556

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes release preparation treating a recorded newer-schema publication as a supported first-hop source, and requiring older-schema candidates to cover newly tagged packages they cannot upgrade from.

Fixes #168257. Supersedes #168280, thanks @RomneyDa.

User Impact

Release maintainers get first-hop sources within the candidate's state and agent schema range. Supported but uncovered npm tags still require verified package coverage and print the existing refresh command. Updater runtime behavior, database schemas, and recovery are unchanged.

Why This Change Was Made

Record the exact package schema pair alongside each inventory entry, and share one schema-support check between first-hop selection and registry coverage. Existing v1 inventories without schema metadata retain their shipped admitted-source behavior; the inventory format and bridge generation remain unchanged. The 12 recorded versions were checked against their exact npm manifests, including matching recorded SHA-512 integrity.

Tooling LOC: +44 net; generated inventory metadata: +48 net; tests: +55 net. The duplicate local object-record guard in the inventory owner was removed in favor of the existing shared guard. No unrelated CI or diagnostics changes from the contributor PR are included.

Evidence

  • Regression fails on the original selector: a schema 1/1 candidate also selects the state-2 and agent-2 beta sources. The repaired selector excludes both and rejects an explicitly selected unsupported source.
  • Focused proof: initial 145/145 tests pass across first-hop fixtures, postbuild/inventory, cleanup, and external bindings. Final owner proof after the empty-supported-set correction: 136/136 pass in 36.82 s wall time; measured test time is 5.57 s for the 11-case first-hop file and 13.97 s for the existing 125-case postbuild file. The new registry cases extend the existing CLI fixture; the candidate manifest is isolated so future repository schema bumps do not invalidate the fixture.
  • pnpm update:compat:check passes for all 12 recorded publications. Live npm confirms the schema field's singleton-array response; the existing npm normalizer handles it. Both npm 11 and npm 12 fixture shapes pass.
  • node scripts/check-changed.mjs --base cf534960545d3fa8c020450da474d67c269ceb00 passes, including script/root-test types, all three export scans, lint, and guard checks. pnpm check:madge-import-cycles: zero cycles. git diff --check passes.
  • Cross-lane importer sweep before the final empty-supported-set correction: 984 passed, one skipped, one host-specific failure across 15 files; 2,556.52 s wall time. The final focused run above covers that last correction. The diagnosed host failure is: package-acceptance-workflow.test.ts / keeps every tracked repository skill visible to Git-aware syncs sees .agents/ in the shared checkout's private .git/info/exclude (line 47). The repository test and ignore rules are unchanged; the private setting was not modified.
  • Known pre-existing cost: the package-acceptance suite's 257-evaluation planner case takes 308.43 s; it reports 241,792 emitted bytes. The package-acceptance file totals 2,115.44 s of test time. These existing process-heavy checks are recorded under the campaign's pre-existing-slow-suite ruling.
  • Independent Codex review unavailable: the first attempt produced no verdict after over 22 minutes; a bounded isolated diagnostic attempt timed out after 180 s with reviewer_unavailable, exit 124, and no report. Lead review of the published head remains required. No review success is claimed.

Published head: 5f38ce8bd23c35205c40805e84aa0d681387b54e. Hosted CI is pending at this authoring handoff.

Record release schema metadata and exclude unsupported first-hop sources and registry coverage obligations. Keep historical v1 inventories and supported-source refresh guidance intact.

Fixes #168257. Supersedes #168280.

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

clawsweeper Bot commented Oct 11, 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: M labels Oct 11, 2026
@steipete
steipete marked this pull request as ready for review October 11, 2026 08:35
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 11, 2026
@clawsweeper

clawsweeper Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR records publication schemas and filters first-hop sources and registry coverage requirements against the candidate’s supported schemas.

Example: A candidate supports state=1 and agent=1; recorded 2026.10.1-beta.1 requires state=2 and agent=1.

  • Before: The newer-schema beta is selected as a first-hop source.
  • After: The beta is excluded, and explicitly selecting it reports that the candidate does not support it.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused repair has useful regression evidence, but one definite CLI-to-shell defect prevents merge.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored tooling PR is outside the ordinary contributor proof gate; supplied evidence includes selector regressions, mocked-npm CLI cases, and a reported live registry check, with no demonstrated empty-set Docker flow.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Release maintainers get unsupported first-hop obligations when publications require schemas newer than the candidate supports.
Reason: The linked report establishes deterministic incorrect admission, and the maintainer-authored direction preserves existing updater and inventory contracts.

Merge readiness

⛔ Needs changes before merge - 1 item remains

This PR addresses a concrete release-tooling defect, but its newly admitted empty-source case breaks the Docker caller and needs one focused correction.

Priority: P2
Reviewed head: 5f38ce8bd23c35205c40805e84aa0d681387b54e

Before merge

  • Preserve an empty source set through the CLI and Docker wrapper (P2) - When every recorded publication exceeds the candidate schemas—the supported=false case added by this PR—the selector now returns []. However, sources mode still writes join("\n") plus a trailing newline, so the Docker wrapper's read loop appends one empty version. With no explicit source tarball, that entry selects FIRST_HOP_TGZ and inspects its synthetic first-hop version as an unrecorded source. With the normal unset expected-missing-chunk override, inspection throws "unrecorded first-hop source requires an explicit expected missing chunk", so release qualification still fails rather than accounting for zero supported sources. Serialize the empty list without a blank record and cover this path through the existing wrapper fixture.

Findings

  • [P2] Preserve an empty source set through the CLI and Docker wrapper — scripts/e2e/lib/update-first-hop-package-fixtures.mjs:47

Tests

  • Missing end-to-end proof: The all-unsupported case is tested at the selector but not through sources CLI serialization and the Docker wrapper.
Agent review details

How this fits together

Release tooling reads candidate manifests, publication inventories, and npm metadata to select historical upgrade sources and require coverage for supported publications.

flowchart TD
  A[Publication manifests] --> B[Compatibility inventory]
  C[Candidate manifest] --> D[Schema support check]
  B --> D
  E[Npm tagged publications] --> D
  D --> F[First hop source selection]
  D --> G[Registry coverage requirements]
  F --> H[Docker upgrade lanes]
Loading

Technical review

Best possible solution:

Keep the shared schema check and serialize zero admitted sources as zero CLI records so the Docker wrapper records an empty source set.

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

Source inspection establishes both the original unconditional admission and the introduced empty-set failure; no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

Sharing schema eligibility between selection and registry coverage is a focused repair, provided its empty result survives the existing CLI and shell boundary.

Full review comments:

  • [P2] Preserve an empty source set through the CLI and Docker wrapper — scripts/e2e/lib/update-first-hop-package-fixtures.mjs:47
    When every recorded publication exceeds the candidate schemas—the supported=false case added by this PR—the selector now returns []. However, sources mode still writes join("\n") plus a trailing newline, so the Docker wrapper's read loop appends one empty version. With no explicit source tarball, that entry selects FIRST_HOP_TGZ and inspects its synthetic first-hop version as an unrecorded source. With the normal unset expected-missing-chunk override, inspection throws "unrecorded first-hop source requires an explicit expected missing chunk", so release qualification still fails rather than accounting for zero supported sources. Serialize the empty list without a blank record and cover this path through the existing wrapper fixture.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • First-hop selection and registry coverage changes intended behavior with a stated reason (05bf4e0: Verified publications supplied the supported upgrade window and registry coverage obligations; the later parallel-lane change retained explicit source selection.)
  • Inventory parsing and compatibility bridge generation keeps the original intent (05bf4e0: Preserve old updater imports across package replacement using verified package identities and source origins.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test test/scripts/update-first-hop-package-fixtures.test.ts --maxWorkers=1
  • node scripts/check-changed.mjs --base cf53496
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 05bf4e0 adds scripts/update-compat-inventory.mts:43 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 05bf4e050b1c; files: scripts/update-compat-inventory.mts)

PR surface

Tests +55, Other +92. Total +147 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 64 9 +55
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 5 114 22 +92
Total 7 178 31 +147

Review metrics

Metric Value Why it matters
Production tooling versus tests Production tooling +44 net lines; tests +55 net lines The growth adds shared schema admission and focused selector/registry regressions; the empty-set regression still needs caller coverage.

Root-cause cluster

Relationship: same_root_cause
Canonical: #168257
Summary: This PR implements the canonical publication-admission report as a focused replacement for the earlier broader PR.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P2: The defect affects release preparation tooling without changing running Gateway behavior.
  • add merge-risk: 🚨 automation: The newly permitted empty-source result becomes a blank source in the Docker release lane and causes qualification to fail.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The defect affects release preparation tooling without changing running Gateway behavior.
  • merge-risk: 🚨 automation: The newly permitted empty-source result becomes a blank source in the Docker release lane and causes qualification to fail.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

Reviewed October 11, 2026, 4:41 AM ET / 08:41 UTC.

@steipete
steipete merged commit 4d96196 into main Oct 11, 2026
174 checks passed
@steipete
steipete deleted the upd/upd-l1556 branch October 11, 2026 08:43
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
…claw#169012)

Release tooling recorded every published release as a supported first-hop upgrade source, including newer-schema betas an older candidate cannot read, and demanded registry coverage for every npm tag regardless of schema. The inventory now records each release's schema, and first-hop selection and registry coverage share one schema-admission check. Fixes openclaw#168257. Supersedes openclaw#168280, thanks @RomneyDa.
RomneyDa pushed a commit that referenced this pull request Oct 13, 2026
)

Release tooling recorded every published release as a supported first-hop upgrade source, including newer-schema betas an older candidate cannot read, and demanded registry coverage for every npm tag regardless of schema. The inventory now records each release's schema, and first-hop selection and registry coverage share one schema-admission check. Fixes #168257. Supersedes #168280, thanks @RomneyDa.

(cherry picked from commit 4d96196)
RomneyDa added a commit that referenced this pull request Oct 13, 2026
…ort)

Records published stable 2026.10.2 in the update-compat inventory so the
candidate admits it as a first-hop upgrade source, mirroring how main
recorded it in its 2026.10.2 closeout.

Regenerated with the branch's owning generator (`pnpm update:compat:gen`)
from integrity-verified npm tarballs of every recorded release; main's
2026.10.2 entry is not copied because main's generator changed after the
cut (#169268 and related), so its chunk list differs (51 vs 56 chunks).
All previously recorded releases are unchanged in content; the only other
change is the generator's canonical key order, which places
`schemaVersions` (added by the #169012 backport) before `chunks`, exactly
as main's regeneration did. 2026.10.3 is unpublished and not recorded.

Extracted-from: 9a1b712
RomneyDa pushed a commit that referenced this pull request Oct 13, 2026
)

Backport of 4d96196 (#169012) adapted for 2026.10.3.

Kept the release line's existing first-hop fixture cases alongside the new
schema-admission regression (test conflict only).

(cherry picked from commit 4d96196)
scribe-dandelion-cult added a commit to karmaterminal/openclaw that referenced this pull request Oct 18, 2026
First-parent upstream c96fac1..d9eba8a (10 PRs: openclaw#168948 GitHub
connection authority to workers, openclaw#168975, openclaw#168772 cron receipt custody
removal, openclaw#169012, openclaw#169006, openclaw#169009, openclaw#168283 test batch d042, openclaw#168994,
openclaw#168964, openclaw#168855 approval/placement state in workers).

Conflicts:
- docs/reference/database-schemas/worker-access-inventory.md: took
  upstream, then regenerated (db:worker-inventory:gen, 633 files / 2449
  calls) instead of hand-merging.
- src/agents/embedded-agent-runner/compact-reasons.test.ts: upstream
  openclaw#168283 deleted low-value cases; kept upstream's file plus our own
  additions only (unknown_model, empty reason, closed-union check and the
  isCompactionSkipCode block).

session-reset-service.ts auto-merged: upstream's awaited placement
retirement (assertCurrent) is disjoint from our continuation-cancellation
cleanup reason.

Refs #1475

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Release inventory admits upgrade sources with unsupported schema versions

1 participant