Skip to content

fix(protocol): refresh approval reviewer models - #121725

Closed
vyctorbrzezowski wants to merge 1 commit into
mainfrom
fix/ci-heal-approval-generated-artifacts
Closed

vyctorbrzezowski wants to merge 1 commit into
mainfrom
fix/ci-heal-approval-generated-artifacts

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The authoritative approval resolve schemas carry optional reviewer metadata, but the generated Swift gateway models omitted that field. Generated-protocol checks therefore fail, and Swift clients cannot decode or encode reviewer data on those resolve payloads.

Why This Change Was Made

Regenerate the Swift protocol owner output so ApprovalResolveParams, ExecApprovalResolveParams, and PluginApprovalResolveParams each expose optional reviewer, default it to nil, assign it, and include its coding key.

The branch previously included a /learn assertion refresh. Current main now owns a stronger canonical repair in 8ae273603d8, so that duplicate change was removed during the final rebase.

User Impact

Swift clients remain compatible with payloads that omit reviewer metadata and now preserve reviewer metadata when it is present. No TypeScript runtime, configuration, dependency, or user workflow changes.

Evidence

  • pnpm protocol:check — passed protocol registry, schema generation, Swift generation check, Kotlin generation, protocol-since guard, and generated-diff guard.
  • git diff --check — passed.
  • Autoreview TruffleHog preflight — clean. The external Codex executable is unavailable in this orb; manual review found no issue in the deterministic one-file generated diff.
  • Final scope: one generated Swift file, +15/-3; production TypeScript +0/-0; tests +0/-0.
  • Required exact-head hosted CI remains the landing gate.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Aug 10, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 10, 2026 21:04
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 10, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Aug 10, 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 repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S and removed size: XS labels Aug 10, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the fix/ci-heal-approval-generated-artifacts branch from 21c6a4e to d0bba67 Compare August 10, 2026 21:32
@openclaw-barnacle openclaw-barnacle Bot added size: XS and removed agents Agent runtime and tooling size: S labels Aug 10, 2026
@vyctorbrzezowski vyctorbrzezowski changed the title fix(ci): regenerate protocol and plugin-SDK artifacts stale since the approval reviewer field fix(ci): refresh stale generated artifacts and the /learn prompt assertion Aug 10, 2026

Copy link
Copy Markdown
Contributor

Current main advanced to db879e73fa988e88e4b899fd39e06376d6d19d29, which already carries the dead-export repair and regenerated docs/.generated/plugin-sdk-api-baseline.jsonl. The current PR head d0bba67f1850a5b36b228c4dda32c37b9ec4aeac is now conflicting; its check-dependencies and Plugin SDK baseline failures were produced against the superseded base. A rebase/force rewrite that drops the baseline file and retains only GatewayModels.swift plus the /learn assertion should leave the still-unowned repairs and unblock the queued exact-head PRs.

@steipete
steipete force-pushed the fix/ci-heal-approval-generated-artifacts branch from d0bba67 to ca17356 Compare August 10, 2026 21:53
@openclaw-barnacle openclaw-barnacle Bot removed the docs Improvements or additions to documentation label Aug 10, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Aug 10, 2026
@clawsweeper

clawsweeper Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 10, 2026, 5:58 PM ET / 21:58 UTC.

ClawSweeper review

What this changes

The PR regenerates Swift approval-resolution models with the optional reviewer field and updates the /learn prompt test to assert the reuse-first instruction now emitted.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open. Current main still has the schema/prompt-derived inconsistencies, and this narrow branch brings both generated and test surfaces back in sync with no blocking correctness finding.

Priority: P2
Reviewed head: ca17356be454f8eceae328e91f3baf8c732b57a3

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned repair with no blocking review finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The PR is member-maintained and repairs generated/test consistency; its focused validation is supplemental rather than an external-contributor proof gate.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The PR is member-maintained and repairs generated/test consistency; its focused validation is supplemental rather than an external-contributor proof gate.
Evidence reviewed 6 items Current protocol contract: Current main declares optional reviewer metadata on all three approval-resolution parameter schemas; the native Swift output is therefore stale rather than the schema being incomplete.
Generated-model repair matches source: Current main omits reviewer from all three Swift resolution structs; the PR head adds the optional Codable property, defaulted initializer argument, and coding key in each matching model.
Prompt assertion repair: The current /learn prompt says to inspect proposals and live skills before creating anything, while current main still asserts the removed create-only wording; the PR asserts the emitted reuse-first sentence.
Findings None None.
Security None None.

How this fits together

Gateway protocol schemas feed generated Swift models for native OpenClaw clients. The /learn command converts a chat command into a Skill Workshop instruction, which its focused test protects against prompt drift.

flowchart LR
A[Gateway approval schemas] --> B[Swift model generator]
B --> C[Native client models]
D[Learn command] --> E[Skill Workshop instruction]
E --> F[Command behavior test]
Loading

Before merge

  • Complete next step (P2) - No repair dispatch is needed: this member-maintained branch already contains the narrow owner-aligned correction; exact-head hosted CI remains the normal landing gate.
Agent review details

Security

None.

PR surface

Tests +2, Other +12. Total +14 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 3 1 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 15 3 +12
Total 2 18 4 +14

Review metrics

Metric Value Why it matters
Production versus test delta generated client +15/-3; tests +3/-1; handwritten production +0/-0 The production delta is mechanical protocol output; the only handwritten change corrects an existing prompt contract assertion.

Technical review

Best possible solution:

Merge this generated-model and prompt-contract refresh once the exact-head hosted checks complete successfully.

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

Yes—source inspection reproduces both inconsistencies: current main’s schemas and emitted prompt disagree with its Swift artifact and focused assertion, respectively.

Is this the best way to solve the issue?

Yes. Regenerating at the protocol artifact boundary and updating the prompt-contract assertion is narrower and safer than changing the already-canonical schema or reuse-first instruction.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e0a4146f551b.

Labels

Label changes:

  • add P2: The stale derived outputs disrupt normal pull-request validation but have limited runtime blast radius.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR is member-maintained and repairs generated/test consistency; its focused validation is supplemental rather than an external-contributor proof gate.

Label justifications:

  • P2: The stale derived outputs disrupt normal pull-request validation but have limited runtime blast radius.
  • 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 PR is member-maintained and repairs generated/test consistency; its focused validation is supplemental rather than an external-contributor proof gate.

Evidence

What I checked:

Likely related people:

  • steipete: Peter Steinberger authored the current-main ancestor containing the protocol and prompt truth, specified the final narrow scope in discussion, and force-pushed the final reviewed head. (role: recent area contributor; confidence: medium; commits: 40817435e815, ca17356be454; files: packages/gateway-protocol/src/schema/approvals.ts, src/skills/workshop/learn-prompt.ts, apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift)

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.

@steipete
steipete force-pushed the fix/ci-heal-approval-generated-artifacts branch from ca17356 to af94ae2 Compare August 10, 2026 22:06
@steipete steipete changed the title fix(ci): refresh stale generated artifacts and the /learn prompt assertion fix(protocol): refresh approval reviewer models Aug 10, 2026
@steipete

Copy link
Copy Markdown
Contributor

Superseded by #121751, the requested single consolidated heal lane. It carries the same generator-owned Swift reviewer repair, credits @vyctorbrzezowski in the commit and PR body, and combines it with the remaining dead-export cleanup after the other classes landed directly on main.

Closing this conflicting duplicate now that the replacement PR exists. Thank you for tracing and proving the generated-model drift.

@steipete steipete closed this Aug 10, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Closing as superseded. Every item this PR carried has landed on main independently, so there is nothing left here to merge.

Item Canonical fix on main Status
GatewayModels.swift stale reviewer field b015af4b123 chore(protocol): refresh approval reviewer Swift models Covered — this branch no longer differs from main on that file
plugin-sdk-api-baseline.jsonl stale closure db879e73fa9 fix(ci): heal dead-export scan and refresh plugin-sdk baseline Covered — and main's regeneration supersedes this branch's, see note below
commands-learn.test.ts asserting deleted prompt text 8ae273603d8 test(commands): align learn prompt invariants Covered, with a stronger assertion than this branch used

Earlier revisions of this branch also carried a madge import-cycle cut and three approval test alignments. Those were superseded first, by 40817435e81 (cyclic runtime contracts), 2205c5df28f (native route selection semantics) and aeeacd9565a (gateway request mock type). Worth recording that 40817435e81 picked the same edge and the same destination this branch had chosen independently — ApprovalRequestChannelRouteClass relocated into the zero-import approval-types.ts leaf that already owned the sibling ChannelApprovalKind union.

Note on the baseline, since it is the one place this branch was actually wrong: its regenerated copy was produced before the type relocation landed, and baseline entries carry a closureHash over the transitive type closure rather than over declaration text alone. Moving a declaration between files therefore moves the hash even when the text is byte-identical. check-plugin-sdk-api-baseline caught that on this branch's last run, which is the correct outcome — main's own regeneration is authoritative.

Two observations from this work that outlive the PR:

  1. A red lane does not block the merge button; only the aggregate does. On fix: keep approval requests on the owning channel account #121673's head 968a0df9801 the topology lane reported failure at 20:04:45Z and the merge happened at 20:12:42Z. The required aggregate openclaw/ci-gate had not concluded at that moment — it resolved to failure at 20:13:31Z, 49 seconds after the merge.
  2. Pushes to main do not run the PR lanes. The check-runs attached to a main tip carry no check-plugin-sdk-api-baseline, no checks-fast-bundled-protocol, and no topology lane. A green-looking main is therefore not evidence that those lanes pass, which is why stale generated artifacts stay invisible until the next PR happens to run them.

@RomneyDa
RomneyDa deleted the fix/ci-heal-approval-generated-artifacts branch October 22, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

3 participants