Skip to content

refactor(docker): share image version parsing - #148243

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/docker-image-version-parsing
Sep 15, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/docker-image-version-parsing

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Docker channel promotion and Vercel registry publication separately interpret the same image-version label.

User Impact

No user-visible behavior change. Accepted labels, contextual errors, platform ordering, rollback checks and publication safeguards remain unchanged.

Why This Change Was Made

Share only the JSON and label parsing in the existing Docker release-policy owner. Each caller retains its own subprocess handling and parses the label before updating its platform map. Any nonempty label remains valid at this boundary, including labels that the caller subsequently rejects as a requested-version mismatch.

Evidence

  • The same 118 cases passed on the original and candidate implementations across the full channel-promotion, Vercel-publication and unchanged release-policy suites, with identical test bytes and case names.
  • Caller fixtures cover padded labels, malformed JSON with its SyntaxError cause, null/missing/non-string/blank labels, second-platform failure before writes, and custom-build reaching the requested-version comparison. Existing attestation, rollback and digest checks remain covered.
  • All 18 selected check stages passed, including formatting, typechecking, lint and dead-export checks. Fresh scoped review found no actionable P0-P2 issues.
  • Exact-head CI passed on 7551b0b94df22255aadf8dd96031fcd37689c129. The earlier queue recovery and subsequent checkout-timeout failure remain recorded; attempt 3 retried only the failed core-types job and its dependent gate. No required gate was disabled or bypassed.
  • The completed canonical review on September 15, 2026 found no actionable correctness or security issues on this head.
  • This is controlled local proof with injected Docker responses, not real Docker, registry availability, release execution, performance measurement or a full current-main qualification.

@vincentkoc vincentkoc self-assigned this Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 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.

@vincentkoc
vincentkoc marked this pull request as ready for review September 14, 2026 12:22
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling size: M maintainer Maintainer-authored PR labels Sep 14, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 14, 2026
@clawsweeper

clawsweeper Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 11:29 PM ET / September 15, 2026, 03:29 UTC (Revision 2).

ClawSweeper review

What this changes

Shares Docker image-version label parsing between channel promotion and Vercel registry publication, with caller tests preserving accepted labels and contextual errors.

Merge readiness

✅ Ready for maintainer review

Keep open: this remains a useful, behavior-preserving cleanup absent from current main. No actionable correctness or security defect was found; the member-authored PR is also protected from automated closure.

Priority: P3
Reviewed head: 7551b0b94df22255aadf8dd96031fcd37689c129

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused extraction with meaningful caller coverage and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored refactor is exempt from the external-contributor proof gate; its reported caller-level tests use injected Docker responses and do not establish live registry behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored refactor is exempt from the external-contributor proof gate; its reported caller-level tests use injected Docker responses and do not establish live registry behavior.
Evidence reviewed 8 items Introduced production change preserves behavior: The pinned introduction diff moves the same JSON lookup, string validation, trimming, error text, and error cause into the existing release-policy module. Both callers invoke it outside their subprocess error handlers and before updating their platform maps.
Current main still has the duplicate implementations: The three production modules have no changes between the pinned merge base and fetched main. Main therefore still contains the original separate parsers; the shared extraction remains distinct work.
Latest release check: The supplied latest release, v2026.9.4, also lacks the shared image-config parser in its release-policy module.
Findings None None.
Security None None.

How this fits together

Docker release scripts inspect image metadata before copying images or advancing release tags. The shared parser extracts each platform’s version label; callers retain version comparisons, attestation checks, rollback protection, and registry writes.

flowchart TD
  A[Requested release and image references] --> B[Docker image inspection]
  B --> C[Shared version label parser]
  C --> D[Caller release and platform checks]
  C --> E[Contextual parsing error]
  D --> F[Verified registry publication]
  D --> G[Reject before writes]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +122, Other -1. Total +121 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 232 110 +122
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 29 30 -1
Total 5 261 140 +121

Review metrics

None.

Technical review

Best possible solution:

Keep one shared label parser while preserving caller-owned subprocess handling and publication safeguards.

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

Not applicable: this PR proposes behavior-preserving refactoring, not a bug fix; source comparison supports equivalence, and tests were not executed during this review.

Is this the best way to solve the issue?

Yes: extracting only the identical parsing operation into the existing release-policy owner removes duplication without combining the callers’ distinct execution and publication responsibilities.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is an internal deduplication with preserved release behavior and no reported user-facing defect.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored refactor is exempt from the external-contributor proof gate; its reported caller-level tests use injected Docker responses and do not establish live registry behavior.

Evidence

What I checked:

  • Introduced production change preserves behavior: The pinned introduction diff moves the same JSON lookup, string validation, trimming, error text, and error cause into the existing release-policy module. Both callers invoke it outside their subprocess error handlers and before updating their platform maps. (scripts/lib/docker-release-policy.mjs:69, 7551b0b94df2)
  • Current main still has the duplicate implementations: The three production modules have no changes between the pinned merge base and fetched main. Main therefore still contains the original separate parsers; the shared extraction remains distinct work. (scripts/docker-channel-promote.mjs, a4a3e5670573)
  • Latest release check: The supplied latest release, v2026.9.4, also lacks the shared image-config parser in its release-policy module. (scripts/lib/docker-release-policy.mjs, 3a9d69db306c)
  • Caller-level preservation coverage: Both complete changed test modules were inspected. Added cases exercise padded labels, invalid JSON and its cause, absent or invalid labels, second-platform rejection before writes, and arbitrary nonempty labels reaching the existing requested-version comparison. These use mocked Docker execution, not a live registry. (test/scripts/docker-channel-promote.test.ts:518, 7551b0b94df2)
  • Publication and alias callers inspected: The full Vercel publication module retains immutable source selection, attestation verification, size admission, digest verification, and alias rollback checks. The extraction introduces no changed permissions, credentials, dependencies, or authorization decisions. (scripts/vercel-container-registry-publish.mjs:255, 7551b0b94df2)
  • Prior review and submitted validation: The supplied completed review covered the same head and retained no findings. The captured PR body reports 118 matching before/after test cases and 18 passing check stages, explicitly identifying the proof as injected Docker responses. The author's subsequent comment requests re-review without adding a new technical disposition. (7551b0b94df2)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-14T12:39:25.421Z sha 7551b0b :: needs maintainer review before merge. :: none

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc
vincentkoc merged commit cae155c into main Sep 15, 2026
226 of 237 checks passed
@vincentkoc
vincentkoc deleted the refactor/docker-image-version-parsing branch September 15, 2026 03:39
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 15, 2026
vincentkoc added a commit that referenced this pull request Sep 15, 2026
* commit 'd8e50a38fd1c4df6dd69bcbc155697c464e1be45': (23 commits)
  fix(cron): release queued reservations when activation fails (#141008)
  fix(gateway): reduce CPU work in session lists and searches (#148713)
  feat(gateway): add admin CPU profile diagnostics (#148004)
  fix(gateway): cap device-required probe cache to prevent unbounded growth (#147708)
  fix(ci): align Gateway E2E expectations (#148653)
  refactor(ai): remove unused overflow wrapper (#148719)
  feat: stage selected chat text as editable comments (#148649)
  fix(ci): admit reachable release refs with large histories (#148161)
  fix(agents): allow authorized email CLI actions (#148521)
  improve(agents): trim large tool results with less CPU (#148718)
  refactor(docker): share image version parsing (#148243)
  fix(ci): retain passing hosted checks after skipped duplicates (#148722)
  fix(update): report configuration failures during repair (#144819)
  refactor(imessage): share handle classification (#148229)
  fix(ui): keep the selected agent across Settings pages (#148667)
  test(telegram): reuse deferred fixture helper (#148501)
  fix(media): resize images before understanding (#122431)
  fix: preserve unfinished work during completed PR cleanup (#148704)
  refactor(migrate-hermes): reuse canonical config record coercion (#148645)
  perf(channels): reduce history worker metadata footprint (#148711)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M 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