Skip to content

fix(ci): publish vocabulary through verified pull requests - #35

Draft
vincentkoc wants to merge 2 commits into
mainfrom
fix/pr-only-publishers-20261121
Draft

vincentkoc wants to merge 2 commits into
mainfrom
fix/pr-only-publishers-20261121

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Publish the checked public-vocabulary artifact through a pull request and normal expected-head squash merge. The publisher retains unmerged candidates, validates the candidate's sole source parent, exact two-file scope and payload blobs, and requires the active strict GitHub Actions Publication merge admission rule plus non-fast-forward protection before posting its admission status. A concurrent main advance is rejected by the server instead of publishing stale generated data.

A trusted, main-only pull_request_target workflow admits fresh open-PR metadata on the exact event head. It never executes candidate code; obsolete events write no status. Candidate and provenance validation remain in the publisher. After one normal merge attempt, the publisher verifies the actual PR head/base repository, merge parent, payload, reachability, and current main before passing the merge SHA to the existing deployment job.

The existing discover/generate/check boundary, artifact retention, CPR pin, Cloudflare deployment, and refresh=false recovery path are preserved. Only the publisher and metadata gate gain admission status permission; no new credential is introduced.

Validation

  • Passed 39 real-Git fixtures executing the actual publisher shell and admission code: retained/open/orphan candidates, topology and scope rejection, exact status ordering, strict/wrong-App/missing-rule/redacted/exposed-bypass behavior, stale-event no-status behavior, bounded mergeability, ambiguous merge reconciliation, server-refused stale-base publication, and retargeted/foreign merge receipts.
  • Passed workflow parsing, focused Bash syntax and ShellCheck, Node syntax, and diff checks. Full actionlint's embedded-check process stalled; its task-owned process was stopped, then workflow parsing and focused shell checks passed separately.
  • Independent semantic review and fresh full-PR scoped autoreview found no actionable P0–P2 issue at this head.
  • Hosted checks for this updated head are pending. The prior head's check run passed 16 test files and Wrangler dry-run; that earlier result does not qualify the updated source.

Production delta for the complete PR is +188/-7 lines (net +181); tests are +248/-34 (net +214), with documentation counted separately. Production growth establishes the publisher's retained-candidate, strict admission, and exact merged-receipt ownership boundary in the existing workflow/module.

Activation boundary

Draft only: merging this workflow triggers the existing production Deploy workflow. Production merge remains held pending explicit approval. No workflow dispatch, production deployment, ruleset activation, or exclusion removal was performed for this update.

Before automatic publication, an administrator must verify the default-only strict Publication merge admission rule from GitHub Actions App 15368 with no bypass actors. Runtime accepts redacted bypass metadata, rejects exposed bypasses, and holds the candidate if required protection is absent. The repository remains excluded from the organization PR-only rule until an actual non-noop publisher run proves PR creation, normal merge, and the deployment receipt.

@clawsweeper

clawsweeper Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

🦞👀
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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. 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:feature Preliminary submission classification; full source review pending. labels Nov 21, 2026
@clawsweeper

clawsweeper Bot commented Nov 21, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

Publish checked vocabulary updates through a retained pull request and verify the squash-merge commit before deployment.

Example: A daily refresh changes data/public-vocabulary.json and src/public-vocabulary.ts.

  • Before: The publisher commits those files directly to main.
  • After: The publisher creates automation/public-vocabulary, squash-merges its PR, and verifies the merged payload before deployment.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, scoped maintenance with no blocking defect; real-Git fixtures and hosted checks support it, while hosted PR creation remains unexercised.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored workflow change has no changed application entry point requiring shipped-behavior proof; fixtures cover publication shell behavior, and the body explicitly defers hosted publication verification.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Direct-to-main vocabulary publishing prevents applying a repository policy that requires changes to pass through pull requests.
Reason: The existing feature owner authorizes the publication change and records a staged rollout while preserving artifact validation and deployment recovery.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored draft replaces the active direct-push publisher, and review found no blocking correctness or security defect.

Priority: P2
Reviewed head: 62d370a0f95d35f13ca02152d11a90ae9a9188f3

Before merge

None.

Findings

None.

Tests

  • Low-value test test/helpers/vocabulary-publication.mjs: Remove the duplicate orphan-same and orphan-different cases: they follow the same setup and mocked responses as pending-same and pending-different, and the PR-creation action is bypassed in both.
Agent review details

How this fits together

The Deploy workflow turns released OpenClaw metadata into a validated public-name vocabulary, publishes its two generated files, and deploys the checked commit to the Worker.

flowchart LR
  A[Stable releases] --> B[Generated vocabulary]
  B --> C[Trusted checks]
  C --> D[Retained candidate PR]
  D --> E[Verified squash commit]
  E --> F[Worker deployment]
Loading

Technical review

Best possible solution:

Retain the existing validation and deployment owners while publishing through one candidate PR and its verified squash-merge SHA.

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

This is a workflow maintenance change; current main visibly uses direct pushes, while the supplied fixtures exercise the replacement shell with real Git and simulated GitHub responses.

Is this the best way to solve the issue?

The change uses the existing publisher and deployment jobs, removes the direct-push path, and verifies the checked payload against the actual squash commit.

AGENTS.md: not found in the target repository.

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

Provenance checked

  • Vocabulary publication and matching documentation changes intended behavior with a stated reason (133ff85: Automate stable-release vocabulary maintenance using isolated generation, trusted checks, constrained fast-forward publication, and retryable deployment.)
  • Publication regression coverage keeps the original intent (133ff85: Verify that a concurrent main update prevents the former native push from overwriting it; the replacement fixtures exercise the new PR publication checks.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Introduced change and current main: The pinned diff replaces direct publication to main with candidate retention, PR creation, expected-head squash merge, and merged-parent and payload verification; the default branch remains at the supplied base. (.github/workflows/deploy.yml:150, 62d370a0f95d)
  • Maintainer direction and staged activation: The full PR body confirms maintainer authorship, a draft production hold, and continued exclusion from PR-only enforcement until an actual non-noop publication and deployment receipt succeed. (62d370a0f95d)
  • Hosted validation: https://github.com/openclaw/telemetry/actions/runs/44876836880 passed for the reviewed head; job metadata confirms successful checks and Wrangler dry-run, with publication and deployment skipped. Raw logs redirected to a blocked storage host, so their contents were not inspected. (.github/workflows/deploy.yml:107, 62d370a0f95d)
  • Original publication contract: feat(telemetry): maintain public vocabulary from stable releases #29 established isolated generation, trusted artifact validation, constrained direct publication, and exact-commit deployment recovery; this PR retains those owners while changing publication transport. (.github/workflows/deploy.yml:126, 133ff8562f72)
  • Pinned dependency contract: The workflow executes this action, making its contract relevant; its pinned source supports the selected paths, retained branch, and PR-number/head-SHA outputs, and leaves the unsigned candidate commit available locally. No AGENTS.md was present in its recursive tree. (src/create-pull-request.ts, 3ffccacd4605)
  • History inspection limit: Historical commit metadata, scoped history, current-main blame, and original changed blobs were readable; a historical git show --stat encountered an unavailable old blob, so introduction conclusions rely on the supplied provenance and independently read PR discussion. (.github/workflows/deploy.yml:126, 133ff8562f72)

Likely related people:

  • Vincent Koc: Raw commit 133ff85 adds .github/workflows/deploy.yml:126 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 133ff8562f72; files: .github/workflows/deploy.yml)
  • Peter Steinberger: Raw commit ef6a8e6 adds .github/workflows/deploy.yml:21 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: ef6a8e6943c7; files: .github/workflows/deploy.yml)

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 P2: This is a scoped maintenance improvement to scheduled vocabulary publication without an established urgent runtime regression.
  • add merge-risk: 🚨 automation: The change replaces the production publisher with token-created PRs and squash merges; the maintainer records staged activation that delays PR-only enforcement until a successful non-noop run.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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:

  • P2: This is a scoped maintenance improvement to scheduled vocabulary publication without an established urgent runtime regression.
  • merge-risk: 🚨 automation: The change replaces the production publisher with token-created PRs and squash merges; the maintainer records staged activation that delays PR-only enforcement until a successful non-noop run.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 21, 2026, 1:58 AM ET / 06:58 UTC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. P2 Normal priority bug or improvement 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant