Skip to content

fix(protocol): accept inherited config hint metadata - #197680

Merged
steipete merged 1 commit into
mainfrom
fix/2430-config-hint-validators
Nov 12, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/2430-config-hint-validators

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes full CI failing its generated-validator gate after #167743 added inherited-default config hints without regenerating the compiled protocol validator.

User Impact

Protocol clients can validate config lookup hints carrying the existing inheritedDefault field. No configuration, wire-version, or database migration is required. The Gateway's direct lookup response path was not observed to fail.

Why This Change Was Made

Regenerate the predicate from the canonical schema using pnpm gateway:validators:gen, and strengthen the existing lookup test to exercise the exported compiled validator. The generated output gains three lines for the already-declared optional boolean; authored production and test line counts are unchanged.

Related: #167743. The original failure also blocks native app tests in full CI.

Evidence

The strengthened test fails on exact base 4eb318d5eea7d5014772c41a0e480f8ab2b84dd5 because a valid inherited-default hint is rejected, and all 11 owner tests pass after regeneration. Generated-validator parity passes. The affected inherited-default browser tests pass (2), and bundled config enum E2E passes (1).

A synthetic 2,000-child config response with 500 validation calls per sample has base A/A wall times of 122.54/122.56 ms and fixed A/A times of 120.02/120.58 ms; CPU remains about 125–128 ms and observed heap growth is comparable. This is correctness evidence, not a performance claim. The predicate performs no database or workspace I/O.

Independent Codex autoreview of the complete local change against the pinned base, through P2, is scoped-clean with no actionable findings. The changed-file check reports only seven unrelated unused exports introduced by #197615; those same findings reproduce on exact parent 4eb318d5eea7d5014772c41a0e480f8ab2b84dd5 and are repaired separately in #197679. This PR does not suppress them. All other changed-file checks passed.

@clawsweeper

clawsweeper Bot commented Nov 12, 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 app: web-ui App: web-ui gateway Gateway runtime size: XS labels Nov 12, 2026
@steipete
steipete marked this pull request as ready for review November 12, 2026 09:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T10:01:13.736117Z f8bc2b1 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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. labels Nov 12, 2026
@clawsweeper clawsweeper Bot added 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 Nov 12, 2026
@clawsweeper

clawsweeper Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Regenerates the compiled config lookup validator to accept existing inherited-default metadata and strengthens its regression test.

Example: Validate a config lookup response with path "gateway", schema {}, hint {"inheritedDefault":true}, and children [].

  • Before: The compiled validator rejects the response despite the canonical schema allowing the field.
  • After: The compiled validator accepts the response and checks that inheritedDefault is boolean.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A minimal, source-verified repair with useful regression coverage and green exact-head CI; execution evidence for the specific predicate remains test-based.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored generated-validator repair is outside the contributor proof gate; supplied validation consists of reported base/head owner tests and parity checks plus successful exact-head CI, while the inspected historical UI screenshots do not prove this repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Protocol consumers using the exported compiled lookup validator can reject valid inherited-default hint metadata.
Reason: The maintainer-authored repair restores an existing schema contract and generated freshness without adding product behavior or configuration.

Regression provenance

Regression provenance — verified: source commit 5117315a991d by Marvinthebored; canonical PR #167743 (blame-to-merge-commit).

Merge readiness

✅ Ready for maintainer review

Keep open: this PR provides a focused repair for a validator mismatch still present on main, with no actionable correctness or security findings and a passing exact-head CI gate.

Priority: P2
Reviewed head: f8bc2b197b6cab15dd826b3752619081970368fc

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Gateway protocol package turns canonical TypeBox schemas into shipped predicates; config lookup responses enter its exported validator and produce a validation result and diagnostics.

flowchart LR
  A[Config hint producer] --> B[Config lookup response]
  B --> C[Exported protocol validator]
  D[Canonical schema] --> E[Validator generator]
  E --> F[Compiled predicate]
  F --> C
  C --> G[Validation result]
Loading

Technical review

Best possible solution:

Keep the canonical schema authoritative and land this generated-predicate repair with the existing compiled-validator regression.

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

Source inspection establishes that main rejects inheritedDefault in compiled lookup hints while the canonical schema accepts it; the PR reports an exact-base failing regression, but this review ran no target code.

Is this the best way to solve the issue?

This is the smallest complete repair: regenerate the existing predicate and exercise it through the existing exported validator without changing schemas, defaults, or ownership.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit f52fb07 adds packages/gateway-protocol/src/compiled/protocol.generated/predicates.js:9994 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f52fb07f74b1; files: packages/gateway-protocol/src/compiled/protocol.generated/predicates.js)
  • Marvinthebored: Raw commit 5117315 adds packages/gateway-protocol/src/schema/config.ts:358 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5117315a991d; files: packages/gateway-protocol/src/schema/config.ts)

PR surface

Source +3, Tests 0. Total +3 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 4 1 +3
Tests 1 4 4 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 8 5 +3

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: A concrete generated-validator mismatch blocks schema freshness checks and rejects valid metadata, with limited demonstrated runtime impact.
  • 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: A concrete generated-validator mismatch blocks schema freshness checks and rejects valid metadata, with limited demonstrated runtime impact.
  • 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 12, 2026, 5:15 AM ET / 10:15 UTC.

@steipete
steipete merged commit 9d8a514 into main Nov 12, 2026
208 of 211 checks passed
@steipete
steipete deleted the fix/2430-config-hint-validators branch November 12, 2026 10:52
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

app: web-ui App: web-ui gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

1 participant